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
27f799d8
Commit
27f799d8
authored
Jul 30, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store inner window directly in HTMLDocumentNode.
parent
348e5d85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
htmldoc.c
dlls/mshtml/htmldoc.c
+14
-5
htmlwindow.c
dlls/mshtml/htmlwindow.c
+4
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-1
No files found.
dlls/mshtml/htmldoc.c
View file @
27f799d8
...
...
@@ -2091,8 +2091,13 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
This
->
plugin_hosts
),
PluginHost
,
entry
));
if
(
This
->
nsdoc
)
{
assert
(
!
This
->
window
);
release_document_mutation
(
This
);
nsIDOMHTMLDocument_Release
(
This
->
nsdoc
);
}
else
if
(
This
->
window
)
{
/* document fragments own reference to inner window */
IHTMLWindow2_Release
(
&
This
->
window
->
base
.
IHTMLWindow2_iface
);
This
->
window
=
NULL
;
}
heap_free
(
This
->
event_vector
);
...
...
@@ -2124,6 +2129,7 @@ static void HTMLDocumentNode_unlink(HTMLDOMNode *iface)
release_document_mutation
(
This
);
This
->
nsdoc
=
NULL
;
nsIDOMHTMLDocument_Release
(
nsdoc
);
This
->
window
=
NULL
;
}
}
...
...
@@ -2238,7 +2244,7 @@ static dispex_static_data_t HTMLDocumentNode_dispex = {
HTMLDocumentNode_iface_tids
};
static
HTMLDocumentNode
*
alloc_doc_node
(
HTMLDocumentObj
*
doc_obj
,
HTML
Out
erWindow
*
window
)
static
HTMLDocumentNode
*
alloc_doc_node
(
HTMLDocumentObj
*
doc_obj
,
HTML
Inn
erWindow
*
window
)
{
HTMLDocumentNode
*
doc
;
...
...
@@ -2249,7 +2255,8 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLOuterWindo
doc
->
ref
=
1
;
doc
->
basedoc
.
doc_node
=
doc
;
doc
->
basedoc
.
doc_obj
=
doc_obj
;
doc
->
basedoc
.
window
=
window
;
doc
->
basedoc
.
window
=
window
->
base
.
outer_window
;
doc
->
window
=
window
;
init_dispex
(
&
doc
->
node
.
dispex
,
(
IUnknown
*
)
&
doc
->
node
.
IHTMLDOMNode_iface
,
&
HTMLDocumentNode_dispex
);
...
...
@@ -2264,7 +2271,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLOuterWindo
return
doc
;
}
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
nsdoc
,
HTMLDocumentObj
*
doc_obj
,
HTML
Out
erWindow
*
window
,
HTMLDocumentNode
**
ret
)
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
nsdoc
,
HTMLDocumentObj
*
doc_obj
,
HTML
Inn
erWindow
*
window
,
HTMLDocumentNode
**
ret
)
{
HTMLDocumentNode
*
doc
;
...
...
@@ -2272,7 +2279,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
if
(
!
doc
)
return
E_OUTOFMEMORY
;
if
(
!
doc_obj
->
basedoc
.
window
||
window
==
doc_obj
->
basedoc
.
window
)
if
(
!
doc_obj
->
basedoc
.
window
||
window
->
base
.
outer_window
==
doc_obj
->
basedoc
.
window
)
doc
->
basedoc
.
cp_container
.
forward_container
=
&
doc_obj
->
basedoc
.
cp_container
;
HTMLDOMNode_Init
(
doc
,
&
doc
->
node
,
(
nsIDOMNode
*
)
nsdoc
);
...
...
@@ -2294,10 +2301,12 @@ HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node,
{
HTMLDocumentNode
*
doc_frag
;
doc_frag
=
alloc_doc_node
(
doc_node
->
basedoc
.
doc_obj
,
doc_node
->
basedoc
.
window
);
doc_frag
=
alloc_doc_node
(
doc_node
->
basedoc
.
doc_obj
,
doc_node
->
window
);
if
(
!
doc_frag
)
return
E_OUTOFMEMORY
;
IHTMLWindow2_AddRef
(
&
doc_frag
->
window
->
base
.
IHTMLWindow2_iface
);
HTMLDOMNode_Init
(
doc_node
,
&
doc_frag
->
node
,
nsnode
);
doc_frag
->
node
.
vtbl
=
&
HTMLDocumentFragmentImplVtbl
;
doc_frag
->
node
.
cp_container
=
&
doc_frag
->
basedoc
.
cp_container
;
...
...
dlls/mshtml/htmlwindow.c
View file @
27f799d8
...
...
@@ -239,8 +239,10 @@ static void release_inner_window(HTMLInnerWindow *This)
abort_window_bindings
(
This
);
release_script_hosts
(
This
);
if
(
This
->
doc
)
if
(
This
->
doc
)
{
This
->
doc
->
window
=
NULL
;
htmldoc_release
(
&
This
->
doc
->
basedoc
);
}
release_dispex
(
&
This
->
dispex
);
...
...
@@ -2745,7 +2747,7 @@ HRESULT update_window_doc(HTMLInnerWindow *window)
return
E_FAIL
;
}
hres
=
create_doc_from_nsdoc
(
nshtmldoc
,
outer_window
->
doc_obj
,
outer_
window
,
&
window
->
doc
);
hres
=
create_doc_from_nsdoc
(
nshtmldoc
,
outer_window
->
doc_obj
,
window
,
&
window
->
doc
);
nsIDOMHTMLDocument_Release
(
nshtmldoc
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/mshtml/mshtml_private.h
View file @
27f799d8
...
...
@@ -679,6 +679,8 @@ struct HTMLDocumentNode {
LONG
ref
;
HTMLInnerWindow
*
window
;
nsIDOMHTMLDocument
*
nsdoc
;
BOOL
content_ready
;
event_target_t
*
body_event_target
;
...
...
@@ -700,7 +702,7 @@ struct HTMLDocumentNode {
HRESULT
HTMLDocument_Create
(
IUnknown
*
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLLoadOptions_Create
(
IUnknown
*
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
,
HTMLDocumentObj
*
,
HTML
Out
erWindow
*
,
HTMLDocumentNode
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
,
HTMLDocumentObj
*
,
HTML
Inn
erWindow
*
,
HTMLDocumentNode
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_document_fragment
(
nsIDOMNode
*
,
HTMLDocumentNode
*
,
HTMLDocumentNode
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLOuterWindow_Create
(
HTMLDocumentObj
*
,
nsIDOMWindow
*
,
HTMLOuterWindow
*
,
HTMLOuterWindow
**
)
DECLSPEC_HIDDEN
;
...
...
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