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
79356c65
Commit
79356c65
authored
Jun 25, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved document node from HTMLOuterWindow to HTMLInnerWindow.
parent
08964ede
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
41 additions
and
38 deletions
+41
-38
htmldoc.c
dlls/mshtml/htmldoc.c
+3
-4
htmlevent.c
dlls/mshtml/htmlevent.c
+1
-1
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-1
htmlframe.c
dlls/mshtml/htmlframe.c
+2
-2
htmlframebase.c
dlls/mshtml/htmlframebase.c
+2
-2
htmliframe.c
dlls/mshtml/htmliframe.c
+2
-2
htmlimg.c
dlls/mshtml/htmlimg.c
+6
-3
htmloption.c
dlls/mshtml/htmloption.c
+3
-3
htmlwindow.c
dlls/mshtml/htmlwindow.c
+0
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-2
navigate.c
dlls/mshtml/navigate.c
+6
-6
npplugin.c
dlls/mshtml/npplugin.c
+4
-4
nsio.c
dlls/mshtml/nsio.c
+4
-4
persist.c
dlls/mshtml/persist.c
+1
-1
script.c
dlls/mshtml/script.c
+3
-3
No files found.
dlls/mshtml/htmldoc.c
View file @
79356c65
...
...
@@ -1568,7 +1568,7 @@ static void HTMLDocument_on_advise(IUnknown *iface, cp_static_data_t *cp)
HTMLDocument
*
This
=
impl_from_IHTMLDocument2
((
IHTMLDocument2
*
)
iface
);
if
(
This
->
window
)
update_cp_events
(
This
->
window
,
&
This
->
doc_node
->
node
.
event_target
,
cp
,
This
->
doc_node
->
node
.
nsnode
);
update_cp_events
(
This
->
window
->
base
.
inner_window
,
&
This
->
doc_node
->
node
.
event_target
,
cp
,
This
->
doc_node
->
node
.
nsnode
);
}
static
inline
HTMLDocument
*
impl_from_ISupportErrorInfo
(
ISupportErrorInfo
*
iface
)
...
...
@@ -2448,7 +2448,6 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
if
(
FAILED
(
hres
))
return
hres
;
nsres
=
nsIWebBrowser_GetContentDOMWindow
(
doc
->
nscontainer
->
webbrowser
,
&
nswindow
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"GetContentDOMWindow failed: %08x
\n
"
,
nsres
);
...
...
@@ -2461,8 +2460,8 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
return
hres
;
}
if
(
!
doc
->
basedoc
.
doc_node
&&
doc
->
basedoc
.
window
->
doc
)
{
doc
->
basedoc
.
doc_node
=
doc
->
basedoc
.
window
->
doc
;
if
(
!
doc
->
basedoc
.
doc_node
&&
doc
->
basedoc
.
window
->
base
.
inner_window
->
doc
)
{
doc
->
basedoc
.
doc_node
=
doc
->
basedoc
.
window
->
base
.
inner_window
->
doc
;
htmldoc_addref
(
&
doc
->
basedoc
.
doc_node
->
basedoc
);
}
...
...
dlls/mshtml/htmlevent.c
View file @
79356c65
...
...
@@ -1348,7 +1348,7 @@ HRESULT detach_event(event_target_t *event_target, HTMLDocument *doc, BSTR name,
return
S_OK
;
}
void
update_cp_events
(
HTML
Out
erWindow
*
window
,
event_target_t
**
event_target_ptr
,
cp_static_data_t
*
cp
,
nsIDOMNode
*
nsnode
)
void
update_cp_events
(
HTML
Inn
erWindow
*
window
,
event_target_t
**
event_target_ptr
,
cp_static_data_t
*
cp
,
nsIDOMNode
*
nsnode
)
{
event_target_t
*
event_target
;
int
i
;
...
...
dlls/mshtml/htmlevent.h
View file @
79356c65
...
...
@@ -54,7 +54,7 @@ HRESULT attach_event(event_target_t**,nsIDOMNode*,HTMLDocument*,BSTR,IDispatch*,
HRESULT
detach_event
(
event_target_t
*
,
HTMLDocument
*
,
BSTR
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
HRESULT
dispatch_event
(
HTMLDOMNode
*
,
const
WCHAR
*
,
VARIANT
*
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
call_fire_event
(
HTMLDOMNode
*
,
eventid_t
)
DECLSPEC_HIDDEN
;
void
update_cp_events
(
HTML
Out
erWindow
*
,
event_target_t
**
,
cp_static_data_t
*
,
nsIDOMNode
*
)
DECLSPEC_HIDDEN
;
void
update_cp_events
(
HTML
Inn
erWindow
*
,
event_target_t
**
,
cp_static_data_t
*
,
nsIDOMNode
*
)
DECLSPEC_HIDDEN
;
HRESULT
doc_init_events
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
detach_events
(
HTMLDocumentNode
*
doc
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/htmlframe.c
View file @
79356c65
...
...
@@ -206,12 +206,12 @@ static HRESULT HTMLFrameElement_get_document(HTMLDOMNode *iface, IDispatch **p)
{
HTMLFrameElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
if
(
!
This
->
framebase
.
content_window
||
!
This
->
framebase
.
content_window
->
doc
)
{
if
(
!
This
->
framebase
.
content_window
||
!
This
->
framebase
.
content_window
->
base
.
inner_window
->
doc
)
{
*
p
=
NULL
;
return
S_OK
;
}
*
p
=
(
IDispatch
*
)
&
This
->
framebase
.
content_window
->
doc
->
basedoc
.
IHTMLDocument2_iface
;
*
p
=
(
IDispatch
*
)
&
This
->
framebase
.
content_window
->
base
.
inner_window
->
doc
->
basedoc
.
IHTMLDocument2_iface
;
IDispatch_AddRef
(
*
p
);
return
S_OK
;
}
...
...
dlls/mshtml/htmlframebase.c
View file @
79356c65
...
...
@@ -461,12 +461,12 @@ static HRESULT WINAPI HTMLFrameBase2_get_readyState(IHTMLFrameBase2 *iface, BSTR
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
content_window
||
!
This
->
content_window
->
doc
)
{
if
(
!
This
->
content_window
||
!
This
->
content_window
->
base
.
inner_window
->
doc
)
{
FIXME
(
"no document associated
\n
"
);
return
E_FAIL
;
}
return
IHTMLDocument2_get_readyState
(
&
This
->
content_window
->
doc
->
basedoc
.
IHTMLDocument2_iface
,
p
);
return
IHTMLDocument2_get_readyState
(
&
This
->
content_window
->
base
.
inner_window
->
doc
->
basedoc
.
IHTMLDocument2_iface
,
p
);
}
static
HRESULT
WINAPI
HTMLFrameBase2_put_allowTransparency
(
IHTMLFrameBase2
*
iface
,
VARIANT_BOOL
v
)
...
...
dlls/mshtml/htmliframe.c
View file @
79356c65
...
...
@@ -184,12 +184,12 @@ static HRESULT HTMLIFrame_get_document(HTMLDOMNode *iface, IDispatch **p)
{
HTMLIFrame
*
This
=
impl_from_HTMLDOMNode
(
iface
);
if
(
!
This
->
framebase
.
content_window
||
!
This
->
framebase
.
content_window
->
doc
)
{
if
(
!
This
->
framebase
.
content_window
||
!
This
->
framebase
.
content_window
->
base
.
inner_window
->
doc
)
{
*
p
=
NULL
;
return
S_OK
;
}
*
p
=
(
IDispatch
*
)
&
This
->
framebase
.
content_window
->
doc
->
basedoc
.
IHTMLDocument2_iface
;
*
p
=
(
IDispatch
*
)
&
This
->
framebase
.
content_window
->
base
.
inner_window
->
doc
->
basedoc
.
IHTMLDocument2_iface
;
IDispatch_AddRef
(
*
p
);
return
S_OK
;
}
...
...
dlls/mshtml/htmlimg.c
View file @
79356c65
...
...
@@ -807,6 +807,7 @@ static HRESULT WINAPI HTMLImageElementFactory_create(IHTMLImageElementFactory *i
VARIANT
width
,
VARIANT
height
,
IHTMLImgElement
**
img_elem
)
{
HTMLImageElementFactory
*
This
=
impl_from_IHTMLImageElementFactory
(
iface
);
HTMLDocumentNode
*
doc
;
IHTMLImgElement
*
img
;
HTMLElement
*
elem
;
nsIDOMHTMLElement
*
nselem
;
...
...
@@ -818,18 +819,20 @@ static HRESULT WINAPI HTMLImageElementFactory_create(IHTMLImageElementFactory *i
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_variant
(
&
width
),
debugstr_variant
(
&
height
),
img_elem
);
if
(
!
This
->
window
||
!
This
->
window
->
doc
)
{
if
(
!
This
->
window
||
!
This
->
window
->
base
.
inner_window
->
doc
)
{
WARN
(
"NULL doc
\n
"
);
return
E_UNEXPECTED
;
}
doc
=
This
->
window
->
base
.
inner_window
->
doc
;
*
img_elem
=
NULL
;
hres
=
create_nselem
(
This
->
window
->
doc
,
imgW
,
&
nselem
);
hres
=
create_nselem
(
doc
,
imgW
,
&
nselem
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
HTMLElement_Create
(
This
->
window
->
doc
,
(
nsIDOMNode
*
)
nselem
,
FALSE
,
&
elem
);
hres
=
HTMLElement_Create
(
doc
,
(
nsIDOMNode
*
)
nselem
,
FALSE
,
&
elem
);
nsIDOMHTMLElement_Release
(
nselem
);
if
(
FAILED
(
hres
))
{
ERR
(
"HTMLElement_Create failed
\n
"
);
...
...
dlls/mshtml/htmloption.c
View file @
79356c65
...
...
@@ -468,18 +468,18 @@ static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory
TRACE
(
"(%p)->(%s %s %s %s %p)
\n
"
,
This
,
debugstr_variant
(
&
text
),
debugstr_variant
(
&
value
),
debugstr_variant
(
&
defaultselected
),
debugstr_variant
(
&
selected
),
optelem
);
if
(
!
This
->
window
||
!
This
->
window
->
doc
)
{
if
(
!
This
->
window
||
!
This
->
window
->
base
.
inner_window
->
doc
)
{
WARN
(
"NULL doc
\n
"
);
return
E_UNEXPECTED
;
}
*
optelem
=
NULL
;
hres
=
create_nselem
(
This
->
window
->
doc
,
optionW
,
&
nselem
);
hres
=
create_nselem
(
This
->
window
->
base
.
inner_window
->
doc
,
optionW
,
&
nselem
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
get_node
(
This
->
window
->
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
,
&
node
);
hres
=
get_node
(
This
->
window
->
base
.
inner_window
->
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
,
&
node
);
nsIDOMHTMLElement_Release
(
nselem
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/mshtml/htmlwindow.c
View file @
79356c65
This diff is collapsed.
Click to expand it.
dlls/mshtml/mshtml_private.h
View file @
79356c65
...
...
@@ -321,7 +321,6 @@ struct HTMLOuterWindow {
windowref_t
*
window_ref
;
LONG
task_magic
;
HTMLDocumentNode
*
doc
;
HTMLDocumentObj
*
doc_obj
;
nsIDOMWindow
*
nswindow
;
HTMLOuterWindow
*
parent
;
...
...
@@ -357,6 +356,8 @@ struct HTMLOuterWindow {
struct
HTMLInnerWindow
{
HTMLWindow
base
;
HTMLDocumentNode
*
doc
;
};
typedef
enum
{
...
...
@@ -656,7 +657,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument*,HTMLDocumentObj*,HTMLOuterWind
HRESULT
create_document_fragment
(
nsIDOMNode
*
,
HTMLDocumentNode
*
,
HTMLDocumentNode
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLOuterWindow_Create
(
HTMLDocumentObj
*
,
nsIDOMWindow
*
,
HTMLOuterWindow
*
,
HTMLOuterWindow
**
)
DECLSPEC_HIDDEN
;
void
update_window_doc
(
HTMLOuterWindow
*
)
DECLSPEC_HIDDEN
;
HRESULT
update_window_doc
(
HTMLOuterWindow
*
)
DECLSPEC_HIDDEN
;
HTMLOuterWindow
*
nswindow_to_window
(
const
nsIDOMWindow
*
)
DECLSPEC_HIDDEN
;
void
get_top_window
(
HTMLOuterWindow
*
,
HTMLOuterWindow
**
)
DECLSPEC_HIDDEN
;
HTMLOptionElementFactory
*
HTMLOptionElementFactory_Create
(
HTMLOuterWindow
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
79356c65
...
...
@@ -726,7 +726,7 @@ HRESULT start_binding(HTMLOuterWindow *window, HTMLDocumentNode *doc, BSCallback
bscallback
->
doc
=
doc
;
if
(
!
doc
&&
window
)
bscallback
->
doc
=
window
->
doc
;
bscallback
->
doc
=
window
->
base
.
inner_window
->
doc
;
/* NOTE: IE7 calls IsSystemMoniker here*/
...
...
@@ -998,10 +998,10 @@ static HRESULT on_start_nsrequest(nsChannelBSC *This)
list_remove
(
&
This
->
bsc
.
entry
);
list_init
(
&
This
->
bsc
.
entry
);
update_window_doc
(
This
->
window
);
if
(
This
->
window
->
doc
!=
This
->
bsc
.
doc
)
{
if
(
This
->
window
->
base
.
inner_window
->
doc
!=
This
->
bsc
.
doc
)
{
if
(
This
->
bsc
.
doc
)
list_remove
(
&
This
->
bsc
.
entry
);
This
->
bsc
.
doc
=
This
->
window
->
doc
;
This
->
bsc
.
doc
=
This
->
window
->
base
.
inner_window
->
doc
;
}
list_add_head
(
&
This
->
bsc
.
doc
->
bindings
,
&
This
->
bsc
.
entry
);
if
(
This
->
window
->
readystate
!=
READYSTATE_LOADING
)
...
...
@@ -1276,7 +1276,7 @@ static HRESULT nsChannelBSC_start_binding(BSCallback *bsc)
nsChannelBSC
*
This
=
nsChannelBSC_from_BSCallback
(
bsc
);
if
(
This
->
window
)
This
->
window
->
doc
->
skip_mutation_notif
=
FALSE
;
This
->
window
->
base
.
inner_window
->
doc
->
skip_mutation_notif
=
FALSE
;
return
S_OK
;
}
...
...
@@ -1668,7 +1668,7 @@ void set_window_bscallback(HTMLOuterWindow *window, nsChannelBSC *callback)
if
(
callback
)
{
callback
->
window
=
window
;
IBindStatusCallback_AddRef
(
&
callback
->
bsc
.
IBindStatusCallback_iface
);
callback
->
bsc
.
doc
=
window
->
doc
;
callback
->
bsc
.
doc
=
window
->
base
.
inner_window
->
doc
;
}
}
...
...
@@ -2150,7 +2150,7 @@ HRESULT navigate_url(HTMLOuterWindow *window, const WCHAR *new_url, const WCHAR
if
(
window
->
doc_obj
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
BOOL
cancel
;
hres
=
hlink_frame_navigate
(
&
window
->
doc
->
basedoc
,
url
,
NULL
,
0
,
&
cancel
);
hres
=
hlink_frame_navigate
(
&
window
->
base
.
inner_window
->
doc
->
basedoc
,
url
,
NULL
,
0
,
&
cancel
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/mshtml/npplugin.c
View file @
79356c65
...
...
@@ -234,7 +234,7 @@ static nsIDOMElement *get_dom_element(NPP instance)
return
elem
;
}
static
HTML
Out
erWindow
*
get_elem_window
(
nsIDOMElement
*
elem
)
static
HTML
Inn
erWindow
*
get_elem_window
(
nsIDOMElement
*
elem
)
{
nsIDOMWindow
*
nswindow
;
nsIDOMDocument
*
nsdoc
;
...
...
@@ -253,7 +253,7 @@ static HTMLOuterWindow *get_elem_window(nsIDOMElement *elem)
window
=
nswindow_to_window
(
nswindow
);
nsIDOMWindow_Release
(
nswindow
);
return
window
;
return
window
->
base
.
inner_window
;
}
static
BOOL
parse_classid
(
const
PRUnichar
*
classid
,
CLSID
*
clsid
)
...
...
@@ -313,7 +313,7 @@ static BOOL get_elem_clsid(nsIDOMElement *elem, CLSID *clsid)
return
ret
;
}
static
IUnknown
*
create_activex_object
(
HTML
Out
erWindow
*
window
,
nsIDOMElement
*
nselem
,
CLSID
*
clsid
)
static
IUnknown
*
create_activex_object
(
HTML
Inn
erWindow
*
window
,
nsIDOMElement
*
nselem
,
CLSID
*
clsid
)
{
IClassFactoryEx
*
cfex
;
IClassFactory
*
cf
;
...
...
@@ -357,7 +357,7 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I
char
**
argv
,
NPSavedData
*
saved
)
{
nsIDOMElement
*
nselem
;
HTML
Out
erWindow
*
window
;
HTML
Inn
erWindow
*
window
;
IUnknown
*
obj
;
CLSID
clsid
;
NPError
err
=
NPERR_NO_ERROR
;
...
...
dlls/mshtml/nsio.c
View file @
79356c65
...
...
@@ -285,10 +285,10 @@ HRESULT load_nsuri(HTMLOuterWindow *window, nsWineURI *uri, nsChannelBSC *channe
}
uri
->
channel_bsc
=
channelbsc
;
doc
=
window
->
doc
;
doc
=
window
->
base
.
inner_window
->
doc
;
doc
->
skip_mutation_notif
=
TRUE
;
nsres
=
nsIDocShell_LoadURI
(
doc_shell
,
(
nsIURI
*
)
&
uri
->
nsIURL_iface
,
NULL
,
flags
,
FALSE
);
if
(
doc
==
window
->
doc
)
if
(
doc
==
window
->
base
.
inner_window
->
doc
)
doc
->
skip_mutation_notif
=
FALSE
;
uri
->
channel_bsc
=
NULL
;
nsIDocShell_Release
(
doc_shell
);
...
...
@@ -1022,9 +1022,9 @@ static nsresult async_open(nsChannel *This, HTMLOuterWindow *window, BOOL is_doc
}
else
{
start_binding_task_t
*
task
=
heap_alloc
(
sizeof
(
start_binding_task_t
));
task
->
doc
=
window
->
doc
;
task
->
doc
=
window
->
base
.
inner_window
->
doc
;
task
->
bscallback
=
bscallback
;
push_task
(
&
task
->
header
,
start_binding_proc
,
start_binding_task_destr
,
window
->
doc
->
basedoc
.
task_magic
);
push_task
(
&
task
->
header
,
start_binding_proc
,
start_binding_task_destr
,
window
->
base
.
inner_window
->
doc
->
basedoc
.
task_magic
);
}
return
NS_OK
;
...
...
dlls/mshtml/persist.c
View file @
79356c65
...
...
@@ -406,7 +406,7 @@ void set_ready_state(HTMLOuterWindow *window, READYSTATE readystate)
if
(
window
->
doc_obj
&&
window
->
doc_obj
->
basedoc
.
window
==
window
)
call_property_onchanged
(
&
window
->
doc_obj
->
basedoc
.
cp_propnotif
,
DISPID_READYSTATE
);
fire_event
(
window
->
doc
,
EVENTID_READYSTATECHANGE
,
FALSE
,
window
->
doc
->
node
.
nsnode
,
NULL
);
fire_event
(
window
->
base
.
inner_window
->
doc
,
EVENTID_READYSTATECHANGE
,
FALSE
,
window
->
base
.
inner_
window
->
doc
->
node
.
nsnode
,
NULL
);
if
(
window
->
frame_element
)
fire_event
(
window
->
frame_element
->
element
.
node
.
doc
,
EVENTID_READYSTATECHANGE
,
...
...
dlls/mshtml/script.c
View file @
79356c65
...
...
@@ -573,10 +573,10 @@ static HRESULT WINAPI ASServiceProvider_QueryService(IServiceProvider *iface, RE
if
(
IsEqualGUID
(
&
SID_SInternetHostSecurityManager
,
guidService
))
{
TRACE
(
"(%p)->(SID_SInternetHostSecurityManager)
\n
"
,
This
);
if
(
!
This
->
window
||
!
This
->
window
->
doc
)
if
(
!
This
->
window
||
!
This
->
window
->
base
.
inner_window
->
doc
)
return
E_NOINTERFACE
;
return
IInternetHostSecurityManager_QueryInterface
(
&
This
->
window
->
doc
->
IInternetHostSecurityManager_iface
,
return
IInternetHostSecurityManager_QueryInterface
(
&
This
->
window
->
base
.
inner_window
->
doc
->
IInternetHostSecurityManager_iface
,
riid
,
ppv
);
}
...
...
@@ -659,7 +659,7 @@ static void parse_extern_script(ScriptHost *script_host, LPCWSTR src)
if
(
FAILED
(
hres
))
return
;
hres
=
bind_mon_to_buffer
(
script_host
->
window
->
doc
,
mon
,
(
void
**
)
&
buf
,
&
size
);
hres
=
bind_mon_to_buffer
(
script_host
->
window
->
base
.
inner_window
->
doc
,
mon
,
(
void
**
)
&
buf
,
&
size
);
IMoniker_Release
(
mon
);
if
(
FAILED
(
hres
))
return
;
...
...
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