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
d09692d1
Commit
d09692d1
authored
Jun 10, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Push TASK_PARSECOMPLETE in load event if Gecko is available.
parent
5c08a14c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
7 deletions
+51
-7
navigate.c
dlls/mshtml/navigate.c
+2
-2
nsembed.c
dlls/mshtml/nsembed.c
+49
-5
No files found.
dlls/mshtml/navigate.c
View file @
d09692d1
...
@@ -404,7 +404,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
...
@@ -404,7 +404,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
}
}
}
}
if
(
This
->
doc
)
{
if
(
This
->
doc
&&
!
This
->
doc
->
nscontainer
)
{
task_t
*
task
=
mshtml_alloc
(
sizeof
(
task_t
));
task_t
*
task
=
mshtml_alloc
(
sizeof
(
task_t
));
task
->
doc
=
This
->
doc
;
task
->
doc
=
This
->
doc
;
...
@@ -413,7 +413,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
...
@@ -413,7 +413,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
/*
/*
* This should be done in the worker thread that parses HTML,
* This should be done in the worker thread that parses HTML,
* but we don't have such thread
(Gecko parses HTML for us)
.
* but we don't have such thread.
*/
*/
push_task
(
task
);
push_task
(
task
);
}
}
...
...
dlls/mshtml/nsembed.c
View file @
d09692d1
...
@@ -628,6 +628,28 @@ void set_ns_editmode(NSContainer *This)
...
@@ -628,6 +628,28 @@ void set_ns_editmode(NSContainer *This)
nsIWebBrowser_SetParentURIContentListener
(
This
->
webbrowser
,
NSURICL
(
This
));
nsIWebBrowser_SetParentURIContentListener
(
This
->
webbrowser
,
NSURICL
(
This
));
}
}
static
void
handle_load_event
(
NSContainer
*
This
,
nsIDOMEvent
*
event
)
{
task_t
*
task
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
doc
)
return
;
task
=
mshtml_alloc
(
sizeof
(
task_t
));
task
->
doc
=
This
->
doc
;
task
->
task_id
=
TASK_PARSECOMPLETE
;
task
->
next
=
NULL
;
/*
* This should be done in the worker thread that parses HTML,
* but we don't have such thread (Gecko parses HTML for us).
*/
push_task
(
task
);
}
void
close_gecko
(
void
)
void
close_gecko
(
void
)
{
{
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
...
@@ -1283,11 +1305,24 @@ static nsrefcnt NSAPI nsDOMEventListener_Release(nsIDOMEventListener *iface)
...
@@ -1283,11 +1305,24 @@ static nsrefcnt NSAPI nsDOMEventListener_Release(nsIDOMEventListener *iface)
static
nsresult
NSAPI
nsDOMEventListener_HandleEvent
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
static
nsresult
NSAPI
nsDOMEventListener_HandleEvent
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
{
{
NSContainer
*
This
=
NSEVENTLIST_THIS
(
iface
);
NSContainer
*
This
=
NSEVENTLIST_THIS
(
iface
);
nsAString
type_str
;
const
PRUnichar
*
type
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
event
)
;
static
const
PRUnichar
loadW
[]
=
{
'l'
,
'o'
,
'a'
,
'd'
,
0
}
;
if
(
This
->
doc
->
usermode
==
EDITMODE
)
nsAString_Init
(
&
type_str
,
NULL
);
handle_edit_event
(
This
->
doc
,
event
);
nsIDOMEvent_GetType
(
event
,
&
type_str
);
nsAString_GetData
(
&
type_str
,
&
type
,
NULL
);
TRACE
(
"(%p)->(%p) %s
\n
"
,
This
,
event
,
debugstr_w
(
type
));
if
(
!
strcmpW
(
loadW
,
type
))
{
handle_load_event
(
This
,
event
);
}
else
if
(
This
->
doc
&&
This
->
doc
->
usermode
==
EDITMODE
)
{
handle_edit_event
(
This
->
doc
,
event
);
}
nsAString_Finish
(
&
type_str
);
return
NS_OK
;
return
NS_OK
;
}
}
...
@@ -1519,14 +1554,23 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
...
@@ -1519,14 +1554,23 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
nsres
=
nsIDOMWindow_QueryInterface
(
dom_window
,
&
IID_nsIDOMEventTarget
,
(
void
**
)
&
target
);
nsres
=
nsIDOMWindow_QueryInterface
(
dom_window
,
&
IID_nsIDOMEventTarget
,
(
void
**
)
&
target
);
nsIDOMWindow_Release
(
dom_window
);
nsIDOMWindow_Release
(
dom_window
);
if
(
NS_SUCCEEDED
(
nsres
))
{
if
(
NS_SUCCEEDED
(
nsres
))
{
nsAString
keypress_str
;
nsAString
keypress_str
,
load_str
;
static
const
PRUnichar
wsz_keypress
[]
=
{
'k'
,
'e'
,
'y'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
0
};
static
const
PRUnichar
wsz_keypress
[]
=
{
'k'
,
'e'
,
'y'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
0
};
static
const
PRUnichar
wsz_load
[]
=
{
'l'
,
'o'
,
'a'
,
'd'
,
0
};
nsAString_Init
(
&
keypress_str
,
wsz_keypress
);
nsAString_Init
(
&
keypress_str
,
wsz_keypress
);
nsres
=
nsIDOMEventTarget_AddEventListener
(
target
,
&
keypress_str
,
NSEVENTLIST
(
ret
),
TRUE
);
nsres
=
nsIDOMEventTarget_AddEventListener
(
target
,
&
keypress_str
,
NSEVENTLIST
(
ret
),
TRUE
);
nsAString_Finish
(
&
keypress_str
);
nsAString_Finish
(
&
keypress_str
);
nsIDOMEventTarget_Release
(
target
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
ERR
(
"AddEventTarget failed: %08x
\n
"
,
nsres
);
ERR
(
"AddEventTarget failed: %08x
\n
"
,
nsres
);
nsAString_Init
(
&
load_str
,
wsz_load
);
nsres
=
nsIDOMEventTarget_AddEventListener
(
target
,
&
load_str
,
NSEVENTLIST
(
ret
),
TRUE
);
nsAString_Finish
(
&
load_str
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"AddEventTarget failed: %08x
\n
"
,
nsres
);
nsIDOMEventTarget_Release
(
target
);
}
else
{
}
else
{
ERR
(
"Could not get nsIDOMEventTarget interface: %08x
\n
"
,
nsres
);
ERR
(
"Could not get nsIDOMEventTarget interface: %08x
\n
"
,
nsres
);
}
}
...
...
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