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
7a8043d3
Commit
7a8043d3
authored
Oct 06, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLStyle::[get|put]_height implementation.
parent
91cb239f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
4 deletions
+48
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+27
-4
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
dom.c
dlls/mshtml/tests/dom.c
+20
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
7a8043d3
...
...
@@ -57,6 +57,8 @@ static const WCHAR attrFontStyle[] =
{
'f'
,
'o'
,
'n'
,
't'
,
'-'
,
's'
,
't'
,
'y'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
attrFontWeight
[]
=
{
'f'
,
'o'
,
'n'
,
't'
,
'-'
,
'w'
,
'e'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
attrHeight
[]
=
{
'h'
,
'e'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
attrLeft
[]
=
{
'l'
,
'e'
,
'f'
,
't'
,
0
};
static
const
WCHAR
attrMargin
[]
=
...
...
@@ -91,6 +93,7 @@ static const LPCWSTR style_strings[] = {
attrFontSize
,
attrFontStyle
,
attrFontWeight
,
attrHeight
,
attrLeft
,
attrMargin
,
attrMarginLeft
,
...
...
@@ -1329,15 +1332,35 @@ static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
static
HRESULT
WINAPI
HTMLStyle_put_height
(
IHTMLStyle
*
iface
,
VARIANT
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(v%d)
\n
"
,
This
,
V_VT
(
&
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
switch
(
V_VT
(
&
v
))
{
case
VT_BSTR
:
return
set_style_attr
(
This
,
STYLEID_HEIGHT
,
V_BSTR
(
&
v
),
0
);
default:
FIXME
(
"unimplemented vt %d
\n
"
,
V_VT
(
&
v
));
return
E_NOTIMPL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLStyle_get_height
(
IHTMLStyle
*
iface
,
VARIANT
*
p
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
BSTR
ret
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
hres
=
get_style_attr
(
This
,
STYLEID_HEIGHT
,
&
ret
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
ret
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLStyle_put_styleFloat
(
IHTMLStyle
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/htmlstyle.h
View file @
7a8043d3
...
...
@@ -43,6 +43,7 @@ typedef enum {
STYLEID_FONT_SIZE
,
STYLEID_FONT_STYLE
,
STYLEID_FONT_WEIGHT
,
STYLEID_HEIGHT
,
STYLEID_LEFT
,
STYLEID_MARGIN
,
STYLEID_MARGIN_LEFT
,
...
...
dlls/mshtml/tests/dom.c
View file @
7a8043d3
...
...
@@ -2138,6 +2138,26 @@ static void test_default_style(IHTMLStyle *style)
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"3px"
),
"V_BSTR(v) = %s
\n
"
,
dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
IHTMLStyle_get_height
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_height failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v)=%d
\n
"
,
V_VT
(
&
v
));
ok
(
!
V_BSTR
(
&
v
),
"V_BSTR(v) != NULL
\n
"
);
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"64px"
);
hres
=
IHTMLStyle_put_height
(
style
,
v
);
ok
(
hres
==
S_OK
,
"put_height failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
IHTMLStyle_get_height
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_height failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v)=%d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"64px"
),
"V_BSTR(v) = %s
\n
"
,
dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
str
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLStyle_get_cursor
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_cursor failed: %08x
\n
"
,
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