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
c897306d
Commit
c897306d
authored
Jul 30, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLTable::cellSpacing property implementation.
parent
792eafa4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
4 deletions
+71
-4
htmltable.c
dlls/mshtml/htmltable.c
+38
-4
dom.c
dlls/mshtml/tests/dom.c
+33
-0
No files found.
dlls/mshtml/htmltable.c
View file @
c897306d
...
...
@@ -170,15 +170,49 @@ static HRESULT WINAPI HTMLTable_get_rules(IHTMLTable *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLTable_put_cellSpacing
(
IHTMLTable
*
iface
,
VARIANT
v
)
{
HTMLTable
*
This
=
impl_from_IHTMLTable
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
nsAString
nsstr
;
WCHAR
buf
[
64
];
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
switch
(
V_VT
(
&
v
))
{
case
VT_BSTR
:
nsAString_InitDepend
(
&
nsstr
,
V_BSTR
(
&
v
));
break
;
case
VT_I4
:
{
static
const
WCHAR
formatW
[]
=
{
'%'
,
'd'
,
0
};
sprintfW
(
buf
,
formatW
,
V_I4
(
&
v
));
nsAString_InitDepend
(
&
nsstr
,
buf
);
break
;
}
default:
FIXME
(
"unsupported arg %s
\n
"
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLTableElement_SetCellSpacing
(
This
->
nstable
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetCellSpacing failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLTable_get_cellSpacing
(
IHTMLTable
*
iface
,
VARIANT
*
p
)
{
HTMLTable
*
This
=
impl_from_IHTMLTable
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLTableElement_GetCellSpacing
(
This
->
nstable
,
&
nsstr
);
V_VT
(
p
)
=
VT_BSTR
;
return
return_nsstr
(
nsres
,
&
nsstr
,
&
V_BSTR
(
p
));
}
static
HRESULT
WINAPI
HTMLTable_put_cellPadding
(
IHTMLTable
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
c897306d
...
...
@@ -5513,11 +5513,29 @@ static void test_tr_elem(IHTMLElement *elem)
IHTMLTableRow_Release
(
row
);
}
#define test_table_cell_spacing(a,b) _test_table_cell_spacing(__LINE__,a,b)
static
void
_test_table_cell_spacing
(
unsigned
line
,
IHTMLTable
*
table
,
const
char
*
exstr
)
{
VARIANT
v
;
HRESULT
hres
;
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLTable_get_cellSpacing
(
table
,
&
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_cellSpacing failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
if
(
exstr
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
V_BSTR
(
&
v
),
exstr
),
"cellSpacing = %s, expected %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)),
exstr
);
else
ok_
(
__FILE__
,
line
)(
!
V_BSTR
(
&
v
),
"cellSpacing = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
}
static
void
test_table_elem
(
IHTMLElement
*
elem
)
{
IHTMLElementCollection
*
col
;
IHTMLTable
*
table
;
IHTMLDOMNode
*
node
;
VARIANT
v
;
HRESULT
hres
;
static
const
elem_type_t
row_types
[]
=
{
ET_TR
,
ET_TR
};
...
...
@@ -5557,6 +5575,21 @@ static void test_table_elem(IHTMLElement *elem)
test_elem_collection
((
IUnknown
*
)
col
,
tbodies_types
,
sizeof
(
tbodies_types
)
/
sizeof
(
*
tbodies_types
));
IHTMLElementCollection_Release
(
col
);
test_table_cell_spacing
(
table
,
NULL
);
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
10
;
hres
=
IHTMLTable_put_cellSpacing
(
table
,
v
);
ok
(
hres
==
S_OK
,
"put_cellSpacing = %08x
\n
"
,
hres
);
test_table_cell_spacing
(
table
,
"10"
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"11"
);
hres
=
IHTMLTable_put_cellSpacing
(
table
,
v
);
ok
(
hres
==
S_OK
,
"put_cellSpacing = %08x
\n
"
,
hres
);
test_table_cell_spacing
(
table
,
"11"
);
VariantClear
(
&
v
);
IHTMLTable_Release
(
table
);
}
...
...
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