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
cc8d9f23
Commit
cc8d9f23
authored
Nov 18, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLStyleSheet::cssText property partial implementation.
parent
e6cd0f7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
4 deletions
+60
-4
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+60
-4
No files found.
dlls/mshtml/htmlstylesheet.c
View file @
cc8d9f23
...
...
@@ -17,6 +17,7 @@
*/
#include <stdarg.h>
#include <assert.h>
#define COBJMACROS
...
...
@@ -629,15 +630,70 @@ static HRESULT WINAPI HTMLStyleSheet_get_media(IHTMLStyleSheet *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyleSheet_put_cssText
(
IHTMLStyleSheet
*
iface
,
BSTR
v
)
{
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
do
{
nsres
=
nsIDOMCSSStyleSheet_DeleteRule
(
This
->
nsstylesheet
,
0
);
}
while
(
NS_SUCCEEDED
(
nsres
));
if
(
v
&&
*
v
)
{
nsAString
nsstr
;
UINT32
idx
;
/* FIXME: This won't work for multiple rules in the string. */
nsAString_InitDepend
(
&
nsstr
,
v
);
nsres
=
nsIDOMCSSStyleSheet_InsertRule
(
This
->
nsstylesheet
,
&
nsstr
,
0
,
&
idx
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
FIXME
(
"InsertRule failed for string %s. Probably multiple rules passed.
\n
"
,
debugstr_w
(
v
));
return
E_FAIL
;
}
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLStyleSheet_get_cssText
(
IHTMLStyleSheet
*
iface
,
BSTR
*
p
)
{
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMCSSRuleList
*
nslist
=
NULL
;
nsIDOMCSSRule
*
nsrule
;
nsAString
nsstr
;
UINT32
len
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMCSSStyleSheet_GetCssRules
(
This
->
nsstylesheet
,
&
nslist
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetCssRules failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMCSSRuleList_GetLength
(
nslist
,
&
len
);
assert
(
nsres
==
NS_OK
);
if
(
len
)
{
nsres
=
nsIDOMCSSRuleList_Item
(
nslist
,
0
,
&
nsrule
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Item failed: %08x
\n
"
,
nsres
);
}
nsIDOMCSSRuleList_Release
(
nslist
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
if
(
!
len
)
{
*
p
=
NULL
;
return
S_OK
;
}
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMCSSRule_GetCssText
(
nsrule
,
&
nsstr
);
nsIDOMCSSRule_Release
(
nsrule
);
return
return_nsstr
(
nsres
,
&
nsstr
,
p
);
}
static
HRESULT
WINAPI
HTMLStyleSheet_get_rules
(
IHTMLStyleSheet
*
iface
,
...
...
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