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
9a665ec2
Commit
9a665ec2
authored
Oct 06, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLCurrentStyle::get_display implementation.
parent
72fc799d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
htmlcurstyle.c
dlls/mshtml/htmlcurstyle.c
+7
-5
htmlstyle.c
dlls/mshtml/htmlstyle.c
+10
-5
htmlstyle.h
dlls/mshtml/htmlstyle.h
+2
-0
dom.c
dlls/mshtml/tests/dom.c
+8
-0
No files found.
dlls/mshtml/htmlcurstyle.c
View file @
9a665ec2
...
...
@@ -25,10 +25,10 @@
#include "winuser.h"
#include "ole2.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "mshtml_private.h"
#include "htmlstyle.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
...
...
@@ -376,8 +376,10 @@ static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *ifa
static
HRESULT
WINAPI
HTMLCurrentStyle_get_display
(
IHTMLCurrentStyle
*
iface
,
BSTR
*
p
)
{
HTMLCurrentStyle
*
This
=
HTMLCURSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_DISPLAY
,
p
);
}
static
HRESULT
WINAPI
HTMLCurrentStyle_get_visibility
(
IHTMLCurrentStyle
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/htmlstyle.c
View file @
9a665ec2
...
...
@@ -185,14 +185,14 @@ static HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWO
return
S_OK
;
}
static
HRESULT
get_
style_attr_nsval
(
HTMLStyle
*
This
,
styleid_t
sid
,
nsAString
*
value
)
static
HRESULT
get_
nsstyle_attr_nsval
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
nsAString
*
value
)
{
nsAString
str_name
;
nsresult
nsres
;
nsAString_Init
(
&
str_name
,
style_strings
[
sid
]);
nsres
=
nsIDOMCSSStyleDeclaration_GetPropertyValue
(
This
->
nsstyle
,
&
str_name
,
value
);
nsres
=
nsIDOMCSSStyleDeclaration_GetPropertyValue
(
nsstyle
,
&
str_name
,
value
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetProperty failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
...
...
@@ -203,14 +203,14 @@ static HRESULT get_style_attr_nsval(HTMLStyle *This, styleid_t sid, nsAString *v
return
NS_OK
;
}
static
HRESULT
get_style_attr
(
HTMLStyle
*
This
,
styleid_t
sid
,
BSTR
*
p
)
HRESULT
get_nsstyle_attr
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
BSTR
*
p
)
{
nsAString
str_value
;
const
PRUnichar
*
value
;
nsAString_Init
(
&
str_value
,
NULL
);
get_
style_attr_nsval
(
This
,
sid
,
&
str_value
);
get_
nsstyle_attr_nsval
(
nsstyle
,
sid
,
&
str_value
);
nsAString_GetData
(
&
str_value
,
&
value
);
*
p
=
*
value
?
SysAllocString
(
value
)
:
NULL
;
...
...
@@ -221,6 +221,11 @@ static HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p)
return
S_OK
;
}
static
inline
HRESULT
get_style_attr
(
HTMLStyle
*
This
,
styleid_t
sid
,
BSTR
*
p
)
{
return
get_nsstyle_attr
(
This
->
nsstyle
,
sid
,
p
);
}
static
HRESULT
check_style_attr_value
(
HTMLStyle
*
This
,
styleid_t
sid
,
LPCWSTR
exval
,
VARIANT_BOOL
*
p
)
{
nsAString
str_value
;
...
...
@@ -228,7 +233,7 @@ static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR ex
nsAString_Init
(
&
str_value
,
NULL
);
get_
style_attr_nsval
(
This
,
sid
,
&
str_value
);
get_
nsstyle_attr_nsval
(
This
->
nsstyle
,
sid
,
&
str_value
);
nsAString_GetData
(
&
str_value
,
&
value
);
*
p
=
strcmpW
(
value
,
exval
)
?
VARIANT_FALSE
:
VARIANT_TRUE
;
...
...
dlls/mshtml/htmlstyle.h
View file @
9a665ec2
...
...
@@ -51,3 +51,5 @@ typedef enum {
}
styleid_t
;
void
HTMLStyle2_Init
(
HTMLStyle
*
);
HRESULT
get_nsstyle_attr
(
nsIDOMCSSStyleDeclaration
*
,
styleid_t
,
BSTR
*
);
dlls/mshtml/tests/dom.c
View file @
9a665ec2
...
...
@@ -1986,8 +1986,16 @@ static void test_navigator(IHTMLDocument2 *doc)
static
void
test_current_style
(
IHTMLCurrentStyle
*
current_style
)
{
BSTR
str
;
HRESULT
hres
;
test_disp
((
IUnknown
*
)
current_style
,
&
DIID_DispHTMLCurrentStyle
);
test_ifaces
((
IUnknown
*
)
current_style
,
cstyle_iids
);
hres
=
IHTMLCurrentStyle_get_display
(
current_style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_display failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"block"
),
"get_display returned %s
\n
"
,
dbgstr_w
(
str
));
SysFreeString
(
str
);
}
static
void
test_default_style
(
IHTMLStyle
*
style
)
...
...
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