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
6ebfbcc6
Commit
6ebfbcc6
authored
Sep 06, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLCSSStyleDeclaration::backgroundClip property implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db2d8316
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
5 deletions
+32
-5
htmlstyle.c
dlls/mshtml/htmlstyle.c
+8
-5
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
style.c
dlls/mshtml/tests/style.c
+23
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
6ebfbcc6
...
...
@@ -39,6 +39,8 @@ static const WCHAR backgroundW[] =
{
'b'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
0
};
static
const
WCHAR
background_attachmentW
[]
=
{
'b'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
'-'
,
'a'
,
't'
,
't'
,
'a'
,
'c'
,
'h'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
background_clipW
[]
=
{
'b'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
'-'
,
'c'
,
'l'
,
'i'
,
'p'
,
0
};
static
const
WCHAR
background_colorW
[]
=
{
'b'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
'-'
,
'c'
,
'o'
,
'l'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
background_imageW
[]
=
...
...
@@ -333,6 +335,7 @@ typedef struct {
static
const
style_tbl_entry_t
style_tbl
[]
=
{
{
backgroundW
,
DISPID_IHTMLSTYLE_BACKGROUND
},
{
background_attachmentW
,
DISPID_IHTMLSTYLE_BACKGROUNDATTACHMENT
},
{
background_clipW
,
DISPID_UNKNOWN
},
{
background_colorW
,
DISPID_IHTMLSTYLE_BACKGROUNDCOLOR
,
ATTR_HEX_INT
},
{
background_imageW
,
DISPID_IHTMLSTYLE_BACKGROUNDIMAGE
,
ATTR_FIX_URL
},
{
background_positionW
,
DISPID_IHTMLSTYLE_BACKGROUNDPOSITION
},
...
...
@@ -7290,15 +7293,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_cssFloat(IHTMLCSSStyleDeclarat
static
HRESULT
WINAPI
HTMLCSSStyleDeclaration_put_backgroundClip
(
IHTMLCSSStyleDeclaration
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLCSSStyleDeclaration
(
iface
);
FIXM
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
TRAC
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
set_style_property
(
This
,
STYLEID_BACKGROUND_CLIP
,
v
)
;
}
static
HRESULT
WINAPI
HTMLCSSStyleDeclaration_get_backgroundClip
(
IHTMLCSSStyleDeclaration
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLCSSStyleDeclaration
(
iface
);
FIXM
E
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRAC
E
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_style_property
(
This
,
STYLEID_BACKGROUND_CLIP
,
p
)
;
}
static
HRESULT
WINAPI
HTMLCSSStyleDeclaration_put_backgroundOrigin
(
IHTMLCSSStyleDeclaration
*
iface
,
BSTR
v
)
...
...
@@ -7760,7 +7763,7 @@ static HRESULT HTMLStyle_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags,
const
style_tbl_entry_t
*
style_entry
;
style_entry
=
lookup_style_tbl
(
name
);
if
(
style_entry
)
{
if
(
style_entry
&&
style_entry
->
dispid
!=
DISPID_UNKNOWN
)
{
*
dispid
=
style_entry
->
dispid
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlstyle.h
View file @
6ebfbcc6
...
...
@@ -36,6 +36,7 @@ struct HTMLStyle {
typedef
enum
{
STYLEID_BACKGROUND
,
STYLEID_BACKGROUND_ATTACHMENT
,
STYLEID_BACKGROUND_CLIP
,
STYLEID_BACKGROUND_COLOR
,
STYLEID_BACKGROUND_IMAGE
,
STYLEID_BACKGROUND_POSITION
,
...
...
dlls/mshtml/tests/style.c
View file @
6ebfbcc6
...
...
@@ -736,6 +736,26 @@ static void test_style6(IHTMLStyle6 *style)
SysFreeString
(
str
);
}
static
void
test_css_style_declaration
(
IHTMLCSSStyleDeclaration
*
css_style
)
{
BSTR
str
;
HRESULT
hres
;
hres
=
IHTMLCSSStyleDeclaration_get_backgroundClip
(
css_style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_backgroundClip failed: %08x
\n
"
,
hres
);
ok
(
!
str
,
"backgroundClip = %s
\n
"
,
wine_dbgstr_w
(
str
));
str
=
a2bstr
(
"border-box"
);
hres
=
IHTMLCSSStyleDeclaration_put_backgroundClip
(
css_style
,
str
);
ok
(
hres
==
S_OK
,
"put_backgroundClip failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLCSSStyleDeclaration_get_backgroundClip
(
css_style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_backgroundClip failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"border-box"
),
"backgroundClip = %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
}
static
void
test_body_style
(
IHTMLStyle
*
style
)
{
IHTMLCSSStyleDeclaration
*
css_style
;
...
...
@@ -2817,6 +2837,9 @@ static void test_body_style(IHTMLStyle *style)
win_skip
(
"IHTMLStyle6 not available
\n
"
);
}
if
(
compat_mode
>=
COMPAT_IE9
)
test_css_style_declaration
(
css_style
);
if
(
css_style
)
IHTMLCSSStyleDeclaration_Release
(
css_style
);
}
...
...
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