[Webkit-unassigned] [Bug 44731] Extra Events triggered by <input> on focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 26 17:38:26 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44731





--- Comment #3 from Joseph Pecoraro <joepeck at webkit.org>  2010-08-26 17:38:26 PST ---
Looks like there might be multiple dispatches stemming from EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent). A look at the 4 backtraces (all 4 focus events fired) show this function as the root of the two dispatching branches:


Breakpoint 1, WebCore::HTMLInputElement::handleFocusEvent (this=0x112917900) at WebCore/html/HTMLInputElement.cpp:728
728        InputElement::dispatchFocusEvent(this, this);

  #0 WebCore::HTMLInputElement::handleFocusEvent at WebCore/html/HTMLInputElement.cpp:728
  #1 WebCore::HTMLTextFormControlElement::dispatchFocusEvent at WebCore/html/HTMLFormControlElement.cpp:487
  #2 WebCore::Document::setFocusedNode at WebCore/dom/Document.cpp:3070
  #3 WebCore::FocusController::setFocusedNode at WebCore/page/FocusController.cpp:627
  #4 WebCore::EventHandler::dispatchMouseEvent at WebCore/page/EventHandler.cpp:1890
> #5 WebCore::EventHandler::handleMousePressEvent at WebCore/page/EventHandler.cpp:1305
  #6 WebCore::EventHandler::mouseDown at WebCore/page/mac/EventHandlerMac.mm:494
  #7 -[WebHTMLView at WebKit/mac/WebView/WebHTMLView.mm:3578
  #8  0x00007fff8678434f in -[NSWindow sendEvent:] ()
  #9  0x0000000100041889 in ?? ()
  #10 0x0000000100041815 in ?? ()
  #11 0x00007fff866b9a86 in -[NSApplication sendEvent:] ()
  #12 0x000000010003855a in ?? ()
  #13 0x00007fff866504da in -[NSApplication run] ()
  #14 0x00007fff866491a8 in NSApplicationMain ()
  #15 0x0000000100009804 in ?? ()


Breakpoint 1, WebCore::HTMLInputElement::handleFocusEvent (this=0x112917900) at WebCore/html/HTMLInputElement.cpp:728
728        InputElement::dispatchFocusEvent(this, this);

  #0 WebCore::HTMLInputElement::handleFocusEvent at WebCore/html/HTMLInputElement.cpp:728
  #1 WebCore::HTMLTextFormControlElement::dispatchFocusEvent at WebCore/html/HTMLFormControlElement.cpp:487
  #2 WebCore::Document::setFocusedNode at WebCore/dom/Document.cpp:3070
  #3 WebCore::FocusController::setFocusedNode at WebCore/page/FocusController.cpp:627
  #4 WebCore::Frame::setFocusedNodeIfNeeded at WebCore/page/Frame.cpp:592
  #5 WebCore::SelectionController::setSelection at WebCore/editing/SelectionController.cpp:156
  #6 WebCore::SelectionController::setSelection at SelectionController.h:68
  #7 WebCore::EventHandler::handleMousePressEventSingleClick at WebCore/page/EventHandler.cpp:403
  #8 WebCore::EventHandler::handleMousePressEvent at WebCore/page/EventHandler.cpp:472
> #9 WebCore::EventHandler::handleMousePressEvent at WebCore/page/EventHandler.cpp:1346
  #10 WebCore::EventHandler::mouseDown at WebCore/page/mac/EventHandlerMac.mm:494
  #11 -[WebHTMLView at WebKit/mac/WebView/WebHTMLView.mm:3578
  #12 0x00007fff8678434f in -[NSWindow sendEvent:] ()
  #13 0x0000000100041889 in ?? ()
  #14 0x0000000100041815 in ?? ()
  #15 0x00007fff866b9a86 in -[NSApplication sendEvent:] ()
  #16 0x000000010003855a in ?? ()
  #17 0x00007fff866504da in -[NSApplication run] ()
  #18 0x00007fff866491a8 in NSApplicationMain ()
  #19 0x0000000100009804 in ?? ()

Where the lines are:

(1) bool swallowEvent = dispatchMouseEvent(eventNames().mousedownEvent, mev.targetNode(), true, m_clickCount, mouseEvent, true);

(2) swallowEvent = handleMousePressEvent(mev);

Note that (2) is called expecting swallowEvent to have been false. Maybe (1) should have returned true? I'll be investigating.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list