Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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
- Loading branch information