[webkit-changes] [WebKit/WebKit] fc7f34: Support ::backdrop renderers on all elements
Tim Nguyen
noreply at github.com
Sat Dec 3 16:11:54 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fc7f34162f2456c11091af902071437be8911450
https://github.com/WebKit/WebKit/commit/fc7f34162f2456c11091af902071437be8911450
Author: Tim Nguyen <ntim at apple.com>
Date: 2022-12-03 (Sat, 03 Dec 2022)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection.html
A LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection-expected.txt
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
Log Message:
-----------
Support ::backdrop renderers on all elements
https://bugs.webkit.org/show_bug.cgi?id=248569
rdar://102833504
Reviewed by Darin Adler.
The fullscreen API needs to display ::backdrop pseudo elements for _all_ elements, with no exception.
- Add custom code in RenderBlock::nodeForHitTest to get correct handling for hit-testing
- Append backdrop renderers as children of RenderView, since not all individual renderers support children. RenderView is guaranteed to exist and it now centralizes all ::backdrop in one place.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection.html:
This was imported when we unprefixed -webkit-user-select, however this was reverted. The import script usually adds prefixes as necessary.
This didn't fail before, since the test selected nothing both with or without user-select.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection-expected.txt:
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-selection-expected.txt: Added.
The new results are due to the hit-testing change, which now causes us to start a selection when we mousedown on the backdrop.
They pass properly on WebDriver, since the WKTR testdriver is incorrect, the mouse selection should start at the 3rd character, end at the 6th, not start outside of the backdrop.
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeForHitTest const): Lookup associated renderer in top layer in case of ::backdrop to match behavior tested by backdrop-receives-element-events.html, common to other browsers.
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updateBackdropRenderer):
Canonical link: https://commits.webkit.org/257337@main
More information about the webkit-changes
mailing list