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
1afbe2e1
Commit
1afbe2e1
authored
Apr 07, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Expose IHTMLStyleSheet4 to scripts.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9756574f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
1 deletion
+56
-1
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+8
-1
documentmode.js
dlls/mshtml/tests/documentmode.js
+36
-0
dom.js
dlls/mshtml/tests/dom.js
+12
-0
No files found.
dlls/mshtml/htmlstylesheet.c
View file @
1afbe2e1
...
...
@@ -1102,6 +1102,12 @@ static const IHTMLStyleSheet4Vtbl HTMLStyleSheet4Vtbl = {
HTMLStyleSheet4_deleteRule
,
};
static
void
HTMLStyleSheet_init_dispex_info
(
dispex_data_t
*
info
,
compat_mode_t
mode
)
{
if
(
mode
>=
COMPAT_MODE_IE9
)
dispex_info_add_interface
(
info
,
IHTMLStyleSheet4_tid
,
NULL
);
}
static
const
tid_t
HTMLStyleSheet_iface_tids
[]
=
{
IHTMLStyleSheet_tid
,
0
...
...
@@ -1109,7 +1115,8 @@ static const tid_t HTMLStyleSheet_iface_tids[] = {
static
dispex_static_data_t
HTMLStyleSheet_dispex
=
{
NULL
,
DispHTMLStyleSheet_tid
,
HTMLStyleSheet_iface_tids
HTMLStyleSheet_iface_tids
,
HTMLStyleSheet_init_dispex_info
};
HRESULT
create_style_sheet
(
nsIDOMStyleSheet
*
nsstylesheet
,
compat_mode_t
compat_mode
,
IHTMLStyleSheet
**
ret
)
...
...
dlls/mshtml/tests/documentmode.js
View file @
1afbe2e1
...
...
@@ -134,6 +134,42 @@ sync_test("xhr_props", function() {
test_exposed
(
"dispatchEvent"
,
v
>=
9
);
});
sync_test
(
"stylesheet_props"
,
function
()
{
var
v
=
document
.
documentMode
;
var
elem
=
document
.
createElement
(
"style"
);
document
.
body
.
appendChild
(
elem
);
var
sheet
=
v
>=
9
?
elem
.
sheet
:
elem
.
styleSheet
;
function
test_exposed
(
prop
,
expect
)
{
if
(
expect
)
ok
(
prop
in
sheet
,
prop
+
" not found in style sheet."
);
else
ok
(
!
(
prop
in
sheet
),
prop
+
" found in style sheet."
);
}
test_exposed
(
"href"
,
true
);
test_exposed
(
"title"
,
true
);
test_exposed
(
"type"
,
true
);
test_exposed
(
"media"
,
true
);
test_exposed
(
"ownerNode"
,
v
>=
9
);
test_exposed
(
"ownerRule"
,
v
>=
9
);
test_exposed
(
"cssRules"
,
v
>=
9
);
test_exposed
(
"insertRule"
,
v
>=
9
);
test_exposed
(
"deleteRule"
,
v
>=
9
);
test_exposed
(
"disabled"
,
true
);
test_exposed
(
"parentStyleSheet"
,
true
);
test_exposed
(
"owningElement"
,
true
);
test_exposed
(
"readOnly"
,
true
);
test_exposed
(
"imports"
,
true
);
test_exposed
(
"id"
,
true
);
test_exposed
(
"addImport"
,
true
);
test_exposed
(
"addRule"
,
true
);
test_exposed
(
"removeImport"
,
true
);
test_exposed
(
"removeRule"
,
true
);
test_exposed
(
"cssText"
,
true
);
test_exposed
(
"rules"
,
true
);
});
sync_test
(
"xhr open"
,
function
()
{
var
e
=
false
;
try
{
...
...
dlls/mshtml/tests/dom.js
View file @
1afbe2e1
...
...
@@ -381,6 +381,7 @@ sync_test("style_properties", function() {
sync_test
(
"stylesheets"
,
function
()
{
document
.
body
.
innerHTML
=
'<style>.div { margin-right: 1px; }</style>'
;
var
elem
=
document
.
body
.
firstChild
;
ok
(
document
.
styleSheets
.
length
===
1
,
"document.styleSheets.length = "
+
document
.
styleSheets
.
length
);
...
...
@@ -393,6 +394,17 @@ sync_test("stylesheets", function() {
stylesheet
.
rules
.
item
(
1
);
ok
(
false
,
"expected exception"
);
}
catch
(
e
)
{}
ok
(
stylesheet
.
href
===
null
,
"stylesheet.href = "
+
stylesheet
.
href
);
var
id
=
stylesheet
.
insertRule
(
".input { margin-left: 1px; }"
,
0
);
ok
(
id
===
0
,
"id = "
+
id
);
ok
(
document
.
styleSheets
.
length
===
1
,
"document.styleSheets.length = "
+
document
.
styleSheets
.
length
);
try
{
stylesheet
.
insertRule
(
".input { margin-left: 1px; }"
,
3
);
ok
(
false
,
"expected exception"
);
}
catch
(
e
)
{}
});
sync_test
(
"storage"
,
function
()
{
...
...
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