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
af529308
Commit
af529308
authored
Apr 30, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
May 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Don't assume that nselem is valid in HTMLElement.
parent
791dd955
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
htmlelem.c
dlls/mshtml/htmlelem.c
+42
-0
htmlelem2.c
dlls/mshtml/htmlelem2.c
+10
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
af529308
...
...
@@ -138,6 +138,11 @@ static HRESULT WINAPI HTMLElement_setAttribute(IHTMLElement *iface, BSTR strAttr
WARN
(
"(%p)->(%s . %08x)
\n
"
,
This
,
debugstr_w
(
strAttributeName
),
lFlags
);
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
VariantInit
(
&
AttributeValueChanged
);
hres
=
VariantChangeType
(
&
AttributeValueChanged
,
&
AttributeValue
,
0
,
VT_BSTR
);
...
...
@@ -178,6 +183,11 @@ static HRESULT WINAPI HTMLElement_getAttribute(IHTMLElement *iface, BSTR strAttr
WARN
(
"(%p)->(%s %08x %p)
\n
"
,
This
,
debugstr_w
(
strAttributeName
),
lFlags
,
AttributeValue
);
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
V_VT
(
AttributeValue
)
=
VT_NULL
;
nsAString_Init
(
&
attr_str
,
strAttributeName
);
...
...
@@ -245,6 +255,11 @@ static HRESULT WINAPI HTMLElement_get_className(IHTMLElement *iface, BSTR *p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
nsAString_Init
(
&
class_str
,
NULL
);
nsres
=
nsIDOMHTMLElement_GetClassName
(
This
->
nselem
,
&
class_str
);
...
...
@@ -286,6 +301,15 @@ static HRESULT WINAPI HTMLElement_get_tagName(IHTMLElement *iface, BSTR *p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
nselem
)
{
static
const
WCHAR
comment_tagW
[]
=
{
'!'
,
0
};
WARN
(
"NULL nselem, assuming comment
\n
"
);
*
p
=
SysAllocString
(
comment_tagW
);
return
S_OK
;
}
nsAString_Init
(
&
tag_str
,
NULL
);
nsres
=
nsIDOMHTMLElement_GetTagName
(
This
->
nselem
,
&
tag_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
...
...
@@ -316,6 +340,11 @@ static HRESULT WINAPI HTMLElement_get_style(IHTMLElement *iface, IHTMLStyle **p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMElementCSSInlineStyle
,
(
void
**
)
&
nselemstyle
);
if
(
NS_FAILED
(
nsres
))
{
...
...
@@ -627,6 +656,11 @@ static HRESULT WINAPI HTMLElement_put_innerHTML(IHTMLElement *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMNSHTMLElement: %08x
\n
"
,
nsres
);
...
...
@@ -702,6 +736,11 @@ static HRESULT HTMLElement_InsertAdjacentNode(HTMLElement *This, BSTR where, nsI
static
const
WCHAR
wszAfterEnd
[]
=
{
'a'
,
'f'
,
't'
,
'e'
,
'r'
,
'E'
,
'n'
,
'd'
,
0
};
nsresult
nsres
;
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
if
(
!
strcmpiW
(
where
,
wszBeforeBegin
))
{
nsIDOMNode
*
unused
;
...
...
@@ -1513,6 +1552,9 @@ static BOOL is_elem_name(HTMLElement *elem, LPCWSTR name)
static
const
PRUnichar
nameW
[]
=
{
'n'
,
'a'
,
'm'
,
'e'
,
0
};
if
(
!
elem
->
nselem
)
return
FALSE
;
nsAString_Init
(
&
nsstr
,
NULL
);
nsIDOMHTMLElement_GetId
(
elem
->
nselem
,
&
nsstr
);
nsAString_GetData
(
&
nsstr
,
&
str
);
...
...
dlls/mshtml/htmlelem2.c
View file @
af529308
...
...
@@ -651,6 +651,11 @@ static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
TRACE
(
"(%p)->(%ld)
\n
"
,
This
,
v
);
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsIDOMNSHTMLElement_SetScrollTop
(
nselem
,
v
);
...
...
@@ -677,6 +682,11 @@ static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
TRACE
(
"(%p)->(%ld)
\n
"
,
This
,
v
);
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsIDOMNSHTMLElement_SetScrollLeft
(
nselem
,
v
);
...
...
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