Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Issue 3366025: Merge 67246 - 2010-09-109 Peter Kasting <pkasting@google.com>... (Closed)

Created:
10 years, 3 months ago by Peter Kasting
Modified:
9 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/517/
Visibility:
Public.

Description

Merge 67246 - 2010-09-109 Peter Kasting <pkasting@google.com>; Reviewed by Darin Adler. Cleanup and simplification in advance of making middle clicks not send a click event. https://bugs.webkit.org/show_bug.cgi?id=22382 * editing/DeleteButton.cpp: (WebCore::DeleteButton::defaultEventHandler): Removed unneeded code to check if the event is a MouseEvent. Any click event will do. * html/HTMLAnchorElement.cpp: (WebCore::appendServerMapMousePosition): Added. Factors out the modifications to the URL to add the mouse position to make the default event handler function easier to read. (WebCore::HTMLAnchorElement::defaultEventHandler): Reorganized to make the enter key logic separate from the link clicking logic and simplify the function. This makes minor functional changes like not calling FrameLoader::urlSelected() for fake "keydown" events constructed from JavaScript. (WebCore::HTMLAnchorElement::isLiveLink): Refactored to use new shared implementation in treatLinkAsLiveForEventType(). (WebCore::eventType): Factors out event type calculation (for treatLinkAsLiveForEventType()) from the default event handler to make it easier to read. (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType): Implementation of the portions of isLiveLink() that are common with the checks defaultEventHandler() wants to do. (WebCore::isEnterKeyKeydownEvent): Added. Shared by the default event handlers for all three anchor elements. (WebCore::isMiddleMouseButtonEvent): Added. Shared by the isLinkClick function below and some code in SVG. Later we can make this private to this source file once we remove the unneeded SVG code. (WebCore::isLinkClick): Added. Shared by the default event handlers for all three anchor elements. (WebCore::handleLinkClick): Ditto. * html/HTMLAnchorElement.h: Added the new functions. * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): Removed lots of unneeded logic and streamlined the code to more closely match the HTMLAnchorElement code and share functions with it. * wml/WMLAElement.cpp: (WebCore::WMLAElement::defaultEventHandler): Ditto. TBR=pkasting@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=67262

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -193 lines) Patch
M WebCore/ChangeLog View 1 chunk +44 lines, -0 lines 0 comments Download
M WebCore/editing/DeleteButton.cpp View 1 chunk +4 lines, -8 lines 0 comments Download
M WebCore/html/HTMLAnchorElement.h View 2 chunks +16 lines, -1 line 0 comments Download
M WebCore/html/HTMLAnchorElement.cpp View 3 chunks +105 lines, -118 lines 0 comments Download
M WebCore/svg/SVGAElement.cpp View 3 chunks +28 lines, -39 lines 0 comments Download
M WebCore/wml/WMLAElement.cpp View 3 chunks +8 lines, -27 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Peter Kasting
10 years, 3 months ago (2010-09-11 01:24:48 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698