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
359a9041
Commit
359a9041
authored
Oct 02, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store nsIDOMNodeSelector in HTMLDocumentNode.
parent
e3607c98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
htmldoc.c
dlls/mshtml/htmldoc.c
+16
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
navigate.c
dlls/mshtml/navigate.c
+1
-7
No files found.
dlls/mshtml/htmldoc.c
View file @
359a9041
...
@@ -2101,6 +2101,11 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
...
@@ -2101,6 +2101,11 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
while
(
!
list_empty
(
&
This
->
plugin_hosts
))
while
(
!
list_empty
(
&
This
->
plugin_hosts
))
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
This
->
plugin_hosts
),
PluginHost
,
entry
));
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
This
->
plugin_hosts
),
PluginHost
,
entry
));
if
(
This
->
nsnode_selector
)
{
nsIDOMNodeSelector_Release
(
This
->
nsnode_selector
);
This
->
nsnode_selector
=
NULL
;
}
if
(
This
->
nsdoc
)
{
if
(
This
->
nsdoc
)
{
assert
(
!
This
->
window
);
assert
(
!
This
->
window
);
release_document_mutation
(
This
);
release_document_mutation
(
This
);
...
@@ -2126,6 +2131,8 @@ static void HTMLDocumentNode_traverse(HTMLDOMNode *iface, nsCycleCollectionTrave
...
@@ -2126,6 +2131,8 @@ static void HTMLDocumentNode_traverse(HTMLDOMNode *iface, nsCycleCollectionTrave
{
{
HTMLDocumentNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
if
(
This
->
nsnode_selector
)
note_cc_edge
((
nsISupports
*
)
This
->
nsnode_selector
,
"This->nsnode_selector"
,
cb
);
if
(
This
->
nsdoc
)
if
(
This
->
nsdoc
)
note_cc_edge
((
nsISupports
*
)
This
->
nsdoc
,
"This->nsdoc"
,
cb
);
note_cc_edge
((
nsISupports
*
)
This
->
nsdoc
,
"This->nsdoc"
,
cb
);
}
}
...
@@ -2134,6 +2141,11 @@ static void HTMLDocumentNode_unlink(HTMLDOMNode *iface)
...
@@ -2134,6 +2141,11 @@ static void HTMLDocumentNode_unlink(HTMLDOMNode *iface)
{
{
HTMLDocumentNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
if
(
This
->
nsnode_selector
)
{
nsIDOMNodeSelector_Release
(
This
->
nsnode_selector
);
This
->
nsnode_selector
=
NULL
;
}
if
(
This
->
nsdoc
)
{
if
(
This
->
nsdoc
)
{
nsIDOMHTMLDocument
*
nsdoc
=
This
->
nsdoc
;
nsIDOMHTMLDocument
*
nsdoc
=
This
->
nsdoc
;
...
@@ -2285,6 +2297,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
...
@@ -2285,6 +2297,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
nsdoc
,
HTMLDocumentObj
*
doc_obj
,
HTMLInnerWindow
*
window
,
HTMLDocumentNode
**
ret
)
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
nsdoc
,
HTMLDocumentObj
*
doc_obj
,
HTMLInnerWindow
*
window
,
HTMLDocumentNode
**
ret
)
{
{
HTMLDocumentNode
*
doc
;
HTMLDocumentNode
*
doc
;
nsresult
nsres
;
doc
=
alloc_doc_node
(
doc_obj
,
window
);
doc
=
alloc_doc_node
(
doc_obj
,
window
);
if
(
!
doc
)
if
(
!
doc
)
...
@@ -2298,6 +2311,9 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
...
@@ -2298,6 +2311,9 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
nsIDOMHTMLDocument_AddRef
(
nsdoc
);
nsIDOMHTMLDocument_AddRef
(
nsdoc
);
doc
->
nsdoc
=
nsdoc
;
doc
->
nsdoc
=
nsdoc
;
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMNodeSelector
,
(
void
**
)
&
doc
->
nsnode_selector
);
assert
(
nsres
==
NS_OK
);
init_document_mutation
(
doc
);
init_document_mutation
(
doc
);
doc_init_events
(
doc
);
doc_init_events
(
doc
);
...
...
dlls/mshtml/mshtml_private.h
View file @
359a9041
...
@@ -689,6 +689,7 @@ struct HTMLDocumentNode {
...
@@ -689,6 +689,7 @@ struct HTMLDocumentNode {
HTMLInnerWindow
*
window
;
HTMLInnerWindow
*
window
;
nsIDOMHTMLDocument
*
nsdoc
;
nsIDOMHTMLDocument
*
nsdoc
;
nsIDOMNodeSelector
*
nsnode_selector
;
BOOL
content_ready
;
BOOL
content_ready
;
event_target_t
*
body_event_target
;
event_target_t
*
body_event_target
;
...
...
dlls/mshtml/navigate.c
View file @
359a9041
...
@@ -2004,19 +2004,13 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri)
...
@@ -2004,19 +2004,13 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri)
*/
*/
selector
=
heap_alloc
(
sizeof
(
selector_formatW
)
+
SysStringLen
(
frag
)
*
sizeof
(
WCHAR
));
selector
=
heap_alloc
(
sizeof
(
selector_formatW
)
+
SysStringLen
(
frag
)
*
sizeof
(
WCHAR
));
if
(
selector
)
{
if
(
selector
)
{
nsIDOMNodeSelector
*
node_selector
;
nsIDOMElement
*
nselem
=
NULL
;
nsIDOMElement
*
nselem
=
NULL
;
nsAString
selector_str
;
nsAString
selector_str
;
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
window
->
base
.
inner_window
->
doc
->
nsdoc
,
&
IID_nsIDOMNodeSelector
,
(
void
**
)
&
node_selector
);
assert
(
nsres
==
NS_OK
);
sprintfW
(
selector
,
selector_formatW
,
frag
);
sprintfW
(
selector
,
selector_formatW
,
frag
);
nsAString_InitDepend
(
&
selector_str
,
selector
);
nsAString_InitDepend
(
&
selector_str
,
selector
);
/* NOTE: Gecko doesn't set result to NULL if there is no match, so nselem must be initialized */
/* NOTE: Gecko doesn't set result to NULL if there is no match, so nselem must be initialized */
nsres
=
nsIDOMNodeSelector_QuerySelector
(
node_selector
,
&
selector_str
,
&
nselem
);
nsres
=
nsIDOMNodeSelector_QuerySelector
(
window
->
base
.
inner_window
->
doc
->
nsnode_selector
,
&
selector_str
,
&
nselem
);
nsIDOMNodeSelector_Release
(
node_selector
);
nsAString_Finish
(
&
selector_str
);
nsAString_Finish
(
&
selector_str
);
heap_free
(
selector
);
heap_free
(
selector
);
if
(
NS_SUCCEEDED
(
nsres
)
&&
nselem
)
{
if
(
NS_SUCCEEDED
(
nsres
)
&&
nselem
)
{
...
...
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