Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3a118f86
Commit
3a118f86
authored
Mar 09, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLStyle::put_cssText implementation.
parent
50126adf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+14
-2
dom.c
dlls/mshtml/tests/dom.c
+29
-2
No files found.
dlls/mshtml/htmlstyle.c
View file @
3a118f86
...
...
@@ -2056,8 +2056,20 @@ static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_cssText
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
text_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
text_str
,
v
);
nsres
=
nsIDOMCSSStyleDeclaration_SetCssText
(
This
->
nsstyle
,
&
text_str
);
nsAString_Finish
(
&
text_str
);
if
(
NS_FAILED
(
nsres
))
{
FIXME
(
"SetCssStyle failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLStyle_get_cssText
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
3a118f86
...
...
@@ -1943,6 +1943,18 @@ static void _test_style_csstext(unsigned line, IHTMLStyle *style, const char *ex
SysFreeString
(
text
);
}
#define test_style_set_csstext(s,t) _test_style_set_csstext(__LINE__,s,t)
static
void
_test_style_set_csstext
(
unsigned
line
,
IHTMLStyle
*
style
,
const
char
*
text
)
{
BSTR
tmp
;
HRESULT
hres
;
tmp
=
a2bstr
(
text
);
hres
=
IHTMLStyle_put_cssText
(
style
,
tmp
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_cssText failed: %08x
\n
"
,
hres
);
SysFreeString
(
tmp
);
}
static
void
test_elem_col_item
(
IHTMLElementCollection
*
col
,
LPCWSTR
n
,
const
elem_type_t
*
elem_types
,
long
len
)
{
...
...
@@ -3590,6 +3602,20 @@ static void test_default_style(IHTMLStyle *style)
}
}
static
void
test_set_csstext
(
IHTMLStyle
*
style
)
{
VARIANT
v
;
HRESULT
hres
;
test_style_set_csstext
(
style
,
"background-color: black;"
);
hres
=
IHTMLStyle_get_backgroundColor
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_backgroundColor: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"type failed: %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"black"
),
"str=%s
\n
"
,
dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
}
static
void
test_default_selection
(
IHTMLDocument2
*
doc
)
{
IHTMLSelectionObject
*
selection
;
...
...
@@ -3830,8 +3856,6 @@ static void test_defaults(IHTMLDocument2 *doc)
test_location
(
doc
);
test_navigator
(
doc
);
IHTMLStyle_Release
(
style
);
elem2
=
get_elem2_iface
((
IUnknown
*
)
elem
);
hres
=
IHTMLElement2_get_currentStyle
(
elem2
,
&
cstyle
);
ok
(
hres
==
S_OK
,
"get_currentStyle failed: %08x
\n
"
,
hres
);
...
...
@@ -3843,6 +3867,9 @@ static void test_defaults(IHTMLDocument2 *doc)
IHTMLElement_Release
(
elem
);
test_set_csstext
(
style
);
IHTMLStyle_Release
(
style
);
hres
=
IHTMLDocument2_get_styleSheets
(
doc
,
&
stylesheetcol
);
ok
(
hres
==
S_OK
,
"get_styleSheets failed: %08x
\n
"
,
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