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
2c6c00a8
Commit
2c6c00a8
authored
Nov 30, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Forward setting window.location to window.location.href.
parent
f8d8fbba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
10 deletions
+50
-10
htmlwindow.c
dlls/mshtml/htmlwindow.c
+45
-10
navigate.c
dlls/mshtml/navigate.c
+5
-0
No files found.
dlls/mshtml/htmlwindow.c
View file @
2c6c00a8
...
...
@@ -24,6 +24,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtmdid.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -100,6 +101,22 @@ static void release_children(HTMLWindow *This)
}
}
static
HRESULT
get_location
(
HTMLWindow
*
This
,
HTMLLocation
**
ret
)
{
if
(
This
->
location
)
{
IHTMLLocation_AddRef
(
HTMLLOCATION
(
This
->
location
));
}
else
{
HRESULT
hres
;
hres
=
HTMLLocation_Create
(
This
,
&
This
->
location
);
if
(
FAILED
(
hres
))
return
hres
;
}
*
ret
=
This
->
location
;
return
S_OK
;
}
#define HTMLWINDOW2_THIS(iface) DEFINE_THIS(HTMLWindow, HTMLWindow2, iface)
static
HRESULT
WINAPI
HTMLWindow2_QueryInterface
(
IHTMLWindow2
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -183,6 +200,9 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
IHTMLLocation_Release
(
HTMLLOCATION
(
This
->
location
));
}
if
(
This
->
screen
)
IHTMLScreen_Release
(
This
->
screen
);
if
(
This
->
event_target
)
release_event_target
(
This
->
event_target
);
for
(
i
=
0
;
i
<
This
->
global_prop_cnt
;
i
++
)
...
...
@@ -193,6 +213,10 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
heap_free
(
This
->
global_props
);
release_script_hosts
(
This
);
if
(
This
->
nswindow
)
nsIDOMWindow_Release
(
This
->
nswindow
);
list_remove
(
&
This
->
entry
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
...
...
@@ -590,20 +614,16 @@ static HRESULT WINAPI HTMLWindow2_get_Image(IHTMLWindow2 *iface, IHTMLImageEleme
static
HRESULT
WINAPI
HTMLWindow2_get_location
(
IHTMLWindow2
*
iface
,
IHTMLLocation
**
p
)
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
HTMLLocation
*
location
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
location
)
{
IHTMLLocation_AddRef
(
HTMLLOCATION
(
This
->
location
));
}
else
{
HRESULT
hres
;
hres
=
HTMLLocation_Create
(
This
,
&
This
->
location
);
if
(
FAILED
(
hres
))
return
hres
;
}
hres
=
get_location
(
This
,
&
location
);
if
(
FAILED
(
hres
))
return
hres
;
*
p
=
HTMLLOCATION
(
This
->
location
);
*
p
=
HTMLLOCATION
(
location
);
return
S_OK
;
}
...
...
@@ -1757,6 +1777,21 @@ static HRESULT WINAPI WindowDispEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID
TRACE
(
"(%p)->(%x %x %x %p %p %p %p)
\n
"
,
This
,
id
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
if
(
id
==
DISPID_IHTMLWINDOW2_LOCATION
&&
(
wFlags
&
DISPATCH_PROPERTYPUT
))
{
HTMLLocation
*
location
;
HRESULT
hres
;
TRACE
(
"forwarding to location.href
\n
"
);
hres
=
get_location
(
This
,
&
location
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IDispatchEx_InvokeEx
(
DISPATCHEX
(
&
location
->
dispex
),
DISPID_VALUE
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
IHTMLLocation_Release
(
HTMLLOCATION
(
location
));
return
hres
;
}
return
IDispatchEx_InvokeEx
(
DISPATCHEX
(
&
This
->
dispex
),
id
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
}
...
...
dlls/mshtml/navigate.c
View file @
2c6c00a8
...
...
@@ -1246,6 +1246,11 @@ HRESULT navigate_url(HTMLDocumentNode *doc, OLECHAR *url)
url
=
translated_url
;
}
if
(
doc
!=
doc
->
basedoc
.
doc_obj
->
basedoc
.
doc_node
)
{
FIXME
(
"navigation in frame
\n
"
);
return
E_NOTIMPL
;
}
hres
=
hlink_frame_navigate
(
&
doc
->
basedoc
,
url
,
NULL
,
0
);
if
(
FAILED
(
hres
))
FIXME
(
"hlink_frame_navigate failed: %08x
\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