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
fbdfec74
Commit
fbdfec74
authored
Nov 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Properly handle fragment-only navigation.
parent
7b5125ac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
3 deletions
+77
-3
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
navigate.c
dlls/mshtml/navigate.c
+44
-0
nsiface.idl
dlls/mshtml/nsiface.idl
+29
-1
nsio.c
dlls/mshtml/nsio.c
+1
-1
persist.c
dlls/mshtml/persist.c
+1
-1
No files found.
dlls/mshtml/mshtml_private.h
View file @
fbdfec74
...
@@ -671,6 +671,7 @@ void release_nsio(void) DECLSPEC_HIDDEN;
...
@@ -671,6 +671,7 @@ void release_nsio(void) DECLSPEC_HIDDEN;
BOOL
is_gecko_path
(
const
char
*
)
DECLSPEC_HIDDEN
;
BOOL
is_gecko_path
(
const
char
*
)
DECLSPEC_HIDDEN
;
HRESULT
nsuri_to_url
(
LPCWSTR
,
BOOL
,
BSTR
*
)
DECLSPEC_HIDDEN
;
HRESULT
nsuri_to_url
(
LPCWSTR
,
BOOL
,
BSTR
*
)
DECLSPEC_HIDDEN
;
BOOL
compare_ignoring_frag
(
IUri
*
,
IUri
*
)
DECLSPEC_HIDDEN
;
HRESULT
navigate_url
(
HTMLWindow
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
navigate_url
(
HTMLWindow
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_frame_doc
(
HTMLFrameBase
*
,
nsIDOMDocument
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_frame_doc
(
HTMLFrameBase
*
,
nsIDOMDocument
*
)
DECLSPEC_HIDDEN
;
...
@@ -700,6 +701,7 @@ nsresult get_nsinterface(nsISupports*,REFIID,void**) DECLSPEC_HIDDEN;
...
@@ -700,6 +701,7 @@ nsresult get_nsinterface(nsISupports*,REFIID,void**) DECLSPEC_HIDDEN;
void
set_window_bscallback
(
HTMLWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
void
set_window_bscallback
(
HTMLWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
void
set_current_mon
(
HTMLWindow
*
,
IMoniker
*
)
DECLSPEC_HIDDEN
;
void
set_current_mon
(
HTMLWindow
*
,
IMoniker
*
)
DECLSPEC_HIDDEN
;
void
set_current_uri
(
HTMLWindow
*
,
IUri
*
)
DECLSPEC_HIDDEN
;
HRESULT
start_binding
(
HTMLWindow
*
,
HTMLDocumentNode
*
,
BSCallback
*
,
IBindCtx
*
)
DECLSPEC_HIDDEN
;
HRESULT
start_binding
(
HTMLWindow
*
,
HTMLDocumentNode
*
,
BSCallback
*
,
IBindCtx
*
)
DECLSPEC_HIDDEN
;
HRESULT
async_start_doc_binding
(
HTMLWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
HRESULT
async_start_doc_binding
(
HTMLWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
void
abort_document_bindings
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
abort_document_bindings
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
fbdfec74
...
@@ -1766,6 +1766,45 @@ static void navigate_task_destr(task_t *_task)
...
@@ -1766,6 +1766,45 @@ static void navigate_task_destr(task_t *_task)
heap_free
(
task
);
heap_free
(
task
);
}
}
static
HRESULT
navigate_fragment
(
HTMLWindow
*
window
,
IUri
*
uri
)
{
nsIDOMLocation
*
nslocation
;
nsAString
nsfrag_str
;
BSTR
frag
;
nsresult
nsres
;
HRESULT
hres
;
set_current_uri
(
window
,
uri
);
nsres
=
nsIDOMWindow_GetLocation
(
window
->
nswindow
,
&
nslocation
);
if
(
FAILED
(
nsres
)
||
!
nslocation
)
return
E_FAIL
;
hres
=
IUri_GetFragment
(
uri
,
&
frag
);
if
(
FAILED
(
hres
))
{
nsIDOMLocation_Release
(
nslocation
);
return
hres
;
}
nsAString_InitDepend
(
&
nsfrag_str
,
frag
);
nsres
=
nsIDOMLocation_SetHash
(
nslocation
,
&
nsfrag_str
);
nsAString_Finish
(
&
nsfrag_str
);
nsIDOMLocation_Release
(
nslocation
);
SysFreeString
(
frag
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetHash failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
if
(
window
->
doc_obj
->
doc_object_service
)
{
IDocObjectService_FireNavigateComplete2
(
window
->
doc_obj
->
doc_object_service
,
&
window
->
IHTMLWindow2_iface
,
0x10
);
IDocObjectService_FireDocumentComplete
(
window
->
doc_obj
->
doc_object_service
,
&
window
->
IHTMLWindow2_iface
,
0
);
}
return
S_OK
;
}
HRESULT
super_navigate
(
HTMLWindow
*
window
,
IUri
*
uri
,
const
WCHAR
*
headers
,
BYTE
*
post_data
,
DWORD
post_data_size
)
HRESULT
super_navigate
(
HTMLWindow
*
window
,
IUri
*
uri
,
const
WCHAR
*
headers
,
BYTE
*
post_data
,
DWORD
post_data_size
)
{
{
nsChannelBSC
*
bsc
;
nsChannelBSC
*
bsc
;
...
@@ -1796,6 +1835,11 @@ HRESULT super_navigate(HTMLWindow *window, IUri *uri, const WCHAR *headers, BYTE
...
@@ -1796,6 +1835,11 @@ HRESULT super_navigate(HTMLWindow *window, IUri *uri, const WCHAR *headers, BYTE
}
}
}
}
if
(
window
->
uri
&&
compare_ignoring_frag
(
window
->
uri
,
uri
))
{
TRACE
(
"fragment navigate
\n
"
);
return
navigate_fragment
(
window
,
uri
);
}
hres
=
CreateURLMonikerEx2
(
NULL
,
uri
,
&
mon
,
URL_MK_UNIFORM
);
hres
=
CreateURLMonikerEx2
(
NULL
,
uri
,
&
mon
,
URL_MK_UNIFORM
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
...
...
dlls/mshtml/nsiface.idl
View file @
fbdfec74
...
@@ -130,7 +130,6 @@ typedef nsISupports nsIDOMMediaList;
...
@@ -130,7 +130,6 @@ typedef nsISupports nsIDOMMediaList;
typedef nsISupports nsIDOMHTMLTableCaptionElement;
typedef nsISupports nsIDOMHTMLTableCaptionElement;
typedef nsISupports nsIDOMHTMLTableSectionElement;
typedef nsISupports nsIDOMHTMLTableSectionElement;
typedef nsISupports nsIDOMClientRectList;
typedef nsISupports nsIDOMClientRectList;
typedef nsISupports nsIDOMLocation;
typedef nsISupports nsINode;
typedef nsISupports nsINode;
typedef nsISupports nsIStyleSheet;
typedef nsISupports nsIStyleSheet;
typedef nsISupports nsIStyleRule;
typedef nsISupports nsIStyleRule;
...
@@ -556,6 +555,35 @@ interface nsIChannelEventSink : nsISupports
...
@@ -556,6 +555,35 @@ interface nsIChannelEventSink : nsISupports
[
[
object,
object,
uuid(a6cf906d-15b3-11d2-932e-00805f8add32),
local
]
interface nsIDOMLocation : nsISupports
{
nsresult GetHash(nsAString *aHash);
nsresult SetHash(const nsAString *aHash);
nsresult GetHost(nsAString *aHost);
nsresult SetHost(const nsAString *aHost);
nsresult GetHostname(nsAString *aHostname);
nsresult SetHostname(const nsAString *aHostname);
nsresult GetHref(nsAString *aHref);
nsresult SetHref(const nsAString *aHref);
nsresult GetPathname(nsAString *aPathname);
nsresult SetPathname(const nsAString *aPathname);
nsresult GetPort(nsAString *aPort);
nsresult SetPort(const nsAString *aPort);
nsresult GetProtocol(nsAString *aProtocol);
nsresult SetProtocol(const nsAString *aProtocol);
nsresult GetSearch(nsAString *aSearch);
nsresult SetSearch(const nsAString *aSearch);
nsresult Reload(PRBool forceget);
nsresult Replace(const nsAString *url);
nsresult Assign(const nsAString *url);
nsresult ToString(nsAString *_retval);
}
[
object,
uuid(2938307a-9d70-4b63-8afc-0197e82318ad),
uuid(2938307a-9d70-4b63-8afc-0197e82318ad),
local
local
]
]
...
...
dlls/mshtml/nsio.c
View file @
fbdfec74
...
@@ -113,7 +113,7 @@ static IUri *get_uri_nofrag(IUri *uri)
...
@@ -113,7 +113,7 @@ static IUri *get_uri_nofrag(IUri *uri)
return
ret
;
return
ret
;
}
}
static
BOOL
compare_ignoring_frag
(
IUri
*
uri1
,
IUri
*
uri2
)
BOOL
compare_ignoring_frag
(
IUri
*
uri1
,
IUri
*
uri2
)
{
{
IUri
*
uri_nofrag1
,
*
uri_nofrag2
;
IUri
*
uri_nofrag1
,
*
uri_nofrag2
;
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
...
...
dlls/mshtml/persist.c
View file @
fbdfec74
...
@@ -70,7 +70,7 @@ static BOOL use_gecko_script(HTMLWindow *window)
...
@@ -70,7 +70,7 @@ static BOOL use_gecko_script(HTMLWindow *window)
return
FAILED
(
hres
)
||
scheme
!=
URL_SCHEME_ABOUT
;
return
FAILED
(
hres
)
||
scheme
!=
URL_SCHEME_ABOUT
;
}
}
static
void
set_current_uri
(
HTMLWindow
*
window
,
IUri
*
uri
)
void
set_current_uri
(
HTMLWindow
*
window
,
IUri
*
uri
)
{
{
if
(
window
->
uri
)
{
if
(
window
->
uri
)
{
IUri_Release
(
window
->
uri
);
IUri_Release
(
window
->
uri
);
...
...
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