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
b95197ac
Commit
b95197ac
authored
Jun 11, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added get_URL implementation.
parent
068ce615
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
5 deletions
+57
-5
htmldoc.c
dlls/mshtml/htmldoc.c
+9
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
persist.c
dlls/mshtml/persist.c
+20
-3
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+27
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
b95197ac
...
...
@@ -508,8 +508,15 @@ static HRESULT WINAPI HTMLDocument_put_URL(IHTMLDocument2 *iface, BSTR v)
static
HRESULT
WINAPI
HTMLDocument_get_URL
(
IHTMLDocument2
*
iface
,
BSTR
*
p
)
{
FIXME
(
"(%p)->(%p)
\n
"
,
iface
,
p
);
return
E_NOTIMPL
;
HTMLDocument
*
This
=
HTMLDOC_THIS
(
iface
);
static
const
WCHAR
about_blank_url
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
0
};
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
p
);
*
p
=
SysAllocString
(
This
->
url
?
This
->
url
:
about_blank_url
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDocument_put_domain
(
IHTMLDocument2
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/mshtml_private.h
View file @
b95197ac
...
...
@@ -102,6 +102,7 @@ struct HTMLDocument {
BSCallback
*
bscallback
;
IMoniker
*
mon
;
BSTR
url
;
HWND
hwnd
;
HWND
tooltips_hwnd
;
...
...
dlls/mshtml/persist.c
View file @
b95197ac
...
...
@@ -115,11 +115,27 @@ static nsIInputStream *get_post_data_stream(IBindCtx *bctx)
void
set_current_mon
(
HTMLDocument
*
This
,
IMoniker
*
mon
)
{
if
(
This
->
mon
)
HRESULT
hres
;
if
(
This
->
mon
)
{
IMoniker_Release
(
This
->
mon
);
if
(
mon
)
IMoniker_AddRef
(
mon
);
This
->
mon
=
NULL
;
}
if
(
This
->
url
)
{
SysFreeString
(
This
->
url
);
This
->
url
=
NULL
;
}
if
(
!
mon
)
return
;
IMoniker_AddRef
(
mon
);
This
->
mon
=
mon
;
hres
=
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
url
);
if
(
FAILED
(
hres
))
WARN
(
"GetDisplayName failed: %08x
\n
"
,
hres
);
}
static
HRESULT
set_moniker
(
HTMLDocument
*
This
,
IMoniker
*
mon
,
IBindCtx
*
pibc
,
BOOL
*
bind_complete
)
...
...
@@ -674,4 +690,5 @@ void HTMLDocument_Persist_Init(HTMLDocument *This)
This
->
bscallback
=
NULL
;
This
->
mon
=
NULL
;
This
->
url
=
NULL
;
}
dlls/mshtml/tests/htmldoc.c
View file @
b95197ac
...
...
@@ -2189,8 +2189,10 @@ static void test_ConnectionPointContainer(IUnknown *unk)
static
void
test_GetCurMoniker
(
IUnknown
*
unk
,
IMoniker
*
exmon
,
LPCWSTR
exurl
)
{
IHTMLDocument2
*
doc
;
IPersistMoniker
*
permon
;
IMoniker
*
mon
=
(
void
*
)
0xdeadbeef
;
BSTR
doc_url
=
(
void
*
)
0xdeadbeef
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IPersistMoniker
,
(
void
**
)
&
permon
);
...
...
@@ -2198,12 +2200,32 @@ static void test_GetCurMoniker(IUnknown *unk, IMoniker *exmon, LPCWSTR exurl)
if
(
FAILED
(
hres
))
return
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDocument2
,
(
void
**
)
&
doc
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IHTMLDocument2) failed: %08x
\n
"
,
hres
);
hres
=
IHTMLDocument2_get_URL
(
doc
,
&
doc_url
);
ok
(
hres
==
S_OK
,
"get_URL failed: %08x
\n
"
,
hres
);
hres
=
IPersistMoniker_GetCurMoniker
(
permon
,
&
mon
);
IPersistMoniker_Release
(
permon
);
if
(
exmon
)
{
BSTR
url
;
BOOL
exb
=
expect_GetDisplayName
;
BOOL
clb
=
called_GetDisplayName
;
ok
(
hres
==
S_OK
,
"GetCurrentMoniker failed: %08x
\n
"
,
hres
);
ok
(
mon
==
exmon
,
"mon(%p) != exmon(%p)
\n
"
,
mon
,
exmon
);
SET_EXPECT
(
GetDisplayName
);
hres
=
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
url
);
ok
(
hres
==
S_OK
,
"GetDisplayName failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
GetDisplayName
);
expect_GetDisplayName
=
exb
;
called_GetDisplayName
=
clb
;
SysFreeString
(
url
);
ok
(
!
lstrcmpW
(
url
,
doc_url
),
"url != doc_url
\n
"
);
}
else
if
(
exurl
)
{
BSTR
url
;
...
...
@@ -2213,13 +2235,18 @@ static void test_GetCurMoniker(IUnknown *unk, IMoniker *exmon, LPCWSTR exurl)
ok
(
hres
==
S_OK
,
"GetDisplayName failed: %08x
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
url
,
exurl
),
"unexpected url
\n
"
);
ok
(
!
lstrcmpW
(
url
,
doc_url
),
"url != doc_url
\n
"
);
SysFreeString
(
url
);
}
else
{
ok
(
hres
==
E_UNEXPECTED
,
"GetCurrentMoniker failed: %08x, expected E_UNEXPECTED
\n
"
,
hres
);
ok
(
mon
==
(
IMoniker
*
)
0xdeadbeef
,
"mon=%p
\n
"
,
mon
);
ok
(
!
lstrcmpW
(
doc_url
,
about_blank_url
),
"doc_url is not about:blank
\n
"
);
}
SysFreeString
(
doc_url
);
IHTMLDocument_Release
(
doc
);
if
(
mon
&&
mon
!=
(
void
*
)
0xdeadbeef
)
IMoniker_Release
(
mon
);
}
...
...
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