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
680aca56
Commit
680aca56
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 beginning IHTMLScriptElement::put_src implementation.
parent
51b701c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
3 deletions
+52
-3
htmlscript.c
dlls/mshtml/htmlscript.c
+40
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
mutation.c
dlls/mshtml/mutation.c
+10
-2
No files found.
dlls/mshtml/htmlscript.c
View file @
680aca56
...
@@ -95,8 +95,47 @@ static HRESULT WINAPI HTMLScriptElement_Invoke(IHTMLScriptElement *iface, DISPID
...
@@ -95,8 +95,47 @@ static HRESULT WINAPI HTMLScriptElement_Invoke(IHTMLScriptElement *iface, DISPID
static
HRESULT
WINAPI
HTMLScriptElement_put_src
(
IHTMLScriptElement
*
iface
,
BSTR
v
)
static
HRESULT
WINAPI
HTMLScriptElement_put_src
(
IHTMLScriptElement
*
iface
,
BSTR
v
)
{
{
HTMLScriptElement
*
This
=
impl_from_IHTMLScriptElement
(
iface
);
HTMLScriptElement
*
This
=
impl_from_IHTMLScriptElement
(
iface
);
HTMLInnerWindow
*
window
;
nsIDOMNode
*
parent
;
nsAString
src_str
;
nsresult
nsres
;
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
if
(
!
This
->
element
.
node
.
doc
||
!
This
->
element
.
node
.
doc
->
window
)
{
WARN
(
"no windoow
\n
"
);
return
E_UNEXPECTED
;
}
window
=
This
->
element
.
node
.
doc
->
window
;
nsAString_InitDepend
(
&
src_str
,
v
);
nsres
=
nsIDOMHTMLScriptElement_SetSrc
(
This
->
nsscript
,
&
src_str
);
nsAString_Finish
(
&
src_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetSrc failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
if
(
This
->
parsed
)
{
WARN
(
"already parsed
\n
"
);
return
S_OK
;
}
if
(
window
->
parser_callback_cnt
)
{
FIXME
(
"execution inside parser not supported
\n
"
);
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLScriptElement_GetParentNode
(
This
->
nsscript
,
&
parent
);
if
(
NS_FAILED
(
nsres
)
||
!
parent
)
{
FIXME
(
"No parent, not supported detached elements
\n
"
);
return
E_NOTIMPL
;
}
nsIDOMNode_Release
(
parent
);
doc_insert_script
(
window
,
This
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLScriptElement_get_src
(
IHTMLScriptElement
*
iface
,
BSTR
*
p
)
static
HRESULT
WINAPI
HTMLScriptElement_get_src
(
IHTMLScriptElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/mshtml_private.h
View file @
680aca56
...
@@ -399,6 +399,8 @@ struct HTMLInnerWindow {
...
@@ -399,6 +399,8 @@ struct HTMLInnerWindow {
IOmHistory
*
history
;
IOmHistory
*
history
;
IHTMLStorage
*
session_storage
;
IHTMLStorage
*
session_storage
;
unsigned
parser_callback_cnt
;
global_prop_t
*
global_props
;
global_prop_t
*
global_props
;
DWORD
global_prop_cnt
;
DWORD
global_prop_cnt
;
DWORD
global_prop_size
;
DWORD
global_prop_size
;
...
...
dlls/mshtml/mutation.c
View file @
680aca56
...
@@ -298,11 +298,16 @@ static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_ifa
...
@@ -298,11 +298,16 @@ static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_ifa
nsIDOMHTMLScriptElement
*
nsscript
;
nsIDOMHTMLScriptElement
*
nsscript
;
HTMLScriptElement
*
script_elem
;
HTMLScriptElement
*
script_elem
;
nsIParser
*
nsparser
=
NULL
;
nsIParser
*
nsparser
=
NULL
;
HTMLInnerWindow
*
window
;
nsresult
nsres
;
nsresult
nsres
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
doc
,
script_iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
doc
,
script_iface
);
window
=
doc
->
window
;
if
(
!
window
)
return
NS_OK
;
nsres
=
nsISupports_QueryInterface
(
script_iface
,
&
IID_nsIDOMHTMLScriptElement
,
(
void
**
)
&
nsscript
);
nsres
=
nsISupports_QueryInterface
(
script_iface
,
&
IID_nsIDOMHTMLScriptElement
,
(
void
**
)
&
nsscript
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLScriptElement: %08x
\n
"
,
nsres
);
ERR
(
"Could not get nsIDOMHTMLScriptElement: %08x
\n
"
,
nsres
);
...
@@ -322,12 +327,15 @@ static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_ifa
...
@@ -322,12 +327,15 @@ static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_ifa
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
NS_ERROR_FAILURE
;
return
NS_ERROR_FAILURE
;
if
(
nsparser
)
if
(
nsparser
)
{
nsIParser_BeginEvaluatingParserInsertedScript
(
nsparser
);
nsIParser_BeginEvaluatingParserInsertedScript
(
nsparser
);
window
->
parser_callback_cnt
++
;
}
doc_insert_script
(
doc
->
window
,
script_elem
);
doc_insert_script
(
window
,
script_elem
);
if
(
nsparser
)
{
if
(
nsparser
)
{
window
->
parser_callback_cnt
--
;
nsIParser_EndEvaluatingParserInsertedScript
(
nsparser
);
nsIParser_EndEvaluatingParserInsertedScript
(
nsparser
);
nsIParser_Release
(
nsparser
);
nsIParser_Release
(
nsparser
);
}
}
...
...
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