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
ccbee09f
Commit
ccbee09f
authored
Oct 16, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added support for IHTMLScriptElement::put_src calls during parser callback.
parent
fdbbaa1f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
2 deletions
+44
-2
htmlscript.c
dlls/mshtml/htmlscript.c
+11
-2
htmlscript.h
dlls/mshtml/htmlscript.h
+5
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
mutation.c
dlls/mshtml/mutation.c
+14
-0
script.c
dlls/mshtml/script.c
+12
-0
No files found.
dlls/mshtml/htmlscript.c
View file @
ccbee09f
...
...
@@ -123,8 +123,17 @@ static HRESULT WINAPI HTMLScriptElement_put_src(IHTMLScriptElement *iface, BSTR
}
if
(
window
->
parser_callback_cnt
)
{
FIXME
(
"execution inside parser not supported
\n
"
);
return
E_NOTIMPL
;
script_queue_entry_t
*
queue
;
queue
=
heap_alloc
(
sizeof
(
*
queue
));
if
(
!
queue
)
return
E_OUTOFMEMORY
;
IHTMLScriptElement_AddRef
(
&
This
->
IHTMLScriptElement_iface
);
queue
->
script
=
This
;
list_add_tail
(
&
window
->
script_queue
,
&
queue
->
entry
);
return
S_OK
;
}
nsres
=
nsIDOMHTMLScriptElement_GetParentNode
(
This
->
nsscript
,
&
parent
);
...
...
dlls/mshtml/htmlscript.h
View file @
ccbee09f
...
...
@@ -25,6 +25,11 @@ typedef struct {
BOOL
parsed
;
}
HTMLScriptElement
;
typedef
struct
{
struct
list
entry
;
HTMLScriptElement
*
script
;
}
script_queue_entry_t
;
HRESULT
script_elem_from_nsscript
(
HTMLDocumentNode
*
,
nsIDOMHTMLScriptElement
*
,
HTMLScriptElement
**
)
DECLSPEC_HIDDEN
;
void
bind_event_scripts
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/htmlwindow.c
View file @
ccbee09f
...
...
@@ -2720,6 +2720,7 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, IMoniker *mon,
list_init
(
&
window
->
script_hosts
);
list_init
(
&
window
->
bindings
);
list_init
(
&
window
->
script_queue
);
window
->
base
.
outer_window
=
outer_window
;
window
->
base
.
inner_window
=
window
;
...
...
dlls/mshtml/mshtml_private.h
View file @
ccbee09f
...
...
@@ -400,6 +400,7 @@ struct HTMLInnerWindow {
IHTMLStorage
*
session_storage
;
unsigned
parser_callback_cnt
;
struct
list
script_queue
;
global_prop_t
*
global_props
;
DWORD
global_prop_cnt
;
...
...
dlls/mshtml/mutation.c
View file @
ccbee09f
...
...
@@ -298,6 +298,7 @@ static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_ifa
nsIDOMHTMLScriptElement
*
nsscript
;
HTMLScriptElement
*
script_elem
;
nsIParser
*
nsparser
=
NULL
;
script_queue_entry_t
*
iter
;
HTMLInnerWindow
*
window
;
nsresult
nsres
;
HRESULT
hres
;
...
...
@@ -332,8 +333,20 @@ static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_ifa
window
->
parser_callback_cnt
++
;
}
IHTMLWindow2_AddRef
(
&
window
->
base
.
IHTMLWindow2_iface
);
doc_insert_script
(
window
,
script_elem
);
while
(
!
list_empty
(
&
window
->
script_queue
))
{
iter
=
LIST_ENTRY
(
list_head
(
&
window
->
script_queue
),
script_queue_entry_t
,
entry
);
list_remove
(
&
iter
->
entry
);
doc_insert_script
(
window
,
iter
->
script
);
IHTMLScriptElement_Release
(
&
iter
->
script
->
IHTMLScriptElement_iface
);
heap_free
(
iter
);
}
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
if
(
nsparser
)
{
window
->
parser_callback_cnt
--
;
nsIParser_EndEvaluatingParserInsertedScript
(
nsparser
);
...
...
@@ -341,6 +354,7 @@ static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_ifa
}
IHTMLScriptElement_Release
(
&
script_elem
->
IHTMLScriptElement_iface
);
return
NS_OK
;
}
...
...
dlls/mshtml/script.c
View file @
ccbee09f
...
...
@@ -915,6 +915,9 @@ void doc_insert_script(HTMLInnerWindow *window, HTMLScriptElement *script_elem)
{
ScriptHost
*
script_host
;
if
(
script_elem
->
parsed
)
return
;
script_host
=
get_elem_script_host
(
window
,
script_elem
);
if
(
!
script_host
)
return
;
...
...
@@ -1309,8 +1312,17 @@ void set_script_mode(HTMLOuterWindow *window, SCRIPTMODE mode)
void
release_script_hosts
(
HTMLInnerWindow
*
window
)
{
script_queue_entry_t
*
queue_iter
;
ScriptHost
*
iter
;
while
(
!
list_empty
(
&
window
->
script_queue
))
{
queue_iter
=
LIST_ENTRY
(
list_head
(
&
window
->
script_queue
),
script_queue_entry_t
,
entry
);
list_remove
(
&
queue_iter
->
entry
);
IHTMLScriptElement_Release
(
&
queue_iter
->
script
->
IHTMLScriptElement_iface
);
heap_free
(
queue_iter
);
}
while
(
!
list_empty
(
&
window
->
script_hosts
))
{
iter
=
LIST_ENTRY
(
list_head
(
&
window
->
script_hosts
),
ScriptHost
,
entry
);
...
...
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