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
807f5c78
Commit
807f5c78
authored
Jun 23, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement2::get_tabIndex implementation.
parent
9eb4ee2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
3 deletions
+37
-3
htmlelem2.c
dlls/mshtml/htmlelem2.c
+21
-2
dom.c
dlls/mshtml/tests/dom.c
+16
-1
No files found.
dlls/mshtml/htmlelem2.c
View file @
807f5c78
...
...
@@ -390,8 +390,27 @@ static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
static
HRESULT
WINAPI
HTMLElement2_get_tabIndex
(
IHTMLElement2
*
iface
,
short
*
p
)
{
HTMLElement
*
This
=
HTMLELEM2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMNSHTMLElement
*
nselem
;
PRInt32
index
=
0
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLNSElement: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMNSHTMLElement_GetTabIndex
(
nselem
,
&
index
);
nsIDOMNSHTMLElement_Release
(
nselem
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetTabIndex failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
index
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement2_focus
(
IHTMLElement2
*
iface
)
...
...
dlls/mshtml/tests/dom.c
View file @
807f5c78
...
...
@@ -42,7 +42,7 @@ static const char elem_test_str[] =
"<html><head><title>test</title><style>.body { margin-right: 0px; }</style>"
"<body>text test<!-- a comment -->"
"<a href=
\"
http://test
\"
name=
\"
x
\"
>link</a>"
"<input id=
\"
in
\"
class=
\"
testclass
\"
/>"
"<input id=
\"
in
\"
class=
\"
testclass
\"
tabIndex=
\"
2
\"
/>"
"<select id=
\"
s
\"
><option id=
\"
x
\"
>opt1</option><option id=
\"
y
\"
>opt2</option></select>"
"<textarea id=
\"
X
\"
>text text</textarea>"
"<table><tbody></tbody></table>"
...
...
@@ -952,6 +952,19 @@ static void _test_elem_class(unsigned line, IUnknown *unk, const char *exclass)
SysFreeString
(
class
);
}
#define test_elem_tabindex(u,i) _test_elem_tabindex(__LINE__,u,i)
static
void
_test_elem_tabindex
(
unsigned
line
,
IUnknown
*
unk
,
short
exindex
)
{
IHTMLElement2
*
elem2
=
_get_elem2_iface
(
line
,
unk
);
short
index
=
-
3
;
HRESULT
hres
;
hres
=
IHTMLElement2_get_tabIndex
(
elem2
,
&
index
);
IHTMLElement2_Release
(
elem2
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_tabIndex failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
index
==
exindex
,
"unexpected index %d
\n
"
,
index
);
}
#define test_elem_set_class(u,c) _test_elem_set_class(__LINE__,u,c)
static
void
_test_elem_set_class
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
class
)
{
...
...
@@ -1840,6 +1853,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_class
((
IUnknown
*
)
elem
,
NULL
);
test_elem_set_class
((
IUnknown
*
)
elem
,
"cl"
);
test_elem_set_class
((
IUnknown
*
)
elem
,
NULL
);
test_elem_tabindex
((
IUnknown
*
)
elem
,
0
);
IHTMLElement_Release
(
elem
);
}
...
...
@@ -1901,6 +1915,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_input_put_value
((
IUnknown
*
)
elem
,
"test"
);
test_input_value
((
IUnknown
*
)
elem
,
NULL
);
test_elem_class
((
IUnknown
*
)
elem
,
"testclass"
);
test_elem_tabindex
((
IUnknown
*
)
elem
,
2
);
IHTMLInputElement_Release
(
input
);
IHTMLElement_Release
(
elem
);
...
...
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