Skip to content

Conversation

@keithamus
Copy link
Member

@keithamus keithamus commented Nov 5, 2023

d23e04b

Make ::backdrop inherit from parent element
https://bugs.webkit.org/show_bug.cgi?id=263834

Reviewed by Tim Nguyen.

StyleTreeResolver/RenterTreeUpdate explicitly checked for ::backdrop
elements to remove their inheritance chain, per the spec at the time.
whatwg/fullscreen#124 was created to query
this and it was resolved that ::backdrop _should_ inherit.

This commit addresses the change by removing the check in
StyleTreeResolve to allow ::backdrop to inherit from its parent element,
and altering the check in RenderTreeUpdate to call renderer.style()
instead of renderer.view.style(). This aligns behaviour with the other
browsers and WPT.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/dialog-backdrop-create.html:
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updateBackdropRenderer):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::makeResolutionContextForPseudoElement):

Canonical link: https://commits.webkit.org/270246@main

8aef5b1

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2
✅ 🛠 tv-sim ✅ 🧪 mac-wk2-stress
✅ 🛠 watch
✅ 🛠 🧪 unsafe-merge ✅ 🛠 watch-sim

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 5, 2023
@keithamus keithamus force-pushed the backdrop-should-inherit-from-parent branch from 29c41dd to 8aef5b1 Compare November 5, 2023 12:40
@keithamus keithamus added CSS Cascading Style Sheets implementation request-merge-queue Request a pull request to be added to merge-queue once ready and removed merging-blocked Applied to prevent a change from being merged labels Nov 5, 2023
@keithamus keithamus requested a review from nt1m November 5, 2023 16:25
@nt1m nt1m added unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed request-merge-queue Request a pull request to be added to merge-queue once ready labels Nov 5, 2023
https://bugs.webkit.org/show_bug.cgi?id=263834

Reviewed by Tim Nguyen.

StyleTreeResolver/RenterTreeUpdate explicitly checked for ::backdrop
elements to remove their inheritance chain, per the spec at the time.
whatwg/fullscreen#124 was created to query
this and it was resolved that ::backdrop _should_ inherit.

This commit addresses the change by removing the check in
StyleTreeResolve to allow ::backdrop to inherit from its parent element,
and altering the check in RenderTreeUpdate to call renderer.style()
instead of renderer.view.style(). This aligns behaviour with the other
browsers and WPT.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/dialog-backdrop-create.html:
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updateBackdropRenderer):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::makeResolutionContextForPseudoElement):

Canonical link: https://commits.webkit.org/270246@main
@webkit-commit-queue webkit-commit-queue force-pushed the backdrop-should-inherit-from-parent branch from 8aef5b1 to d23e04b Compare November 5, 2023 16:33
@webkit-commit-queue
Copy link
Collaborator

Committed 270246@main (d23e04b): https://commits.webkit.org/270246@main

Reviewed commits have been landed. Closing PR #20007 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit d23e04b into WebKit:main Nov 5, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Nov 5, 2023
@keithamus keithamus deleted the backdrop-should-inherit-from-parent branch November 5, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants