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
6e1ad65d
Commit
6e1ad65d
authored
Aug 23, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Remove no longer needed get_attr_from_nselem function.
parent
1d4d1068
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
56 deletions
+2
-56
htmlelem3.c
dlls/mshtml/htmlelem3.c
+2
-56
No files found.
dlls/mshtml/htmlelem3.c
View file @
6e1ad65d
...
...
@@ -556,58 +556,6 @@ static HRESULT WINAPI HTMLElement4_normalize(IHTMLElement4 *iface)
return
E_NOTIMPL
;
}
/* FIXME: This should be done in IDispatchEx implementation layer */
static
BOOL
get_attr_from_nselem
(
HTMLElement
*
This
,
BSTR
name
,
DISPID
*
dispid
)
{
const
PRUnichar
*
v
;
nsIDOMAttr
*
nsattr
;
nsAString
nsstr
;
BSTR
val
=
NULL
;
nsresult
nsres
;
HRESULT
hres
;
nsAString_InitDepend
(
&
nsstr
,
name
);
nsres
=
nsIDOMHTMLElement_GetAttributeNode
(
This
->
nselem
,
&
nsstr
,
&
nsattr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
)
||
!
nsattr
)
return
FALSE
;
FIXME
(
"HACK
\n
"
);
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMAttr_GetNodeValue
(
nsattr
,
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
nsAString_Finish
(
&
nsstr
);
return
FALSE
;
}
nsAString_GetData
(
&
nsstr
,
&
v
);
if
(
*
v
)
{
val
=
SysAllocString
(
v
);
if
(
!
val
)
{
nsAString_Finish
(
&
nsstr
);
return
FALSE
;
}
}
nsAString_Finish
(
&
nsstr
);
hres
=
IDispatchEx_GetDispID
(
&
This
->
node
.
dispex
.
IDispatchEx_iface
,
name
,
fdexNameEnsure
,
dispid
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
arg
;
DISPPARAMS
dp
=
{
&
arg
,
NULL
,
1
,
0
};
EXCEPINFO
ei
;
V_VT
(
&
arg
)
=
VT_BSTR
;
V_BSTR
(
&
arg
)
=
val
;
memset
(
&
ei
,
0
,
sizeof
(
ei
));
hres
=
IDispatchEx_InvokeEx
(
&
This
->
node
.
dispex
.
IDispatchEx_iface
,
*
dispid
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_PROPERTYPUT
,
&
dp
,
NULL
,
&
ei
,
NULL
);
}
SysFreeString
(
val
);
return
SUCCEEDED
(
hres
);
}
static
HRESULT
WINAPI
HTMLElement4_getAttributeNode
(
IHTMLElement4
*
iface
,
BSTR
bstrname
,
IHTMLDOMAttribute
**
ppAttribute
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement4
(
iface
);
...
...
@@ -619,10 +567,8 @@ static HRESULT WINAPI HTMLElement4_getAttributeNode(IHTMLElement4 *iface, BSTR b
hres
=
IDispatchEx_GetDispID
(
&
This
->
node
.
dispex
.
IDispatchEx_iface
,
bstrname
,
fdexNameCaseInsensitive
,
&
dispid
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
if
(
!
get_attr_from_nselem
(
This
,
bstrname
,
&
dispid
))
{
*
ppAttribute
=
NULL
;
return
S_OK
;
}
*
ppAttribute
=
NULL
;
return
S_OK
;
}
else
if
(
FAILED
(
hres
))
{
return
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