Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bb829372
Commit
bb829372
authored
Jan 05, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle get/set Attribute.
parent
e50e78f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
6 deletions
+99
-6
htmlstyle.c
dlls/mshtml/htmlstyle.c
+63
-6
dom.c
dlls/mshtml/tests/dom.c
+36
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
bb829372
...
...
@@ -2048,18 +2048,75 @@ static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttribut
VARIANT
AttributeValue
,
LONG
lFlags
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s v%d %08x)
\n
"
,
This
,
debugstr_w
(
strAttributeName
),
V_VT
(
&
AttributeValue
),
lFlags
);
return
E_NOTIMPL
;
HRESULT
hres
;
DISPID
dispid
;
TRACE
(
"(%p)->(%s v%d %08x)
\n
"
,
This
,
debugstr_w
(
strAttributeName
),
V_VT
(
&
AttributeValue
),
lFlags
);
if
(
!
strAttributeName
)
return
E_INVALIDARG
;
if
(
lFlags
==
1
)
FIXME
(
"Parameter lFlags ignored
\n
"
);
hres
=
HTMLStyle_GetIDsOfNames
(
iface
,
&
IID_NULL
,
(
LPOLESTR
*
)
&
strAttributeName
,
1
,
LOCALE_USER_DEFAULT
,
&
dispid
);
if
(
hres
==
S_OK
)
{
VARIANT
ret
;
DISPID
dispidNamed
=
DISPID_PROPERTYPUT
;
DISPPARAMS
params
;
params
.
cArgs
=
1
;
params
.
rgvarg
=
&
AttributeValue
;
params
.
cNamedArgs
=
1
;
params
.
rgdispidNamedArgs
=
&
dispidNamed
;
hres
=
HTMLStyle_Invoke
(
iface
,
dispid
,
&
IID_NULL
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_PROPERTYPUT
,
&
params
,
&
ret
,
NULL
,
NULL
);
}
else
{
FIXME
(
"Custom attributes not supported.
\n
"
);
}
TRACE
(
"ret: %08x
\n
"
,
hres
);
return
hres
;
}
static
HRESULT
WINAPI
HTMLStyle_getAttribute
(
IHTMLStyle
*
iface
,
BSTR
strAttributeName
,
LONG
lFlags
,
VARIANT
*
AttributeValue
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s %08x %p)
\n
"
,
This
,
debugstr_w
(
strAttributeName
),
lFlags
,
AttributeValue
);
return
E_NOTIMPL
;
HRESULT
hres
;
DISPID
dispid
;
TRACE
(
"(%p)->(%s v%p %08x)
\n
"
,
This
,
debugstr_w
(
strAttributeName
),
AttributeValue
,
lFlags
);
if
(
!
AttributeValue
||
!
strAttributeName
)
return
E_INVALIDARG
;
if
(
lFlags
==
1
)
FIXME
(
"Parameter lFlags ignored
\n
"
);
hres
=
HTMLStyle_GetIDsOfNames
(
iface
,
&
IID_NULL
,
(
LPOLESTR
*
)
&
strAttributeName
,
1
,
LOCALE_USER_DEFAULT
,
&
dispid
);
if
(
hres
==
S_OK
)
{
DISPPARAMS
params
=
{
NULL
,
NULL
,
0
,
0
};
hres
=
HTMLStyle_Invoke
(
iface
,
dispid
,
&
IID_NULL
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_PROPERTYGET
,
&
params
,
AttributeValue
,
NULL
,
NULL
);
}
else
{
FIXME
(
"Custom attributes not supported.
\n
"
);
}
return
hres
;
}
static
HRESULT
WINAPI
HTMLStyle_removeAttribute
(
IHTMLStyle
*
iface
,
BSTR
strAttributeName
,
...
...
dlls/mshtml/tests/dom.c
View file @
bb829372
...
...
@@ -2750,6 +2750,42 @@ static void test_default_style(IHTMLStyle *style)
ok
(
hres
==
S_OK
,
"put_overflow failed: %08x
\n
"
,
hres
);
SysFreeString
(
sOverflowDefault
);
/* Attribute Tests*/
hres
=
IHTMLStyle_getAttribute
(
style
,
NULL
,
1
,
&
v
);
ok
(
hres
==
E_INVALIDARG
,
"getAttribute failed: %08x
\n
"
,
hres
);
str
=
a2bstr
(
"position"
);
hres
=
IHTMLStyle_getAttribute
(
style
,
str
,
1
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"getAttribute failed: %08x
\n
"
,
hres
);
hres
=
IHTMLStyle_getAttribute
(
style
,
str
,
1
,
&
v
);
ok
(
hres
==
S_OK
,
"getAttribute failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"type failed: %d
\n
"
,
V_VT
(
&
v
));
VariantClear
(
&
v
);
hres
=
IHTMLStyle_setAttribute
(
style
,
NULL
,
v
,
1
);
ok
(
hres
==
E_INVALIDARG
,
"getAttribute failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"absolute"
);
hres
=
IHTMLStyle_setAttribute
(
style
,
str
,
v
,
1
);
ok
(
hres
==
S_OK
,
"setAttribute failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
hres
=
IHTMLStyle_getAttribute
(
style
,
str
,
1
,
&
v
);
ok
(
hres
==
S_OK
,
"getAttribute failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"type failed: %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"absolute"
),
"str=%s
\n
"
,
dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
NULL
;
hres
=
IHTMLStyle_setAttribute
(
style
,
str
,
v
,
1
);
ok
(
hres
==
S_OK
,
"setAttribute failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_QueryInterface
(
style
,
&
IID_IHTMLStyle2
,
(
void
**
)
&
style2
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLStyle2 iface: %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment