Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce EventTrackingRegions::Event enum #558

Merged
merged 0 commits into from May 9, 2022

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented May 7, 2022

36ca2e4

Introduce EventTrackingRegions::Event enum
https://bugs.webkit.org/show_bug.cgi?id=240206

Reviewed by Mark Lam.

We noticed that EventNames 260~ AtomStrings are allocated in scrolling thread only because we are using
eventNames() for EventTrackingRegions. But since use of it is limited, we can just use enum instead.

    1. We can make EventTrackingRegions more efficient by using enum instead of String.
    2. We can save memory by avoiding EventNames string allocations & AtomStringTable registration.
    3. We can make this parameter more strictly typed compared to accepting any kind of Strings

* Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::dump):
* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<EventTrackingRegions >::decode):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::eventTrackingTypeForPoint const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateTouchEventTracking):
* Source/WebCore/page/DebugPageOverlays.cpp:
(WebCore::NonFastScrollableRegionOverlay::drawRect):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::touchEventRectsForEventForTesting):
* Source/WebCore/page/Page.h:
* Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
* Source/WebCore/page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::computeWheelProcessingSteps):
(WebCore::ScrollingTree::eventTrackingTypeForPoint):
* Source/WebCore/page/scrolling/ScrollingTree.h:
* Source/WebCore/platform/EventTrackingRegions.cpp:
(WebCore::EventTrackingRegions::eventName):
(WebCore::EventTrackingRegions::trackingTypeForPoint):
(WebCore::EventTrackingRegions::uniteSynchronousRegion):
* Source/WebCore/platform/EventTrackingRegions.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::touchEventRectsForEvent):
* Source/WebCore/testing/Internals.h:

Canonical link: https://commits.webkit.org/250405@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

@Constellation Constellation self-assigned this May 7, 2022
@Constellation Constellation added New Bugs Unclassified bugs are placed in this component until the correct component can be determined. WebKit Nightly Build labels May 7, 2022
@Constellation Constellation requested a review from smfr May 7, 2022 09:16
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label May 7, 2022
@Constellation Constellation removed merging-blocked Applied to prevent a change from being merged New Bugs Unclassified bugs are placed in this component until the correct component can be determined. WebKit Nightly Build labels May 7, 2022
@Constellation Constellation added New Bugs Unclassified bugs are placed in this component until the correct component can be determined. WebKit Nightly Build labels May 7, 2022
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label May 7, 2022
@Constellation Constellation removed merging-blocked Applied to prevent a change from being merged New Bugs Unclassified bugs are placed in this component until the correct component can be determined. WebKit Nightly Build labels May 7, 2022
@Constellation Constellation added New Bugs Unclassified bugs are placed in this component until the correct component can be determined. WebKit Nightly Build labels May 7, 2022
Copy link

@MenloDorian MenloDorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with suggestions for improvement.

Source/WebCore/page/DebugPageOverlays.cpp Outdated Show resolved Hide resolved
Source/WebCore/platform/EventTrackingRegions.cpp Outdated Show resolved Hide resolved
Source/WebCore/platform/EventTrackingRegions.cpp Outdated Show resolved Hide resolved
Source/WebCore/platform/EventTrackingRegions.cpp Outdated Show resolved Hide resolved
Source/WebKit/UIProcess/WebPageProxy.cpp Outdated Show resolved Hide resolved
Source/WebCore/page/Page.cpp Outdated Show resolved Hide resolved
Source/WebCore/page/Page.h Outdated Show resolved Hide resolved
Source/WebCore/platform/EventTrackingRegions.h Outdated Show resolved Hide resolved
Copy link
Member Author

@Constellation Constellation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Source/WebCore/page/DebugPageOverlays.cpp Outdated Show resolved Hide resolved
Source/WebCore/page/Page.cpp Outdated Show resolved Hide resolved
Source/WebCore/page/Page.h Outdated Show resolved Hide resolved
Source/WebCore/platform/EventTrackingRegions.cpp Outdated Show resolved Hide resolved
Source/WebCore/platform/EventTrackingRegions.cpp Outdated Show resolved Hide resolved
Source/WebCore/platform/EventTrackingRegions.cpp Outdated Show resolved Hide resolved
Source/WebCore/platform/EventTrackingRegions.h Outdated Show resolved Hide resolved
Source/WebKit/UIProcess/WebPageProxy.cpp Outdated Show resolved Hide resolved
@Constellation Constellation force-pushed the eng/scrolling-event-names branch 2 times, most recently from 9bbdf68 to e0e594c Compare May 9, 2022 03:35
@Constellation Constellation added the merge-queue Applied to send a pull request to merge-queue label May 9, 2022
@webkit-early-warning-system
Copy link
Collaborator

Commit message contains (OOPS!), blocking PR #558

@webkit-early-warning-system webkit-early-warning-system added merging-blocked Applied to prevent a change from being merged and removed merge-queue Applied to send a pull request to merge-queue labels May 9, 2022
@Constellation Constellation merged commit 36ca2e4 into WebKit:main May 9, 2022
@Constellation
Copy link
Member Author

@Constellation Constellation deleted the eng/scrolling-event-names branch May 9, 2022 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merging-blocked Applied to prevent a change from being merged New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
3 participants