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
6d13dd69
Commit
6d13dd69
authored
Sep 30, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLStyle6::outline property implementation.
parent
93f9d824
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
5 deletions
+53
-5
htmlstyle.c
dlls/mshtml/htmlstyle.c
+4
-1
htmlstyle.h
dlls/mshtml/htmlstyle.h
+2
-0
htmlstyle3.c
dlls/mshtml/htmlstyle3.c
+8
-4
style.c
dlls/mshtml/tests/style.c
+39
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
6d13dd69
...
...
@@ -135,6 +135,8 @@ static const WCHAR attrMarginTop[] =
{
'm'
,
'a'
,
'r'
,
'g'
,
'i'
,
'n'
,
'-'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
attrMinHeight
[]
=
{
'm'
,
'i'
,
'n'
,
'-'
,
'h'
,
'e'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
attrOutline
[]
=
{
'o'
,
'u'
,
't'
,
'l'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
attrOverflow
[]
=
{
'o'
,
'v'
,
'e'
,
'r'
,
'f'
,
'l'
,
'o'
,
'w'
,
0
};
static
const
WCHAR
attrOverflowX
[]
=
...
...
@@ -241,6 +243,7 @@ static const style_tbl_entry_t style_tbl[] = {
{
attrMarginRight
,
DISPID_IHTMLSTYLE_MARGINRIGHT
},
{
attrMarginTop
,
DISPID_IHTMLSTYLE_MARGINTOP
},
{
attrMinHeight
,
DISPID_IHTMLSTYLE4_MINHEIGHT
},
{
attrOutline
,
DISPID_IHTMLSTYLE6_OUTLINE
},
{
attrOverflow
,
DISPID_IHTMLSTYLE_OVERFLOW
},
{
attrOverflowX
,
DISPID_IHTMLSTYLE2_OVERFLOWX
},
{
attrOverflowY
,
DISPID_IHTMLSTYLE2_OVERFLOWY
},
...
...
@@ -464,7 +467,7 @@ static HRESULT nsstyle_to_bstr(const WCHAR *val, DWORD flags, BSTR *p)
DWORD
len
;
if
(
!*
val
)
{
*
p
=
NULL
;
*
p
=
(
flags
&
ATTR_NO_NULL
)
?
SysAllocStringLen
(
NULL
,
0
)
:
NULL
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlstyle.h
View file @
6d13dd69
...
...
@@ -83,6 +83,7 @@ typedef enum {
STYLEID_MARGIN_RIGHT
,
STYLEID_MARGIN_TOP
,
STYLEID_MIN_HEIGHT
,
STYLEID_OUTLINE
,
STYLEID_OVERFLOW
,
STYLEID_OVERFLOW_X
,
STYLEID_OVERFLOW_Y
,
...
...
@@ -123,3 +124,4 @@ HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
#define ATTR_STR_TO_INT 0x0004
#define ATTR_HEX_INT 0x0008
#define ATTR_REMOVE_COMMA 0x0010
#define ATTR_NO_NULL 0x0020
dlls/mshtml/htmlstyle3.c
View file @
6d13dd69
...
...
@@ -702,15 +702,19 @@ static HRESULT WINAPI HTMLStyle6_get_counterReset(IHTMLStyle6 *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle6_put_outline
(
IHTMLStyle6
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle6
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
set_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_OUTLINE
,
v
,
0
);
}
static
HRESULT
WINAPI
HTMLStyle6_get_outline
(
IHTMLStyle6
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle6
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_OUTLINE
,
p
,
ATTR_NO_NULL
);
}
static
HRESULT
WINAPI
HTMLStyle6_put_outlineWidth
(
IHTMLStyle6
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/style.c
View file @
6d13dd69
...
...
@@ -37,6 +37,13 @@ static int strcmp_wa(LPCWSTR strw, const char *stra)
return
lstrcmpA
(
stra
,
buf
);
}
static
BOOL
wstr_contains
(
const
WCHAR
*
strw
,
const
char
*
stra
)
{
CHAR
buf
[
512
];
WideCharToMultiByte
(
CP_ACP
,
0
,
strw
,
-
1
,
buf
,
sizeof
(
buf
),
NULL
,
NULL
);
return
strstr
(
buf
,
stra
)
!=
NULL
;
}
static
BSTR
a2bstr
(
const
char
*
str
)
{
BSTR
ret
;
...
...
@@ -464,11 +471,35 @@ static void test_style4(IHTMLStyle4 *style4)
VariantClear
(
&
vdefault
);
}
static
void
test_style6
(
IHTMLStyle6
*
style
)
{
BSTR
str
;
HRESULT
hres
;
str
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLStyle6_get_outline
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_outline failed: %08x
\n
"
,
hres
);
ok
(
str
&&
!*
str
,
"outline = %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
str
=
a2bstr
(
"1px"
);
hres
=
IHTMLStyle6_put_outline
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_outline failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLStyle6_get_outline
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_outline failed: %08x
\n
"
,
hres
);
ok
(
wstr_contains
(
str
,
"1px"
),
"outline = %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
}
static
void
test_body_style
(
IHTMLStyle
*
style
)
{
IHTMLStyle2
*
style2
;
IHTMLStyle3
*
style3
;
IHTMLStyle4
*
style4
;
IHTMLStyle6
*
style6
;
VARIANT_BOOL
b
;
VARIANT
v
;
BSTR
str
;
...
...
@@ -2064,6 +2095,14 @@ static void test_body_style(IHTMLStyle *style)
test_style4
(
style4
);
IHTMLStyle4_Release
(
style4
);
}
hres
=
IHTMLStyle_QueryInterface
(
style
,
&
IID_IHTMLStyle6
,
(
void
**
)
&
style6
);
if
(
SUCCEEDED
(
hres
))
{
test_style6
(
style6
);
IHTMLStyle6_Release
(
style6
);
}
else
{
win_skip
(
"IHTMLStyle6 not available
\n
"
);
}
}
#define test_style_filter(a,b) _test_style_filter(__LINE__,a,b)
...
...
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