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
9257ab8a
Commit
9257ab8a
authored
Jul 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Factor out getting style value string from Gecko value.
parent
ff17abc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
11 deletions
+26
-11
htmlstyle.c
dlls/mshtml/htmlstyle.c
+26
-11
No files found.
dlls/mshtml/htmlstyle.c
View file @
9257ab8a
...
...
@@ -407,18 +407,35 @@ static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, stylei
return
NS_OK
;
}
static
HRESULT
nsstyle_to_bstr
(
const
WCHAR
*
val
,
DWORD
flags
,
BSTR
*
p
)
{
BSTR
ret
;
if
(
!*
val
)
{
*
p
=
NULL
;
return
S_OK
;
}
ret
=
SysAllocString
(
val
);
if
(
!
ret
)
return
E_OUTOFMEMORY
;
*
p
=
ret
;
return
S_OK
;
}
HRESULT
get_nsstyle_attr
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
BSTR
*
p
)
{
nsAString
str_value
;
const
PRUnichar
*
value
;
HRESULT
hres
;
nsAString_Init
(
&
str_value
,
NULL
);
get_nsstyle_attr_nsval
(
nsstyle
,
sid
,
&
str_value
);
nsAString_GetData
(
&
str_value
,
&
value
);
*
p
=
*
value
?
SysAllocString
(
value
)
:
NULL
;
hres
=
nsstyle_to_bstr
(
value
,
0
,
p
);
nsAString_Finish
(
&
str_value
);
TRACE
(
"%s -> %s
\n
"
,
debugstr_w
(
style_tbl
[
sid
].
name
),
debugstr_w
(
*
p
));
...
...
@@ -430,6 +447,7 @@ HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
nsAString
str_value
;
const
PRUnichar
*
value
;
BOOL
set
=
FALSE
;
HRESULT
hres
=
S_OK
;
nsAString_Init
(
&
str_value
,
NULL
);
...
...
@@ -458,22 +476,19 @@ HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
}
if
(
!
set
)
{
BSTR
str
=
NULL
;
BSTR
str
;
if
(
*
value
)
{
str
=
SysAllocString
(
value
);
if
(
!
str
)
return
E_OUTOFMEMORY
;
hres
=
nsstyle_to_bstr
(
value
,
flags
,
&
str
);
if
(
SUCCEEDED
(
hres
))
{
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
str
;
}
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
str
;
}
nsAString_Finish
(
&
str_value
);
TRACE
(
"%s -> %s
\n
"
,
debugstr_w
(
style_tbl
[
sid
].
name
),
debugstr_variant
(
p
));
return
S_OK
;
return
hres
;
}
static
inline
HRESULT
get_style_attr
(
HTMLStyle
*
This
,
styleid_t
sid
,
BSTR
*
p
)
...
...
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