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
bde26041
Commit
bde26041
authored
Aug 20, 2014
by
Zhenbo Li
Committed by
Alexandre Julliard
Aug 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLStyle::listStyle property implementation.
parent
7432a858
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
4 deletions
+46
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+11
-4
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
style.c
dlls/mshtml/tests/style.c
+34
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
bde26041
...
...
@@ -128,6 +128,8 @@ static const WCHAR attrLetterSpacing[] =
{
'l'
,
'e'
,
't'
,
't'
,
'e'
,
'r'
,
'-'
,
's'
,
'p'
,
'a'
,
'c'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
attrLineHeight
[]
=
{
'l'
,
'i'
,
'n'
,
'e'
,
'-'
,
'h'
,
'e'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
attrListStyle
[]
=
{
'l'
,
'i'
,
's'
,
't'
,
'-'
,
's'
,
't'
,
'y'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
attrListStyleType
[]
=
{
'l'
,
'i'
,
's'
,
't'
,
'-'
,
's'
,
't'
,
'y'
,
'l'
,
'e'
,
'-'
,
't'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
attrListStylePosition
[]
=
...
...
@@ -252,6 +254,7 @@ static const style_tbl_entry_t style_tbl[] = {
{
attrLeft
,
DISPID_IHTMLSTYLE_LEFT
},
{
attrLetterSpacing
,
DISPID_IHTMLSTYLE_LETTERSPACING
},
{
attrLineHeight
,
DISPID_IHTMLSTYLE_LINEHEIGHT
},
{
attrListStyle
,
DISPID_IHTMLSTYLE_LISTSTYLE
},
{
attrListStylePosition
,
DISPID_IHTMLSTYLE_LISTSTYLEPOSITION
},
{
attrListStyleType
,
DISPID_IHTMLSTYLE_LISTSTYLETYPE
},
{
attrMargin
,
DISPID_IHTMLSTYLE_MARGIN
},
...
...
@@ -2241,15 +2244,19 @@ static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_listStyle
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
set_style_attr
(
This
,
STYLEID_LIST_STYLE
,
v
,
0
);
}
static
HRESULT
WINAPI
HTMLStyle_get_listStyle
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_style_attr
(
This
,
STYLEID_LIST_STYLE
,
p
);
}
static
HRESULT
WINAPI
HTMLStyle_put_whiteSpace
(
IHTMLStyle
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/htmlstyle.h
View file @
bde26041
...
...
@@ -79,6 +79,7 @@ typedef enum {
STYLEID_LEFT
,
STYLEID_LETTER_SPACING
,
STYLEID_LINE_HEIGHT
,
STYLEID_LIST_STYLE
,
STYLEID_LISTSTYLEPOSITION
,
STYLEID_LISTSTYLETYPE
,
STYLEID_MARGIN
,
...
...
dlls/mshtml/tests/style.c
View file @
bde26041
...
...
@@ -59,6 +59,22 @@ static BSTR a2bstr(const char *str)
return
ret
;
}
static
const
WCHAR
*
strstr_wa
(
const
WCHAR
*
str
,
const
char
*
suba
)
{
BSTR
sub
;
const
WCHAR
*
ret
=
NULL
;
sub
=
a2bstr
(
suba
);
while
(
*
str
)
{
const
WCHAR
*
p1
=
str
,
*
p2
=
sub
;
while
(
*
p1
&&
*
p2
&&
*
p1
==
*
p2
)
{
p1
++
;
p2
++
;
}
if
(
!*
p2
)
{
ret
=
str
;
break
;}
str
++
;
}
SysFreeString
(
sub
);
return
ret
;
}
#define test_var_bstr(a,b) _test_var_bstr(__LINE__,a,b)
static
void
_test_var_bstr
(
unsigned
line
,
const
VARIANT
*
v
,
const
char
*
expect
)
{
...
...
@@ -2194,6 +2210,24 @@ static void test_body_style(IHTMLStyle *style)
ok
(
!
strcmp_wa
(
str
,
"inside"
),
"listStyleType = %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
str
=
a2bstr
(
"decimal-leading-zero none inside"
);
hres
=
IHTMLStyle_put_listStyle
(
style
,
str
);
ok
(
hres
==
S_OK
||
broken
(
hres
==
E_INVALIDARG
),
/* win 2000 */
"put_listStyle(%s) failed: %08x
\n
"
,
wine_dbgstr_w
(
str
),
hres
);
SysFreeString
(
str
);
if
(
hres
!=
E_INVALIDARG
)
{
hres
=
IHTMLStyle_get_listStyle
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_listStyle failed: %08x
\n
"
,
hres
);
ok
(
strstr_wa
(
str
,
"decimal-leading-zero"
)
==
str
&&
strstr_wa
(
str
,
"none"
)
!=
NULL
&&
strstr_wa
(
str
,
"inside"
)
!=
NULL
,
"listStyle = %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
}
else
{
win_skip
(
"IHTMLStyle_put_listStyle already failed
\n
"
);
}
hres
=
IHTMLStyle_QueryInterface
(
style
,
&
IID_IHTMLStyle2
,
(
void
**
)
&
style2
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLStyle2 iface: %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
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