Closed
Bug 1154182
Opened 10 years ago
Closed 10 years ago
OSX keybindings don't work in remote iframes (b2g desktop)
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: paul, Assigned: paul)
References
Details
Attachments
(2 files, 1 obsolete file)
1.79 KB,
patch
|
Details | Diff | Splinter Review | |
2.20 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
alt backspace: should delete a word
command left: should move curret to the begining of the line
command right: should move curret to the end the line
command shift: right should select text to the end of line
command shift: left should select text to the begennig of line
command c: copy
command v: paste
command x: cut
An easy way to reproduce is to enable remote tabs in B2G desktop:
> user_pref("dom.ipc.tabs.disabled", false);
then open Gaia's browser and try to copy some text.
![]() |
Assignee | |
Comment 1•10 years ago
|
||
I'm willing to work on this if it's not too hard and someone can assist me.
![]() |
Assignee | |
Comment 2•10 years ago
|
||
I'm wondering why Option+Key works when Cmd+Key doesn't.
Comment hidden (typo) |
![]() |
Assignee | |
Comment 5•10 years ago
|
||
With: NSPR_LOG_MODULES=NativeKeyBindings:5 NSPR_LOG_FILE=/tmp/gecko.log
Notes:
- /tmp/gecko.log.child-1 is empty.
- in child process, we see 3 dumps instead of 1
Opt+Left in the parent process (work as expected):
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, interpreting
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, bindingCommands=1
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, selector=moveWordLeft:
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, command=cmd_wordPrevious
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, handled=true
Cmd+Left in the parent process (work as expected):
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, interpreting
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, bindingCommands=1
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, selector=moveToLeftEndOfLine:
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, command=cmd_beginLine
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, handled=true
Opt+Left in the remote iframe (work as expected):
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, interpreting
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, bindingCommands=1
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, selector=moveWordLeft:
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, command=cmd_wordPrevious
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, handled=true
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, interpreting
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, bindingCommands=1
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, selector=moveWordLeft:
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, command=cmd_wordPrevious
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, handled=true
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, interpreting
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, bindingCommands=1
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, selector=moveWordLeft:
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, command=cmd_wordPrevious
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, handled=true
Cmd+Left in the remote iframe (doesn't work):
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, interpreting
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, bindingCommands=1
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, selector=moveToLeftEndOfLine:
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, command=cmd_beginLine
2049012480[10039a070]: 11af25940 NativeKeyBindings::KeyPress, handled=true
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, interpreting
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, bindingCommands=1
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, selector=moveToLeftEndOfLine:
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, command=cmd_beginLine
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, handled=true
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, interpreting
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, bindingCommands=1
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, selector=moveToLeftEndOfLine:
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, command=cmd_beginLine
2049012480[10039a070]: 10034e550 NativeKeyBindings::KeyPress, handled=true
![]() |
Assignee | |
Comment 6•10 years ago
|
||
Also, emacs-like keybindings fail too (like Ctrl-a / Ctrl-e).
![]() |
Assignee | |
Comment 7•10 years ago
|
||
As far as I understand, commands should be forwarded to the child process. But copy and paste commands are supposed to be forwarded via `copypaste-docommand`. Investigating.
Comment hidden (typo) |
Comment hidden (typo) |
![]() |
Assignee | |
Comment 10•10 years ago
|
||
Clipboard commands are not forwarded because of an exception in docshell.isCommandEnabled: NS_ERROR_FACTORY_NOT_REGISTERED: Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIDocShell.isCommandEnabled]
![]() |
Assignee | |
Comment 11•10 years ago
|
||
editor/libeditor/nsPlaintextDataTransfer.cpp
nsCOMPtr<nsIClipboard> clipboard(do_GetService("@mozilla.org/widget/clipboard;1", &rv));
NS_ENSURE_SUCCESS(rv, rv);
This is where the exception comes from.
![]() |
Assignee | |
Comment 12•10 years ago
|
||
This is not a final patch. It just illustrates what goes wrong.
There's not clipboard component for the B2G content process on Desktop. This patch enables nsClipboardProxyConstructor.
I don't know how it works with B2G on Gonk or Desktop Firefox (e10s), so I'm not sure what the right approach is.
Flags: needinfo?(mstange)
Attachment #8592664 -
Flags: feedback?
![]() |
Assignee | |
Updated•10 years ago
|
Attachment #8592664 -
Flags: feedback?
![]() |
Assignee | |
Comment 13•10 years ago
|
||
Bill, apparently you worked on bug 966467. Can you help me figure out how to properly fix this bug?
Flags: needinfo?(wmccloskey)
![]() |
Assignee | |
Comment 14•10 years ago
|
||
For the second part of this patch, I need to forward commands to the child process. Or make it so commands like "cmd_beginLine" are triggered within the child process.
Forwarding from the main process appears to work (I used DoCommandHelper.handleEvent('beginLine')).
![]() |
Assignee | |
Comment 15•10 years ago
|
||
We bail out of PuppetWidget::ExecuteNativeKeyBinding if B2G.
![]() |
Assignee | |
Comment 16•10 years ago
|
||
Removing the #ifdef in ExecuteNativeKeyBinding solves the keybinding issue.
![]() |
Assignee | |
Comment 17•10 years ago
|
||
This patch enables native keybindings and register the clipboard component for B2G on Desktop.
Let's land that once we landed bug 1121217.
Assignee: nobody → paul
Attachment #8592664 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Flags: needinfo?(wmccloskey)
![]() |
Assignee | |
Updated•10 years ago
|
![]() |
Assignee | |
Comment 18•10 years ago
|
||
Fabrice, can you land that in the larch branch?
Flags: needinfo?(fabrice)
![]() |
Assignee | |
Updated•10 years ago
|
Flags: needinfo?(fabrice)
Comment 19•10 years ago
|
||
Comment on attachment 8592734 [details] [diff] [review]
v1
Review of attachment 8592734 [details] [diff] [review]:
-----------------------------------------------------------------
I tend to think that the root error here is that we should use MOZ_WIDGET_GONK instead of MOZ_B2G. I see no reason to not support that on regular b2g desktop builds.
Updated•10 years ago
|
Flags: needinfo?(fabrice)
![]() |
Assignee | |
Comment 20•10 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #19)
> Comment on attachment 8592734 [details] [diff] [review]
> v1
>
> Review of attachment 8592734 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I tend to think that the root error here is that we should use
> MOZ_WIDGET_GONK instead of MOZ_B2G. I see no reason to not support that on
> regular b2g desktop builds.
Yeah, I was thinking of that too, but I'm afraid that would have some impact on the simulator. I can verify that though.
![]() |
Assignee | |
Comment 21•10 years ago
|
||
B2G Desktop seems to work well.
Let's see if tests pass: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f0a80fe0a6c0
![]() |
Assignee | |
Updated•10 years ago
|
Attachment #8593173 -
Flags: review?(wmccloskey)
Attachment #8593173 -
Flags: review?(wmccloskey) → review+
![]() |
Assignee | |
Updated•10 years ago
|
Keywords: checkin-needed
![]() |
||
Comment 22•10 years ago
|
||
Keywords: checkin-needed
![]() |
||
Comment 23•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•