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
b1c7b891
Commit
b1c7b891
authored
Apr 07, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLTableCell::rowSpan property implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7d8cf318
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
15 deletions
+55
-15
htmltablecell.c
dlls/mshtml/htmltablecell.c
+25
-4
dom.c
dlls/mshtml/tests/dom.c
+30
-11
No files found.
dlls/mshtml/htmltablecell.c
View file @
b1c7b891
...
...
@@ -100,15 +100,36 @@ static HRESULT WINAPI HTMLTableCell_Invoke(IHTMLTableCell *iface, DISPID dispIdM
static
HRESULT
WINAPI
HTMLTableCell_put_rowSpan
(
IHTMLTableCell
*
iface
,
LONG
v
)
{
HTMLTableCell
*
This
=
impl_from_IHTMLTableCell
(
iface
);
FIXME
(
"(%p)->(%d)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
v
);
if
(
v
<=
0
)
return
E_INVALIDARG
;
nsres
=
nsIDOMHTMLTableCellElement_SetRowSpan
(
This
->
nscell
,
v
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetRowSpan failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLTableCell_get_rowSpan
(
IHTMLTableCell
*
iface
,
LONG
*
p
)
{
HTMLTableCell
*
This
=
impl_from_IHTMLTableCell
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLTableCellElement_GetRowSpan
(
This
->
nscell
,
p
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetRowSpan failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLTableCell_put_colSpan
(
IHTMLTableCell
*
iface
,
LONG
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
b1c7b891
...
...
@@ -7234,23 +7234,31 @@ static void test_tr_elem(IHTMLElement *elem)
IHTMLTableRow_Release
(
row
);
}
static
void
test_td_elem
(
IHTML
Element
*
elem
)
static
void
test_td_elem
(
IHTML
Document2
*
doc
,
IHTMLElement
*
div
)
{
IHTMLTableCell
*
cell
;
IHTMLElement
*
elem
;
HRESULT
hres
;
LONG
lval
;
BSTR
str
;
VARIANT
vbg
,
vDefaultbg
;
test_elem_set_innerhtml
((
IUnknown
*
)
div
,
"<table id=
\"
tbl
\"
><tbody>"
" <tr></tr>"
" <tr id=
\"
row2
\"
><td id=
\"
td1
\"
>td1 text</td><td id=
\"
td2
\"
>td2 text</td><td></td></tr>"
" <tr></tr>"
"</tbody></table>"
);
elem
=
get_doc_elem_by_id
(
doc
,
"td1"
);
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLTableCell
,
(
void
**
)
&
cell
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLTableRow iface: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
IHTMLElement_Release
(
elem
);
lval
=
0xdeadbeef
;
hres
=
IHTMLTableCell_get_cellIndex
(
cell
,
&
lval
);
ok
(
hres
==
S_OK
,
"get cellIndex failed: %08x
\n
"
,
hres
);
ok
(
lval
==
1
,
"Expected 1
, got %d
\n
"
,
lval
);
ok
(
!
lval
,
"Expected 0
, got %d
\n
"
,
lval
);
str
=
a2bstr
(
"left"
);
hres
=
IHTMLTableCell_put_align
(
cell
,
str
);
...
...
@@ -7300,6 +7308,23 @@ static void test_td_elem(IHTMLElement *elem)
ok
(
hres
==
S_OK
,
"put_bgColor failed: %08x
\n
"
,
hres
);
VariantClear
(
&
vDefaultbg
);
hres
=
IHTMLTableCell_get_rowSpan
(
cell
,
&
lval
);
ok
(
hres
==
S_OK
,
"get_rowSpan failed: %08x
\n
"
,
hres
);
ok
(
lval
==
1
,
"rowSpan = %d
\n
"
,
lval
);
hres
=
IHTMLTableCell_put_rowSpan
(
cell
,
-
1
);
ok
(
hres
==
E_INVALIDARG
,
"put_rowSpan failed: %08x
\n
"
,
hres
);
hres
=
IHTMLTableCell_put_rowSpan
(
cell
,
0
);
ok
(
hres
==
E_INVALIDARG
,
"put_rowSpan failed: %08x
\n
"
,
hres
);
hres
=
IHTMLTableCell_put_rowSpan
(
cell
,
2
);
ok
(
hres
==
S_OK
,
"put_rowSpan failed: %08x
\n
"
,
hres
);
hres
=
IHTMLTableCell_get_rowSpan
(
cell
,
&
lval
);
ok
(
hres
==
S_OK
,
"get_rowSpan failed: %08x
\n
"
,
hres
);
ok
(
lval
==
2
,
"rowSpan = %d
\n
"
,
lval
);
IHTMLTableCell_Release
(
cell
);
}
...
...
@@ -8543,13 +8568,6 @@ static void test_elems(IHTMLDocument2 *doc)
IHTMLElement_Release
(
elem
);
}
elem
=
get_doc_elem_by_id
(
doc
,
"td2"
);
ok
(
elem
!=
NULL
,
"elem == NULL
\n
"
);
if
(
elem
)
{
test_td_elem
(
elem
);
IHTMLElement_Release
(
elem
);
}
elem
=
get_doc_elem_by_id
(
doc
,
"row2"
);
ok
(
elem
!=
NULL
,
"elem == NULL
\n
"
);
if
(
elem
)
{
...
...
@@ -9246,6 +9264,7 @@ static void test_elems2(IHTMLDocument2 *doc)
IHTMLElement_Release
(
elem
);
}
test_td_elem
(
doc
,
div
);
test_attr
(
doc
,
div
);
test_blocked
(
doc
,
div
);
test_elem_names
(
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