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
821b1090
Commit
821b1090
authored
Jul 27, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Jul 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement getAttributeNS for Elements.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
840ec530
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
2 deletions
+58
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+57
-2
nsembed.c
dlls/mshtml/nsembed.c
+1
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
821b1090
...
...
@@ -4813,8 +4813,33 @@ static HRESULT WINAPI HTMLElement6_Invoke(IHTMLElement6 *iface, DISPID dispIdMem
static
HRESULT
WINAPI
HTMLElement6_getAttributeNS
(
IHTMLElement6
*
iface
,
VARIANT
*
pvarNS
,
BSTR
strAttributeName
,
VARIANT
*
AttributeValue
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement6
(
iface
);
FIXME
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_variant
(
pvarNS
),
debugstr_w
(
strAttributeName
),
AttributeValue
);
return
E_NOTIMPL
;
nsAString
ns_str
,
name_str
,
value_str
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_variant
(
pvarNS
),
debugstr_w
(
strAttributeName
),
AttributeValue
);
if
(
!
This
->
dom_element
)
{
FIXME
(
"No dom_element
\n
"
);
return
E_NOTIMPL
;
}
hres
=
variant_to_nsstr
(
pvarNS
,
FALSE
,
&
ns_str
);
if
(
FAILED
(
hres
))
return
hres
;
nsAString_InitDepend
(
&
name_str
,
strAttributeName
);
nsAString_InitDepend
(
&
value_str
,
NULL
);
nsres
=
nsIDOMElement_GetAttributeNS
(
This
->
dom_element
,
&
ns_str
,
&
name_str
,
&
value_str
);
nsAString_Finish
(
&
ns_str
);
nsAString_Finish
(
&
name_str
);
hres
=
return_nsstr_variant
(
nsres
,
&
value_str
,
0
,
AttributeValue
);
if
(
SUCCEEDED
(
hres
)
&&
V_VT
(
AttributeValue
)
==
VT_NULL
)
{
V_VT
(
AttributeValue
)
=
VT_BSTR
;
V_BSTR
(
AttributeValue
)
=
NULL
;
}
return
hres
;
}
static
HRESULT
WINAPI
HTMLElement6_setAttributeNS
(
IHTMLElement6
*
iface
,
VARIANT
*
pvarNS
,
BSTR
strAttributeName
,
VARIANT
*
pvarAttributeValue
)
...
...
@@ -6791,6 +6816,35 @@ static IHTMLEventObj *HTMLElement_set_current_event(DispatchEx *dispex, IHTMLEve
return
default_set_current_event
(
This
->
node
.
doc
->
window
,
event
);
}
static
HRESULT
IHTMLElement6_getAttributeNS_hook
(
DispatchEx
*
dispex
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
res
,
EXCEPINFO
*
ei
,
IServiceProvider
*
caller
)
{
VARIANT
args
[
2
];
HRESULT
hres
;
DISPPARAMS
new_dp
=
{
args
,
NULL
,
2
,
0
};
if
(
!
(
flags
&
DISPATCH_METHOD
)
||
dp
->
cArgs
<
2
||
dp
->
cNamedArgs
)
return
S_FALSE
;
switch
(
V_VT
(
&
dp
->
rgvarg
[
dp
->
cArgs
-
1
]))
{
case
VT_EMPTY
:
case
VT_BSTR
:
case
VT_NULL
:
return
S_FALSE
;
default:
break
;
}
hres
=
change_type
(
&
args
[
1
],
&
dp
->
rgvarg
[
dp
->
cArgs
-
1
],
VT_BSTR
,
caller
);
if
(
FAILED
(
hres
))
return
hres
;
args
[
0
]
=
dp
->
rgvarg
[
dp
->
cArgs
-
2
];
hres
=
dispex_call_builtin
(
dispex
,
DISPID_IHTMLELEMENT6_GETATTRIBUTENS
,
&
new_dp
,
res
,
ei
,
caller
);
VariantClear
(
&
args
[
1
]);
return
hres
;
}
static
HRESULT
IHTMLElement6_setAttribute_hook
(
DispatchEx
*
dispex
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
res
,
EXCEPINFO
*
ei
,
IServiceProvider
*
caller
)
{
...
...
@@ -6823,6 +6877,7 @@ static HRESULT IHTMLElement6_setAttribute_hook(DispatchEx *dispex, WORD flags, D
void
HTMLElement_init_dispex_info
(
dispex_data_t
*
info
,
compat_mode_t
mode
)
{
static
const
dispex_hook_t
elem6_ie10_hooks
[]
=
{
{
DISPID_IHTMLELEMENT6_GETATTRIBUTENS
,
IHTMLElement6_getAttributeNS_hook
},
{
DISPID_IHTMLELEMENT6_IE9_SETATTRIBUTE
,
IHTMLElement6_setAttribute_hook
},
{
DISPID_UNKNOWN
}
};
...
...
dlls/mshtml/nsembed.c
View file @
821b1090
...
...
@@ -998,6 +998,7 @@ HRESULT variant_to_nsstr(VARIANT *v, BOOL hex_int, nsAString *nsstr)
WCHAR
buf
[
32
];
switch
(
V_VT
(
v
))
{
case
VT_EMPTY
:
case
VT_NULL
:
nsAString_InitDepend
(
nsstr
,
NULL
);
return
S_OK
;
...
...
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