Bug 122588 - Make EventDispatcher::dispatch comprehensible
Summary: Make EventDispatcher::dispatch comprehensible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-09 21:36 PDT by Ryosuke Niwa
Modified: 2013-10-10 01:17 PDT (History)
8 users (show)

See Also:


Attachments
Cleanup (20.53 KB, patch)
2013-10-09 21:42 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 (159.01 KB, application/zip)
2013-10-09 22:35 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (154.99 KB, application/zip)
2013-10-09 23:01 PDT, Build Bot
no flags Details
Fixed the regression (22.21 KB, patch)
2013-10-10 00:13 PDT, Ryosuke Niwa
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-10-09 21:36:05 PDT
Make EventDispatcher::dispatch comprehensible
Comment 1 Ryosuke Niwa 2013-10-09 21:42:56 PDT
Created attachment 213851 [details]
Cleanup
Comment 2 Ryosuke Niwa 2013-10-09 21:43:22 PDT
This patch should make Darin & Sam very happy :)
Comment 3 Build Bot 2013-10-09 22:35:46 PDT
Comment on attachment 213851 [details]
Cleanup

Attachment 213851 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/3485155

New failing tests:
animations/animation-border-overflow.html
accessibility/axpress-on-aria-button.html
animations/3d/matrix-transform-type-animation.html
compositing/self-painting-layers2.html
animations/3d/state-at-end-event-transform.html
animations/added-while-suspended.html
compositing/video-page-visibility.html
animations/animation-add-events-in-handler.html
animations/additive-transform-animations.html
animations/3d/replace-filling-transform.html
accessibility/file-upload-button-with-axpress.html
http/tests/appcache/video.html
accessibility/loading-iframe-sends-notification.html
compositing/layers-inside-overflow-scroll.html
compositing/animation/state-at-end-event-transform-layer.html
accessibility/label-element-press.html
compositing/animation/animation-compositing.html
compositing/self-painting-layers.html
animations/3d/change-transform-in-end-event.html
compositing/geometry/clipped-video-controller.html
compositing/contents-scale/animating.html
http/tests/cache/cancel-during-failure-crash.html
canvas/philip/tests/security.dataURI.html
compositing/iframes/layout-on-compositing-change.html
compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html
canvas/philip/tests/2d.pattern.modify.image1.html
http/tests/appcache/non-html.xhtml
canvas/philip/tests/2d.pattern.modify.image2.html
compositing/geometry/limit-layer-bounds-opacity-transition.html
compositing/layer-creation/animation-overlap-with-children.html
Comment 4 Build Bot 2013-10-09 22:35:48 PDT
Created attachment 213853 [details]
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-13  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 5 Build Bot 2013-10-09 23:01:51 PDT
Comment on attachment 213851 [details]
Cleanup

Attachment 213851 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/3489190

New failing tests:
animations/animation-border-overflow.html
accessibility/axpress-on-aria-button.html
animations/3d/matrix-transform-type-animation.html
compositing/self-painting-layers2.html
animations/3d/state-at-end-event-transform.html
animations/added-while-suspended.html
compositing/video-page-visibility.html
animations/animation-add-events-in-handler.html
animations/additive-transform-animations.html
animations/3d/replace-filling-transform.html
accessibility/file-upload-button-with-axpress.html
http/tests/appcache/video.html
accessibility/loading-iframe-sends-notification.html
compositing/layers-inside-overflow-scroll.html
compositing/animation/state-at-end-event-transform-layer.html
accessibility/label-element-press.html
compositing/animation/animation-compositing.html
compositing/self-painting-layers.html
animations/3d/change-transform-in-end-event.html
compositing/geometry/clipped-video-controller.html
compositing/contents-scale/animating.html
http/tests/cache/cancel-during-failure-crash.html
canvas/philip/tests/security.dataURI.html
compositing/iframes/layout-on-compositing-change.html
compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html
canvas/philip/tests/2d.pattern.modify.image1.html
http/tests/appcache/non-html.xhtml
canvas/philip/tests/2d.pattern.modify.image2.html
compositing/geometry/limit-layer-bounds-opacity-transition.html
compositing/layer-creation/animation-overlap-with-children.html
Comment 6 Build Bot 2013-10-09 23:01:53 PDT
Created attachment 213854 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 7 Ryosuke Niwa 2013-10-10 00:13:48 PDT
Created attachment 213856 [details]
Fixed the regression
Comment 8 Andreas Kling 2013-10-10 01:01:10 PDT
Comment on attachment 213856 [details]
Fixed the regression

View in context: https://bugs.webkit.org/attachment.cgi?id=213856&action=review

r=me, I love that you are doing this.

> Source/WebCore/ChangeLog:38
> +        (WebCore::Node::handleLocalEvents): Now takes Event& now.

now + now!

> Source/WebCore/dom/EventContext.cpp:87
> +    if (m_relatedTarget.get() && event.isMouseEvent())
> +        toMouseEvent(event).setRelatedTarget(m_relatedTarget.get());
> +    else if (m_relatedTarget.get() && event.isFocusEvent())
> +        toFocusEvent(event).setRelatedTarget(m_relatedTarget.get());

I would wrap this in a single null check like so:
if (m_relatedTarget) {
    ...
}

> Source/WebCore/dom/EventDispatcher.cpp:102
> +static void callDefaultEventHanldersInTheBubblingOrder(Event& event, const EventPath& path)

Typo, hanlders.

> Source/WebCore/dom/EventDispatcher.cpp:186
> +    if (isHTMLInputElement(m_node.get()))
> +        toHTMLInputElement(m_node.get())->willDispatchEvent(*m_event.get(), clickHandlingState);

I'd use *m_node instead of m_node.get() here.

> Source/WebCore/dom/EventDispatcher.cpp:196
> +        toHTMLInputElement(m_node.get())->didDispatchClickEvent(*m_event.get(), clickHandlingState);

Same here.
Comment 9 Ryosuke Niwa 2013-10-10 01:17:50 PDT
Committed r157210: <http://trac.webkit.org/changeset/157210>