Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cb11d670
Commit
cb11d670
authored
Nov 16, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDocument3::dir property implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b05928aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
4 deletions
+68
-4
htmldoc.c
dlls/mshtml/htmldoc.c
+31
-4
dom.c
dlls/mshtml/tests/dom.c
+37
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
cb11d670
...
...
@@ -2173,15 +2173,42 @@ static HRESULT WINAPI HTMLDocument3_get_onpropertychange(IHTMLDocument3 *iface,
static
HRESULT
WINAPI
HTMLDocument3_put_dir
(
IHTMLDocument3
*
iface
,
BSTR
v
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument3
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
dir_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
doc_node
->
nsdoc
)
{
FIXME
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
nsAString_InitDepend
(
&
dir_str
,
v
);
nsres
=
nsIDOMHTMLDocument_SetDir
(
This
->
doc_node
->
nsdoc
,
&
dir_str
);
nsAString_Finish
(
&
dir_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetDir failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDocument3_get_dir
(
IHTMLDocument3
*
iface
,
BSTR
*
p
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument3
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
dir_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
doc_node
->
nsdoc
)
{
FIXME
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
nsres
=
nsIDOMHTMLDocument_GetDir
(
This
->
doc_node
->
nsdoc
,
&
dir_str
);
return
return_nsstr
(
nsres
,
&
dir_str
,
p
);
}
static
HRESULT
WINAPI
HTMLDocument3_put_oncontextmenu
(
IHTMLDocument3
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
cb11d670
...
...
@@ -6304,6 +6304,42 @@ static void test_default_selection(IHTMLDocument2 *doc)
IHTMLTxtRange_Release
(
range
);
}
static
void
test_doc_dir
(
IHTMLDocument2
*
doc2
)
{
IHTMLDocument3
*
doc
=
get_doc3_iface
(
doc2
);
BSTR
dir
;
HRESULT
hres
;
dir
=
(
BSTR
)
0xdeadbeef
;
hres
=
IHTMLDocument3_get_dir
(
doc
,
&
dir
);
ok
(
hres
==
S_OK
,
"get_dir failed: %08x
\n
"
,
hres
);
ok
(
!
dir
,
"dir = %s
\n
"
,
wine_dbgstr_w
(
dir
));
dir
=
a2bstr
(
"rtl"
);
hres
=
IHTMLDocument3_put_dir
(
doc
,
dir
);
ok
(
hres
==
S_OK
,
"put_dir failed: %08x
\n
"
,
hres
);
SysFreeString
(
dir
);
dir
=
NULL
;
hres
=
IHTMLDocument3_get_dir
(
doc
,
&
dir
);
ok
(
hres
==
S_OK
,
"get_dir failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
dir
,
"rtl"
),
"dir = %s
\n
"
,
wine_dbgstr_w
(
dir
));
SysFreeString
(
dir
);
dir
=
a2bstr
(
"ltr"
);
hres
=
IHTMLDocument3_put_dir
(
doc
,
dir
);
ok
(
hres
==
S_OK
,
"put_dir failed: %08x
\n
"
,
hres
);
SysFreeString
(
dir
);
dir
=
NULL
;
hres
=
IHTMLDocument3_get_dir
(
doc
,
&
dir
);
ok
(
hres
==
S_OK
,
"get_dir failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
dir
,
"ltr"
),
"dir = %s
\n
"
,
wine_dbgstr_w
(
dir
));
SysFreeString
(
dir
);
IHTMLDocument3_Release
(
doc
);
}
static
void
test_unique_id
(
IHTMLDocument2
*
doc
,
IHTMLElement
*
elem
)
{
IHTMLDocument3
*
doc3
=
get_doc3_iface
(
doc
);
...
...
@@ -6393,6 +6429,7 @@ static void test_doc_elem(IHTMLDocument2 *doc)
test_elem_client_rect
((
IUnknown
*
)
elem
);
test_unique_id
(
doc
,
elem
);
test_doc_dir
(
doc
);
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