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
53e095c2
Commit
53e095c2
authored
Mar 12, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Pass document node to handle_edit_event.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aa4d9190
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
editor.c
dlls/mshtml/editor.c
+10
-10
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
nsevents.c
dlls/mshtml/nsevents.c
+2
-4
No files found.
dlls/mshtml/editor.c
View file @
53e095c2
...
...
@@ -379,7 +379,7 @@ static void set_font_size(HTMLDocument *This, LPCWSTR size)
set_dirty
(
This
->
doc_node
->
browser
,
VARIANT_TRUE
);
}
static
void
handle_arrow_key
(
HTMLDocument
*
This
,
nsIDOMEvent
*
event
,
nsIDOMKeyEvent
*
key_event
,
const
char
*
const
cmds
[
4
])
static
void
handle_arrow_key
(
HTMLDocument
Node
*
doc
,
nsIDOMEvent
*
event
,
nsIDOMKeyEvent
*
key_event
,
const
char
*
const
cmds
[
4
])
{
int
i
=
0
;
cpp_bool
b
;
...
...
@@ -393,12 +393,12 @@ static void handle_arrow_key(HTMLDocument *This, nsIDOMEvent *event, nsIDOMKeyEv
i
|=
2
;
if
(
cmds
[
i
])
do_ns_editor_command
(
This
->
doc_obj
->
nscontain
er
,
cmds
[
i
]);
do_ns_editor_command
(
doc
->
brows
er
,
cmds
[
i
]);
nsIDOMEvent_PreventDefault
(
event
);
}
void
handle_edit_event
(
HTMLDocument
*
This
,
nsIDOMEvent
*
event
)
void
handle_edit_event
(
HTMLDocument
Node
*
doc
,
nsIDOMEvent
*
event
)
{
nsIDOMKeyEvent
*
key_event
;
UINT32
code
;
...
...
@@ -417,7 +417,7 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
};
TRACE
(
"left
\n
"
);
handle_arrow_key
(
This
,
event
,
key_event
,
cmds
);
handle_arrow_key
(
doc
,
event
,
key_event
,
cmds
);
break
;
}
case
DOM_VK_RIGHT
:
{
...
...
@@ -429,7 +429,7 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
};
TRACE
(
"right
\n
"
);
handle_arrow_key
(
This
,
event
,
key_event
,
cmds
);
handle_arrow_key
(
doc
,
event
,
key_event
,
cmds
);
break
;
}
case
DOM_VK_UP
:
{
...
...
@@ -441,7 +441,7 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
};
TRACE
(
"up
\n
"
);
handle_arrow_key
(
This
,
event
,
key_event
,
cmds
);
handle_arrow_key
(
doc
,
event
,
key_event
,
cmds
);
break
;
}
case
DOM_VK_DOWN
:
{
...
...
@@ -453,7 +453,7 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
};
TRACE
(
"down
\n
"
);
handle_arrow_key
(
This
,
event
,
key_event
,
cmds
);
handle_arrow_key
(
doc
,
event
,
key_event
,
cmds
);
break
;
}
case
DOM_VK_DELETE
:
{
...
...
@@ -464,7 +464,7 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
};
TRACE
(
"delete
\n
"
);
handle_arrow_key
(
This
,
event
,
key_event
,
cmds
);
handle_arrow_key
(
doc
,
event
,
key_event
,
cmds
);
break
;
}
case
DOM_VK_HOME
:
{
...
...
@@ -476,7 +476,7 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
};
TRACE
(
"home
\n
"
);
handle_arrow_key
(
This
,
event
,
key_event
,
cmds
);
handle_arrow_key
(
doc
,
event
,
key_event
,
cmds
);
break
;
}
case
DOM_VK_END
:
{
...
...
@@ -488,7 +488,7 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
};
TRACE
(
"end
\n
"
);
handle_arrow_key
(
This
,
event
,
key_event
,
cmds
);
handle_arrow_key
(
doc
,
event
,
key_event
,
cmds
);
break
;
}
}
...
...
dlls/mshtml/mshtml_private.h
View file @
53e095c2
...
...
@@ -1136,7 +1136,7 @@ HRESULT do_query_service(IUnknown*,REFGUID,REFIID,void**) DECLSPEC_HIDDEN;
/* editor */
HRESULT
setup_edit_mode
(
HTMLDocumentObj
*
)
DECLSPEC_HIDDEN
;
void
init_editor
(
HTMLDocument
*
)
DECLSPEC_HIDDEN
;
void
handle_edit_event
(
HTMLDocument
*
,
nsIDOMEvent
*
)
DECLSPEC_HIDDEN
;
void
handle_edit_event
(
HTMLDocument
Node
*
,
nsIDOMEvent
*
)
DECLSPEC_HIDDEN
;
HRESULT
editor_exec_copy
(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
editor_exec_cut
(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
editor_exec_paste
(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/nsevents.c
View file @
53e095c2
...
...
@@ -173,17 +173,15 @@ static nsresult NSAPI handle_keypress(nsIDOMEventListener *iface,
{
nsEventListener
*
This
=
impl_from_nsIDOMEventListener
(
iface
);
HTMLDocumentNode
*
doc
=
This
->
This
->
doc
;
HTMLDocumentObj
*
doc_obj
;
if
(
!
doc
||
!
doc
->
browser
)
return
NS_ERROR_FAILURE
;
doc_obj
=
doc
->
basedoc
.
doc_obj
;
TRACE
(
"(%p)->(%p)
\n
"
,
doc
,
event
);
update_doc
(
doc
_obj
,
UPDATE_UI
);
update_doc
(
doc
->
browser
->
doc
,
UPDATE_UI
);
if
(
doc
->
browser
->
usermode
==
EDITMODE
)
handle_edit_event
(
&
doc_obj
->
base
doc
,
event
);
handle_edit_event
(
doc
,
event
);
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