Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7945fc61f7720ebd0fa9a2bd7d047b6f0d0c2586
https://github.com/WebKit/WebKit/commit/7945fc61f7720ebd0fa9a2bd7d047b6f0d0c2586
Author: Darin Adler <[email protected]>
Date: 2025-07-22 (Tue, 22 Jul 2025)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/page/DebugPageOverlays.cpp
M Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Log Message:
-----------
Putting HashMap in a heap block hurts memory use, speed, code size (WebCore
DOM)
rdar://155739380
https://bugs.webkit.org/show_bug.cgi?id=295864
Reviewed by Chris Dumez.
HashMap and similar classes are already pointers to a hash table, so there is
no reason
to wrap them in a unique_ptr in a heap block and add another level of
indirection.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::buildAccessKeyCache): Updated since m_accessKeyCache is
std::optional instead of std::unique_ptr.
(WebCore::Document::invalidateAccessKeyCacheSlowCase): Ditto.
(WebCore::Document::willBeRemovedFromFrame): Updated since m_touchEventTargets
and m_wheelEventTargets are not stored in std::unique_ptr any more.
(WebCore::Document::absoluteRegionForWheelEventTargets): Renamed from
absoluteRegionForEventTargets and updated to use m_wheelEventTargets.
* Source/WebCore/dom/Document.h: Updated m_accessKeyCache to use
std::optional and m_touchEventTargets and m_wheelEventTargets to not
use std::unique_ptr. Deleted unused touchEventTargets and wheelEventTargets
functions. Made absoluteEventRegionForNode private and renamed
absoluteRegionForEventTargets to absoluteRegionForWheelEventTargets
since that's the only thing it's used for.
* Source/WebCore/page/DebugPageOverlays.cpp:
(WebCore::MouseWheelRegionOverlay::updateRegion): Use
absoluteRegionForWheelEventTargets.
* Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
Ditto.
Canonical link: https://commits.webkit.org/297735@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes