Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3cac8d22
Commit
3cac8d22
authored
Feb 12, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Pass element as nsIDOMElement to get_elem_attr_value.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54a746f1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
22 deletions
+22
-22
editor.c
dlls/mshtml/editor.c
+1
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+3
-3
htmlelemcol.c
dlls/mshtml/htmlelemcol.c
+2
-2
htmlform.c
dlls/mshtml/htmlform.c
+7
-7
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
pluginhost.c
dlls/mshtml/pluginhost.c
+2
-2
propbag.c
dlls/mshtml/propbag.c
+3
-3
script.c
dlls/mshtml/script.c
+3
-3
No files found.
dlls/mshtml/editor.c
View file @
3cac8d22
...
...
@@ -295,7 +295,7 @@ static void get_font_size(HTMLDocument *This, WCHAR *ret)
TRACE
(
"found font tag %p
\n
"
,
elem
);
get_elem_attr_value
(
elem
,
sizeW
,
&
val_str
,
&
val
);
get_elem_attr_value
(
(
nsIDOMElement
*
)
elem
,
sizeW
,
&
val_str
,
&
val
);
if
(
*
val
)
{
TRACE
(
"found size %s
\n
"
,
debugstr_w
(
val
));
strcpyW
(
ret
,
val
);
...
...
dlls/mshtml/htmlelem.c
View file @
3cac8d22
...
...
@@ -166,14 +166,14 @@ HRESULT replace_node_by_html(nsIDOMHTMLDocument *nsdoc, nsIDOMNode *nsnode, cons
return
hres
;
}
nsresult
get_elem_attr_value
(
nsIDOM
HTML
Element
*
nselem
,
const
WCHAR
*
name
,
nsAString
*
val_str
,
const
PRUnichar
**
val
)
nsresult
get_elem_attr_value
(
nsIDOMElement
*
nselem
,
const
WCHAR
*
name
,
nsAString
*
val_str
,
const
PRUnichar
**
val
)
{
nsAString
name_str
;
nsresult
nsres
;
nsAString_InitDepend
(
&
name_str
,
name
);
nsAString_Init
(
val_str
,
NULL
);
nsres
=
nsIDOM
HTML
Element_GetAttribute
(
nselem
,
&
name_str
,
val_str
);
nsres
=
nsIDOMElement_GetAttribute
(
nselem
,
&
name_str
,
val_str
);
nsAString_Finish
(
&
name_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetAttribute(%s) failed: %08x
\n
"
,
debugstr_w
(
name
),
nsres
);
...
...
@@ -192,7 +192,7 @@ HRESULT elem_string_attr_getter(HTMLElement *elem, const WCHAR *name, BOOL use_n
nsresult
nsres
;
HRESULT
hres
=
S_OK
;
nsres
=
get_elem_attr_value
(
elem
->
nselem
,
name
,
&
val_str
,
&
val
);
nsres
=
get_elem_attr_value
(
elem
->
dom_element
,
name
,
&
val_str
,
&
val
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
...
...
dlls/mshtml/htmlelemcol.c
View file @
3cac8d22
...
...
@@ -381,14 +381,14 @@ static BOOL is_elem_name(HTMLElement *elem, LPCWSTR name)
return
FALSE
;
nsAString_Init
(
&
nsstr
,
NULL
);
nsIDOM
HTMLElement_GetId
(
elem
->
nselem
,
&
nsstr
);
nsIDOM
Element_GetId
(
elem
->
dom_element
,
&
nsstr
);
nsAString_GetData
(
&
nsstr
,
&
str
);
if
(
!
strcmpiW
(
str
,
name
))
{
nsAString_Finish
(
&
nsstr
);
return
TRUE
;
}
nsres
=
get_elem_attr_value
(
elem
->
nselem
,
nameW
,
&
nsstr
,
&
str
);
nsres
=
get_elem_attr_value
(
elem
->
dom_element
,
nameW
,
&
nsstr
,
&
str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
ret
=
!
strcmpiW
(
str
,
name
);
nsAString_Finish
(
&
nsstr
);
...
...
dlls/mshtml/htmlform.c
View file @
3cac8d22
...
...
@@ -671,7 +671,7 @@ static HRESULT HTMLFormElement_get_dispid(HTMLDOMNode *iface,
nsAString_Init
(
&
nsstr
,
NULL
);
for
(
i
=
0
;
i
<
len
;
++
i
)
{
nsIDOMNode
*
nsitem
;
nsIDOM
HTMLElement
*
nshtml_
elem
;
nsIDOM
Element
*
elem
;
const
PRUnichar
*
str
;
nsres
=
nsIDOMHTMLCollection_Item
(
elements
,
i
,
&
nsitem
);
...
...
@@ -681,7 +681,7 @@ static HRESULT HTMLFormElement_get_dispid(HTMLDOMNode *iface,
break
;
}
nsres
=
nsIDOMNode_QueryInterface
(
nsitem
,
&
IID_nsIDOM
HTMLElement
,
(
void
**
)
&
nshtml_
elem
);
nsres
=
nsIDOMNode_QueryInterface
(
nsitem
,
&
IID_nsIDOM
Element
,
(
void
**
)
&
elem
);
nsIDOMNode_Release
(
nsitem
);
if
(
NS_FAILED
(
nsres
))
{
FIXME
(
"Failed to get nsIDOMHTMLNode interface: 0x%08x
\n
"
,
nsres
);
...
...
@@ -690,16 +690,16 @@ static HRESULT HTMLFormElement_get_dispid(HTMLDOMNode *iface,
}
/* compare by id attr */
nsres
=
nsIDOM
HTMLElement_GetId
(
nshtml_
elem
,
&
nsstr
);
nsres
=
nsIDOM
Element_GetId
(
elem
,
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
FIXME
(
"GetId failed: 0x%08x
\n
"
,
nsres
);
nsIDOM
HTMLElement_Release
(
nshtml_
elem
);
nsIDOM
Element_Release
(
elem
);
hres
=
E_FAIL
;
break
;
}
nsAString_GetData
(
&
nsstr
,
&
str
);
if
(
!
strcmpiW
(
str
,
name
))
{
nsIDOM
HTMLElement_Release
(
nshtml_
elem
);
nsIDOM
Element_Release
(
elem
);
/* FIXME: using index for dispid */
*
pid
=
MSHTML_DISPID_CUSTOM_MIN
+
i
;
hres
=
S_OK
;
...
...
@@ -707,8 +707,8 @@ static HRESULT HTMLFormElement_get_dispid(HTMLDOMNode *iface,
}
/* compare by name attr */
nsres
=
get_elem_attr_value
(
nshtml_
elem
,
nameW
,
&
name_str
,
&
str
);
nsIDOM
HTMLElement_Release
(
nshtml_
elem
);
nsres
=
get_elem_attr_value
(
elem
,
nameW
,
&
name_str
,
&
str
);
nsIDOM
Element_Release
(
elem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
if
(
!
strcmpiW
(
str
,
name
))
{
nsAString_Finish
(
&
name_str
);
...
...
dlls/mshtml/mshtml_private.h
View file @
3cac8d22
...
...
@@ -1095,7 +1095,7 @@ HRESULT attr_value_to_string(VARIANT*) DECLSPEC_HIDDEN;
HRESULT
get_elem_attr_value_by_dispid
(
HTMLElement
*
,
DISPID
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_elem_source_index
(
HTMLElement
*
,
LONG
*
)
DECLSPEC_HIDDEN
;
nsresult
get_elem_attr_value
(
nsIDOM
HTML
Element
*
,
const
WCHAR
*
,
nsAString
*
,
const
PRUnichar
**
)
DECLSPEC_HIDDEN
;
nsresult
get_elem_attr_value
(
nsIDOMElement
*
,
const
WCHAR
*
,
nsAString
*
,
const
PRUnichar
**
)
DECLSPEC_HIDDEN
;
HRESULT
elem_string_attr_getter
(
HTMLElement
*
,
const
WCHAR
*
,
BOOL
,
BSTR
*
)
DECLSPEC_HIDDEN
;
HRESULT
elem_string_attr_setter
(
HTMLElement
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/pluginhost.c
View file @
3cac8d22
...
...
@@ -1669,7 +1669,7 @@ static BOOL get_elem_clsid(nsIDOMHTMLElement *elem, CLSID *clsid)
static
const
PRUnichar
classidW
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'i'
,
'd'
,
0
};
nsres
=
get_elem_attr_value
(
elem
,
classidW
,
&
val_str
,
&
val
);
nsres
=
get_elem_attr_value
(
(
nsIDOMElement
*
)
elem
,
classidW
,
&
val_str
,
&
val
);
if
(
NS_SUCCEEDED
(
nsres
))
{
if
(
*
val
)
ret
=
parse_classid
(
val
,
clsid
);
...
...
@@ -1907,7 +1907,7 @@ static void check_codebase(HTMLInnerWindow *window, nsIDOMHTMLElement *nselem)
static
const
PRUnichar
codebaseW
[]
=
{
'c'
,
'o'
,
'd'
,
'e'
,
'b'
,
'a'
,
's'
,
'e'
,
0
};
nsres
=
get_elem_attr_value
(
nselem
,
codebaseW
,
&
val_str
,
&
val
);
nsres
=
get_elem_attr_value
(
(
nsIDOMElement
*
)
nselem
,
codebaseW
,
&
val_str
,
&
val
);
if
(
NS_SUCCEEDED
(
nsres
))
{
if
(
*
val
)
{
hres
=
CoInternetCombineUrlEx
(
window
->
base
.
outer_window
->
uri
,
val
,
0
,
&
uri
,
0
);
...
...
dlls/mshtml/propbag.c
View file @
3cac8d22
...
...
@@ -273,7 +273,7 @@ static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag)
const
PRUnichar
*
name
,
*
value
;
nsAString
name_str
,
value_str
;
nsIDOMHTMLCollection
*
params
;
nsIDOM
HTML
Element
*
param_elem
;
nsIDOMElement
*
param_elem
;
UINT32
length
,
i
;
nsIDOMNode
*
nsnode
;
nsresult
nsres
;
...
...
@@ -300,7 +300,7 @@ static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag)
break
;
}
nsres
=
nsIDOMNode_QueryInterface
(
nsnode
,
&
IID_nsIDOM
HTML
Element
,
(
void
**
)
&
param_elem
);
nsres
=
nsIDOMNode_QueryInterface
(
nsnode
,
&
IID_nsIDOMElement
,
(
void
**
)
&
param_elem
);
nsIDOMNode_Release
(
nsnode
);
if
(
NS_FAILED
(
nsres
))
{
hres
=
E_FAIL
;
...
...
@@ -318,7 +318,7 @@ static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag)
nsAString_Finish
(
&
name_str
);
}
nsIDOM
HTML
Element_Release
(
param_elem
);
nsIDOMElement_Release
(
param_elem
);
if
(
FAILED
(
hres
))
break
;
if
(
NS_FAILED
(
nsres
))
{
...
...
dlls/mshtml/script.c
View file @
3cac8d22
...
...
@@ -1205,7 +1205,7 @@ static BOOL get_guid_from_language(LPCWSTR type, GUID *guid)
static
BOOL
get_script_guid
(
HTMLInnerWindow
*
window
,
nsIDOMHTMLScriptElement
*
nsscript
,
GUID
*
guid
)
{
nsIDOM
HTML
Element
*
nselem
;
nsIDOMElement
*
nselem
;
const
PRUnichar
*
language
;
nsAString
val_str
;
BOOL
ret
=
FALSE
;
...
...
@@ -1229,11 +1229,11 @@ static BOOL get_script_guid(HTMLInnerWindow *window, nsIDOMHTMLScriptElement *ns
ERR
(
"GetType failed: %08x
\n
"
,
nsres
);
}
nsres
=
nsIDOMHTMLScriptElement_QueryInterface
(
nsscript
,
&
IID_nsIDOM
HTML
Element
,
(
void
**
)
&
nselem
);
nsres
=
nsIDOMHTMLScriptElement_QueryInterface
(
nsscript
,
&
IID_nsIDOMElement
,
(
void
**
)
&
nselem
);
assert
(
nsres
==
NS_OK
);
nsres
=
get_elem_attr_value
(
nselem
,
languageW
,
&
val_str
,
&
language
);
nsIDOM
HTML
Element_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
if
(
*
language
)
{
ret
=
get_guid_from_language
(
language
,
guid
);
...
...
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