Bug 158826 - Specialize synchronous event tracking per event type
Summary: Specialize synchronous event tracking per event type
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-15 20:36 PDT by Benjamin Poulain
Modified: 2016-06-23 19:38 PDT (History)
3 users (show)

See Also:


Attachments
Patch (84.15 KB, patch)
2016-06-15 20:49 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (84.48 KB, patch)
2016-06-15 22:03 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (85.63 KB, patch)
2016-06-16 15:17 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (85.63 KB, patch)
2016-06-16 15:40 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (91.24 KB, patch)
2016-06-23 14:42 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (91.56 KB, patch)
2016-06-23 17:39 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2016-06-15 20:36:18 PDT
Specialize synchronous event tracking per event type
Comment 1 Benjamin Poulain 2016-06-15 20:49:30 PDT
Created attachment 281433 [details]
Patch
Comment 2 Benjamin Poulain 2016-06-15 22:03:20 PDT
Created attachment 281440 [details]
Patch
Comment 3 Benjamin Poulain 2016-06-16 15:17:14 PDT
Created attachment 281478 [details]
Patch
Comment 4 Benjamin Poulain 2016-06-16 15:40:50 PDT
Created attachment 281485 [details]
Patch
Comment 5 Simon Fraser (smfr) 2016-06-16 18:08:15 PDT
Comment on attachment 281485 [details]
Patch

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

> Source/WTF/wtf/HashMap.h:540
> -        if (bPos == notFound || it->value != bPos->value)
> +        if (bPos == notFound || !(it->value == bPos->value))

This is a bit sad because a class may implement a much cheaper operator != than operator ==. I don't think you should make this change.

> Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp:254
> +        for (const auto& synchronousEventRegion : m_eventTrackingRegions.eventSpecificSynchronousDispatchRegions) {
> +            for (auto rect : synchronousEventRegion.value.rects()) {

Would be nice to log the event name here if possible.

> Source/WebCore/platform/EventTrackingRegions.cpp:47
> +    return asynchronousDispatchRegion.isEmpty()
> +        && eventSpecificSynchronousDispatchRegions.isEmpty();

No need to wrap.

> Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:501
> +            for (const auto& synchronousEventRegion : node.eventTrackingRegions().eventSpecificSynchronousDispatchRegions) {
> +                for (auto rect : synchronousEventRegion.value.rects()) {

Dump event names.

> Source/WebKit2/UIProcess/WebPageProxy.cpp:1943
> +    if (static_cast<uintptr_t>(b) > static_cast<uintptr_t>(a))
> +        return b;
> +    return a;

return static_cast<TrackingType>(std::max<>(static_cast<uintptr_t>(a),static_cast<uintptr_t>(b))) ?

> Source/WebKit2/UIProcess/WebPageProxy.cpp:1983
> +    // We don't want to WebCore to be able to setup its state correctly after some
> +    // events were dismissed. We send everything, WebCore updates its internal state and dispatch what is needed.

I find this hard to understand.
Comment 6 Benjamin Poulain 2016-06-23 14:42:17 PDT
Created attachment 281932 [details]
Patch
Comment 7 Benjamin Poulain 2016-06-23 17:39:06 PDT
Created attachment 281946 [details]
Patch
Comment 8 Benjamin Poulain 2016-06-23 19:38:13 PDT
Comment on attachment 281946 [details]
Patch

Clearing flags on attachment: 281946

Committed r202408: <http://trac.webkit.org/changeset/202408>
Comment 9 Benjamin Poulain 2016-06-23 19:38:17 PDT
All reviewed patches have been landed.  Closing bug.