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
8c475300
Commit
8c475300
authored
Feb 17, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle get/put minHeight.
parent
63075222
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
6 deletions
+50
-6
htmlstyle.c
dlls/mshtml/htmlstyle.c
+5
-2
htmlstyle.h
dlls/mshtml/htmlstyle.h
+4
-0
htmlstyle3.c
dlls/mshtml/htmlstyle3.c
+8
-4
dom.c
dlls/mshtml/tests/dom.c
+33
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
8c475300
...
...
@@ -83,6 +83,8 @@ static const WCHAR attrMarginLeft[] =
{
'm'
,
'a'
,
'r'
,
'g'
,
'i'
,
'n'
,
'-'
,
'l'
,
'e'
,
'f'
,
't'
,
0
};
static
const
WCHAR
attrMarginRight
[]
=
{
'm'
,
'a'
,
'r'
,
'g'
,
'i'
,
'n'
,
'-'
,
'r'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
attrMinHeight
[]
=
{
'm'
,
'i'
,
'n'
,
'-'
,
'h'
,
'e'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
attrOverflow
[]
=
{
'o'
,
'v'
,
'e'
,
'r'
,
'f'
,
'l'
,
'o'
,
'w'
,
0
};
static
const
WCHAR
attrPaddingLeft
[]
=
...
...
@@ -132,6 +134,7 @@ static const struct{
{
attrMargin
,
DISPID_IHTMLSTYLE_MARGIN
},
{
attrMarginLeft
,
DISPID_IHTMLSTYLE_MARGINLEFT
},
{
attrMarginRight
,
DISPID_IHTMLSTYLE_MARGINRIGHT
},
{
attrMinHeight
,
DISPID_IHTMLSTYLE4_MINHEIGHT
},
{
attrOverflow
,
DISPID_IHTMLSTYLE_OVERFLOW
},
{
attrPaddingLeft
,
DISPID_IHTMLSTYLE_PADDINGLEFT
},
{
attrPosition
,
DISPID_IHTMLSTYLE2_POSITION
},
...
...
@@ -242,7 +245,7 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCW
return
S_OK
;
}
static
HRESULT
set_nsstyle_attr_var
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
VARIANT
*
value
,
DWORD
flags
)
HRESULT
set_nsstyle_attr_var
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
VARIANT
*
value
,
DWORD
flags
)
{
switch
(
V_VT
(
value
))
{
case
VT_NULL
:
...
...
@@ -308,7 +311,7 @@ HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR
return
S_OK
;
}
static
HRESULT
get_nsstyle_attr_var
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
VARIANT
*
p
,
DWORD
flags
)
HRESULT
get_nsstyle_attr_var
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
VARIANT
*
p
,
DWORD
flags
)
{
nsAString
str_value
;
const
PRUnichar
*
value
;
...
...
dlls/mshtml/htmlstyle.h
View file @
8c475300
...
...
@@ -59,6 +59,7 @@ typedef enum {
STYLEID_MARGIN
,
STYLEID_MARGIN_LEFT
,
STYLEID_MARGIN_RIGHT
,
STYLEID_MIN_HEIGHT
,
STYLEID_OVERFLOW
,
STYLEID_PADDING_LEFT
,
STYLEID_POSITION
,
...
...
@@ -76,3 +77,6 @@ void HTMLStyle3_Init(HTMLStyle*);
HRESULT
get_nsstyle_attr
(
nsIDOMCSSStyleDeclaration
*
,
styleid_t
,
BSTR
*
);
HRESULT
set_nsstyle_attr
(
nsIDOMCSSStyleDeclaration
*
,
styleid_t
,
LPCWSTR
,
DWORD
);
HRESULT
set_nsstyle_attr_var
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
VARIANT
*
value
,
DWORD
flags
);
HRESULT
get_nsstyle_attr_var
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
VARIANT
*
p
,
DWORD
flags
);
dlls/mshtml/htmlstyle3.c
View file @
8c475300
...
...
@@ -409,15 +409,19 @@ static HRESULT WINAPI HTMLStyle4_get_textOverflow(IHTMLStyle4 *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle4_put_minHeight
(
IHTMLStyle4
*
iface
,
VARIANT
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE4_THIS
(
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_HEIGHT
,
&
v
,
0
);
}
static
HRESULT
WINAPI
HTMLStyle4_get_minHeight
(
IHTMLStyle4
*
iface
,
VARIANT
*
p
)
{
HTMLStyle
*
This
=
HTMLSTYLE4_THIS
(
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_HEIGHT
,
p
,
0
);
}
static
const
IHTMLStyle4Vtbl
HTMLStyle4Vtbl
=
{
...
...
dlls/mshtml/tests/dom.c
View file @
8c475300
...
...
@@ -2403,9 +2403,35 @@ static void test_style2(IHTMLStyle2 *style2)
SysFreeString
(
str
);
}
static
void
test_style4
(
IHTMLStyle4
*
style4
)
{
HRESULT
hres
;
VARIANT
v
;
VARIANT
vdefault
;
hres
=
IHTMLStyle4_get_minHeight
(
style4
,
&
vdefault
);
ok
(
hres
==
S_OK
,
"get_minHeight failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"10px"
);
hres
=
IHTMLStyle4_put_minHeight
(
style4
,
v
);
ok
(
hres
==
S_OK
,
"put_minHeight failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
hres
=
IHTMLStyle4_get_minHeight
(
style4
,
&
v
);
ok
(
hres
==
S_OK
,
"get_minHeight 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
"
,
dbgstr_w
(
V_BSTR
(
&
v
)));
hres
=
IHTMLStyle4_put_minHeight
(
style4
,
vdefault
);
ok
(
hres
==
S_OK
,
"put_minHeight failed: %08x
\n
"
,
hres
);
VariantClear
(
&
vdefault
);
}
static
void
test_default_style
(
IHTMLStyle
*
style
)
{
IHTMLStyle2
*
style2
;
IHTMLStyle4
*
style4
;
VARIANT_BOOL
b
;
VARIANT
v
;
BSTR
str
;
...
...
@@ -3034,6 +3060,13 @@ static void test_default_style(IHTMLStyle *style)
test_style2
(
style2
);
IHTMLStyle2_Release
(
style2
);
}
hres
=
IHTMLStyle_QueryInterface
(
style
,
&
IID_IHTMLStyle4
,
(
void
**
)
&
style4
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLStyle4 iface: %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
test_style4
(
style4
);
IHTMLStyle4_Release
(
style4
);
}
}
static
void
test_default_selection
(
IHTMLDocument2
*
doc
)
...
...
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