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
aa733bed
Commit
aa733bed
authored
Jul 30, 2010
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Aug 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Send more informative messages to OleInPlaceFrame.
parent
bf46b4fd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
20 deletions
+86
-20
En.rc
dlls/mshtml/En.rc
+6
-0
main.c
dlls/mshtml/main.c
+49
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
nsevents.c
dlls/mshtml/nsevents.c
+2
-4
persist.c
dlls/mshtml/persist.c
+24
-16
resource.h
dlls/mshtml/resource.h
+4
-0
No files found.
dlls/mshtml/En.rc
View file @
aa733bed
...
...
@@ -20,6 +20,12 @@
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE
{
IDS_STATUS_DONE "Done"
IDS_STATUS_DOWNLOADINGFROM "Downloading from %s..."
}
STRINGTABLE
{
IDS_HTMLDISABLED "HTML rendering is currently disabled."
...
...
dlls/mshtml/main.c
View file @
aa733bed
...
...
@@ -40,6 +40,7 @@
#define INIT_GUID
#include "mshtml_private.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
...
...
@@ -48,6 +49,7 @@ DWORD mshtml_tls = TLS_OUT_OF_INDEXES;
static
HINSTANCE
shdoclc
=
NULL
;
static
HDC
display_dc
;
static
LPWSTR
status_strings
[
NUM_STATUS_STRINGS
];
static
void
thread_detach
(
void
)
{
...
...
@@ -63,6 +65,13 @@ static void thread_detach(void)
heap_free
(
thread_data
);
}
void
free_strings
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
NUM_STATUS_STRINGS
;
i
++
)
heap_free
(
status_strings
[
i
]);
}
static
void
process_detach
(
void
)
{
close_gecko
();
...
...
@@ -74,6 +83,46 @@ static void process_detach(void)
TlsFree
(
mshtml_tls
);
if
(
display_dc
)
DeleteObject
(
display_dc
);
free_strings
();
}
void
set_statustext
(
HTMLDocumentObj
*
doc
,
INT
id
,
LPCWSTR
arg
)
{
int
index
=
id
-
IDS_STATUS_DONE
;
LPWSTR
p
=
status_strings
[
index
];
if
(
!
doc
->
frame
)
return
;
if
(
!
p
)
{
DWORD
len
=
255
;
p
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
len
=
LoadStringW
(
hInst
,
id
,
p
,
len
);
len
++
;
p
=
heap_realloc
(
p
,
len
*
sizeof
(
WCHAR
));
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
status_strings
[
index
],
p
,
NULL
))
{
heap_free
(
p
);
p
=
status_strings
[
index
];
}
}
if
(
arg
)
{
DWORD
len
=
lstrlenW
(
p
)
+
lstrlenW
(
arg
)
-
1
;
LPWSTR
buf
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
snprintfW
(
buf
,
len
-
1
,
p
,
arg
);
p
=
buf
;
}
IOleInPlaceFrame_SetStatusText
(
doc
->
frame
,
p
);
if
(
arg
)
heap_free
(
p
);
}
HINSTANCE
get_shdoclc
(
void
)
...
...
dlls/mshtml/mshtml_private.h
View file @
aa733bed
...
...
@@ -1024,5 +1024,6 @@ static inline void windowref_release(windowref_t *ref)
HDC
get_display_dc
(
void
);
HINSTANCE
get_shdoclc
(
void
);
void
set_statustext
(
HTMLDocumentObj
*
,
INT
,
LPCWSTR
);
extern
HINSTANCE
hInst
;
dlls/mshtml/nsevents.c
View file @
aa733bed
...
...
@@ -34,6 +34,7 @@
#include "mshtml_private.h"
#include "htmlevent.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
...
...
@@ -239,10 +240,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
if
(
doc_obj
->
view_sink
)
IAdviseSink_OnViewChange
(
doc_obj
->
view_sink
,
DVASPECT_CONTENT
,
-
1
);
if
(
doc_obj
->
frame
)
{
static
const
WCHAR
wszDone
[]
=
{
'D'
,
'o'
,
'n'
,
'e'
,
0
};
IOleInPlaceFrame_SetStatusText
(
doc_obj
->
frame
,
wszDone
);
}
set_statustext
(
doc_obj
,
IDS_STATUS_DONE
,
NULL
);
update_title
(
doc_obj
);
}
...
...
dlls/mshtml/persist.c
View file @
aa733bed
...
...
@@ -37,6 +37,7 @@
#include "mshtml_private.h"
#include "htmlevent.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
...
...
@@ -44,6 +45,7 @@ typedef struct {
task_t
header
;
HTMLDocumentObj
*
doc
;
BOOL
set_download
;
LPOLESTR
url
;
}
download_proc_task_t
;
static
BOOL
use_gecko_script
(
LPCWSTR
url
)
...
...
@@ -134,8 +136,8 @@ static void set_downloading_proc(task_t *_task)
TRACE
(
"(%p)
\n
"
,
doc
);
if
(
doc
->
frame
)
IOleInPlaceFrame_SetStatusText
(
doc
->
frame
,
NULL
/* FIXME */
);
set_statustext
(
doc
,
IDS_STATUS_DOWNLOADINGFROM
,
task
->
url
);
CoTaskMemFree
(
task
->
url
);
if
(
!
doc
->
client
)
return
;
...
...
@@ -243,26 +245,31 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel
}
hres
=
create_doc_uri
(
This
->
window
,
url
,
&
nsuri
);
CoTaskMemFree
(
url
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
async_bsc
)
{
bscallback
=
async_bsc
;
}
else
{
hres
=
create_channelbsc
(
mon
,
NULL
,
NULL
,
0
,
&
bscallback
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
SUCCEEDED
(
hres
))
{
if
(
async_bsc
)
{
bscallback
=
async_bsc
;
}
else
{
hres
=
create_channelbsc
(
mon
,
NULL
,
NULL
,
0
,
&
bscallback
);
}
}
hres
=
load_nsuri
(
This
->
window
,
nsuri
,
bscallback
,
LOAD_INITIAL_DOCUMENT_URI
);
nsISupports_Release
((
nsISupports
*
)
nsuri
);
/* FIXME */
if
(
SUCCEEDED
(
hres
))
set_window_bscallback
(
This
->
window
,
bscallback
);
if
(
bscallback
!=
async_bsc
)
IUnknown_Release
((
IUnknown
*
)
bscallback
);
{
hres
=
load_nsuri
(
This
->
window
,
nsuri
,
bscallback
,
LOAD_INITIAL_DOCUMENT_URI
);
nsISupports_Release
((
nsISupports
*
)
nsuri
);
/* FIXME */
if
(
SUCCEEDED
(
hres
))
set_window_bscallback
(
This
->
window
,
bscallback
);
if
(
bscallback
!=
async_bsc
)
IUnknown_Release
((
IUnknown
*
)
bscallback
);
}
if
(
FAILED
(
hres
))
{
CoTaskMemFree
(
url
);
return
hres
;
}
HTMLDocument_LockContainer
(
This
->
doc_obj
,
TRUE
);
...
...
@@ -275,6 +282,7 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel
download_task
=
heap_alloc
(
sizeof
(
download_proc_task_t
));
download_task
->
doc
=
This
->
doc_obj
;
download_task
->
set_download
=
set_download
;
download_task
->
url
=
url
;
push_task
(
&
download_task
->
header
,
set_downloading_proc
,
This
->
doc_obj
->
basedoc
.
task_magic
);
return
S_OK
;
...
...
dlls/mshtml/resource.h
View file @
aa733bed
...
...
@@ -25,6 +25,10 @@
#define IDS_DOWNLOADING 7502
#define IDS_INSTALLING 7503
#define NUM_STATUS_STRINGS 2
#define IDS_STATUS_DOWNLOADINGFROM 7550
#define IDS_STATUS_DONE 7551
#define ID_DWL_DIALOG 7600
#define ID_DWL_PROGRESS 7601
#define ID_DWL_INSTALL 7602
...
...
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