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
9305cb3c
Commit
9305cb3c
authored
Nov 25, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Dec 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle get/put overflow.
parent
23922144
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
4 deletions
+70
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+26
-4
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
dom.c
dlls/mshtml/tests/dom.c
+43
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
9305cb3c
...
...
@@ -73,6 +73,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
attrOverflow
[]
=
{
'o'
,
'v'
,
'e'
,
'r'
,
'f'
,
'l'
,
'o'
,
'w'
,
0
};
static
const
WCHAR
attrPaddingLeft
[]
=
{
'p'
,
'a'
,
'd'
,
'd'
,
'i'
,
'n'
,
'g'
,
'-'
,
'l'
,
'e'
,
'f'
,
't'
,
0
};
static
const
WCHAR
attrPosition
[]
=
...
...
@@ -115,6 +117,7 @@ static const struct{
{
attrMargin
,
DISPID_IHTMLSTYLE_MARGIN
},
{
attrMarginLeft
,
DISPID_IHTMLSTYLE_MARGINLEFT
},
{
attrMarginRight
,
DISPID_IHTMLSTYLE_MARGINRIGHT
},
{
attrOverflow
,
DISPID_IHTMLSTYLE_OVERFLOW
},
{
attrPaddingLeft
,
DISPID_IHTMLSTYLE_PADDINGLEFT
},
{
attrPosition
,
DISPID_IHTMLSTYLE2_POSITION
},
{
attrTextAlign
,
DISPID_IHTMLSTYLE_TEXTALIGN
},
...
...
@@ -1733,15 +1736,34 @@ static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
static
HRESULT
WINAPI
HTMLStyle_put_overflow
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
static
const
WCHAR
szVisible
[]
=
{
'v'
,
'i'
,
's'
,
'i'
,
'b'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
szScroll
[]
=
{
's'
,
'c'
,
'r'
,
'o'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
szHidden
[]
=
{
'h'
,
'i'
,
'd'
,
'd'
,
'e'
,
'n'
,
0
};
static
const
WCHAR
szAuto
[]
=
{
'a'
,
'u'
,
't'
,
'o'
,
0
};
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
/* overflow can only be one of the follow values. */
if
(
!
v
||
strcmpiW
(
szVisible
,
v
)
==
0
||
strcmpiW
(
szScroll
,
v
)
==
0
||
strcmpiW
(
szHidden
,
v
)
==
0
||
strcmpiW
(
szAuto
,
v
)
==
0
)
{
return
set_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_OVERFLOW
,
v
,
0
);
}
return
E_INVALIDARG
;
}
static
HRESULT
WINAPI
HTMLStyle_get_overflow
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
p
)
return
E_INVALIDARG
;
return
get_style_attr
(
This
,
STYLEID_OVERFLOW
,
p
);
}
static
HRESULT
WINAPI
HTMLStyle_put_pageBreakBefore
(
IHTMLStyle
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/htmlstyle.h
View file @
9305cb3c
...
...
@@ -50,6 +50,7 @@ typedef enum {
STYLEID_MARGIN
,
STYLEID_MARGIN_LEFT
,
STYLEID_MARGIN_RIGHT
,
STYLEID_OVERFLOW
,
STYLEID_PADDING_LEFT
,
STYLEID_POSITION
,
STYLEID_TEXT_ALIGN
,
...
...
dlls/mshtml/tests/dom.c
View file @
9305cb3c
...
...
@@ -2293,6 +2293,7 @@ static void test_default_style(IHTMLStyle *style)
BSTR
str
;
HRESULT
hres
;
float
f
;
BSTR
sOverflowDefault
;
test_disp
((
IUnknown
*
)
style
,
&
DIID_DispHTMLStyle
);
test_ifaces
((
IUnknown
*
)
style
,
style_iids
);
...
...
@@ -2601,6 +2602,48 @@ static void test_default_style(IHTMLStyle *style)
ok
(
V_I4
(
&
v
)
==
1
,
"V_I4(v) = %d
\n
"
,
V_I4
(
&
v
));
VariantClear
(
&
v
);
/* overflow */
hres
=
IHTMLStyle_get_overflow
(
style
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"get_overflow failed: %08x
\n
"
,
hres
);
hres
=
IHTMLStyle_get_overflow
(
style
,
&
sOverflowDefault
);
ok
(
hres
==
S_OK
,
"get_overflow failed: %08x
\n
"
,
hres
);
str
=
a2bstr
(
"test"
);
hres
=
IHTMLStyle_put_overflow
(
style
,
str
);
ok
(
hres
==
E_INVALIDARG
,
"put_overflow failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"visible"
);
hres
=
IHTMLStyle_put_overflow
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_overflow failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"scroll"
);
hres
=
IHTMLStyle_put_overflow
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_overflow failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"hidden"
);
hres
=
IHTMLStyle_put_overflow
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_overflow failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"auto"
);
hres
=
IHTMLStyle_put_overflow
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_overflow failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_get_overflow
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_overflow failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"auto"
),
"str=%s
\n
"
,
dbgstr_w
(
str
));
SysFreeString
(
str
);
/* restore overflow default */
hres
=
IHTMLStyle_put_overflow
(
style
,
sOverflowDefault
);
ok
(
hres
==
S_OK
,
"put_overflow failed: %08x
\n
"
,
hres
);
SysFreeString
(
sOverflowDefault
);
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