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
78b8ee54
Commit
78b8ee54
authored
Sep 07, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLCSSStyleDeclaration::get_cssText implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
45f8c03c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
20 deletions
+18
-20
htmlstyle.c
dlls/mshtml/htmlstyle.c
+10
-19
style.c
dlls/mshtml/tests/style.c
+8
-1
No files found.
dlls/mshtml/htmlstyle.c
View file @
78b8ee54
...
...
@@ -2472,26 +2472,10 @@ static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
static
HRESULT
WINAPI
HTMLStyle_get_cssText
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
nsAString
text_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
/* FIXME: Gecko style formatting is different than IE (uppercase). */
nsAString_Init
(
&
text_str
,
NULL
);
nsres
=
nsIDOMCSSStyleDeclaration_GetCssText
(
This
->
nsstyle
,
&
text_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
text
;
nsAString_GetData
(
&
text_str
,
&
text
);
*
p
=
*
text
?
SysAllocString
(
text
)
:
NULL
;
}
else
{
FIXME
(
"GetCssStyle failed: %08x
\n
"
,
nsres
);
*
p
=
NULL
;
}
nsAString_Finish
(
&
text_str
);
return
S_OK
;
return
IHTMLCSSStyleDeclaration_get_cssText
(
&
This
->
IHTMLCSSStyleDeclaration_iface
,
p
);
}
static
HRESULT
WINAPI
HTMLStyle_put_pixelTop
(
IHTMLStyle
*
iface
,
LONG
v
)
...
...
@@ -5802,8 +5786,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_put_cssText(IHTMLCSSStyleDeclarati
static
HRESULT
WINAPI
HTMLCSSStyleDeclaration_get_cssText
(
IHTMLCSSStyleDeclaration
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLCSSStyleDeclaration
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
text_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
/* NOTE: Quicks mode should use different formatting (uppercase, no ';' at the end of rule). */
nsAString_Init
(
&
text_str
,
NULL
);
nsres
=
nsIDOMCSSStyleDeclaration_GetCssText
(
This
->
nsstyle
,
&
text_str
);
return
return_nsstr
(
nsres
,
&
text_str
,
p
);
}
static
HRESULT
WINAPI
HTMLCSSStyleDeclaration_put_cursor
(
IHTMLCSSStyleDeclaration
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/style.c
View file @
78b8ee54
...
...
@@ -380,10 +380,17 @@ static void test_set_csstext(IHTMLStyle *style)
SysFreeString
(
str
);
hres
=
IHTMLCSSStyleDeclaration_get_cssFloat
(
css_style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_css
Tex
t failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_css
Floa
t failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"left"
),
"cssFloat = %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
hres
=
IHTMLCSSStyleDeclaration_get_cssText
(
css_style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_cssText failed: %08x
\n
"
,
hres
);
todo_wine_if
(
compat_mode
<
COMPAT_IE9
)
ok
(
!
strcmp_wa
(
str
,
compat_mode
>=
COMPAT_IE9
?
"float: left;"
:
"FLOAT: left"
),
"cssFloat = %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
hres
=
IHTMLCSSStyleDeclaration_put_cssText
(
css_style
,
NULL
);
ok
(
hres
==
S_OK
,
"put_cssText 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