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
1b2525d1
Commit
1b2525d1
authored
Aug 13, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Default to previous script type if not given.
parent
156e2127
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-0
script.c
dlls/mshtml/script.c
+13
-9
No files found.
dlls/mshtml/htmlwindow.c
View file @
1b2525d1
...
...
@@ -2626,6 +2626,7 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, HTMLInnerWindo
init_dispex
(
&
window
->
dispex
,
(
IUnknown
*
)
&
window
->
base
.
IHTMLWindow2_iface
,
&
HTMLWindow_dispex
);
window
->
task_magic
=
get_task_target_magic
();
window
->
current_script_guid
=
CLSID_JScript
;
*
ret
=
window
;
return
S_OK
;
...
...
dlls/mshtml/mshtml_private.h
View file @
1b2525d1
...
...
@@ -385,6 +385,7 @@ struct HTMLInnerWindow {
HTMLDocumentNode
*
doc
;
struct
list
script_hosts
;
GUID
current_script_guid
;
IHTMLEventObj
*
event
;
...
...
@@ -982,6 +983,9 @@ DEFINE_GUID(CLSID_CMarkup,0x3050f4fb,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd
DEFINE_OLEGUID
(
CGID_DocHostCmdPriv
,
0x000214D4L
,
0
,
0
);
DEFINE_GUID
(
CLSID_JScript
,
0xf414c260
,
0x6ac0
,
0x11cf
,
0xb6
,
0xd1
,
0x00
,
0xaa
,
0x00
,
0xbb
,
0xbb
,
0x58
);
DEFINE_GUID
(
CLSID_VBScript
,
0xb54f3741
,
0x5b07
,
0x11cf
,
0xa4
,
0xb0
,
0x00
,
0xaa
,
0x00
,
0x4a
,
0x55
,
0xe8
);
/* memory allocation functions */
static
inline
void
*
__WINE_ALLOC_SIZE
(
1
)
heap_alloc
(
size_t
len
)
...
...
dlls/mshtml/script.c
View file @
1b2525d1
...
...
@@ -63,11 +63,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static
const
WCHAR
windowW
[]
=
{
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
0
};
static
const
WCHAR
emptyW
[]
=
{
0
};
static
const
CLSID
CLSID_JScript
=
{
0xf414c260
,
0x6ac0
,
0x11cf
,{
0xb6
,
0xd1
,
0x00
,
0xaa
,
0x00
,
0xbb
,
0xbb
,
0x58
}};
static
const
CLSID
CLSID_VBScript
=
{
0xb54f3741
,
0x5b07
,
0x11cf
,{
0xa4
,
0xb0
,
0x00
,
0xaa
,
0x00
,
0x4a
,
0x55
,
0xe8
}};
struct
ScriptHost
{
IActiveScriptSite
IActiveScriptSite_iface
;
IActiveScriptSiteInterruptPoll
IActiveScriptSiteInterruptPoll_iface
;
...
...
@@ -646,6 +641,8 @@ static void parse_text(ScriptHost *script_host, LPCWSTR text)
TRACE
(
"%s
\n
"
,
debugstr_w
(
text
));
script_host
->
window
->
current_script_guid
=
script_host
->
guid
;
VariantInit
(
&
var
);
memset
(
&
excepinfo
,
0
,
sizeof
(
excepinfo
));
TRACE
(
">>>
\n
"
);
...
...
@@ -758,7 +755,7 @@ static BOOL get_guid_from_language(LPCWSTR type, GUID *guid)
return
TRUE
;
}
static
BOOL
get_script_guid
(
nsIDOMHTMLScriptElement
*
nsscript
,
GUID
*
guid
)
static
BOOL
get_script_guid
(
HTMLInnerWindow
*
window
,
nsIDOMHTMLScriptElement
*
nsscript
,
GUID
*
guid
)
{
nsAString
attr_str
,
val_str
;
BOOL
ret
=
FALSE
;
...
...
@@ -793,7 +790,7 @@ static BOOL get_script_guid(nsIDOMHTMLScriptElement *nsscript, GUID *guid)
if
(
*
language
)
{
ret
=
get_guid_from_language
(
language
,
guid
);
}
else
{
*
guid
=
CLSID_JScript
;
*
guid
=
window
->
current_script_guid
;
ret
=
TRUE
;
}
}
else
{
...
...
@@ -822,7 +819,7 @@ void doc_insert_script(HTMLInnerWindow *window, nsIDOMHTMLScriptElement *nsscrip
ScriptHost
*
script_host
;
GUID
guid
;
if
(
!
get_script_guid
(
nsscript
,
&
guid
))
{
if
(
!
get_script_guid
(
window
,
nsscript
,
&
guid
))
{
WARN
(
"Could not find script GUID
\n
"
);
return
;
}
...
...
@@ -844,13 +841,15 @@ void doc_insert_script(HTMLInnerWindow *window, nsIDOMHTMLScriptElement *nsscrip
IDispatch
*
script_parse_event
(
HTMLInnerWindow
*
window
,
LPCWSTR
text
)
{
ScriptHost
*
script_host
;
GUID
guid
=
CLSID_JScript
;
GUID
guid
;
const
WCHAR
*
ptr
;
IDispatch
*
disp
;
HRESULT
hres
;
static
const
WCHAR
delimiterW
[]
=
{
'\"'
,
0
};
TRACE
(
"%s
\n
"
,
debugstr_w
(
text
));
for
(
ptr
=
text
;
isalnumW
(
*
ptr
);
ptr
++
);
if
(
*
ptr
==
':'
)
{
LPWSTR
language
;
...
...
@@ -872,6 +871,7 @@ IDispatch *script_parse_event(HTMLInnerWindow *window, LPCWSTR text)
ptr
++
;
}
else
{
ptr
=
text
;
guid
=
window
->
current_script_guid
;
}
if
(
IsEqualGUID
(
&
CLSID_JScript
,
&
guid
)
...
...
@@ -880,6 +880,8 @@ IDispatch *script_parse_event(HTMLInnerWindow *window, LPCWSTR text)
return
NULL
;
}
window
->
current_script_guid
=
guid
;
script_host
=
get_script_host
(
window
,
&
guid
);
if
(
!
script_host
||
!
script_host
->
parse_proc
)
return
NULL
;
...
...
@@ -921,6 +923,8 @@ HRESULT exec_script(HTMLInnerWindow *window, const WCHAR *code, const WCHAR *lan
return
E_FAIL
;
}
window
->
current_script_guid
=
guid
;
memset
(
&
ei
,
0
,
sizeof
(
ei
));
TRACE
(
">>>
\n
"
);
hres
=
IActiveScriptParse_ParseScriptText
(
script_host
->
parse
,
code
,
NULL
,
NULL
,
delimW
,
0
,
0
,
SCRIPTTEXT_ISVISIBLE
,
ret
,
&
ei
);
...
...
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