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
47f26eb9
Commit
47f26eb9
authored
Sep 02, 2014
by
Jactry Zeng
Committed by
Alexandre Julliard
Sep 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLStyle5::minWidth property implementation.
parent
b823337f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
4 deletions
+72
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+3
-0
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
htmlstyle3.c
dlls/mshtml/htmlstyle3.c
+8
-4
style.c
dlls/mshtml/tests/style.c
+60
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
47f26eb9
...
...
@@ -146,6 +146,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
attrMinWidth
[]
=
{
'm'
,
'i'
,
'n'
,
'-'
,
'w'
,
'i'
,
'd'
,
't'
,
'h'
,
0
};
static
const
WCHAR
attrOutline
[]
=
{
'o'
,
'u'
,
't'
,
'l'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
attrOverflow
[]
=
...
...
@@ -263,6 +265,7 @@ static const style_tbl_entry_t style_tbl[] = {
{
attrMarginRight
,
DISPID_IHTMLSTYLE_MARGINRIGHT
},
{
attrMarginTop
,
DISPID_IHTMLSTYLE_MARGINTOP
},
{
attrMinHeight
,
DISPID_IHTMLSTYLE4_MINHEIGHT
},
{
attrMinWidth
,
DISPID_IHTMLSTYLE5_MINWIDTH
},
{
attrOutline
,
DISPID_IHTMLSTYLE6_OUTLINE
},
{
attrOverflow
,
DISPID_IHTMLSTYLE_OVERFLOW
},
{
attrOverflowX
,
DISPID_IHTMLSTYLE2_OVERFLOWX
},
...
...
dlls/mshtml/htmlstyle.h
View file @
47f26eb9
...
...
@@ -88,6 +88,7 @@ typedef enum {
STYLEID_MARGIN_RIGHT
,
STYLEID_MARGIN_TOP
,
STYLEID_MIN_HEIGHT
,
STYLEID_MIN_WIDTH
,
STYLEID_OUTLINE
,
STYLEID_OVERFLOW
,
STYLEID_OVERFLOW_X
,
...
...
dlls/mshtml/htmlstyle3.c
View file @
47f26eb9
...
...
@@ -544,15 +544,19 @@ static HRESULT WINAPI HTMLStyle5_get_maxHeight(IHTMLStyle5 *iface, VARIANT *p)
static
HRESULT
WINAPI
HTMLStyle5_put_minWidth
(
IHTMLStyle5
*
iface
,
VARIANT
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle5
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
set_nsstyle_attr_var
(
This
->
nsstyle
,
STYLEID_MIN_WIDTH
,
&
v
,
ATTR_FIX_PX
);
}
static
HRESULT
WINAPI
HTMLStyle5_get_minWidth
(
IHTMLStyle5
*
iface
,
VARIANT
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle5
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_nsstyle_attr_var
(
This
->
nsstyle
,
STYLEID_MIN_WIDTH
,
p
,
0
);
}
static
HRESULT
WINAPI
HTMLStyle5_put_maxWidth
(
IHTMLStyle5
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/style.c
View file @
47f26eb9
...
...
@@ -499,6 +499,57 @@ static void test_style4(IHTMLStyle4 *style4)
VariantClear
(
&
vdefault
);
}
static
void
test_style5
(
IHTMLStyle5
*
style5
)
{
HRESULT
hres
;
VARIANT
v
;
VARIANT
vdefault
;
/* minWidth */
hres
=
IHTMLStyle5_get_minWidth
(
style5
,
&
vdefault
);
ok
(
hres
==
S_OK
,
"get_minWidth failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"12px"
);
hres
=
IHTMLStyle5_put_minWidth
(
style5
,
v
);
ok
(
hres
==
S_OK
,
"put_minWidth failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
hres
=
IHTMLStyle5_get_minWidth
(
style5
,
&
v
);
ok
(
hres
==
S_OK
,
"get_minWidth failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"12px"
),
"expect 12px got (%s)
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"10%"
);
hres
=
IHTMLStyle5_put_minWidth
(
style5
,
v
);
ok
(
hres
==
S_OK
,
"put_minWidth failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
hres
=
IHTMLStyle5_get_minWidth
(
style5
,
&
v
);
ok
(
hres
==
S_OK
,
"get_minWidth failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"10%"
),
"expect 10%% got (%s)
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"10"
);
hres
=
IHTMLStyle5_put_minWidth
(
style5
,
v
);
ok
(
hres
==
S_OK
,
"put_minWidth failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
hres
=
IHTMLStyle5_get_minWidth
(
style5
,
&
v
);
ok
(
hres
==
S_OK
,
"get_minWidth failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"10px"
),
"expect 10px got (%s)
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
hres
=
IHTMLStyle5_put_minWidth
(
style5
,
vdefault
);
ok
(
hres
==
S_OK
,
"put_minWidth failed: %08x
\n
"
,
hres
);
VariantClear
(
&
vdefault
);
}
static
void
test_style6
(
IHTMLStyle6
*
style
)
{
BSTR
str
;
...
...
@@ -544,6 +595,7 @@ static void test_body_style(IHTMLStyle *style)
IHTMLStyle2
*
style2
;
IHTMLStyle3
*
style3
;
IHTMLStyle4
*
style4
;
IHTMLStyle5
*
style5
;
IHTMLStyle6
*
style6
;
VARIANT_BOOL
b
;
VARIANT
v
;
...
...
@@ -2249,6 +2301,14 @@ static void test_body_style(IHTMLStyle *style)
IHTMLStyle4_Release
(
style4
);
}
hres
=
IHTMLStyle_QueryInterface
(
style
,
&
IID_IHTMLStyle5
,
(
void
**
)
&
style5
);
if
(
SUCCEEDED
(
hres
))
{
test_style5
(
style5
);
IHTMLStyle5_Release
(
style5
);
}
else
{
win_skip
(
"IHTMLStyle5 not available
\n
"
);
}
hres
=
IHTMLStyle_QueryInterface
(
style
,
&
IID_IHTMLStyle6
,
(
void
**
)
&
style6
);
if
(
SUCCEEDED
(
hres
))
{
test_style6
(
style6
);
...
...
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