[webkit-changes] [WebKit/WebKit] f0575f: [Element Targeting] Avoid snapshotting targeted el...
Wenson Hsieh
noreply at github.com
Tue Aug 20 20:38:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f0575f95dd272073dd4795d53b969ec413cdd8fb
https://github.com/WebKit/WebKit/commit/f0575f95dd272073dd4795d53b969ec413cdd8fb
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-08-20 (Tue, 20 Aug 2024)
Changed paths:
M Source/WebCore/page/ElementTargetingController.cpp
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ElementTargetingTests.mm
A Tools/TestWebKitAPI/Tests/WebKitCocoa/element-targeting-10.html
Log Message:
-----------
[Element Targeting] Avoid snapshotting targeted elements with no children and no image content
https://bugs.webkit.org/show_bug.cgi?id=278434
rdar://134312393
Reviewed by Aditya Keerthi.
Add a subtle optimization to skip generating an image for a targeted element, in the case where:
- The renderer is a leaf (no children).
- The renderer is not a replaced renderer (e.g. images, media).
- The renderer does not have a background image.
* Source/WebCore/page/ElementTargetingController.cpp:
(WebCore::ElementTargetingController::snapshotIgnoringVisibilityAdjustment):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ElementTargetingTests.mm:
(TestWebKitAPI::TEST(ElementTargeting, SkipSnapshotForNonReplacedElementWithoutChildren)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/element-targeting-10.html: Added.
Canonical link: https://commits.webkit.org/282547@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list