Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transform-style:preserve-3d doesn't work across display:contents ancestors #28077

Conversation

mattwoodrow
Copy link
Contributor

@mattwoodrow mattwoodrow commented May 3, 2024

adf1f00

transform-style:preserve-3d doesn't work across display:contents ancestors
https://bugs.webkit.org/show_bug.cgi?id=273627
<rdar://127468969>

Reviewed by Alan Baradlay.

When looking for the ancestor element to see if it has 'preserve-3d', any intermediate
ancestors with display:contents should be skipped.

* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform3d-preserve3d-014-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform3d-preserve3d-014.html: Added.
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::flattenedParent):
(WebCore::RenderLayer::ancestorLayerIsDOMParent const):

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

d8e6277

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 βœ… πŸ§ͺ api-wpe
βœ… πŸ§ͺ webkitpy βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  wpe-skia
βœ… πŸ›  πŸ§ͺ jsc βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ›  gtk
βœ… πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ services βœ… πŸ›  tv-sim   πŸ§ͺ mac-wk2-stress βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ›  jsc-armv7
βœ… πŸ›  watch-sim βœ… πŸ§ͺ jsc-armv7-tests

@mattwoodrow mattwoodrow self-assigned this May 3, 2024
@mattwoodrow mattwoodrow added the Layout and Rendering For bugs with layout and rendering of Web pages. label May 3, 2024
@mattwoodrow mattwoodrow force-pushed the eng/preserve-3d-display-contents branch from adf1737 to 0a7f113 Compare May 3, 2024 02:44
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 3, 2024
@mattwoodrow mattwoodrow removed the merging-blocked Applied to prevent a change from being merged label May 6, 2024
@mattwoodrow mattwoodrow force-pushed the eng/preserve-3d-display-contents branch from 0a7f113 to 81763e2 Compare May 6, 2024 01:47
Comment on lines +4116 to +4117
auto parent = flattenedParent(renderer().element());
if (parent && ancestor->renderer().element() == parent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess flattenedParent(renderer().element()) == ancestor->renderer().element() would be sufficient but ofc checking against parent is less error prone.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(totally not suggesting to change it:)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I was worried about nullptr == nullptr, not sure how probable that actually is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, probably close to 0, but then again being defensive here is not a bad thing.

@mattwoodrow mattwoodrow added merge-queue Applied to send a pull request to merge-queue and removed merge-queue Applied to send a pull request to merge-queue labels May 7, 2024
@mattwoodrow mattwoodrow force-pushed the eng/preserve-3d-display-contents branch from 81763e2 to d8e6277 Compare May 7, 2024 21:45
@mattwoodrow mattwoodrow added the merge-queue Applied to send a pull request to merge-queue label May 8, 2024
…stors

https://bugs.webkit.org/show_bug.cgi?id=273627
<rdar://127468969>

Reviewed by Alan Baradlay.

When looking for the ancestor element to see if it has 'preserve-3d', any intermediate
ancestors with display:contents should be skipped.

* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform3d-preserve3d-014-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform3d-preserve3d-014.html: Added.
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::flattenedParent):
(WebCore::RenderLayer::ancestorLayerIsDOMParent const):

Canonical link: https://commits.webkit.org/278499@main
@webkit-commit-queue
Copy link
Collaborator

Committed 278499@main (adf1f00): https://commits.webkit.org/278499@main

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

@webkit-commit-queue webkit-commit-queue merged commit adf1f00 into WebKit:main May 8, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layout and Rendering For bugs with layout and rendering of Web pages.
Projects
None yet
5 participants