Closed Bug 782865 Opened 13 years ago Closed 13 years ago

Keyboard simple quote character does not work in OOP applications

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: vingtetun, Assigned: fabrice)

References

Details

(Whiteboard: [LOE:S] [WebAPI:P0])

Attachments

(1 file)

Steps to reproduce: - Open the browser application - load google.com - in the search field of google type ' or / Actual result: - Nothing appears Expected result: - Characters are entered into text fields
W. T. F.
blocking-basecamp: ? → +
Vivien, can you be the owner here?
Assignee: nobody → 21
(In reply to Andrew Overholt [:overholt] from comment #3) > Vivien, can you be the owner here? I will have a look.
Whiteboard: [LOE:S] → [LOE:S] [WebAPI:P0]
It looks like, only for thoses characters, the event status is set to nsEventStatus_eConsumeNoDefault during nsEventDispatcher::Dispatch(), and then we bail out in nsEventStateManager::HandleCrossProcessEvent(). You knows that part of the code and could give help?
smaug, is there a central place events are dispatch from, that we could monitor to see where the status goes to ConsumeNoDefault here?
Something else about the event status set to nsEventStatus_eConsumeNoDefault : NS_KEY_DOWN and NS_KEY_DOWN are transmitted oop correctly, but not NS_KEY_PRESS.
(In reply to Chris Jones [:cjones] [:warhammer] from comment #6) > smaug, is there a central place events are dispatch from, that we could > monitor to see where the status goes to ConsumeNoDefault here? nsEventDispatcher
It looks like something weird is happening in a xbl event handler that ends up calling preventDefault() and leads to https://mxr.mozilla.org/mozilla-central/source/content/events/src/nsDOMEvent.cpp#441 : (gdb) bt #0 0x00007f8ee2ba403d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007f8ee2ba3edc in sleep () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007f8edd43c8c2 in ah_crap_handler (signum=11) at /home/fabrice/dev/inbound/toolkit/xre/nsSigHandlers.cpp:87 #3 0x00007f8edd44287c in nsProfileLock::FatalSignalHandler (signo=11, info=0x7fff5edcb3b0, context=0x7fff5edcb280) at /home/fabrice/dev/builds/obj-b2g-desktop/toolkit/profile/nsProfileLock.cpp:190 #4 <signal handler called> #5 0x00007f8eddd03c97 in nsDOMEvent::PreventDefault (this=0x7f8ea8c54520) at /home/fabrice/dev/inbound/content/events/src/nsDOMEvent.cpp:445 #6 0x00007f8eddd0b06a in nsDOMKeyboardEvent::PreventDefault (this=0x7f8ea8c54520) at /home/fabrice/dev/inbound/content/events/src/nsDOMKeyboardEvent.h:25 #7 0x00007f8eddf1d626 in nsXBLPrototypeHandler::DispatchXBLCommand (this=0x7f8ea8cffd80, aTarget=0x7f8ec19db800, aEvent=0x7f8ea8c545b0) at /home/fabrice/dev/inbound/content/xbl/src/nsXBLPrototypeHandler.cpp:465 #8 0x00007f8eddf1c312 in nsXBLPrototypeHandler::ExecuteHandler (this=0x7f8ea8cffd80, aTarget=0x7f8ec19db800, aEvent=0x7f8ea8c545b0) at /home/fabrice/dev/inbound/content/xbl/src/nsXBLPrototypeHandler.cpp:220 #9 0x00007f8eddf1b877 in nsXBLWindowKeyHandler::WalkHandlersAndExecute (this=0x7f8ec19e2440, aKeyEvent=0x7f8ea8c545b0, aEventType=0x7f8ecd011610, aHandler=0x7f8ea8cff400, aCharCode=47, aIgnoreShiftKey=false) at /home/fabrice/dev/inbound/content/xbl/src/nsXBLWindowKeyHandler.cpp:522 #10 0x00007f8eddf1b314 in nsXBLWindowKeyHandler::WalkHandlersInternal (this=0x7f8ec19e2440, aKeyEvent=0x7f8ea8c545b0, aEventType=0x7f8ecd011610, aHandler=0x7f8ea8cff400) at /home/fabrice/dev/inbound/content/xbl/src/nsXBLWindowKeyHandler.cpp:440 #11 0x00007f8eddf1abaa in nsXBLWindowKeyHandler::WalkHandlers (this=0x7f8ec19e2440, aKeyEvent=0x7f8ea8c545b0, aEventType=0x7f8ecd011610) at /home/fabrice/dev/inbound/content/xbl/src/nsXBLWindowKeyHandler.cpp:315 #12 0x00007f8eddf1afbd in nsXBLWindowKeyHandler::HandleEvent (this=0x7f8ec19e2440, aEvent=0x7f8ea8c54520) at /home/fabrice/dev/inbound/content/xbl/src/nsXBLWindowKeyHandler.cpp:361 #13 0x00007f8eddceb9f7 in nsEventListenerManager::HandleEventSubType (this=0x7f8ec70947d0, aListenerStruct=0x7f8ec70c44c8, aListener=0x7f8ec19e2440, aDOMEvent=0x7f8ea8c54520, aCurrentTarget=0x7f8ec19db800, aPhaseFlags=514, aPusher=0x7fff5edcc330) at /home/fabrice/dev/inbound/content/events/src/nsEventListenerManager.cpp:840 #14 0x00007f8eddcebcac in nsEventListenerManager::HandleEventInternal (this=0x7f8ec70947d0, aPresContext= 0x7f8ebac94c00, aEvent=0x7fff5edccd10, aDOMEvent=0x7fff5edcc310, aCurrentTarget=0x7f8ec19db800, aFlags=514, aEventStatus=0x7fff5edcc318, aPusher=0x7fff5edcc330) at /home/fabrice/dev/inbound/content/events/src/nsEventListenerManager.cpp:915 #15 0x00007f8eddd1da00 in nsEventListenerManager::HandleEvent (this=0x7f8ec70947d0, aPresContext=0x7f8ebac94c00, aEvent=0x7fff5edccd10, aDOMEvent=0x7fff5edcc310, aCurrentTarget=0x7f8ec19db800, aFlags=514, aEventStatus=0x7fff5edcc318, aPusher=0x7fff5edcc330) at /home/fabrice/dev/inbound/content/events/src/nsEventListenerManager.h:144 #16 0x00007f8eddd1df30 in nsEventTargetChainItem::HandleEvent (this=0x7f8ec0d513f0, aVisitor=..., aFlags=514, aMayHaveNewListenerManagers=false, aPusher=0x7fff5edcc330) at /home/fabrice/dev/inbound/content/events/src/nsEventDispatcher.cpp:185 #17 0x00007f8eddd1e54b in nsEventTargetChainItem::HandleEventTargetChain (this=0x7f8ec0d513f0, aVisitor=..., aFlags=518, aCallback=0x7fff5edcc440, aMayHaveNewListenerManagers=false, aPusher=0x7fff5edcc330) at /home/fabrice/dev/inbound/content/events/src/nsEventDispatcher.cpp:340 #18 0x00007f8eddd1e677 in nsEventTargetChainItem::HandleEventTargetChain (this=0x7f8ec0d513f0, aVisitor=..., aFlags=6, aCallback=0x7fff5edcc440, aMayHaveNewListenerManagers=false, aPusher=0x7fff5edcc330) at /home/fabrice/dev/inbound/content/events/src/nsEventDispatcher.cpp:372 #19 0x00007f8eddd1f521 in nsEventDispatcher::Dispatch (aTarget=0x7f8eb2f3fb60, aPresContext=0x7f8ebac94c00, aEvent=0x7fff5edccd10, aDOMEvent=0x0, aEventStatus=0x7fff5edccb2c, aCallback=0x7fff5edcc440, aTargets=0x0) at /home/fabrice/dev/inbound/content/events/src/nsEventDispatcher.cpp:640 #20 0x00007f8edd7e5dba in PresShell::HandleEventInternal (this=0x7f8ebae2ab70, aEvent=0x7fff5edccd10, aStatus=0x7fff5edccb2c) at /home/fabrice/dev/inbound/layout/base/nsPresShell.cpp:6453 #21 0x00007f8edd7e4e5f in PresShell::HandleEvent (this=0x7f8ebae2ab70, aFrame=0x7f8eb9efd848, aEvent=0x7fff5edccd10, aDontRetargetEvents=true, aEventStatus=0x7fff5edccb2c) at /home/fabrice/dev/inbound/layout/base/nsPresShell.cpp:6105 #22 0x00007f8edd7e3651 in PresShell::HandleEvent (this=0x7f8ed2a0f0e0, aFrame=0x7f8ec70c0c08, aEvent=0x7fff5edccd10, aDontRetargetEvents=false, aEventStatus=0x7fff5edccb2c) at /home/fabrice/dev/inbound/layout/base/nsPresShell.cpp:5736 #23 0x00007f8eddf5ba8d in nsViewManager::DispatchEvent (this=0x7f8ec0dff0b0, aEvent=0x7fff5edccd10, aView=0x7f8ec0dcc980, aStatus=0x7fff5edccb2c) at /home/fabrice/dev/inbound/view/src/nsViewManager.cpp:772 #24 0x00007f8eddf58ca8 in nsView::HandleEvent (this=0x7f8ec0dcc980, aEvent=0x7fff5edccd10, aUseAttachedEvents=false) at /home/fabrice/dev/inbound/view/src/nsView.cpp:1060 #25 0x00007f8edea66189 in nsWindow::DispatchEvent (this=0x7f8ee276a980, aEvent=0x7fff5edccd10, aStatus=@0x7fff5edccda8: nsEventStatus_eIgnore) at /home/fabrice/dev/inbound/widget/gtk2/nsWindow.cpp:460
So, what's happening is that we are triggering these xbl commands: cmd_findTypeText for / cmd_findTypeLinks for ' Next stop: disable these on b2g.
Hah! Nice debugging work, fabrice!
Attached patch patchSplinter Review
Since cmd_findTypeText and cmd_findTypeLinks are not used anywhere, this patch simply removes them. That fixes the issue, even if it's not really clear to me why we end up in this codepath when running oop. I started a try run at https://tbpl.mozilla.org/?tree=Try&rev=ae6001a4e1a8
Assignee: 21 → fabrice
Ok, the try run is all green (Yay!). Anyone feeling so should steal the review.
Comment on attachment 659834 [details] [diff] [review] patch r=me based on feedback from #fx-team.
Attachment #659834 - Flags: review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
I had a sudden realization that those commands could be used in other applications, and turns out they are: https://mxr.mozilla.org/comm-central/search?string=cmd_findTypeText We should probably investigate whether that patch breaks c-c.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: