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
3886fa60
Commit
3886fa60
authored
Mar 27, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Expose getComputedStyle to scripts.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
08939329
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
7 deletions
+34
-7
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-7
documentmode.js
dlls/mshtml/tests/documentmode.js
+16
-0
elements.js
dlls/mshtml/tests/elements.js
+17
-0
No files found.
dlls/mshtml/htmlwindow.c
View file @
3886fa60
...
...
@@ -3499,14 +3499,8 @@ static void HTMLWindow_bind_event(DispatchEx *dispex, eventid_t eid)
static
void
HTMLWindow_init_dispex_info
(
dispex_data_t
*
info
,
compat_mode_t
compat_mode
)
{
/* FIXME: Expose getComputedStyle once it's implemented.
* Stubs break existing web sites. */
static
const
dispex_hook_t
window7_hooks
[]
=
{
{
DISPID_IHTMLWINDOW7_GETCOMPUTEDSTYLE
,
NULL
},
{
DISPID_UNKNOWN
}
};
if
(
compat_mode
>=
COMPAT_MODE_IE9
)
dispex_info_add_interface
(
info
,
IHTMLWindow7_tid
,
window7_hooks
);
dispex_info_add_interface
(
info
,
IHTMLWindow7_tid
,
NULL
);
dispex_info_add_interface
(
info
,
IHTMLWindow5_tid
,
NULL
);
EventTarget_init_dispex_info
(
info
,
compat_mode
);
}
...
...
dlls/mshtml/tests/documentmode.js
View file @
3886fa60
...
...
@@ -105,6 +105,7 @@ function test_window_props() {
test_exposed
(
"dispatchEvent"
,
v
>=
9
);
test_exposed
(
"getSelection"
,
v
>=
9
);
test_exposed
(
"onfocusout"
,
v
>=
9
);
test_exposed
(
"getComputedStyle"
,
v
>=
9
);
if
(
v
>=
9
)
/* FIXME: native exposes it in all compat modes */
test_exposed
(
"performance"
,
true
);
...
...
@@ -167,6 +168,21 @@ function test_style_props() {
test_exposed
(
"removeProperty"
,
v
>=
9
);
test_exposed
(
"background-clip"
,
v
>=
9
);
if
(
window
.
getComputedStyle
)
{
style
=
window
.
getComputedStyle
(
document
.
body
);
test_exposed
(
"removeAttribute"
,
false
);
test_exposed
(
"zIndex"
,
true
);
test_exposed
(
"z-index"
,
true
);
test_exposed
(
"pixelTop"
,
false
);
test_exposed
(
"float"
,
true
);
test_exposed
(
"css-float"
,
false
);
test_exposed
(
"style-float"
,
false
);
test_exposed
(
"setProperty"
,
v
>=
9
);
test_exposed
(
"removeProperty"
,
v
>=
9
);
test_exposed
(
"background-clip"
,
v
>=
9
);
}
next_test
();
}
...
...
dlls/mshtml/tests/elements.js
View file @
3886fa60
...
...
@@ -235,6 +235,7 @@ function test_document_owner() {
function
test_style_properties
()
{
var
style
=
document
.
body
.
style
;
var
current_style
=
document
.
body
.
currentStyle
;
var
computed_style
=
window
.
getComputedStyle
(
document
.
body
);
var
val
;
style
.
cssFloat
=
"left"
;
...
...
@@ -300,6 +301,22 @@ function test_style_properties() {
ok
(
style
.
clip
===
"rect(1px, 1px, 10px, 10px)"
,
"style.clip = "
+
style
.
clip
);
ok
(
current_style
.
clip
===
"rect(1px, 1px, 10px, 10px)"
,
"current_style.clip = "
+
current_style
.
clip
);
ok
(
computed_style
.
clip
===
"rect(1px, 1px, 10px, 10px)"
,
"computed_style.clip = "
+
current_style
.
clip
);
document
.
body
.
style
.
zIndex
=
2
;
ok
(
current_style
.
zIndex
===
2
,
"current_style.zIndex = "
+
current_style
.
zIndex
);
ok
(
computed_style
.
zIndex
===
2
,
"computed_style.zIndex = "
+
computed_style
.
zIndex
);
try
{
current_style
.
zIndex
=
1
;
ok
(
false
,
"expected exception"
);
}
catch
(
e
)
{}
try
{
computed_style
.
zIndex
=
1
;
ok
(
false
,
"expected exception"
);
}
catch
(
e
)
{}
next_test
();
}
...
...
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