LayoutTests:
Reviewed by John Sullivan.
- test for http://bugs.webkit.org/show_bug.cgi?id=11535
<rdar://problem/4946959> REGRESSION: onclick="this.select();"
not working on new forms (11535)
* fast/forms/input-select-on-click-expected.txt: Added.
* fast/forms/input-select-on-click.html: Added.
WebCore:
Reviewed by John Sullivan.
- fix http://bugs.webkit.org/show_bug.cgi?id=11535
<rdar://problem/4946959> REGRESSION: onclick="this.select();" not working on new forms (11535)
Test: fast/forms/input-select-on-click.html
* page/EventHandler.h: Added m_mouseDownWasSingleClickInSelection boolean.
Organized other booleans a bit more logically.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler): Rearrange order to match EventHandler.h, add
m_mouseDownWasSingleClickInSelection initialization.
(WebCore::EventHandler::handleMousePressEventSingleClick): Set m_mouseDownWasSingleClickInSelection
to true in the appropriate special case.
(WebCore::EventHandler::handleMousePressEvent): Set m_mouseDownWasSingleClickInSelection to false.
(WebCore::EventHandler::handleMouseReleaseEvent): Change code to clear selection or set to caret to
only fire if m_mouseDownWasSingleClickInSelection was true rather than firing for any
m_mouseDownMayStartSelect case.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed