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
d619fd2d
Commit
d619fd2d
authored
Nov 12, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement2::put_dir implementation.
parent
1e4cd8f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+19
-2
dom.c
dlls/mshtml/tests/dom.c
+36
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
d619fd2d
...
...
@@ -2601,8 +2601,25 @@ static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIAN
static
HRESULT
WINAPI
HTMLElement2_put_dir
(
IHTMLElement2
*
iface
,
BSTR
v
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement2
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
nselem
)
{
FIXME
(
"Unsupported for comment nodes.
\n
"
);
return
S_OK
;
}
nsAString_InitDepend
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLElement_SetDir
(
This
->
nselem
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetDir failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement2_get_dir
(
IHTMLElement2
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
d619fd2d
...
...
@@ -2695,6 +2695,39 @@ static void _test_select_set_disabled(unsigned line, IHTMLSelectElement *select,
_test_select_get_disabled
(
line
,
select
,
b
);
}
#define test_elem_dir(u,n) _test_elem_dir(__LINE__,u,n)
static
void
_test_elem_dir
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exdir
)
{
IHTMLElement2
*
elem
=
_get_elem2_iface
(
line
,
unk
);
BSTR
dir
;
HRESULT
hres
;
hres
=
IHTMLElement2_get_dir
(
elem
,
&
dir
);
IHTMLElement2_Release
(
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_dir failed: %08x
\n
"
,
hres
);
if
(
exdir
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
dir
,
exdir
),
"got dir: %s, expected %s
\n
"
,
wine_dbgstr_w
(
dir
),
exdir
);
else
ok_
(
__FILE__
,
line
)
(
!
dir
,
"got dir: %s, expected NULL
\n
"
,
wine_dbgstr_w
(
dir
));
SysFreeString
(
dir
);
}
#define set_elem_dir(u,n) _set_elem_dir(__LINE__,u,n)
static
void
_set_elem_dir
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
dira
)
{
IHTMLElement2
*
elem
=
_get_elem2_iface
(
line
,
unk
);
BSTR
dir
=
a2bstr
(
dira
);
HRESULT
hres
;
hres
=
IHTMLElement2_put_dir
(
elem
,
dir
);
IHTMLElement2_Release
(
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_dir failed: %08x
\n
"
,
hres
);
SysFreeString
(
dir
);
_test_elem_dir
(
line
,
unk
,
dira
);
}
#define elem_get_scroll_height(u) _elem_get_scroll_height(__LINE__,u)
static
LONG
_elem_get_scroll_height
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -5640,6 +5673,9 @@ static void test_default_body(IHTMLBodyElement *body)
ok
(
!
l
,
"scrollTop = %d
\n
"
,
l
);
elem_get_scroll_left
((
IUnknown
*
)
body
);
test_elem_dir
((
IUnknown
*
)
body
,
NULL
);
set_elem_dir
((
IUnknown
*
)
body
,
"ltr"
);
/* get_text tests */
hres
=
IHTMLBodyElement_get_text
(
body
,
&
v
);
ok
(
hres
==
S_OK
,
"expect S_OK got 0x%08d
\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