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
64d4efe9
Commit
64d4efe9
authored
Sep 16, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Move node list to HTMLDocumentNode.
parent
95080eac
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
86 additions
and
86 deletions
+86
-86
htmlbody.c
dlls/mshtml/htmlbody.c
+5
-5
htmlcomment.c
dlls/mshtml/htmlcomment.c
+1
-1
htmlcurstyle.c
dlls/mshtml/htmlcurstyle.c
+2
-2
htmldoc.c
dlls/mshtml/htmldoc.c
+9
-9
htmldoc3.c
dlls/mshtml/htmldoc3.c
+4
-4
htmldoc5.c
dlls/mshtml/htmldoc5.c
+1
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+8
-8
htmlelem2.c
dlls/mshtml/htmlelem2.c
+1
-1
htmlelemcol.c
dlls/mshtml/htmlelemcol.c
+3
-3
htmlevent.c
dlls/mshtml/htmlevent.c
+19
-19
htmlevent.h
dlls/mshtml/htmlevent.h
+3
-3
htmliframe.c
dlls/mshtml/htmliframe.c
+2
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+8
-8
htmloption.c
dlls/mshtml/htmloption.c
+3
-3
htmltextnode.c
dlls/mshtml/htmltextnode.c
+1
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+11
-11
mutation.c
dlls/mshtml/mutation.c
+1
-1
nsembed.c
dlls/mshtml/nsembed.c
+1
-1
nsevents.c
dlls/mshtml/nsevents.c
+2
-2
txtrange.c
dlls/mshtml/txtrange.c
+1
-1
No files found.
dlls/mshtml/htmlbody.c
View file @
64d4efe9
...
@@ -606,12 +606,12 @@ static HRESULT WINAPI HTMLBodyElement_createTextRange(IHTMLBodyElement *iface, I
...
@@ -606,12 +606,12 @@ static HRESULT WINAPI HTMLBodyElement_createTextRange(IHTMLBodyElement *iface, I
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
range
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
range
);
if
(
!
This
->
textcont
.
element
.
node
.
doc
->
nsdoc
)
{
if
(
!
This
->
textcont
.
element
.
node
.
doc
->
basedoc
.
nsdoc
)
{
WARN
(
"No nsdoc
\n
"
);
WARN
(
"No nsdoc
\n
"
);
return
E_UNEXPECTED
;
return
E_UNEXPECTED
;
}
}
nsres
=
nsIDOMDocument_QueryInterface
(
This
->
textcont
.
element
.
node
.
doc
->
nsdoc
,
&
IID_nsIDOMDocumentRange
,
nsres
=
nsIDOMDocument_QueryInterface
(
This
->
textcont
.
element
.
node
.
doc
->
basedoc
.
nsdoc
,
&
IID_nsIDOMDocumentRange
,
(
void
**
)
&
nsdocrange
);
(
void
**
)
&
nsdocrange
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMDocumentRabge iface: %08x
\n
"
,
nsres
);
ERR
(
"Could not get nsIDOMDocumentRabge iface: %08x
\n
"
,
nsres
);
...
@@ -629,7 +629,7 @@ static HRESULT WINAPI HTMLBodyElement_createTextRange(IHTMLBodyElement *iface, I
...
@@ -629,7 +629,7 @@ static HRESULT WINAPI HTMLBodyElement_createTextRange(IHTMLBodyElement *iface, I
nsIDOMDocumentRange_Release
(
nsdocrange
);
nsIDOMDocumentRange_Release
(
nsdocrange
);
hres
=
HTMLTxtRange_Create
(
This
->
textcont
.
element
.
node
.
doc
->
doc_node
,
nsrange
,
range
);
hres
=
HTMLTxtRange_Create
(
This
->
textcont
.
element
.
node
.
doc
->
basedoc
.
doc_node
,
nsrange
,
range
);
nsIDOMRange_Release
(
nsrange
);
nsIDOMRange_Release
(
nsrange
);
return
hres
;
return
hres
;
...
@@ -725,8 +725,8 @@ static event_target_t **HTMLBodyElement_get_event_target(HTMLDOMNode *iface)
...
@@ -725,8 +725,8 @@ static event_target_t **HTMLBodyElement_get_event_target(HTMLDOMNode *iface)
{
{
HTMLBodyElement
*
This
=
HTMLBODY_NODE_THIS
(
iface
);
HTMLBodyElement
*
This
=
HTMLBODY_NODE_THIS
(
iface
);
return
This
->
textcont
.
element
.
node
.
doc
&&
This
->
textcont
.
element
.
node
.
doc
->
window
return
This
->
textcont
.
element
.
node
.
doc
&&
This
->
textcont
.
element
.
node
.
doc
->
basedoc
.
window
?
&
This
->
textcont
.
element
.
node
.
doc
->
window
->
event_target
?
&
This
->
textcont
.
element
.
node
.
doc
->
basedoc
.
window
->
event_target
:
&
This
->
textcont
.
element
.
node
.
event_target
;
:
&
This
->
textcont
.
element
.
node
.
event_target
;
}
}
...
...
dlls/mshtml/htmlcomment.c
View file @
64d4efe9
...
@@ -186,7 +186,7 @@ static dispex_static_data_t HTMLCommentElement_dispex = {
...
@@ -186,7 +186,7 @@ static dispex_static_data_t HTMLCommentElement_dispex = {
HTMLCommentElement_iface_tids
HTMLCommentElement_iface_tids
};
};
HTMLElement
*
HTMLCommentElement_Create
(
HTMLDocument
*
doc
,
nsIDOMNode
*
nsnode
)
HTMLElement
*
HTMLCommentElement_Create
(
HTMLDocument
Node
*
doc
,
nsIDOMNode
*
nsnode
)
{
{
HTMLCommentElement
*
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
HTMLCommentElement
*
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
...
...
dlls/mshtml/htmlcurstyle.c
View file @
64d4efe9
...
@@ -899,12 +899,12 @@ HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
...
@@ -899,12 +899,12 @@ HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
HTMLCurrentStyle
*
ret
;
HTMLCurrentStyle
*
ret
;
nsresult
nsres
;
nsresult
nsres
;
if
(
!
elem
->
node
.
doc
->
nsdoc
)
{
if
(
!
elem
->
node
.
doc
->
basedoc
.
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
return
E_UNEXPECTED
;
}
}
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
elem
->
node
.
doc
->
nsdoc
,
&
IID_nsIDOMDocumentView
,
(
void
**
)
&
nsdocview
);
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
elem
->
node
.
doc
->
basedoc
.
nsdoc
,
&
IID_nsIDOMDocumentView
,
(
void
**
)
&
nsdocview
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMDocumentView: %08x
\n
"
,
nsres
);
ERR
(
"Could not get nsIDOMDocumentView: %08x
\n
"
,
nsres
);
return
E_FAIL
;
return
E_FAIL
;
...
...
dlls/mshtml/htmldoc.c
View file @
64d4efe9
...
@@ -124,7 +124,7 @@ static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCo
...
@@ -124,7 +124,7 @@ static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCo
}
}
if
(
nselem
)
{
if
(
nselem
)
{
*
p
=
create_all_collection
(
get_node
(
This
,
(
nsIDOMNode
*
)
nselem
,
TRUE
),
TRUE
);
*
p
=
create_all_collection
(
get_node
(
This
->
doc_node
,
(
nsIDOMNode
*
)
nselem
,
TRUE
),
TRUE
);
nsIDOMElement_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
}
else
{
}
else
{
*
p
=
NULL
;
*
p
=
NULL
;
...
@@ -154,7 +154,7 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement
...
@@ -154,7 +154,7 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement
}
}
if
(
nsbody
)
{
if
(
nsbody
)
{
node
=
get_node
(
This
,
(
nsIDOMNode
*
)
nsbody
,
TRUE
);
node
=
get_node
(
This
->
doc_node
,
(
nsIDOMNode
*
)
nsbody
,
TRUE
);
nsIDOMHTMLElement_Release
(
nsbody
);
nsIDOMHTMLElement_Release
(
nsbody
);
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
p
);
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
p
);
...
@@ -198,7 +198,7 @@ static HRESULT WINAPI HTMLDocument_get_images(IHTMLDocument2 *iface, IHTMLElemen
...
@@ -198,7 +198,7 @@ static HRESULT WINAPI HTMLDocument_get_images(IHTMLDocument2 *iface, IHTMLElemen
}
}
if
(
nscoll
)
{
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
nsIDOMElement_Release
(
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
}
...
@@ -230,7 +230,7 @@ static HRESULT WINAPI HTMLDocument_get_applets(IHTMLDocument2 *iface, IHTMLEleme
...
@@ -230,7 +230,7 @@ static HRESULT WINAPI HTMLDocument_get_applets(IHTMLDocument2 *iface, IHTMLEleme
}
}
if
(
nscoll
)
{
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
nsIDOMElement_Release
(
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
}
...
@@ -262,7 +262,7 @@ static HRESULT WINAPI HTMLDocument_get_links(IHTMLDocument2 *iface, IHTMLElement
...
@@ -262,7 +262,7 @@ static HRESULT WINAPI HTMLDocument_get_links(IHTMLDocument2 *iface, IHTMLElement
}
}
if
(
nscoll
)
{
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
nsIDOMElement_Release
(
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
}
...
@@ -294,7 +294,7 @@ static HRESULT WINAPI HTMLDocument_get_forms(IHTMLDocument2 *iface, IHTMLElement
...
@@ -294,7 +294,7 @@ static HRESULT WINAPI HTMLDocument_get_forms(IHTMLDocument2 *iface, IHTMLElement
}
}
if
(
nscoll
)
{
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
nsIDOMElement_Release
(
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
}
...
@@ -326,7 +326,7 @@ static HRESULT WINAPI HTMLDocument_get_anchors(IHTMLDocument2 *iface, IHTMLEleme
...
@@ -326,7 +326,7 @@ static HRESULT WINAPI HTMLDocument_get_anchors(IHTMLDocument2 *iface, IHTMLEleme
}
}
if
(
nscoll
)
{
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
HTMLDOC
(
This
),
nscoll
);
nsIDOMElement_Release
(
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
}
...
@@ -930,7 +930,7 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa
...
@@ -930,7 +930,7 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa
return
E_FAIL
;
return
E_FAIL
;
}
}
elem
=
HTMLElement_Create
(
This
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
elem
=
HTMLElement_Create
(
This
->
doc_node
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
nsIDOMElement_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
*
newElem
=
HTMLELEM
(
elem
);
*
newElem
=
HTMLELEM
(
elem
);
...
@@ -1763,7 +1763,6 @@ static void destroy_htmldoc(HTMLDocument *This)
...
@@ -1763,7 +1763,6 @@ static void destroy_htmldoc(HTMLDocument *This)
if
(
This
->
event_target
)
if
(
This
->
event_target
)
release_event_target
(
This
->
event_target
);
release_event_target
(
This
->
event_target
);
release_nodes
(
This
);
release_dispex
(
&
This
->
dispex
);
release_dispex
(
&
This
->
dispex
);
ConnectionPointContainer_Destroy
(
&
This
->
cp_container
);
ConnectionPointContainer_Destroy
(
&
This
->
cp_container
);
...
@@ -1801,6 +1800,7 @@ static ULONG HTMLDocumentNode_Release(HTMLDocument *base)
...
@@ -1801,6 +1800,7 @@ static ULONG HTMLDocumentNode_Release(HTMLDocument *base)
if
(
!
ref
)
{
if
(
!
ref
)
{
detach_selection
(
This
);
detach_selection
(
This
);
detach_ranges
(
This
);
detach_ranges
(
This
);
release_nodes
(
This
);
destroy_htmldoc
(
&
This
->
basedoc
);
destroy_htmldoc
(
&
This
->
basedoc
);
heap_free
(
This
);
heap_free
(
This
);
}
}
...
...
dlls/mshtml/htmldoc3.c
View file @
64d4efe9
...
@@ -123,7 +123,7 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t
...
@@ -123,7 +123,7 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t
return
E_FAIL
;
return
E_FAIL
;
}
}
node
=
HTMLDOMTextNode_Create
(
This
,
(
nsIDOMNode
*
)
nstext
);
node
=
HTMLDOMTextNode_Create
(
This
->
doc_node
,
(
nsIDOMNode
*
)
nstext
);
nsIDOMElement_Release
(
nstext
);
nsIDOMElement_Release
(
nstext
);
*
newTextNode
=
HTMLDOMNODE
(
node
);
*
newTextNode
=
HTMLDOMNODE
(
node
);
...
@@ -152,7 +152,7 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
...
@@ -152,7 +152,7 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
}
}
if
(
nselem
)
{
if
(
nselem
)
{
node
=
get_node
(
This
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
node
=
get_node
(
This
->
doc_node
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
nsIDOMElement_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
p
);
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
p
);
}
else
{
}
else
{
...
@@ -442,7 +442,7 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v
...
@@ -442,7 +442,7 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v
}
}
if
(
nselem
)
{
if
(
nselem
)
{
node
=
get_node
(
This
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
node
=
get_node
(
This
->
doc_node
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
nsIDOMElement_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
pel
);
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
pel
);
...
@@ -480,7 +480,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface,
...
@@ -480,7 +480,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface,
return
E_FAIL
;
return
E_FAIL
;
}
}
*
pelColl
=
(
IHTMLElementCollection
*
)
create_collection_from_nodelist
(
This
,
(
IUnknown
*
)
HTMLDOC3
(
This
),
nslist
);
*
pelColl
=
(
IHTMLElementCollection
*
)
create_collection_from_nodelist
(
This
->
doc_node
,
(
IUnknown
*
)
HTMLDOC3
(
This
),
nslist
);
nsIDOMNodeList_Release
(
nslist
);
nsIDOMNodeList_Release
(
nslist
);
return
S_OK
;
return
S_OK
;
...
...
dlls/mshtml/htmldoc5.c
View file @
64d4efe9
...
@@ -144,7 +144,7 @@ static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bs
...
@@ -144,7 +144,7 @@ static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bs
return
E_FAIL
;
return
E_FAIL
;
}
}
node
=
&
HTMLCommentElement_Create
(
This
,
(
nsIDOMNode
*
)
nscomment
)
->
node
;
node
=
&
HTMLCommentElement_Create
(
This
->
doc_node
,
(
nsIDOMNode
*
)
nscomment
)
->
node
;
nsIDOMElement_Release
(
nscomment
);
nsIDOMElement_Release
(
nscomment
);
*
ppRetNode
=
HTMLDOMNODE
(
node
);
*
ppRetNode
=
HTMLDOMNODE
(
node
);
...
...
dlls/mshtml/htmlelem.c
View file @
64d4efe9
...
@@ -171,7 +171,7 @@ static HRESULT WINAPI HTMLElement_getAttribute(IHTMLElement *iface, BSTR strAttr
...
@@ -171,7 +171,7 @@ static HRESULT WINAPI HTMLElement_getAttribute(IHTMLElement *iface, BSTR strAttr
WCHAR
buffer
[
256
];
WCHAR
buffer
[
256
];
DWORD
len
;
DWORD
len
;
BSTR
bstrBaseUrl
;
BSTR
bstrBaseUrl
;
hres
=
IHTMLDocument2_get_URL
(
HTMLDOC
(
This
->
node
.
doc
),
&
bstrBaseUrl
);
hres
=
IHTMLDocument2_get_URL
(
HTMLDOC
(
&
This
->
node
.
doc
->
base
doc
),
&
bstrBaseUrl
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
hres
=
CoInternetCombineUrl
(
bstrBaseUrl
,
value
,
hres
=
CoInternetCombineUrl
(
bstrBaseUrl
,
value
,
URL_ESCAPE_SPACES_ONLY
|
URL_DONT_ESCAPE_EXTRA_INFO
,
URL_ESCAPE_SPACES_ONLY
|
URL_DONT_ESCAPE_EXTRA_INFO
,
...
@@ -589,7 +589,7 @@ static HRESULT WINAPI HTMLElement_get_document(IHTMLElement *iface, IDispatch **
...
@@ -589,7 +589,7 @@ static HRESULT WINAPI HTMLElement_get_document(IHTMLElement *iface, IDispatch **
if
(
!
p
)
if
(
!
p
)
return
E_POINTER
;
return
E_POINTER
;
*
p
=
(
IDispatch
*
)
HTMLDOC
(
This
->
node
.
doc
);
*
p
=
(
IDispatch
*
)
HTMLDOC
(
&
This
->
node
.
doc
->
base
doc
);
IDispatch_AddRef
(
*
p
);
IDispatch_AddRef
(
*
p
);
return
S_OK
;
return
S_OK
;
...
@@ -899,7 +899,7 @@ static HRESULT WINAPI HTMLElement_put_innerText(IHTMLElement *iface, BSTR v)
...
@@ -899,7 +899,7 @@ static HRESULT WINAPI HTMLElement_put_innerText(IHTMLElement *iface, BSTR v)
}
}
nsAString_Init
(
&
text_str
,
v
);
nsAString_Init
(
&
text_str
,
v
);
nsres
=
nsIDOMHTMLDocument_CreateTextNode
(
This
->
node
.
doc
->
nsdoc
,
&
text_str
,
&
text_node
);
nsres
=
nsIDOMHTMLDocument_CreateTextNode
(
This
->
node
.
doc
->
basedoc
.
nsdoc
,
&
text_str
,
&
text_node
);
nsAString_Finish
(
&
text_str
);
nsAString_Finish
(
&
text_str
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateTextNode failed: %08x
\n
"
,
nsres
);
ERR
(
"CreateTextNode failed: %08x
\n
"
,
nsres
);
...
@@ -1055,12 +1055,12 @@ static HRESULT WINAPI HTMLElement_insertAdjacentHTML(IHTMLElement *iface, BSTR w
...
@@ -1055,12 +1055,12 @@ static HRESULT WINAPI HTMLElement_insertAdjacentHTML(IHTMLElement *iface, BSTR w
TRACE
(
"(%p)->(%s %s)
\n
"
,
This
,
debugstr_w
(
where
),
debugstr_w
(
html
));
TRACE
(
"(%p)->(%s %s)
\n
"
,
This
,
debugstr_w
(
where
),
debugstr_w
(
html
));
if
(
!
This
->
node
.
doc
->
nsdoc
)
{
if
(
!
This
->
node
.
doc
->
basedoc
.
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
return
E_UNEXPECTED
;
}
}
nsres
=
nsIDOMDocument_QueryInterface
(
This
->
node
.
doc
->
nsdoc
,
&
IID_nsIDOMDocumentRange
,
(
void
**
)
&
nsdocrange
);
nsres
=
nsIDOMDocument_QueryInterface
(
This
->
node
.
doc
->
basedoc
.
nsdoc
,
&
IID_nsIDOMDocumentRange
,
(
void
**
)
&
nsdocrange
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
{
ERR
(
"getting nsIDOMDocumentRange failed: %08x
\n
"
,
nsres
);
ERR
(
"getting nsIDOMDocumentRange failed: %08x
\n
"
,
nsres
);
...
@@ -1113,14 +1113,14 @@ static HRESULT WINAPI HTMLElement_insertAdjacentText(IHTMLElement *iface, BSTR w
...
@@ -1113,14 +1113,14 @@ static HRESULT WINAPI HTMLElement_insertAdjacentText(IHTMLElement *iface, BSTR w
TRACE
(
"(%p)->(%s %s)
\n
"
,
This
,
debugstr_w
(
where
),
debugstr_w
(
text
));
TRACE
(
"(%p)->(%s %s)
\n
"
,
This
,
debugstr_w
(
where
),
debugstr_w
(
text
));
if
(
!
This
->
node
.
doc
->
nsdoc
)
{
if
(
!
This
->
node
.
doc
->
basedoc
.
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
return
E_UNEXPECTED
;
}
}
nsAString_Init
(
&
ns_text
,
text
);
nsAString_Init
(
&
ns_text
,
text
);
nsres
=
nsIDOMDocument_CreateTextNode
(
This
->
node
.
doc
->
nsdoc
,
&
ns_text
,
(
nsIDOMText
**
)
&
nsnode
);
nsres
=
nsIDOMDocument_CreateTextNode
(
This
->
node
.
doc
->
basedoc
.
nsdoc
,
&
ns_text
,
(
nsIDOMText
**
)
&
nsnode
);
nsAString_Finish
(
&
ns_text
);
nsAString_Finish
(
&
ns_text
);
if
(
NS_FAILED
(
nsres
)
||
!
nsnode
)
if
(
NS_FAILED
(
nsres
)
||
!
nsnode
)
...
@@ -1520,7 +1520,7 @@ void HTMLElement_Init(HTMLElement *This)
...
@@ -1520,7 +1520,7 @@ void HTMLElement_Init(HTMLElement *This)
init_dispex
(
&
This
->
node
.
dispex
,
(
IUnknown
*
)
HTMLELEM
(
This
),
&
HTMLElement_dispex
);
init_dispex
(
&
This
->
node
.
dispex
,
(
IUnknown
*
)
HTMLELEM
(
This
),
&
HTMLElement_dispex
);
}
}
HTMLElement
*
HTMLElement_Create
(
HTMLDocument
*
doc
,
nsIDOMNode
*
nsnode
,
BOOL
use_generic
)
HTMLElement
*
HTMLElement_Create
(
HTMLDocument
Node
*
doc
,
nsIDOMNode
*
nsnode
,
BOOL
use_generic
)
{
{
nsIDOMHTMLElement
*
nselem
;
nsIDOMHTMLElement
*
nselem
;
HTMLElement
*
ret
=
NULL
;
HTMLElement
*
ret
=
NULL
;
...
...
dlls/mshtml/htmlelem2.c
View file @
64d4efe9
...
@@ -608,7 +608,7 @@ static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
...
@@ -608,7 +608,7 @@ static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
event
),
pDisp
,
pfResult
);
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
event
),
pDisp
,
pfResult
);
return
attach_event
(
get_node_event_target
(
&
This
->
node
),
This
->
node
.
doc
,
event
,
pDisp
,
pfResult
);
return
attach_event
(
get_node_event_target
(
&
This
->
node
),
&
This
->
node
.
doc
->
base
doc
,
event
,
pDisp
,
pfResult
);
}
}
static
HRESULT
WINAPI
HTMLElement2_detachEvent
(
IHTMLElement2
*
iface
,
BSTR
event
,
IDispatch
*
pDisp
)
static
HRESULT
WINAPI
HTMLElement2_detachEvent
(
IHTMLElement2
*
iface
,
BSTR
event
,
IDispatch
*
pDisp
)
...
...
dlls/mshtml/htmlelemcol.c
View file @
64d4efe9
...
@@ -445,7 +445,7 @@ static dispex_static_data_t HTMLElementCollection_dispex = {
...
@@ -445,7 +445,7 @@ static dispex_static_data_t HTMLElementCollection_dispex = {
HTMLElementCollection_iface_tids
HTMLElementCollection_iface_tids
};
};
static
void
create_all_list
(
HTMLDocument
*
doc
,
HTMLDOMNode
*
elem
,
elem_vector_t
*
buf
)
static
void
create_all_list
(
HTMLDocument
Node
*
doc
,
HTMLDOMNode
*
elem
,
elem_vector_t
*
buf
)
{
{
nsIDOMNodeList
*
nsnode_list
;
nsIDOMNodeList
*
nsnode_list
;
nsIDOMNode
*
iter
;
nsIDOMNode
*
iter
;
...
@@ -492,7 +492,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node, BOOL include_ro
...
@@ -492,7 +492,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node, BOOL include_ro
return
HTMLElementCollection_Create
((
IUnknown
*
)
HTMLDOMNODE
(
node
),
buf
.
buf
,
buf
.
len
);
return
HTMLElementCollection_Create
((
IUnknown
*
)
HTMLDOMNODE
(
node
),
buf
.
buf
,
buf
.
len
);
}
}
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocument
*
doc
,
IUnknown
*
unk
,
nsIDOMNodeList
*
nslist
)
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocument
Node
*
doc
,
IUnknown
*
unk
,
nsIDOMNodeList
*
nslist
)
{
{
PRUint32
length
=
0
,
i
;
PRUint32
length
=
0
,
i
;
elem_vector_t
buf
;
elem_vector_t
buf
;
...
@@ -521,7 +521,7 @@ IHTMLElementCollection *create_collection_from_nodelist(HTMLDocument *doc, IUnkn
...
@@ -521,7 +521,7 @@ IHTMLElementCollection *create_collection_from_nodelist(HTMLDocument *doc, IUnkn
return
HTMLElementCollection_Create
(
unk
,
buf
.
buf
,
buf
.
len
);
return
HTMLElementCollection_Create
(
unk
,
buf
.
buf
,
buf
.
len
);
}
}
IHTMLElementCollection
*
create_collection_from_htmlcol
(
HTMLDocument
*
doc
,
IUnknown
*
unk
,
nsIDOMHTMLCollection
*
nscol
)
IHTMLElementCollection
*
create_collection_from_htmlcol
(
HTMLDocument
Node
*
doc
,
IUnknown
*
unk
,
nsIDOMHTMLCollection
*
nscol
)
{
{
PRUint32
length
=
0
,
i
;
PRUint32
length
=
0
,
i
;
elem_vector_t
buf
;
elem_vector_t
buf
;
...
...
dlls/mshtml/htmlevent.c
View file @
64d4efe9
...
@@ -695,7 +695,7 @@ static IHTMLEventObj *create_event(HTMLDOMNode *target, eventid_t eid, nsIDOMEve
...
@@ -695,7 +695,7 @@ static IHTMLEventObj *create_event(HTMLDOMNode *target, eventid_t eid, nsIDOMEve
return
HTMLEVENTOBJ
(
ret
);
return
HTMLEVENTOBJ
(
ret
);
}
}
static
void
call_event_handlers
(
HTMLDocument
*
doc
,
IHTMLEventObj
*
event_obj
,
event_target_t
*
event_target
,
static
void
call_event_handlers
(
HTMLDocument
Node
*
doc
,
IHTMLEventObj
*
event_obj
,
event_target_t
*
event_target
,
eventid_t
eid
,
IDispatch
*
this_obj
)
eventid_t
eid
,
IDispatch
*
this_obj
)
{
{
handler_vector_t
*
handler_vector
;
handler_vector_t
*
handler_vector
;
...
@@ -741,7 +741,7 @@ static void call_event_handlers(HTMLDocument *doc, IHTMLEventObj *event_obj, eve
...
@@ -741,7 +741,7 @@ static void call_event_handlers(HTMLDocument *doc, IHTMLEventObj *event_obj, eve
}
}
}
}
void
fire_event
(
HTMLDocument
*
doc
,
eventid_t
eid
,
nsIDOMNode
*
target
,
nsIDOMEvent
*
nsevent
)
void
fire_event
(
HTMLDocument
Node
*
doc
,
eventid_t
eid
,
nsIDOMNode
*
target
,
nsIDOMEvent
*
nsevent
)
{
{
IHTMLEventObj
*
prev_event
,
*
event_obj
=
NULL
;
IHTMLEventObj
*
prev_event
,
*
event_obj
=
NULL
;
nsIDOMNode
*
parent
,
*
nsnode
;
nsIDOMNode
*
parent
,
*
nsnode
;
...
@@ -750,8 +750,8 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
...
@@ -750,8 +750,8 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
TRACE
(
"(%p) %s
\n
"
,
doc
,
debugstr_w
(
event_info
[
eid
].
name
));
TRACE
(
"(%p) %s
\n
"
,
doc
,
debugstr_w
(
event_info
[
eid
].
name
));
prev_event
=
doc
->
window
->
event
;
prev_event
=
doc
->
basedoc
.
window
->
event
;
event_obj
=
doc
->
window
->
event
=
create_event
(
get_node
(
doc
,
target
,
TRUE
),
eid
,
nsevent
);
event_obj
=
doc
->
basedoc
.
window
->
event
=
create_event
(
get_node
(
doc
,
target
,
TRUE
),
eid
,
nsevent
);
nsIDOMNode_GetNodeType
(
target
,
&
node_type
);
nsIDOMNode_GetNodeType
(
target
,
&
node_type
);
nsnode
=
target
;
nsnode
=
target
;
...
@@ -784,7 +784,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
...
@@ -784,7 +784,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
nsIDOMHTMLElement
*
nsbody
;
nsIDOMHTMLElement
*
nsbody
;
nsresult
nsres
;
nsresult
nsres
;
nsres
=
nsIDOMHTMLDocument_GetBody
(
doc
->
nsdoc
,
&
nsbody
);
nsres
=
nsIDOMHTMLDocument_GetBody
(
doc
->
basedoc
.
nsdoc
,
&
nsbody
);
if
(
NS_SUCCEEDED
(
nsres
)
&&
nsbody
)
{
if
(
NS_SUCCEEDED
(
nsres
)
&&
nsbody
)
{
node
=
get_node
(
doc
,
(
nsIDOMNode
*
)
nsbody
,
FALSE
);
node
=
get_node
(
doc
,
(
nsIDOMNode
*
)
nsbody
,
FALSE
);
if
(
node
)
if
(
node
)
...
@@ -795,7 +795,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
...
@@ -795,7 +795,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
}
}
}
}
call_event_handlers
(
doc
,
event_obj
,
doc
->
event_target
,
eid
,
(
IDispatch
*
)
HTMLDOC
(
doc
));
call_event_handlers
(
doc
,
event_obj
,
doc
->
basedoc
.
event_target
,
eid
,
(
IDispatch
*
)
HTMLDOC
(
&
doc
->
base
doc
));
break
;
break
;
default:
default:
...
@@ -806,7 +806,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
...
@@ -806,7 +806,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
nsIDOMNode_Release
(
nsnode
);
nsIDOMNode_Release
(
nsnode
);
IHTMLEventObj_Release
(
event_obj
);
IHTMLEventObj_Release
(
event_obj
);
doc
->
window
->
event
=
prev_event
;
doc
->
basedoc
.
window
->
event
=
prev_event
;
}
}
static
inline
event_target_t
*
get_event_target
(
event_target_t
**
event_target_ptr
)
static
inline
event_target_t
*
get_event_target
(
event_target_t
**
event_target_ptr
)
...
@@ -837,7 +837,7 @@ static BOOL alloc_handler_vector(event_target_t *event_target, eventid_t eid, in
...
@@ -837,7 +837,7 @@ static BOOL alloc_handler_vector(event_target_t *event_target, eventid_t eid, in
return
TRUE
;
return
TRUE
;
}
}
static
HRESULT
set_event_handler_disp
(
event_target_t
**
event_target_ptr
,
HTML
Document
*
doc
,
eventid_t
eid
,
IDispatch
*
disp
)
static
HRESULT
set_event_handler_disp
(
event_target_t
**
event_target_ptr
,
HTML
Window
*
window
,
eventid_t
eid
,
IDispatch
*
disp
)
{
{
event_target_t
*
event_target
;
event_target_t
*
event_target
;
...
@@ -856,16 +856,16 @@ static HRESULT set_event_handler_disp(event_target_t **event_target_ptr, HTMLDoc
...
@@ -856,16 +856,16 @@ static HRESULT set_event_handler_disp(event_target_t **event_target_ptr, HTMLDoc
return
S_OK
;
return
S_OK
;
IDispatch_AddRef
(
disp
);
IDispatch_AddRef
(
disp
);
if
(
doc
->
window
->
nswindow
&&
(
event_info
[
eid
].
flags
&
EVENT_DEFAULTLISTENER
))
{
if
(
window
->
nswindow
&&
(
event_info
[
eid
].
flags
&
EVENT_DEFAULTLISTENER
))
{
if
(
!
doc
->
window
->
event_vector
)
{
if
(
!
window
->
event_vector
)
{
doc
->
window
->
event_vector
=
heap_alloc_zero
(
EVENTID_LAST
*
sizeof
(
BOOL
));
window
->
event_vector
=
heap_alloc_zero
(
EVENTID_LAST
*
sizeof
(
BOOL
));
if
(
!
doc
->
window
->
event_vector
)
if
(
!
window
->
event_vector
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
if
(
!
doc
->
window
->
event_vector
[
eid
])
{
if
(
!
window
->
event_vector
[
eid
])
{
doc
->
window
->
event_vector
[
eid
]
=
TRUE
;
window
->
event_vector
[
eid
]
=
TRUE
;
add_nsevent_listener
(
doc
->
window
,
event_info
[
eid
].
name
);
add_nsevent_listener
(
window
,
event_info
[
eid
].
name
);
}
}
}
}
...
@@ -883,7 +883,7 @@ HRESULT set_event_handler(event_target_t **event_target, HTMLDocument *doc, even
...
@@ -883,7 +883,7 @@ HRESULT set_event_handler(event_target_t **event_target, HTMLDocument *doc, even
break
;
break
;
case
VT_DISPATCH
:
case
VT_DISPATCH
:
return
set_event_handler_disp
(
event_target
,
doc
,
eid
,
V_DISPATCH
(
var
));
return
set_event_handler_disp
(
event_target
,
doc
->
window
,
eid
,
V_DISPATCH
(
var
));
default:
default:
FIXME
(
"not supported vt=%d
\n
"
,
V_VT
(
var
));
FIXME
(
"not supported vt=%d
\n
"
,
V_VT
(
var
));
...
@@ -939,7 +939,7 @@ HRESULT attach_event(event_target_t **event_target_ptr, HTMLDocument *doc, BSTR
...
@@ -939,7 +939,7 @@ HRESULT attach_event(event_target_t **event_target_ptr, HTMLDocument *doc, BSTR
return
S_OK
;
return
S_OK
;
}
}
void
check_event_attr
(
HTMLDocument
*
doc
,
nsIDOMElement
*
nselem
)
void
check_event_attr
(
HTMLDocument
Node
*
doc
,
nsIDOMElement
*
nselem
)
{
{
const
PRUnichar
*
attr_value
;
const
PRUnichar
*
attr_value
;
nsAString
attr_name_str
,
attr_value_str
;
nsAString
attr_name_str
,
attr_value_str
;
...
@@ -961,10 +961,10 @@ void check_event_attr(HTMLDocument *doc, nsIDOMElement *nselem)
...
@@ -961,10 +961,10 @@ void check_event_attr(HTMLDocument *doc, nsIDOMElement *nselem)
TRACE
(
"%p.%s = %s
\n
"
,
nselem
,
debugstr_w
(
event_info
[
i
].
attr_name
),
debugstr_w
(
attr_value
));
TRACE
(
"%p.%s = %s
\n
"
,
nselem
,
debugstr_w
(
event_info
[
i
].
attr_name
),
debugstr_w
(
attr_value
));
disp
=
script_parse_event
(
doc
->
window
,
attr_value
);
disp
=
script_parse_event
(
doc
->
basedoc
.
window
,
attr_value
);
if
(
disp
)
{
if
(
disp
)
{
node
=
get_node
(
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
node
=
get_node
(
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
set_event_handler_disp
(
get_node_event_target
(
node
),
node
->
doc
,
i
,
disp
);
set_event_handler_disp
(
get_node_event_target
(
node
),
node
->
doc
->
basedoc
.
window
,
i
,
disp
);
IDispatch_Release
(
disp
);
IDispatch_Release
(
disp
);
}
}
}
}
...
...
dlls/mshtml/htmlevent.h
View file @
64d4efe9
...
@@ -39,9 +39,9 @@ typedef enum {
...
@@ -39,9 +39,9 @@ typedef enum {
}
eventid_t
;
}
eventid_t
;
eventid_t
str_to_eid
(
LPCWSTR
);
eventid_t
str_to_eid
(
LPCWSTR
);
void
check_event_attr
(
HTMLDocument
*
,
nsIDOMElement
*
);
void
check_event_attr
(
HTMLDocument
Node
*
,
nsIDOMElement
*
);
void
release_event_target
(
event_target_t
*
);
void
release_event_target
(
event_target_t
*
);
void
fire_event
(
HTMLDocument
*
,
eventid_t
,
nsIDOMNode
*
,
nsIDOMEvent
*
);
void
fire_event
(
HTMLDocument
Node
*
,
eventid_t
,
nsIDOMNode
*
,
nsIDOMEvent
*
);
HRESULT
set_event_handler
(
event_target_t
**
,
HTMLDocument
*
,
eventid_t
,
VARIANT
*
);
HRESULT
set_event_handler
(
event_target_t
**
,
HTMLDocument
*
,
eventid_t
,
VARIANT
*
);
HRESULT
get_event_handler
(
event_target_t
**
,
eventid_t
,
VARIANT
*
);
HRESULT
get_event_handler
(
event_target_t
**
,
eventid_t
,
VARIANT
*
);
HRESULT
attach_event
(
event_target_t
**
,
HTMLDocument
*
,
BSTR
,
IDispatch
*
,
VARIANT_BOOL
*
);
HRESULT
attach_event
(
event_target_t
**
,
HTMLDocument
*
,
BSTR
,
IDispatch
*
,
VARIANT_BOOL
*
);
...
@@ -53,7 +53,7 @@ static inline event_target_t **get_node_event_target(HTMLDOMNode *node)
...
@@ -53,7 +53,7 @@ static inline event_target_t **get_node_event_target(HTMLDOMNode *node)
static
inline
HRESULT
set_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
static
inline
HRESULT
set_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
{
{
return
set_event_handler
(
get_node_event_target
(
node
),
node
->
doc
,
eid
,
var
);
return
set_event_handler
(
get_node_event_target
(
node
),
&
node
->
doc
->
base
doc
,
eid
,
var
);
}
}
static
inline
HRESULT
get_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
static
inline
HRESULT
get_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
...
...
dlls/mshtml/htmliframe.c
View file @
64d4efe9
...
@@ -130,13 +130,13 @@ static HRESULT WINAPI HTMLIFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface,
...
@@ -130,13 +130,13 @@ static HRESULT WINAPI HTMLIFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface,
return
E_FAIL
;
return
E_FAIL
;
}
}
hres
=
HTMLWindow_Create
(
This
->
element
.
node
.
doc
->
doc_obj
,
NULL
,
&
window
);
hres
=
HTMLWindow_Create
(
This
->
element
.
node
.
doc
->
basedoc
.
doc_obj
,
NULL
,
&
window
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
nsIDOMDocument_Release
(
nsdoc
);
nsIDOMDocument_Release
(
nsdoc
);
return
hres
;
return
hres
;
}
}
hres
=
create_doc_from_nsdoc
(
nshtmldoc
,
This
->
element
.
node
.
doc
->
doc_obj
,
window
,
&
content_doc
);
hres
=
create_doc_from_nsdoc
(
nshtmldoc
,
This
->
element
.
node
.
doc
->
basedoc
.
doc_obj
,
window
,
&
content_doc
);
nsIDOMHTMLDocument_Release
(
nshtmldoc
);
nsIDOMHTMLDocument_Release
(
nshtmldoc
);
if
(
SUCCEEDED
(
hres
))
if
(
SUCCEEDED
(
hres
))
window_set_docnode
(
window
,
content_doc
);
window_set_docnode
(
window
,
content_doc
);
...
...
dlls/mshtml/htmlnode.c
View file @
64d4efe9
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
static
HTMLDOMNode
*
get_node_obj
(
HTMLDocument
*
,
IUnknown
*
);
static
HTMLDOMNode
*
get_node_obj
(
HTMLDocument
Node
*
,
IUnknown
*
);
typedef
struct
{
typedef
struct
{
DispatchEx
dispex
;
DispatchEx
dispex
;
...
@@ -41,7 +41,7 @@ typedef struct {
...
@@ -41,7 +41,7 @@ typedef struct {
LONG
ref
;
LONG
ref
;
/* FIXME: implement weak reference */
/* FIXME: implement weak reference */
HTMLDocument
*
doc
;
HTMLDocument
Node
*
doc
;
nsIDOMNodeList
*
nslist
;
nsIDOMNodeList
*
nslist
;
}
HTMLDOMChildrenCollection
;
}
HTMLDOMChildrenCollection
;
...
@@ -262,7 +262,7 @@ static dispex_static_data_t HTMLDOMChildrenCollection_dispex = {
...
@@ -262,7 +262,7 @@ static dispex_static_data_t HTMLDOMChildrenCollection_dispex = {
HTMLDOMChildrenCollection_iface_tids
HTMLDOMChildrenCollection_iface_tids
};
};
static
IHTMLDOMChildrenCollection
*
create_child_collection
(
HTMLDocument
*
doc
,
nsIDOMNodeList
*
nslist
)
static
IHTMLDOMChildrenCollection
*
create_child_collection
(
HTMLDocument
Node
*
doc
,
nsIDOMNodeList
*
nslist
)
{
{
HTMLDOMChildrenCollection
*
ret
;
HTMLDOMChildrenCollection
*
ret
;
...
@@ -875,7 +875,7 @@ static const NodeImplVtbl HTMLDOMNodeImplVtbl = {
...
@@ -875,7 +875,7 @@ static const NodeImplVtbl HTMLDOMNodeImplVtbl = {
HTMLDOMNode_destructor
HTMLDOMNode_destructor
};
};
void
HTMLDOMNode_Init
(
HTMLDocument
*
doc
,
HTMLDOMNode
*
node
,
nsIDOMNode
*
nsnode
)
void
HTMLDOMNode_Init
(
HTMLDocument
Node
*
doc
,
HTMLDOMNode
*
node
,
nsIDOMNode
*
nsnode
)
{
{
node
->
lpHTMLDOMNodeVtbl
=
&
HTMLDOMNodeVtbl
;
node
->
lpHTMLDOMNodeVtbl
=
&
HTMLDOMNodeVtbl
;
node
->
lpHTMLDOMNode2Vtbl
=
&
HTMLDOMNode2Vtbl
;
node
->
lpHTMLDOMNode2Vtbl
=
&
HTMLDOMNode2Vtbl
;
...
@@ -889,7 +889,7 @@ void HTMLDOMNode_Init(HTMLDocument *doc, HTMLDOMNode *node, nsIDOMNode *nsnode)
...
@@ -889,7 +889,7 @@ void HTMLDOMNode_Init(HTMLDocument *doc, HTMLDOMNode *node, nsIDOMNode *nsnode)
doc
->
nodes
=
node
;
doc
->
nodes
=
node
;
}
}
static
HTMLDOMNode
*
create_node
(
HTMLDocument
*
doc
,
nsIDOMNode
*
nsnode
)
static
HTMLDOMNode
*
create_node
(
HTMLDocument
Node
*
doc
,
nsIDOMNode
*
nsnode
)
{
{
HTMLDOMNode
*
ret
;
HTMLDOMNode
*
ret
;
PRUint16
node_type
;
PRUint16
node_type
;
...
@@ -923,7 +923,7 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode)
...
@@ -923,7 +923,7 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode)
* (better) find a way to store HTMLDOMelement pointer in nsIDOMNode.
* (better) find a way to store HTMLDOMelement pointer in nsIDOMNode.
*/
*/
HTMLDOMNode
*
get_node
(
HTMLDocument
*
This
,
nsIDOMNode
*
nsnode
,
BOOL
create
)
HTMLDOMNode
*
get_node
(
HTMLDocument
Node
*
This
,
nsIDOMNode
*
nsnode
,
BOOL
create
)
{
{
HTMLDOMNode
*
iter
=
This
->
nodes
;
HTMLDOMNode
*
iter
=
This
->
nodes
;
...
@@ -944,7 +944,7 @@ HTMLDOMNode *get_node(HTMLDocument *This, nsIDOMNode *nsnode, BOOL create)
...
@@ -944,7 +944,7 @@ HTMLDOMNode *get_node(HTMLDocument *This, nsIDOMNode *nsnode, BOOL create)
* We should use better way for getting node object (like private interface)
* We should use better way for getting node object (like private interface)
* or avoid it at all.
* or avoid it at all.
*/
*/
static
HTMLDOMNode
*
get_node_obj
(
HTMLDocument
*
This
,
IUnknown
*
iface
)
static
HTMLDOMNode
*
get_node_obj
(
HTMLDocument
Node
*
This
,
IUnknown
*
iface
)
{
{
HTMLDOMNode
*
iter
=
This
->
nodes
;
HTMLDOMNode
*
iter
=
This
->
nodes
;
IHTMLDOMNode
*
node
;
IHTMLDOMNode
*
node
;
...
@@ -962,7 +962,7 @@ static HTMLDOMNode *get_node_obj(HTMLDocument *This, IUnknown *iface)
...
@@ -962,7 +962,7 @@ static HTMLDOMNode *get_node_obj(HTMLDocument *This, IUnknown *iface)
return
NULL
;
return
NULL
;
}
}
void
release_nodes
(
HTMLDocument
*
This
)
void
release_nodes
(
HTMLDocument
Node
*
This
)
{
{
HTMLDOMNode
*
iter
,
*
next
;
HTMLDOMNode
*
iter
,
*
next
;
...
...
dlls/mshtml/htmloption.c
View file @
64d4efe9
...
@@ -187,7 +187,7 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
...
@@ -187,7 +187,7 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
element
.
node
.
doc
->
nsdoc
)
{
if
(
!
This
->
element
.
node
.
doc
->
basedoc
.
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
return
E_UNEXPECTED
;
}
}
...
@@ -210,7 +210,7 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
...
@@ -210,7 +210,7 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
}
}
nsAString_Init
(
&
text_str
,
v
);
nsAString_Init
(
&
text_str
,
v
);
nsres
=
nsIDOMHTMLDocument_CreateTextNode
(
This
->
element
.
node
.
doc
->
nsdoc
,
&
text_str
,
&
text_node
);
nsres
=
nsIDOMHTMLDocument_CreateTextNode
(
This
->
element
.
node
.
doc
->
basedoc
.
nsdoc
,
&
text_str
,
&
text_node
);
nsAString_Finish
(
&
text_str
);
nsAString_Finish
(
&
text_str
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateTextNode failed: %08x
\n
"
,
nsres
);
ERR
(
"CreateTextNode failed: %08x
\n
"
,
nsres
);
...
@@ -474,7 +474,7 @@ static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory
...
@@ -474,7 +474,7 @@ static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory
return
E_FAIL
;
return
E_FAIL
;
}
}
hres
=
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
get_node
(
&
This
->
window
->
doc_obj
->
base
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
)),
hres
=
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
get_node
(
This
->
window
->
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
)),
&
IID_IHTMLOptionElement
,
(
void
**
)
optelem
);
&
IID_IHTMLOptionElement
,
(
void
**
)
optelem
);
nsIDOMElement_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
...
...
dlls/mshtml/htmltextnode.c
View file @
64d4efe9
...
@@ -193,7 +193,7 @@ static dispex_static_data_t HTMLDOMTextNode_dispex = {
...
@@ -193,7 +193,7 @@ static dispex_static_data_t HTMLDOMTextNode_dispex = {
HTMLDOMTextNode_iface_tids
HTMLDOMTextNode_iface_tids
};
};
HTMLDOMNode
*
HTMLDOMTextNode_Create
(
HTMLDocument
*
doc
,
nsIDOMNode
*
nsnode
)
HTMLDOMNode
*
HTMLDOMTextNode_Create
(
HTMLDocument
Node
*
doc
,
nsIDOMNode
*
nsnode
)
{
{
HTMLDOMTextNode
*
ret
;
HTMLDOMTextNode
*
ret
;
...
...
dlls/mshtml/mshtml_private.h
View file @
64d4efe9
...
@@ -289,8 +289,6 @@ struct HTMLDocument {
...
@@ -289,8 +289,6 @@ struct HTMLDocument {
ConnectionPoint
cp_htmldocevents
;
ConnectionPoint
cp_htmldocevents
;
ConnectionPoint
cp_htmldocevents2
;
ConnectionPoint
cp_htmldocevents2
;
ConnectionPoint
cp_propnotif
;
ConnectionPoint
cp_propnotif
;
HTMLDOMNode
*
nodes
;
};
};
static
inline
HRESULT
htmldoc_query_interface
(
HTMLDocument
*
This
,
REFIID
riid
,
void
**
ppv
)
static
inline
HRESULT
htmldoc_query_interface
(
HTMLDocument
*
This
,
REFIID
riid
,
void
**
ppv
)
...
@@ -313,6 +311,8 @@ struct HTMLDocumentNode {
...
@@ -313,6 +311,8 @@ struct HTMLDocumentNode {
LONG
ref
;
LONG
ref
;
HTMLDOMNode
*
nodes
;
struct
list
selection_list
;
struct
list
selection_list
;
struct
list
range_list
;
struct
list
range_list
;
};
};
...
@@ -452,7 +452,7 @@ struct HTMLDOMNode {
...
@@ -452,7 +452,7 @@ struct HTMLDOMNode {
LONG
ref
;
LONG
ref
;
nsIDOMNode
*
nsnode
;
nsIDOMNode
*
nsnode
;
HTMLDocument
*
doc
;
HTMLDocument
Node
*
doc
;
event_target_t
*
event_target
;
event_target_t
*
event_target
;
HTMLDOMNode
*
next
;
HTMLDOMNode
*
next
;
...
@@ -647,10 +647,10 @@ void detach_selection(HTMLDocumentNode*);
...
@@ -647,10 +647,10 @@ void detach_selection(HTMLDocumentNode*);
void
detach_ranges
(
HTMLDocumentNode
*
);
void
detach_ranges
(
HTMLDocumentNode
*
);
HRESULT
get_node_text
(
HTMLDOMNode
*
,
BSTR
*
);
HRESULT
get_node_text
(
HTMLDOMNode
*
,
BSTR
*
);
HTMLDOMNode
*
HTMLDOMTextNode_Create
(
HTMLDocument
*
,
nsIDOMNode
*
);
HTMLDOMNode
*
HTMLDOMTextNode_Create
(
HTMLDocument
Node
*
,
nsIDOMNode
*
);
HTMLElement
*
HTMLElement_Create
(
HTMLDocument
*
,
nsIDOMNode
*
,
BOOL
);
HTMLElement
*
HTMLElement_Create
(
HTMLDocument
Node
*
,
nsIDOMNode
*
,
BOOL
);
HTMLElement
*
HTMLCommentElement_Create
(
HTMLDocument
*
,
nsIDOMNode
*
);
HTMLElement
*
HTMLCommentElement_Create
(
HTMLDocument
Node
*
,
nsIDOMNode
*
);
HTMLElement
*
HTMLAnchorElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLAnchorElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLBodyElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLBodyElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLIFrame_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLIFrame_Create
(
nsIDOMHTMLElement
*
);
...
@@ -664,7 +664,7 @@ HTMLElement *HTMLTableRow_Create(nsIDOMHTMLElement*);
...
@@ -664,7 +664,7 @@ HTMLElement *HTMLTableRow_Create(nsIDOMHTMLElement*);
HTMLElement
*
HTMLTextAreaElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLTextAreaElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLGenericElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLGenericElement_Create
(
nsIDOMHTMLElement
*
);
void
HTMLDOMNode_Init
(
HTMLDocument
*
,
HTMLDOMNode
*
,
nsIDOMNode
*
);
void
HTMLDOMNode_Init
(
HTMLDocument
Node
*
,
HTMLDOMNode
*
,
nsIDOMNode
*
);
void
HTMLElement_Init
(
HTMLElement
*
);
void
HTMLElement_Init
(
HTMLElement
*
);
void
HTMLElement2_Init
(
HTMLElement
*
);
void
HTMLElement2_Init
(
HTMLElement
*
);
void
HTMLElement3_Init
(
HTMLElement
*
);
void
HTMLElement3_Init
(
HTMLElement
*
);
...
@@ -676,8 +676,8 @@ void HTMLDOMNode_destructor(HTMLDOMNode*);
...
@@ -676,8 +676,8 @@ void HTMLDOMNode_destructor(HTMLDOMNode*);
HRESULT
HTMLElement_QI
(
HTMLDOMNode
*
,
REFIID
,
void
**
);
HRESULT
HTMLElement_QI
(
HTMLDOMNode
*
,
REFIID
,
void
**
);
void
HTMLElement_destructor
(
HTMLDOMNode
*
);
void
HTMLElement_destructor
(
HTMLDOMNode
*
);
HTMLDOMNode
*
get_node
(
HTMLDocument
*
,
nsIDOMNode
*
,
BOOL
);
HTMLDOMNode
*
get_node
(
HTMLDocument
Node
*
,
nsIDOMNode
*
,
BOOL
);
void
release_nodes
(
HTMLDocument
*
);
void
release_nodes
(
HTMLDocument
Node
*
);
void
release_script_hosts
(
HTMLWindow
*
);
void
release_script_hosts
(
HTMLWindow
*
);
void
connect_scripts
(
HTMLWindow
*
);
void
connect_scripts
(
HTMLWindow
*
);
...
@@ -688,8 +688,8 @@ BOOL find_global_prop(HTMLWindow*,BSTR,DWORD,ScriptHost**,DISPID*);
...
@@ -688,8 +688,8 @@ BOOL find_global_prop(HTMLWindow*,BSTR,DWORD,ScriptHost**,DISPID*);
IDispatch
*
get_script_disp
(
ScriptHost
*
);
IDispatch
*
get_script_disp
(
ScriptHost
*
);
IHTMLElementCollection
*
create_all_collection
(
HTMLDOMNode
*
,
BOOL
);
IHTMLElementCollection
*
create_all_collection
(
HTMLDOMNode
*
,
BOOL
);
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocument
*
,
IUnknown
*
,
nsIDOMNodeList
*
);
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocument
Node
*
,
IUnknown
*
,
nsIDOMNodeList
*
);
IHTMLElementCollection
*
create_collection_from_htmlcol
(
HTMLDocument
*
,
IUnknown
*
,
nsIDOMHTMLCollection
*
);
IHTMLElementCollection
*
create_collection_from_htmlcol
(
HTMLDocument
Node
*
,
IUnknown
*
,
nsIDOMHTMLCollection
*
);
/* commands */
/* commands */
typedef
struct
{
typedef
struct
{
...
...
dlls/mshtml/mutation.c
View file @
64d4efe9
...
@@ -545,7 +545,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
...
@@ -545,7 +545,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
nsres
=
nsISupports_QueryInterface
(
aContent
,
&
IID_nsIDOMElement
,
(
void
**
)
&
nselem
);
nsres
=
nsISupports_QueryInterface
(
aContent
,
&
IID_nsIDOMElement
,
(
void
**
)
&
nselem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
if
(
NS_SUCCEEDED
(
nsres
))
{
check_event_attr
(
&
This
->
doc
->
basedoc
,
nselem
);
check_event_attr
(
This
->
doc
->
basedoc
.
doc_node
,
nselem
);
nsIDOMElement_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
}
}
...
...
dlls/mshtml/nsembed.c
View file @
64d4efe9
...
@@ -1139,7 +1139,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
...
@@ -1139,7 +1139,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
FIXME
(
"aContextFlags=%08x
\n
"
,
aContextFlags
);
FIXME
(
"aContextFlags=%08x
\n
"
,
aContextFlags
);
};
};
show_context_menu
(
This
->
doc
,
dwID
,
&
pt
,
(
IDispatch
*
)
HTMLDOMNODE
(
get_node
(
&
This
->
doc
->
basedoc
,
aNode
,
TRUE
)));
show_context_menu
(
This
->
doc
,
dwID
,
&
pt
,
(
IDispatch
*
)
HTMLDOMNODE
(
get_node
(
This
->
doc
->
basedoc
.
doc_node
,
aNode
,
TRUE
)));
return
NS_OK
;
return
NS_OK
;
}
}
...
...
dlls/mshtml/nsevents.c
View file @
64d4efe9
...
@@ -155,7 +155,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
...
@@ -155,7 +155,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
nsIDOMHTMLDocument_GetBody
(
This
->
doc
->
basedoc
.
nsdoc
,
&
nsbody
);
nsIDOMHTMLDocument_GetBody
(
This
->
doc
->
basedoc
.
nsdoc
,
&
nsbody
);
if
(
nsbody
)
{
if
(
nsbody
)
{
fire_event
(
&
This
->
doc
->
basedoc
,
EVENTID_LOAD
,
(
nsIDOMNode
*
)
nsbody
,
event
);
fire_event
(
This
->
doc
->
basedoc
.
doc_node
,
EVENTID_LOAD
,
(
nsIDOMNode
*
)
nsbody
,
event
);
nsIDOMHTMLElement_Release
(
nsbody
);
nsIDOMHTMLElement_Release
(
nsbody
);
}
}
...
@@ -191,7 +191,7 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
...
@@ -191,7 +191,7 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
return
NS_OK
;
return
NS_OK
;
}
}
fire_event
(
&
This
->
doc
->
basedoc
,
eid
,
nsnode
,
event
);
fire_event
(
This
->
doc
->
basedoc
.
doc_node
,
eid
,
nsnode
,
event
);
nsIDOMNode_Release
(
nsnode
);
nsIDOMNode_Release
(
nsnode
);
...
...
dlls/mshtml/txtrange.c
View file @
64d4efe9
...
@@ -1201,7 +1201,7 @@ static HRESULT WINAPI HTMLTxtRange_parentElement(IHTMLTxtRange *iface, IHTMLElem
...
@@ -1201,7 +1201,7 @@ static HRESULT WINAPI HTMLTxtRange_parentElement(IHTMLTxtRange *iface, IHTMLElem
return
S_OK
;
return
S_OK
;
}
}
node
=
get_node
(
&
This
->
doc
->
base
doc
,
nsnode
,
TRUE
);
node
=
get_node
(
This
->
doc
,
nsnode
,
TRUE
);
nsIDOMNode_Release
(
nsnode
);
nsIDOMNode_Release
(
nsnode
);
return
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
parent
);
return
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
parent
);
...
...
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