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
80f0f35c
Commit
80f0f35c
authored
Apr 13, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use DOM designMode to switch to editor mode.
parent
7cdad62b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
44 deletions
+20
-44
htmlwindow.c
dlls/mshtml/htmlwindow.c
+20
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-1
nsembed.c
dlls/mshtml/nsembed.c
+0
-40
olecmd.c
dlls/mshtml/olecmd.c
+0
-3
No files found.
dlls/mshtml/htmlwindow.c
View file @
80f0f35c
...
@@ -57,6 +57,26 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node)
...
@@ -57,6 +57,26 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node)
if
(
doc_node
)
if
(
doc_node
)
htmldoc_addref
(
&
doc_node
->
basedoc
);
htmldoc_addref
(
&
doc_node
->
basedoc
);
}
}
if
(
doc_node
&&
window
->
doc_obj
->
usermode
==
EDITMODE
)
{
nsIDOMNSHTMLDocument
*
nshtmldoc
;
nsAString
mode_str
;
nsresult
nsres
;
static
const
PRUnichar
onW
[]
=
{
'o'
,
'n'
,
0
};
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
doc_node
->
nsdoc
,
&
IID_nsIDOMNSHTMLDocument
,
(
void
**
)
&
nshtmldoc
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsAString_Init
(
&
mode_str
,
onW
);
nsres
=
nsIDOMNSHTMLDocument_SetDesignMode
(
nshtmldoc
,
&
mode_str
);
nsAString_Finish
(
&
mode_str
);
nsIDOMNSHTMLDocument_Release
(
nshtmldoc
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetDesignMode failed: %08x
\n
"
,
nsres
);
}
else
{
ERR
(
"Could not get nsIDOMNSHTMLDocument interface: %08x
\n
"
,
nsres
);
}
}
}
}
nsIDOMWindow
*
get_nsdoc_window
(
nsIDOMDocument
*
nsdoc
)
nsIDOMWindow
*
get_nsdoc_window
(
nsIDOMDocument
*
nsdoc
)
...
...
dlls/mshtml/mshtml_private.h
View file @
80f0f35c
...
@@ -843,7 +843,6 @@ void update_title(HTMLDocumentObj*);
...
@@ -843,7 +843,6 @@ void update_title(HTMLDocumentObj*);
/* editor */
/* editor */
void
init_editor
(
HTMLDocument
*
);
void
init_editor
(
HTMLDocument
*
);
void
set_ns_editmode
(
NSContainer
*
);
void
handle_edit_event
(
HTMLDocument
*
,
nsIDOMEvent
*
);
void
handle_edit_event
(
HTMLDocument
*
,
nsIDOMEvent
*
);
HRESULT
editor_exec_copy
(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
);
HRESULT
editor_exec_copy
(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
);
HRESULT
editor_exec_cut
(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
);
HRESULT
editor_exec_cut
(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
);
...
...
dlls/mshtml/nsembed.c
View file @
80f0f35c
...
@@ -767,46 +767,6 @@ void get_editor_controller(NSContainer *This)
...
@@ -767,46 +767,6 @@ void get_editor_controller(NSContainer *This)
}
}
}
}
void
set_ns_editmode
(
NSContainer
*
This
)
{
nsIEditingSession
*
editing_session
=
NULL
;
nsIURIContentListener
*
listener
=
NULL
;
nsIDOMWindow
*
dom_window
=
NULL
;
nsresult
nsres
;
nsres
=
get_nsinterface
((
nsISupports
*
)
This
->
webbrowser
,
&
IID_nsIEditingSession
,
(
void
**
)
&
editing_session
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIEditingSession: %08x
\n
"
,
nsres
);
return
;
}
nsres
=
nsIWebBrowser_GetContentDOMWindow
(
This
->
webbrowser
,
&
dom_window
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get content DOM window: %08x
\n
"
,
nsres
);
nsIEditingSession_Release
(
editing_session
);
return
;
}
nsres
=
nsIEditingSession_MakeWindowEditable
(
editing_session
,
dom_window
,
NULL
,
FALSE
,
TRUE
,
TRUE
);
nsIEditingSession_Release
(
editing_session
);
nsIDOMWindow_Release
(
dom_window
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"MakeWindowEditable failed: %08x
\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
));
}
void
close_gecko
(
void
)
void
close_gecko
(
void
)
{
{
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
...
...
dlls/mshtml/olecmd.c
View file @
80f0f35c
...
@@ -616,9 +616,6 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
...
@@ -616,9 +616,6 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
IDocHostUIHandler_HideUI
(
This
->
doc_obj
->
hostui
);
IDocHostUIHandler_HideUI
(
This
->
doc_obj
->
hostui
);
}
}
if
(
This
->
doc_obj
->
nscontainer
)
set_ns_editmode
(
This
->
doc_obj
->
nscontainer
);
if
(
This
->
doc_obj
->
ui_active
)
{
if
(
This
->
doc_obj
->
ui_active
)
{
RECT
rcBorderWidths
;
RECT
rcBorderWidths
;
...
...
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