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
63fe5d84
Commit
63fe5d84
authored
Jan 27, 2011
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle put_borderTopColor.
parent
fcf8e164
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
htmlstyle.c
dlls/mshtml/htmlstyle.c
+9
-3
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
dom.c
dlls/mshtml/tests/dom.c
+18
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
63fe5d84
...
...
@@ -351,8 +351,12 @@ HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
static
const
WCHAR
format
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
px_format
[]
=
{
'%'
,
'd'
,
'p'
,
'x'
,
0
};
static
const
WCHAR
hex_format
[]
=
{
'#'
,
'%'
,
'0'
,
'6'
,
'x'
,
0
};
wsprintfW
(
str
,
flags
&
ATTR_FIX_PX
?
px_format
:
format
,
V_I4
(
value
));
if
(
flags
&
ATTR_HEX_INT
)
wsprintfW
(
str
,
hex_format
,
V_I4
(
value
));
else
wsprintfW
(
str
,
flags
&
ATTR_FIX_PX
?
px_format
:
format
,
V_I4
(
value
));
return
set_nsstyle_attr
(
nsstyle
,
sid
,
str
,
flags
&
~
ATTR_FIX_PX
);
}
default:
...
...
@@ -1537,8 +1541,10 @@ static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_borderTopColor
(
IHTMLStyle
*
iface
,
VARIANT
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
FIXME
(
"(%p)->(v%d)
\n
"
,
This
,
V_VT
(
&
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(v%d)
\n
"
,
This
,
V_VT
(
&
v
));
return
set_nsstyle_attr_var
(
This
->
nsstyle
,
STYLEID_BORDER_TOP_COLOR
,
&
v
,
ATTR_HEX_INT
);
}
static
HRESULT
WINAPI
HTMLStyle_get_borderTopColor
(
IHTMLStyle
*
iface
,
VARIANT
*
p
)
...
...
dlls/mshtml/htmlstyle.h
View file @
63fe5d84
...
...
@@ -108,3 +108,4 @@ HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
#define ATTR_FIX_PX 1
#define ATTR_FIX_URL 2
#define ATTR_STR_TO_INT 4
#define ATTR_HEX_INT 8
dlls/mshtml/tests/dom.c
View file @
63fe5d84
...
...
@@ -5443,6 +5443,24 @@ static void test_default_style(IHTMLStyle *style)
ok
(
hres
==
S_OK
,
"put_letterSpacing: %08x
\n
"
,
hres
);
VariantClear
(
&
vDefault
);
/* borderTopColor */
hres
=
IHTMLStyle_get_borderTopColor
(
style
,
&
vDefault
);
ok
(
hres
==
S_OK
,
"get_borderTopColor: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"red"
);
hres
=
IHTMLStyle_put_borderTopColor
(
style
,
v
);
ok
(
hres
==
S_OK
,
"put_borderTopColor: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
hres
=
IHTMLStyle_get_borderTopColor
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_borderTopColor: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"red"
),
"expecte red = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
hres
=
IHTMLStyle_put_borderTopColor
(
style
,
vDefault
);
ok
(
hres
==
S_OK
,
"put_borderTopColor: %08x
\n
"
,
hres
);
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