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
98789edc
Commit
98789edc
authored
Oct 08, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store nsIDOMHTMLDocument in HTMLDocument.
parent
04841e1f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
2 deletions
+50
-2
htmldoc.c
dlls/mshtml/htmldoc.c
+4
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
navigate.c
dlls/mshtml/navigate.c
+3
-1
nsembed.c
dlls/mshtml/nsembed.c
+40
-1
nsevents.c
dlls/mshtml/nsevents.c
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
98789edc
...
...
@@ -204,6 +204,8 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
ConnectionPointContainer_Destroy
(
&
This
->
cp_container
);
if
(
This
->
nsdoc
)
nsIDOMHTMLDocument_Release
(
This
->
nsdoc
);
if
(
This
->
nscontainer
)
NSContainer_Release
(
This
->
nscontainer
);
...
...
@@ -1636,6 +1638,8 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
init_dispex
(
&
ret
->
dispex
,
(
IUnknown
*
)
HTMLDOC
(
ret
),
&
HTMLDocument_dispex
);
ret
->
nscontainer
=
NSContainer_Create
(
ret
,
NULL
);
update_nsdocument
(
ret
);
ret
->
window
=
HTMLWindow_Create
(
ret
);
get_thread_hwnd
();
...
...
dlls/mshtml/mshtml_private.h
View file @
98789edc
...
...
@@ -246,6 +246,7 @@ struct HTMLDocument {
NSContainer
*
nscontainer
;
HTMLWindow
*
window
;
nsIDOMHTMLDocument
*
nsdoc
;
IOleClientSite
*
client
;
IDocHostUIHandler
*
hostui
;
...
...
@@ -530,6 +531,7 @@ void get_editor_controller(NSContainer*);
void
init_nsevents
(
NSContainer
*
);
void
add_nsevent_listener
(
NSContainer
*
,
LPCWSTR
);
nsresult
get_nsinterface
(
nsISupports
*
,
REFIID
,
void
**
);
void
update_nsdocument
(
HTMLDocument
*
);
void
check_event_attr
(
HTMLDocument
*
,
nsIDOMElement
*
);
void
release_event_target
(
event_target_t
*
);
...
...
dlls/mshtml/navigate.c
View file @
98789edc
...
...
@@ -883,8 +883,10 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
FIXME
(
"OnStartRequest failed: %08x
\n
"
,
nsres
);
/* events are reset when a new document URI is loaded, so re-initialise them here */
if
(
This
->
bsc
.
doc
&&
This
->
bsc
.
doc
->
bscallback
==
This
&&
This
->
bsc
.
doc
->
nscontainer
)
if
(
This
->
bsc
.
doc
&&
This
->
bsc
.
doc
->
bscallback
==
This
&&
This
->
bsc
.
doc
->
nscontainer
)
{
update_nsdocument
(
This
->
bsc
.
doc
);
init_nsevents
(
This
->
bsc
.
doc
->
nscontainer
);
}
}
This
->
bsc
.
readed
+=
This
->
nsstream
->
buf_size
;
...
...
dlls/mshtml/nsembed.c
View file @
98789edc
...
...
@@ -866,6 +866,39 @@ void set_ns_editmode(NSContainer *This)
nsIWebBrowser_SetParentURIContentListener
(
This
->
webbrowser
,
NSURICL
(
This
));
}
void
update_nsdocument
(
HTMLDocument
*
doc
)
{
nsIDOMHTMLDocument
*
nsdoc
;
nsIDOMDocument
*
nsdomdoc
;
nsresult
nsres
;
if
(
!
doc
->
nscontainer
||
!
doc
->
nscontainer
->
navigation
)
return
;
nsres
=
nsIWebNavigation_GetDocument
(
doc
->
nscontainer
->
navigation
,
&
nsdomdoc
);
if
(
NS_FAILED
(
nsres
)
||
!
nsdomdoc
)
{
ERR
(
"GetDocument failed: %08x
\n
"
,
nsres
);
return
;
}
nsres
=
nsIDOMDocument_QueryInterface
(
nsdomdoc
,
&
IID_nsIDOMHTMLDocument
,
(
void
**
)
&
nsdoc
);
nsIDOMDocument_Release
(
nsdomdoc
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLDocument iface: %08x
\n
"
,
nsres
);
return
;
}
if
(
nsdoc
==
doc
->
nsdoc
)
{
nsIDOMHTMLDocument_Release
(
nsdoc
);
return
;
}
if
(
doc
->
nsdoc
)
nsIDOMHTMLDocument_Release
(
doc
->
nsdoc
);
doc
->
nsdoc
=
nsdoc
;
}
void
close_gecko
(
void
)
{
TRACE
(
"()
\n
"
);
...
...
@@ -963,8 +996,14 @@ static nsresult NSAPI nsWebBrowserChrome_SetStatus(nsIWebBrowserChrome *iface,
PRUint32
statusType
,
const
PRUnichar
*
status
)
{
NSContainer
*
This
=
NSWBCHROME_THIS
(
iface
);
TRACE
(
"(%p)->(%d %s)
\n
"
,
This
,
statusType
,
debugstr_w
(
status
));
return
NS_ERROR_NOT_IMPLEMENTED
;
/* FIXME: This hack should be removed when we'll load all pages by URLMoniker */
if
(
This
->
doc
)
update_nsdocument
(
This
->
doc
);
return
NS_OK
;
}
static
nsresult
NSAPI
nsWebBrowserChrome_GetWebBrowser
(
nsIWebBrowserChrome
*
iface
,
...
...
dlls/mshtml/nsevents.c
View file @
98789edc
...
...
@@ -139,6 +139,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
if
(
!
This
->
doc
)
return
NS_OK
;
update_nsdocument
(
This
->
doc
);
connect_scripts
(
This
->
doc
);
setup_nswindow
(
This
->
doc
->
window
);
...
...
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