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
d804631e
Commit
d804631e
authored
Mar 02, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Mar 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle get/put borderStyle.
parent
9188cba1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
4 deletions
+95
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+44
-4
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
dom.c
dlls/mshtml/tests/dom.c
+50
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
d804631e
...
...
@@ -55,6 +55,8 @@ static const WCHAR attrBorderLeftStyle[] =
{
'b'
,
'o'
,
'r'
,
'd'
,
'e'
,
'r'
,
'-'
,
'l'
,
'e'
,
'f'
,
't'
,
'-'
,
's'
,
't'
,
'y'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
attrBorderRightStyle
[]
=
{
'b'
,
'o'
,
'r'
,
'd'
,
'e'
,
'r'
,
'-'
,
'r'
,
'i'
,
'g'
,
'h'
,
't'
,
'-'
,
's'
,
't'
,
'y'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
attrBorderStyle
[]
=
{
'b'
,
'o'
,
'r'
,
'd'
,
'e'
,
'r'
,
'-'
,
's'
,
't'
,
'y'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
attrBorderTopStyle
[]
=
{
'b'
,
'o'
,
'r'
,
'd'
,
'e'
,
'r'
,
'-'
,
't'
,
'o'
,
'p'
,
'-'
,
's'
,
't'
,
'y'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
attrBorderWidth
[]
=
...
...
@@ -124,6 +126,7 @@ static const struct{
{
attrBorderLeft
,
DISPID_IHTMLSTYLE_BORDERLEFT
},
{
attrBorderLeftStyle
,
DISPID_IHTMLSTYLE_BORDERLEFTSTYLE
},
{
attrBorderRightStyle
,
DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE
},
{
attrBorderStyle
,
DISPID_IHTMLSTYLE_BORDERSTYLE
},
{
attrBorderTopStyle
,
DISPID_IHTMLSTYLE_BORDERTOPSTYLE
},
{
attrBorderWidth
,
DISPID_IHTMLSTYLE_BORDERWIDTH
},
{
attrColor
,
DISPID_IHTMLSTYLE_COLOR
},
...
...
@@ -1562,15 +1565,52 @@ static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *
static
HRESULT
WINAPI
HTMLStyle_put_borderStyle
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
static
const
WCHAR
styleWindowInset
[]
=
{
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
'-'
,
'i'
,
'n'
,
's'
,
'e'
,
't'
,
0
};
HRESULT
hres
=
S_OK
;
BSTR
pstyle
;
int
i
=
0
;
int
last
=
0
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
while
(
v
[
i
]
&&
hres
==
S_OK
)
{
if
(
v
[
i
]
==
(
WCHAR
)
' '
)
{
pstyle
=
SysAllocStringLen
(
&
v
[
last
],
(
i
-
last
));
if
(
!
(
is_valid_border_style
(
pstyle
)
||
strcmpiW
(
styleWindowInset
,
pstyle
)
==
0
))
{
TRACE
(
"1. Invalid style (%s)
\n
"
,
debugstr_w
(
pstyle
));
hres
=
E_INVALIDARG
;
}
SysFreeString
(
pstyle
);
last
=
i
+
1
;
}
i
++
;
}
if
(
hres
==
S_OK
)
{
pstyle
=
SysAllocStringLen
(
&
v
[
last
],
i
-
last
);
if
(
!
(
is_valid_border_style
(
pstyle
)
||
strcmpiW
(
styleWindowInset
,
pstyle
)
==
0
))
{
TRACE
(
"2. Invalid style (%s)
\n
"
,
debugstr_w
(
pstyle
));
hres
=
E_INVALIDARG
;
}
SysFreeString
(
pstyle
);
}
if
(
hres
==
S_OK
)
hres
=
set_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_BORDER_STYLE
,
v
,
0
);
return
hres
;
}
static
HRESULT
WINAPI
HTMLStyle_get_borderStyle
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXM
E
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRAC
E
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_style_attr
(
This
,
STYLEID_BORDER_STYLE
,
p
)
;
}
static
HRESULT
WINAPI
HTMLStyle_put_borderTopStyle
(
IHTMLStyle
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/htmlstyle.h
View file @
d804631e
...
...
@@ -45,6 +45,7 @@ typedef enum {
STYLEID_BORDER_LEFT
,
STYLEID_BORDER_LEFT_STYLE
,
STYLEID_BORDER_RIGHT_STYLE
,
STYLEID_BORDER_STYLE
,
STYLEID_BORDER_TOP_STYLE
,
STYLEID_BORDER_WIDTH
,
STYLEID_COLOR
,
...
...
dlls/mshtml/tests/dom.c
View file @
d804631e
...
...
@@ -3262,6 +3262,56 @@ static void test_default_style(IHTMLStyle *style)
test_border_styles
(
style
,
str
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_get_borderStyle
(
style
,
&
sDefault
);
ok
(
hres
==
S_OK
,
"get_borderStyle failed: %08x
\n
"
,
hres
);
str
=
a2bstr
(
"none dotted dashed solid"
);
hres
=
IHTMLStyle_put_borderStyle
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_borderStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"none dotted dashed solid"
);
hres
=
IHTMLStyle_get_borderStyle
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_borderStyle failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"none dotted dashed solid"
),
"expected (none dotted dashed solid) = (%s)
\n
"
,
dbgstr_w
(
V_BSTR
(
&
v
)));
SysFreeString
(
str
);
str
=
a2bstr
(
"double groove ridge inset"
);
hres
=
IHTMLStyle_put_borderStyle
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_borderStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"window-inset outset ridge inset"
);
hres
=
IHTMLStyle_put_borderStyle
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_borderStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"window-inset"
);
hres
=
IHTMLStyle_put_borderStyle
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_borderStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"none none none none none"
);
hres
=
IHTMLStyle_put_borderStyle
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_borderStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"invalid none none none"
);
hres
=
IHTMLStyle_put_borderStyle
(
style
,
str
);
ok
(
hres
==
E_INVALIDARG
,
"put_borderStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"none invalid none none"
);
hres
=
IHTMLStyle_put_borderStyle
(
style
,
str
);
ok
(
hres
==
E_INVALIDARG
,
"put_borderStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_put_borderStyle
(
style
,
sDefault
);
ok
(
hres
==
S_OK
,
"put_borderStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
sDefault
);
/* backgoundColor */
hres
=
IHTMLStyle_get_backgroundColor
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_backgroundColor: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"type failed: %d
\n
"
,
V_VT
(
&
v
));
...
...
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