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
63c8939c
Commit
63c8939c
authored
Feb 25, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle get/put backgroundRepeat.
parent
e3009fec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
4 deletions
+61
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+22
-4
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
dom.c
dlls/mshtml/tests/dom.c
+38
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
63c8939c
...
...
@@ -41,6 +41,8 @@ static const WCHAR attrBackgroundColor[] =
{
'b'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
'-'
,
'c'
,
'o'
,
'l'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
attrBackgroundImage
[]
=
{
'b'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
'-'
,
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
attrBackgroundRepeat
[]
=
{
'b'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
'-'
,
'r'
,
'e'
,
'p'
,
'e'
,
'a'
,
't'
,
0
};
static
const
WCHAR
attrBorder
[]
=
{
'b'
,
'o'
,
'r'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
attrBorderBottomStyle
[]
=
...
...
@@ -113,6 +115,7 @@ static const struct{
{
attrBackground
,
DISPID_IHTMLSTYLE_BACKGROUND
},
{
attrBackgroundColor
,
DISPID_IHTMLSTYLE_BACKGROUNDCOLOR
},
{
attrBackgroundImage
,
DISPID_IHTMLSTYLE_BACKGROUNDIMAGE
},
{
attrBackgroundRepeat
,
DISPID_IHTMLSTYLE_BACKGROUNDREPEAT
},
{
attrBorder
,
DISPID_IHTMLSTYLE_BORDER
},
{
attrBorderBottomStyle
,
DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE
},
{
attrBorderLeft
,
DISPID_IHTMLSTYLE_BORDERLEFT
},
...
...
@@ -803,15 +806,30 @@ static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_backgroundRepeat
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
static
const
WCHAR
styleRepeat
[]
=
{
'r'
,
'e'
,
'p'
,
'e'
,
'a'
,
't'
,
0
};
static
const
WCHAR
styleNoRepeat
[]
=
{
'n'
,
'o'
,
'-'
,
'r'
,
'e'
,
'p'
,
'e'
,
'a'
,
't'
,
0
};
static
const
WCHAR
styleRepeatX
[]
=
{
'r'
,
'e'
,
'p'
,
'e'
,
'a'
,
't'
,
'-'
,
'x'
,
0
};
static
const
WCHAR
styleRepeatY
[]
=
{
'r'
,
'e'
,
'p'
,
'e'
,
'a'
,
't'
,
'-'
,
'y'
,
0
};
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
/* fontWeight can only be one of the following */
if
(
!
v
||
strcmpiW
(
styleRepeat
,
v
)
==
0
||
strcmpiW
(
styleNoRepeat
,
v
)
==
0
||
strcmpiW
(
styleRepeatX
,
v
)
==
0
||
strcmpiW
(
styleRepeatY
,
v
)
==
0
)
{
return
set_style_attr
(
This
,
STYLEID_BACKGROUND_REPEAT
,
v
,
0
);
}
return
E_INVALIDARG
;
}
static
HRESULT
WINAPI
HTMLStyle_get_backgroundRepeat
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_style_attr
(
This
,
STYLEID_BACKGROUND_REPEAT
,
p
);
}
static
HRESULT
WINAPI
HTMLStyle_put_backgroundAttachment
(
IHTMLStyle
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/htmlstyle.h
View file @
63c8939c
...
...
@@ -38,6 +38,7 @@ typedef enum {
STYLEID_BACKGROUND
,
STYLEID_BACKGROUND_COLOR
,
STYLEID_BACKGROUND_IMAGE
,
STYLEID_BACKGROUND_REPEAT
,
STYLEID_BORDER
,
STYLEID_BORDER_BOTTOM_STYLE
,
STYLEID_BORDER_LEFT
,
...
...
dlls/mshtml/tests/dom.c
View file @
63c8939c
...
...
@@ -3184,6 +3184,44 @@ static void test_default_style(IHTMLStyle *style)
hres
=
IHTMLStyle_put_paddingLeft
(
style
,
vDefault
);
ok
(
hres
==
S_OK
,
"get_paddingLeft: %08x
\n
"
,
hres
);
/* BackgroundRepeat */
hres
=
IHTMLStyle_get_backgroundRepeat
(
style
,
&
sDefault
);
ok
(
hres
==
S_OK
,
"get_backgroundRepeat failed: %08x
\n
"
,
hres
);
str
=
a2bstr
(
"invalid"
);
hres
=
IHTMLStyle_put_backgroundRepeat
(
style
,
str
);
ok
(
hres
==
E_INVALIDARG
,
"put_backgroundRepeat failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"repeat"
);
hres
=
IHTMLStyle_put_backgroundRepeat
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_backgroundRepeat failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"no-repeat"
);
hres
=
IHTMLStyle_put_backgroundRepeat
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_backgroundRepeat failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"repeat-x"
);
hres
=
IHTMLStyle_put_backgroundRepeat
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_backgroundRepeat failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"repeat-y"
);
hres
=
IHTMLStyle_put_backgroundRepeat
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_backgroundRepeat failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_get_backgroundRepeat
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_backgroundRepeat failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"repeat-y"
),
"str=%s
\n
"
,
dbgstr_w
(
str
));
SysFreeString
(
str
);
hres
=
IHTMLStyle_put_backgroundRepeat
(
style
,
sDefault
);
ok
(
hres
==
S_OK
,
"put_backgroundRepeat failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_QueryInterface
(
style
,
&
IID_IHTMLStyle2
,
(
void
**
)
&
style2
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLStyle2 iface: %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
...
...
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