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
8a9d4cf1
Commit
8a9d4cf1
authored
Oct 09, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use IUri for script binding.
parent
845f5ccc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
script.c
dlls/mshtml/script.c
+14
-7
No files found.
dlls/mshtml/script.c
View file @
8a9d4cf1
...
...
@@ -826,17 +826,25 @@ static const BSCallbackVtbl ScriptBSCVtbl = {
};
static
HRESULT
bind_script_to_text
(
HTMLInnerWindow
*
window
,
I
Moniker
*
mon
,
WCHAR
**
ret
)
static
HRESULT
bind_script_to_text
(
HTMLInnerWindow
*
window
,
I
Uri
*
uri
,
WCHAR
**
ret
)
{
ScriptBSC
*
bsc
;
IMoniker
*
mon
;
WCHAR
*
text
;
HRESULT
hres
;
hres
=
CreateURLMonikerEx2
(
NULL
,
uri
,
&
mon
,
URL_MK_UNIFORM
);
if
(
FAILED
(
hres
))
return
hres
;
bsc
=
heap_alloc_zero
(
sizeof
(
*
bsc
));
if
(
!
bsc
)
if
(
!
bsc
)
{
IMoniker_Release
(
mon
);
return
E_OUTOFMEMORY
;
}
init_bscallback
(
&
bsc
->
bsc
,
&
ScriptBSCVtbl
,
mon
,
0
);
IMoniker_Release
(
mon
);
bsc
->
hres
=
E_FAIL
;
hres
=
start_binding
(
window
,
&
bsc
->
bsc
,
NULL
);
...
...
@@ -892,13 +900,12 @@ static HRESULT bind_script_to_text(HTMLInnerWindow *window, IMoniker *mon, WCHAR
*
ret
=
text
;
return
S_OK
;
}
static
void
parse_extern_script
(
ScriptHost
*
script_host
,
const
WCHAR
*
src
)
{
IMoniker
*
mon
;
WCHAR
*
text
;
IUri
*
uri
;
HRESULT
hres
;
static
const
WCHAR
wine_schemaW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
':'
};
...
...
@@ -906,12 +913,12 @@ static void parse_extern_script(ScriptHost *script_host, const WCHAR *src)
if
(
strlenW
(
src
)
>
sizeof
(
wine_schemaW
)
/
sizeof
(
WCHAR
)
&&
!
memcmp
(
src
,
wine_schemaW
,
sizeof
(
wine_schemaW
)))
src
+=
sizeof
(
wine_schemaW
)
/
sizeof
(
WCHAR
);
hres
=
CreateURLMoniker
(
NULL
,
src
,
&
mon
);
hres
=
create_uri
(
src
,
0
,
&
uri
);
if
(
FAILED
(
hres
))
return
;
hres
=
bind_script_to_text
(
script_host
->
window
,
mon
,
&
text
);
I
Moniker_Release
(
mon
);
hres
=
bind_script_to_text
(
script_host
->
window
,
uri
,
&
text
);
I
Uri_Release
(
uri
);
if
(
FAILED
(
hres
)
||
!
text
)
return
;
...
...
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