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
13f77846
Commit
13f77846
authored
Dec 08, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use HTMLWindow::alert in nsPromptService::Alert.
parent
62f1ef9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
htmlwindow.c
dlls/mshtml/htmlwindow.c
+14
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-0
nsservice.c
dlls/mshtml/nsservice.c
+16
-2
No files found.
dlls/mshtml/htmlwindow.c
View file @
13f77846
...
...
@@ -39,6 +39,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define HTMLWINDOW2_THIS(iface) DEFINE_THIS(HTMLWindow, HTMLWindow2, iface)
static
struct
list
window_list
=
LIST_INIT
(
window_list
);
static
HRESULT
WINAPI
HTMLWindow2_QueryInterface
(
IHTMLWindow2
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
...
...
@@ -85,8 +87,10 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
{
list_remove
(
&
This
->
entry
);
mshtml_free
(
This
);
}
return
ref
;
}
...
...
@@ -734,10 +738,19 @@ HTMLWindow *HTMLWindow_Create(HTMLDocument *doc)
ERR
(
"GetContentDOMWindow failed: %08x
\n
"
,
nsres
);
}
list_add_head
(
&
window_list
,
&
ret
->
entry
);
return
ret
;
}
HTMLWindow
*
nswindow_to_window
(
nsIDOMWindow
*
nswindow
)
{
HTMLWindow
*
iter
;
LIST_FOR_EACH_ENTRY
(
iter
,
&
window_list
,
HTMLWindow
,
entry
)
{
if
(
iter
->
nswindow
==
nswindow
)
return
iter
;
}
return
NULL
;
}
dlls/mshtml/mshtml_private.h
View file @
13f77846
...
...
@@ -21,6 +21,8 @@
#include "mshtmhst.h"
#include "hlink.h"
#include "wine/list.h"
#ifdef INIT_GUID
#include "initguid.h"
#endif
...
...
@@ -59,6 +61,8 @@ typedef struct {
HTMLDocument
*
doc
;
nsIDOMWindow
*
nswindow
;
struct
list
entry
;
}
HTMLWindow
;
typedef
enum
{
...
...
dlls/mshtml/nsservice.c
View file @
13f77846
...
...
@@ -146,8 +146,22 @@ static nsrefcnt NSAPI nsPromptService_Release(nsIPromptService *iface)
static
nsresult
NSAPI
nsPromptService_Alert
(
nsIPromptService
*
iface
,
nsIDOMWindow
*
aParent
,
const
PRUnichar
*
aDialogTitle
,
const
PRUnichar
*
aText
)
{
FIXME
(
"(%p %s %s)
\n
"
,
aParent
,
debugstr_w
(
aDialogTitle
),
debugstr_w
(
aText
));
return
NS_ERROR_NOT_IMPLEMENTED
;
HTMLWindow
*
window
;
BSTR
text
;
TRACE
(
"(%p %s %s)
\n
"
,
aParent
,
debugstr_w
(
aDialogTitle
),
debugstr_w
(
aText
));
window
=
nswindow_to_window
(
aParent
);
if
(
!
window
)
{
WARN
(
"Could not find HTMLWindow for nsIDOMWindow %p
\n
"
,
aParent
);
return
NS_ERROR_UNEXPECTED
;
}
text
=
SysAllocString
(
aText
);
IHTMLWindow2_alert
(
HTMLWINDOW2
(
window
),
text
);
SysFreeString
(
text
);
return
NS_OK
;
}
static
nsresult
NSAPI
nsPromptService_AlertCheck
(
nsIPromptService
*
iface
,
...
...
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