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
2cd8ff37
Commit
2cd8ff37
authored
Mar 26, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Expose IHTMLCSSStyleDeclaration to scripts from current style object.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9d35d09e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
8 deletions
+33
-8
htmlcurstyle.c
dlls/mshtml/htmlcurstyle.c
+3
-2
htmlstyle.c
dlls/mshtml/htmlstyle.c
+6
-6
htmlstyle.h
dlls/mshtml/htmlstyle.h
+3
-0
documentmode.js
dlls/mshtml/tests/documentmode.js
+15
-0
elements.js
dlls/mshtml/tests/elements.js
+6
-0
No files found.
dlls/mshtml/htmlcurstyle.c
View file @
2cd8ff37
...
@@ -1301,9 +1301,10 @@ static const tid_t HTMLCurrentStyle_iface_tids[] = {
...
@@ -1301,9 +1301,10 @@ static const tid_t HTMLCurrentStyle_iface_tids[] = {
0
0
};
};
static
dispex_static_data_t
HTMLCurrentStyle_dispex
=
{
static
dispex_static_data_t
HTMLCurrentStyle_dispex
=
{
NULL
,
&
CSSStyle_dispex_vtbl
,
DispHTMLCurrentStyle_tid
,
DispHTMLCurrentStyle_tid
,
HTMLCurrentStyle_iface_tids
HTMLCurrentStyle_iface_tids
,
CSSStyle_init_dispex_info
};
};
HRESULT
HTMLCurrentStyle_Create
(
HTMLElement
*
elem
,
IHTMLCurrentStyle
**
p
)
HRESULT
HTMLCurrentStyle_Create
(
HTMLElement
*
elem
,
IHTMLCurrentStyle
**
p
)
...
...
dlls/mshtml/htmlstyle.c
View file @
2cd8ff37
...
@@ -10128,7 +10128,7 @@ static const IHTMLCSSStyleDeclaration2Vtbl HTMLCSSStyleDeclaration2Vtbl = {
...
@@ -10128,7 +10128,7 @@ static const IHTMLCSSStyleDeclaration2Vtbl HTMLCSSStyleDeclaration2Vtbl = {
HTMLCSSStyleDeclaration2_get_animationFillMode
HTMLCSSStyleDeclaration2_get_animationFillMode
};
};
static
HRESULT
HTML
Style_get_dispid
(
DispatchEx
*
dispex
,
BSTR
name
,
DWORD
flags
,
DISPID
*
dispid
)
static
HRESULT
CSS
Style_get_dispid
(
DispatchEx
*
dispex
,
BSTR
name
,
DWORD
flags
,
DISPID
*
dispid
)
{
{
const
style_tbl_entry_t
*
style_entry
;
const
style_tbl_entry_t
*
style_entry
;
...
@@ -10146,15 +10146,15 @@ static HRESULT HTMLStyle_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags,
...
@@ -10146,15 +10146,15 @@ static HRESULT HTMLStyle_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags,
return
DISP_E_UNKNOWNNAME
;
return
DISP_E_UNKNOWNNAME
;
}
}
static
void
HTML
Style_init_dispex_info
(
dispex_data_t
*
info
,
compat_mode_t
mode
)
void
CSS
Style_init_dispex_info
(
dispex_data_t
*
info
,
compat_mode_t
mode
)
{
{
if
(
mode
>=
COMPAT_MODE_IE9
)
if
(
mode
>=
COMPAT_MODE_IE9
)
dispex_info_add_interface
(
info
,
IHTMLCSSStyleDeclaration_tid
,
NULL
);
dispex_info_add_interface
(
info
,
IHTMLCSSStyleDeclaration_tid
,
NULL
);
}
}
static
const
dispex_static_data_vtbl_t
HTML
Style_dispex_vtbl
=
{
const
dispex_static_data_vtbl_t
CSS
Style_dispex_vtbl
=
{
NULL
,
NULL
,
HTML
Style_get_dispid
,
CSS
Style_get_dispid
,
NULL
,
NULL
,
NULL
NULL
};
};
...
@@ -10169,10 +10169,10 @@ static const tid_t HTMLStyle_iface_tids[] = {
...
@@ -10169,10 +10169,10 @@ static const tid_t HTMLStyle_iface_tids[] = {
0
0
};
};
static
dispex_static_data_t
HTMLStyle_dispex
=
{
static
dispex_static_data_t
HTMLStyle_dispex
=
{
&
HTML
Style_dispex_vtbl
,
&
CSS
Style_dispex_vtbl
,
DispHTMLStyle_tid
,
DispHTMLStyle_tid
,
HTMLStyle_iface_tids
,
HTMLStyle_iface_tids
,
HTML
Style_init_dispex_info
CSS
Style_init_dispex_info
};
};
static
HRESULT
get_style_from_elem
(
HTMLElement
*
elem
,
nsIDOMCSSStyleDeclaration
**
ret
)
static
HRESULT
get_style_from_elem
(
HTMLElement
*
elem
,
nsIDOMCSSStyleDeclaration
**
ret
)
...
...
dlls/mshtml/htmlstyle.h
View file @
2cd8ff37
...
@@ -140,6 +140,9 @@ HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
...
@@ -140,6 +140,9 @@ HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
void
init_css_style
(
CSSStyle
*
,
nsIDOMCSSStyleDeclaration
*
,
style_qi_t
,
void
init_css_style
(
CSSStyle
*
,
nsIDOMCSSStyleDeclaration
*
,
style_qi_t
,
dispex_static_data_t
*
,
compat_mode_t
)
DECLSPEC_HIDDEN
;
dispex_static_data_t
*
,
compat_mode_t
)
DECLSPEC_HIDDEN
;
void
CSSStyle_init_dispex_info
(
dispex_data_t
*
info
,
compat_mode_t
mode
)
DECLSPEC_HIDDEN
;
const
dispex_static_data_vtbl_t
CSSStyle_dispex_vtbl
DECLSPEC_HIDDEN
;
HRESULT
get_style_property
(
CSSStyle
*
,
styleid_t
,
BSTR
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_style_property
(
CSSStyle
*
,
styleid_t
,
BSTR
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_style_property_var
(
CSSStyle
*
,
styleid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_style_property_var
(
CSSStyle
*
,
styleid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/tests/documentmode.js
View file @
2cd8ff37
...
@@ -98,6 +98,8 @@ function test_window_props() {
...
@@ -98,6 +98,8 @@ function test_window_props() {
var
v
=
document
.
documentMode
;
var
v
=
document
.
documentMode
;
test_exposed
(
"postMessage"
,
true
);
test_exposed
(
"postMessage"
,
true
);
test_exposed
(
"sessionStorage"
,
true
);
test_exposed
(
"localStorage"
,
true
);
test_exposed
(
"addEventListener"
,
v
>=
9
);
test_exposed
(
"addEventListener"
,
v
>=
9
);
test_exposed
(
"removeEventListener"
,
v
>=
9
);
test_exposed
(
"removeEventListener"
,
v
>=
9
);
test_exposed
(
"dispatchEvent"
,
v
>=
9
);
test_exposed
(
"dispatchEvent"
,
v
>=
9
);
...
@@ -152,6 +154,19 @@ function test_style_props() {
...
@@ -152,6 +154,19 @@ function test_style_props() {
test_exposed
(
"removeProperty"
,
v
>=
9
);
test_exposed
(
"removeProperty"
,
v
>=
9
);
test_exposed
(
"background-clip"
,
v
>=
9
);
test_exposed
(
"background-clip"
,
v
>=
9
);
style
=
document
.
body
.
currentStyle
;
test_exposed
(
"zIndex"
,
true
);
test_exposed
(
"z-index"
,
true
);
test_exposed
(
"filter"
,
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
();
next_test
();
}
}
...
...
dlls/mshtml/tests/elements.js
View file @
2cd8ff37
...
@@ -234,6 +234,7 @@ function test_document_owner() {
...
@@ -234,6 +234,7 @@ function test_document_owner() {
function
test_style_properties
()
{
function
test_style_properties
()
{
var
style
=
document
.
body
.
style
;
var
style
=
document
.
body
.
style
;
var
current_style
=
document
.
body
.
currentStyle
;
var
val
;
var
val
;
style
.
cssFloat
=
"left"
;
style
.
cssFloat
=
"left"
;
...
@@ -295,6 +296,11 @@ function test_style_properties() {
...
@@ -295,6 +296,11 @@ function test_style_properties() {
style
.
setProperty
(
"border-width"
,
"8px"
,
undefined
);
style
.
setProperty
(
"border-width"
,
"8px"
,
undefined
);
ok
(
style
.
borderWidth
===
"7px"
,
"style.borderWidth = "
+
style
.
borderWidth
);
ok
(
style
.
borderWidth
===
"7px"
,
"style.borderWidth = "
+
style
.
borderWidth
);
style
.
clip
=
"rect(1px 1px 10px 10px)"
;
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
);
next_test
();
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