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

Remove CSS3DTransformInteroperabilityEnabled preference #26017

Conversation

annevk
Copy link
Contributor

@annevk annevk commented Mar 17, 2024

670a1d8

Remove CSS3DTransformInteroperabilityEnabled preference
https://bugs.webkit.org/show_bug.cgi?id=271124

Reviewed by Matt Woodrow.

It's been stable for at least a year. The one unfortunate side effect
of this patch is that it more clearly highlights that some underlying
code continues to branch. Arguably those booleans should be turned into
clearly named enum classes.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::copyElementBaseProperties):
* Source/WebCore/rendering/LayerOverlapMap.cpp:
(WebCore::LayerOverlapMap::LayerOverlapMap):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createLocalTransformState const):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestList):
(WebCore::isHitCandidateLegacy): Deleted.
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::useCSS3DTransformInteroperability const): Deleted.
* Source/WebCore/rendering/RenderLayerBacking.h:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerStyleChanged):
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::localToAbsolute const):
(WebCore::RenderObject::absoluteToLocal const):
(WebCore::RenderObject::absoluteToLocalQuad const):
(WebCore::RenderObject::shouldUseTransformFromContainer const):
(WebCore::RenderObject::getTransformFromContainer const):
(WebCore::RenderObject::pushOntoTransformState const):
(WebCore::RenderObject::pushOntoGeometryMap const):
(WebCore::RenderObject::localToContainerQuad const):
(WebCore::RenderObject::localToContainerPoint const):
(WebCore::RenderObject::participatesInPreserve3D const):
* Source/WebCore/rendering/RenderObject.h:
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer const):
(WebCore::RenderView::pushMappingToContainer const):
(WebCore::RenderView::mapAbsoluteToLocalPoint const):
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer const):
* Source/WebCore/rendering/svg/SVGLayerTransformComputation.h:
(WebCore::SVGLayerTransformComputation::computeAccumulatedTransform const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
(WebKit::RemoteLayerTreeHost::css3DTransformInteroperabilityEnabled const): Deleted.

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

ff4f8a7

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

@annevk annevk self-assigned this Mar 17, 2024
@annevk annevk added the WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit). label Mar 17, 2024
@annevk annevk requested a review from mattwoodrow March 17, 2024 08:52
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Mar 17, 2024
@nt1m
Copy link
Member

nt1m commented Mar 17, 2024

Is this ready to be enabled? I'm not sure every platform has this (although I think older platforms check at runtime? not using this pref?)

@annevk annevk removed the merging-blocked Applied to prevent a change from being merged label Mar 17, 2024
@annevk annevk force-pushed the eng/Remove-CSS3DTransformInteroperabilityEnabled-preference branch from 54d9e26 to 562aaf6 Compare March 17, 2024 10:52
@annevk
Copy link
Contributor Author

annevk commented Mar 17, 2024

There's also ENABLE_3D_TRANSFORMS which I'm a bit unclear on whether all platforms enable it, but this preference isn't guarded by anything so seems reasonable to remove given how long it's been stable.

Copy link
Contributor

@mattwoodrow mattwoodrow left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

@@ -245,7 +245,8 @@ class RenderLayerBacking final : public GraphicsLayerClient {
bool shouldAggressivelyRetainTiles(const GraphicsLayer*) const override;
bool shouldTemporarilyRetainTileCohorts(const GraphicsLayer*) const override;
bool useGiantTiles() const override;
bool useCSS3DTransformInteroperability() const override;
// FIXME: Should this have a different name if we need to preserve this difference indefinitely?
bool useCSS3DTransformInteroperability() const override { return true; }
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the difference is intentional, and I believe all the callers of this function will happen on clients that are RenderLayerBacking.

I do see the value in separating the 'remove the preference' changes from anything that could be a functional difference though, but it'd be worth trying to remove this either in this patch or as a follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -549,7 +549,7 @@ void RenderSVGRoot::mapLocalToContainer(const RenderLayerModelObject* repaintCon
// For getCTM/getScreenCTM computations the result must be independent of the page zoom factor.
// To compute these matrices within a non-SVG context (e.g. SVG embedded in HTML -- inline SVG)
// the scaling needs to be removed from the CSS transform state.
TransformState transformStateAboveSVGFragment(settings().css3DTransformInteroperabilityEnabled(), transformState.direction(), transformState.mappedPoint());
TransformState transformStateAboveSVGFragment(true, transformState.direction(), transformState.mappedPoint());
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the only caller of the TransformState constructor that doesn't use the pref currently is just a mistake, so we could/should remove this param.

As with the above, doing so in a separate step is fine :)

Source/WebCore/rendering/RenderLayer.cpp Outdated Show resolved Hide resolved
@annevk annevk force-pushed the eng/Remove-CSS3DTransformInteroperabilityEnabled-preference branch from 562aaf6 to ff4f8a7 Compare March 18, 2024 07:35
@annevk annevk added the merge-queue Applied to send a pull request to merge-queue label Mar 18, 2024
https://bugs.webkit.org/show_bug.cgi?id=271124

Reviewed by Matt Woodrow.

It's been stable for at least a year. The one unfortunate side effect
of this patch is that it more clearly highlights that some underlying
code continues to branch. Arguably those booleans should be turned into
clearly named enum classes.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::copyElementBaseProperties):
* Source/WebCore/rendering/LayerOverlapMap.cpp:
(WebCore::LayerOverlapMap::LayerOverlapMap):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createLocalTransformState const):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestList):
(WebCore::isHitCandidateLegacy): Deleted.
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::useCSS3DTransformInteroperability const): Deleted.
* Source/WebCore/rendering/RenderLayerBacking.h:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerStyleChanged):
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::localToAbsolute const):
(WebCore::RenderObject::absoluteToLocal const):
(WebCore::RenderObject::absoluteToLocalQuad const):
(WebCore::RenderObject::shouldUseTransformFromContainer const):
(WebCore::RenderObject::getTransformFromContainer const):
(WebCore::RenderObject::pushOntoTransformState const):
(WebCore::RenderObject::pushOntoGeometryMap const):
(WebCore::RenderObject::localToContainerQuad const):
(WebCore::RenderObject::localToContainerPoint const):
(WebCore::RenderObject::participatesInPreserve3D const):
* Source/WebCore/rendering/RenderObject.h:
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer const):
(WebCore::RenderView::pushMappingToContainer const):
(WebCore::RenderView::mapAbsoluteToLocalPoint const):
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer const):
* Source/WebCore/rendering/svg/SVGLayerTransformComputation.h:
(WebCore::SVGLayerTransformComputation::computeAccumulatedTransform const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
(WebKit::RemoteLayerTreeHost::css3DTransformInteroperabilityEnabled const): Deleted.

Canonical link: https://commits.webkit.org/276257@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Remove-CSS3DTransformInteroperabilityEnabled-preference branch from ff4f8a7 to 670a1d8 Compare March 18, 2024 09:00
@webkit-commit-queue
Copy link
Collaborator

Committed 276257@main (670a1d8): https://commits.webkit.org/276257@main

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

@webkit-commit-queue webkit-commit-queue merged commit 670a1d8 into WebKit:main Mar 18, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 18, 2024
@annevk annevk deleted the eng/Remove-CSS3DTransformInteroperabilityEnabled-preference branch March 18, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
Projects
None yet
6 participants