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
de5bbbc2
Commit
de5bbbc2
authored
Dec 12, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Dec 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLScriptElement get/put Defer.
parent
8e984bcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
8 deletions
+49
-8
htmlscript.c
dlls/mshtml/htmlscript.c
+29
-4
dom.c
dlls/mshtml/tests/dom.c
+20
-4
No files found.
dlls/mshtml/htmlscript.c
View file @
de5bbbc2
...
...
@@ -154,15 +154,40 @@ static HRESULT WINAPI HTMLScriptElement_get_text(IHTMLScriptElement *iface, BSTR
static
HRESULT
WINAPI
HTMLScriptElement_put_defer
(
IHTMLScriptElement
*
iface
,
VARIANT_BOOL
v
)
{
HTMLScriptElement
*
This
=
HTMLSCRIPT_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
HRESULT
hr
=
S_OK
;
nsresult
nsres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
v
);
nsres
=
nsIDOMHTMLScriptElement_SetDefer
(
This
->
nsscript
,
v
!=
VARIANT_FALSE
);
if
(
NS_FAILED
(
nsres
))
{
hr
=
E_FAIL
;
}
return
hr
;
}
static
HRESULT
WINAPI
HTMLScriptElement_get_defer
(
IHTMLScriptElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLScriptElement
*
This
=
HTMLSCRIPT_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
PRBool
defer
=
FALSE
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
p
)
return
E_INVALIDARG
;
nsres
=
nsIDOMHTMLScriptElement_GetDefer
(
This
->
nsscript
,
&
defer
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetSrc failed: %08x
\n
"
,
nsres
);
}
*
p
=
defer
?
VARIANT_TRUE
:
VARIANT_FALSE
;
TRACE
(
"*p = %d
\n
"
,
*
p
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLScriptElement_get_readyState
(
IHTMLScriptElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
de5bbbc2
...
...
@@ -3433,10 +3433,26 @@ static void test_elems(IHTMLDocument2 *doc)
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLScriptElement
,
(
void
**
)
&
script
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLScriptElement interface: %08x
\n
"
,
hres
);
hres
=
IHTMLScriptElement_get_type
(
script
,
&
type
);
ok
(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
type
,
text_javascriptW
),
"Unexpected type %s
\n
"
,
dbgstr_w
(
type
));
SysFreeString
(
type
);
if
(
hres
==
S_OK
)
{
VARIANT_BOOL
vb
;
hres
=
IHTMLScriptElement_get_type
(
script
,
&
type
);
ok
(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
type
,
text_javascriptW
),
"Unexpected type %s
\n
"
,
dbgstr_w
(
type
));
SysFreeString
(
type
);
/* test defer */
hres
=
IHTMLScriptElement_put_defer
(
script
,
VARIANT_TRUE
);
ok
(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
hres
=
IHTMLScriptElement_get_defer
(
script
,
&
vb
);
ok
(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
ok
(
vb
==
VARIANT_TRUE
,
"get_type failed: %08x
\n
"
,
hres
);
hres
=
IHTMLScriptElement_put_defer
(
script
,
VARIANT_FALSE
);
ok
(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
}
IHTMLScriptElement_Release
(
script
);
}
...
...
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