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
d95a54aa
Commit
d95a54aa
authored
Feb 21, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store nsWineURI object instead of interface in nsChannel.
parent
4ab63f3a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
52 deletions
+34
-52
mshtml_private.h
dlls/mshtml/mshtml_private.h
+5
-1
navigate.c
dlls/mshtml/navigate.c
+1
-1
nsio.c
dlls/mshtml/nsio.c
+28
-50
No files found.
dlls/mshtml/mshtml_private.h
View file @
d95a54aa
...
...
@@ -434,6 +434,10 @@ struct NSContainer {
HWND
reset_focus
;
/* hack */
};
typedef
struct
nsWineURI
nsWineURI
;
HRESULT
set_wine_url
(
nsWineURI
*
,
LPCWSTR
);
typedef
struct
{
const
nsIHttpChannelVtbl
*
lpHttpChannelVtbl
;
const
nsIUploadChannelVtbl
*
lpUploadChannelVtbl
;
...
...
@@ -441,7 +445,7 @@ typedef struct {
LONG
ref
;
ns
I
WineURI
*
uri
;
nsWineURI
*
uri
;
nsIInputStream
*
post_data_stream
;
nsILoadGroup
*
load_group
;
nsIInterfaceRequestor
*
notif_callback
;
...
...
dlls/mshtml/navigate.c
View file @
d95a54aa
...
...
@@ -1087,7 +1087,7 @@ static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG status_code, LPCW
TRACE
(
"redirect to %s
\n
"
,
debugstr_w
(
status_text
));
/* FIXME: We should find a better way to handle this */
nsIWineURI_SetWineURL
(
This
->
nschannel
->
uri
,
status_text
);
set_wine_url
(
This
->
nschannel
->
uri
,
status_text
);
}
return
S_OK
;
...
...
dlls/mshtml/nsio.c
View file @
d95a54aa
...
...
@@ -49,7 +49,7 @@ static nsINetUtil *net_util;
static
const
WCHAR
about_blankW
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
0
};
typedef
struct
{
struct
nsWineURI
{
const
nsIWineURIVtbl
*
lpWineURIVtbl
;
LONG
ref
;
...
...
@@ -62,7 +62,7 @@ typedef struct {
LPWSTR
wine_url
;
PRBool
is_doc_uri
;
BOOL
use_wine_url
;
}
nsWineURI
;
};
#define NSURI(x) ((nsIURI*) &(x)->lpWineURIVtbl)
#define NSWINEURI(x) ((nsIWineURI*) &(x)->lpWineURIVtbl)
...
...
@@ -129,15 +129,8 @@ static BOOL before_async_open(nsChannel *channel, NSContainer *container)
{
HTMLDocumentObj
*
doc
=
container
->
doc
;
DWORD
hlnf
=
0
;
LPCWSTR
uri
;
HRESULT
hres
;
nsIWineURI_GetWineURL
(
channel
->
uri
,
&
uri
);
if
(
!
uri
)
{
ERR
(
"GetWineURL returned NULL
\n
"
);
return
TRUE
;
}
if
(
!
doc
)
{
NSContainer
*
container_iter
=
container
;
...
...
@@ -150,13 +143,19 @@ static BOOL before_async_open(nsChannel *channel, NSContainer *container)
if
(
!
doc
->
client
)
return
TRUE
;
if
(
!
hlnf
&&
!
exec_shldocvw_67
(
doc
,
uri
))
if
(
!
hlnf
&&
!
exec_shldocvw_67
(
doc
,
channel
->
uri
->
wine_url
))
return
FALSE
;
hres
=
hlink_frame_navigate
(
&
doc
->
basedoc
,
uri
,
channel
->
post_data_stream
,
hlnf
);
hres
=
hlink_frame_navigate
(
&
doc
->
basedoc
,
channel
->
uri
->
wine_url
,
channel
->
post_data_stream
,
hlnf
);
return
hres
!=
S_OK
;
}
HRESULT
set_wine_url
(
nsWineURI
*
This
,
LPCWSTR
url
)
{
nsIWineURI_SetWineURL
(
NSWINEURI
(
This
),
url
);
return
S_OK
;
}
static
inline
BOOL
is_http_channel
(
nsChannel
*
This
)
{
return
This
->
url_scheme
==
URL_SCHEME_HTTP
||
This
->
url_scheme
==
URL_SCHEME_HTTP
;
...
...
@@ -215,7 +214,7 @@ static nsrefcnt NSAPI nsChannel_Release(nsIHttpChannel *iface)
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
ref
)
{
nsI
WineURI_Release
(
This
->
uri
);
nsI
URI_Release
(
NSURI
(
This
->
uri
)
);
if
(
This
->
owner
)
nsISupports_Release
(
This
->
owner
);
if
(
This
->
post_data_stream
)
...
...
@@ -369,7 +368,7 @@ static nsresult NSAPI nsChannel_GetURI(nsIHttpChannel *iface, nsIURI **aURI)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
aURI
);
nsI
WineURI_AddRef
(
This
->
uri
);
nsI
URI_AddRef
(
NSURI
(
This
->
uri
)
);
*
aURI
=
(
nsIURI
*
)
This
->
uri
;
return
NS_OK
;
...
...
@@ -720,51 +719,36 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
{
nsChannel
*
This
=
NSCHANNEL_THIS
(
iface
);
HTMLWindow
*
window
=
NULL
;
PRBool
is_doc_uri
;
BOOL
open
=
TRUE
;
nsresult
nsres
=
NS_OK
;
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
aListener
,
aContext
);
TRACE
(
"(%p)->(%p %p)
opening %s
\n
"
,
This
,
aListener
,
aContext
,
debugstr_w
(
This
->
uri
->
wine_url
)
);
if
(
TRACE_ON
(
mshtml
))
{
LPCWSTR
url
;
nsIWineURI_GetWineURL
(
This
->
uri
,
&
url
);
TRACE
(
"opening %s
\n
"
,
debugstr_w
(
url
));
}
nsIWineURI_GetIsDocumentURI
(
This
->
uri
,
&
is_doc_uri
);
if
(
is_doc_uri
)
{
if
(
This
->
uri
->
is_doc_uri
)
{
window
=
get_channel_window
(
This
);
if
(
window
)
{
nsIWineURI_SetWindow
(
This
->
uri
,
window
);
}
else
{
NSContainer
*
nscontainer
;
nsIWineURI_GetNSContainer
(
This
->
uri
,
&
nscontainer
);
if
(
nscontainer
)
{
nsIWineURI_SetWindow
(
NSWINEURI
(
This
->
uri
),
window
);
}
else
if
(
This
->
uri
->
container
)
{
BOOL
b
;
/* nscontainer->doc should be NULL which means navigation to a new window */
if
(
ns
container
->
doc
)
FIXME
(
"nscontainer->doc = %p
\n
"
,
ns
container
->
doc
);
if
(
This
->
uri
->
container
->
doc
)
FIXME
(
"nscontainer->doc = %p
\n
"
,
This
->
uri
->
container
->
doc
);
b
=
before_async_open
(
This
,
nscontainer
);
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
nscontainer
));
b
=
before_async_open
(
This
,
This
->
uri
->
container
);
if
(
b
)
FIXME
(
"Navigation not cancelled
\n
"
);
return
NS_ERROR_UNEXPECTED
;
}
}
}
if
(
!
window
)
{
nsIWineURI_GetWindow
(
This
->
uri
,
&
window
);
nsIWineURI_GetWindow
(
NSWINEURI
(
This
->
uri
)
,
&
window
);
if
(
!
window
&&
This
->
load_group
)
{
window
=
get_window_from_load_group
(
This
);
if
(
window
)
nsIWineURI_SetWindow
(
This
->
uri
,
window
);
nsIWineURI_SetWindow
(
NSWINEURI
(
This
->
uri
)
,
window
);
}
}
...
...
@@ -773,13 +757,9 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
return
NS_ERROR_UNEXPECTED
;
}
if
(
is_doc_uri
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
nsChannelBSC
*
channel_bsc
;
nsIWineURI_GetChannelBSC
(
This
->
uri
,
&
channel_bsc
);
if
(
channel_bsc
)
{
channelbsc_set_channel
(
channel_bsc
,
This
,
aListener
,
aContext
);
IUnknown_Release
((
IUnknown
*
)
channel_bsc
);
if
(
This
->
uri
->
is_doc_uri
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
if
(
This
->
uri
->
channel_bsc
)
{
channelbsc_set_channel
(
This
->
uri
->
channel_bsc
,
This
,
aListener
,
aContext
);
if
(
window
->
doc_obj
->
mime
)
{
heap_free
(
This
->
content_type
);
...
...
@@ -797,7 +777,7 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
}
if
(
open
)
nsres
=
async_open
(
This
,
window
,
is_doc_uri
,
aListener
,
aContext
);
nsres
=
async_open
(
This
,
window
,
This
->
uri
->
is_doc_uri
,
aListener
,
aContext
);
IHTMLWindow2_Release
(
HTMLWINDOW2
(
window
));
return
nsres
;
...
...
@@ -2556,8 +2536,7 @@ static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI
{
PARSEDURLW
parsed_url
=
{
sizeof
(
PARSEDURLW
)};
nsChannel
*
ret
;
nsIWineURI
*
wine_uri
;
const
WCHAR
*
url
;
nsWineURI
*
wine_uri
;
nsresult
nsres
;
TRACE
(
"(%p %p)
\n
"
,
aURI
,
_retval
);
...
...
@@ -2578,9 +2557,8 @@ static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI
nsIURI_AddRef
(
aURI
);
ret
->
original_uri
=
aURI
;
nsIWineURI_GetWineURL
(
wine_uri
,
&
url
);
ret
->
url_scheme
=
url
&&
SUCCEEDED
(
ParseURLW
(
url
,
&
parsed_url
))
?
parsed_url
.
nScheme
:
URL_SCHEME_UNKNOWN
;
ret
->
url_scheme
=
wine_uri
->
wine_url
&&
SUCCEEDED
(
ParseURLW
(
wine_uri
->
wine_url
,
&
parsed_url
))
?
parsed_url
.
nScheme
:
URL_SCHEME_UNKNOWN
;
*
_retval
=
NSCHANNEL
(
ret
);
return
NS_OK
;
...
...
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