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
e3990ddf
Commit
e3990ddf
authored
Aug 17, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Switch nsWebBrowset to editing mode in exec_editmod.
parent
684b6c24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletion
+69
-1
nsiface.idl
dlls/mshtml/nsiface.idl
+17
-0
olecmd.c
dlls/mshtml/olecmd.c
+52
-1
No files found.
dlls/mshtml/nsiface.idl
View file @
e3990ddf
...
...
@@ -108,6 +108,7 @@ typedef nsISupports nsIDOMHTMLFormElement;
typedef nsISupports nsIDOMHTMLOptionsCollection;
typedef nsISupports nsIDOMHTMLCollection;
typedef nsISupports nsIDOMRange;
typedef nsISupports nsIEditor;
[
object,
...
...
@@ -1157,6 +1158,22 @@ interface nsIWindowWatcher : nsISupports
nsresult SetActiveWindow(nsIDOMWindow *aActiveWindow);
}
[
object,
uuid(d39fd2b4-3978-45d2-a4be-ba448171b61b)
]
interface nsIEditingSession : nsISupports
{
nsresult GetEditorStatus(PRUint32 *aEditorStatus);
nsresult MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType,
PRBool doAfterUriLoad);
nsresult WindowIsEditable(nsIDOMWindow *window, PRBool *_retval);
nsresult GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval);
nsresult SetupEditorOnWindow(nsIDOMWindow *window);
nsresult TearDownEditorOnWindow(nsIDOMWindow *window);
nsresult SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor);
}
/*
* NOTE:
* This is a private Wine interface that is implemented by our implementation
...
...
dlls/mshtml/olecmd.c
View file @
e3990ddf
...
...
@@ -247,11 +247,59 @@ static HRESULT exec_browsemode(HTMLDocument *This)
return
S_OK
;
}
static
void
setup_ns_editing
(
NSContainer
*
This
)
{
nsIInterfaceRequestor
*
iface_req
;
nsIEditingSession
*
editing_session
=
NULL
;
nsIURIContentListener
*
listener
=
NULL
;
nsIDOMWindow
*
dom_window
=
NULL
;
nsresult
nsres
;
nsres
=
nsIWebBrowser_QueryInterface
(
This
->
webbrowser
,
&
IID_nsIInterfaceRequestor
,
(
void
**
)
&
iface_req
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIInterfaceRequestor: %08lx
\n
"
,
nsres
);
return
;
}
nsres
=
nsIInterfaceRequestor_GetInterface
(
iface_req
,
&
IID_nsIEditingSession
,
(
void
**
)
&
editing_session
);
nsIInterfaceRequestor_Release
(
iface_req
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIEditingSession: %08lx
\n
"
,
nsres
);
return
;
}
nsres
=
nsIWebBrowser_GetContentDOMWindow
(
This
->
webbrowser
,
&
dom_window
);
nsIDOMWindow_Release
(
dom_window
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get content DOM window: %08lx
\n
"
,
nsres
);
nsIEditingSession_Release
(
editing_session
);
return
;
}
nsres
=
nsIEditingSession_MakeWindowEditable
(
editing_session
,
dom_window
,
NULL
,
FALSE
);
nsIEditingSession_Release
(
editing_session
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"MakeWindowEditable failed: %08lx
\n
"
,
nsres
);
return
;
}
/* MakeWindowEditable changes WebBrowser's parent URI content listener.
* It seams to be a bug in Gecko. To workaround it we set our content
* listener again and Gecko's one as its parent.
*/
nsIWebBrowser_GetParentURIContentListener
(
This
->
webbrowser
,
&
listener
);
nsIURIContentListener_SetParentContentListener
(
NSURICL
(
This
),
listener
);
nsIURIContentListener_Release
(
listener
);
nsIWebBrowser_SetParentURIContentListener
(
This
->
webbrowser
,
NSURICL
(
This
));
}
static
HRESULT
exec_editmode
(
HTMLDocument
*
This
)
{
HRESULT
hres
;
FIXM
E
(
"(%p)
\n
"
,
This
);
TRAC
E
(
"(%p)
\n
"
,
This
);
This
->
usermode
=
EDITMODE
;
...
...
@@ -306,6 +354,9 @@ static HRESULT exec_editmode(HTMLDocument *This)
}
}
if
(
This
->
nscontainer
)
setup_ns_editing
(
This
->
nscontainer
);
return
S_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