Skip to content

Commit

Permalink
Remove ENABLE_3D_TRANSFORMS directive
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=271145

Reviewed by Michael Catanzaro.

It's been enabled on all ports since 2017 or so.

* Source/WTF/wtf/PlatformEnable.h:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/css/query/MediaQueryFeatures.cpp:
(WebCore::MQ::Features::transform3d):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::makeMatrixRenderable):
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldUseTransformFromContainer const):
(WebCore::RenderObject::getTransformFromContainer const):
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Tools/Scripts/webkitperl/FeatureList.pm:
* Tools/Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl:

Canonical link: https://commits.webkit.org/276271@main
  • Loading branch information
annevk committed Mar 18, 2024
1 parent fa9c6d7 commit 904dc91
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 38 deletions.
4 changes: 0 additions & 4 deletions Source/WTF/wtf/PlatformEnable.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@

/* Do not use PLATFORM() tests in this section ! */

#if !defined(ENABLE_3D_TRANSFORMS)
#define ENABLE_3D_TRANSFORMS 0
#endif

#if !defined(ENABLE_ACCESSIBILITY_ANIMATION_CONTROL)
#define ENABLE_ACCESSIBILITY_ANIMATION_CONTROL 0
#endif
Expand Down
4 changes: 0 additions & 4 deletions Source/WTF/wtf/PlatformEnableCocoa.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
/* Please keep the following in alphabetical order so we can notice duplicates. */
/* Items should only be here if they are different from the defaults in PlatformEnable.h. */

#if !defined(ENABLE_3D_TRANSFORMS)
#define ENABLE_3D_TRANSFORMS 1
#endif

#if !defined(ENABLE_ACCESSIBILITY_ANIMATION_CONTROL) \
&& (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000) \
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 170000) \
Expand Down
5 changes: 0 additions & 5 deletions Source/WebCore/css/query/MediaQueryFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,13 +616,8 @@ const FeatureSchema& transform3d()
static MainThreadNeverDestroyed<BooleanSchema> schema {
"-webkit-transform-3d"_s,
[](auto& context) {
#if ENABLE(3D_TRANSFORMS)
CheckedPtr view = context.document->renderView();
return view && view->compositor().canRender3DTransforms();
#else
UNUSED_PARAM(context);
return false;
#endif
}
};
return schema;
Expand Down
5 changes: 0 additions & 5 deletions Source/WebCore/rendering/RenderLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,8 @@ class ClipRectsCache {

void makeMatrixRenderable(TransformationMatrix& matrix, bool has3DRendering)
{
#if !ENABLE(3D_TRANSFORMS)
UNUSED_PARAM(has3DRendering);
matrix.makeAffine();
#else
if (!has3DRendering)
matrix.makeAffine();
#endif
}

#if !LOG_DISABLED
Expand Down
5 changes: 0 additions & 5 deletions Source/WebCore/rendering/RenderLayerCompositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@
#include "RenderModel.h"
#endif

#if ENABLE(3D_TRANSFORMS)
// This symbol is used to determine from a script whether 3D rendering is enabled (via 'nm').
WEBCORE_EXPORT bool WebCoreHas3DRendering = true;
#endif

#if !PLATFORM(MAC) && !PLATFORM(IOS_FAMILY) && !PLATFORM(GTK) && !PLATFORM(WPE)
#define USE_COMPOSITING_FOR_SMALL_CANVASES 1
#endif
Expand Down
9 changes: 1 addition & 8 deletions Source/WebCore/rendering/RenderObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1539,16 +1539,11 @@ void RenderObject::mapAbsoluteToLocalPoint(OptionSet<MapCoordinatesMode> mode, T

bool RenderObject::shouldUseTransformFromContainer(const RenderObject* containerObject) const
{
#if ENABLE(3D_TRANSFORMS)
if (isTransformed())
return true;
if (containerObject && containerObject->style().hasPerspective())
return containerObject == parent();
return false;
#else
UNUSED_PARAM(containerObject);
return isTransformed();
#endif
}

// FIXME: Now that it's no longer passed a container maybe this should be renamed?
Expand All @@ -1559,8 +1554,7 @@ void RenderObject::getTransformFromContainer(const LayoutSize& offsetInContainer
CheckedPtr<RenderLayer> layer;
if (hasLayer() && (layer = downcast<RenderLayerModelObject>(*this).layer()) && layer->transform())
transform.multiply(layer->currentTransform());

#if ENABLE(3D_TRANSFORMS)

CheckedPtr perspectiveObject = parent();

if (perspectiveObject && perspectiveObject->hasLayer() && perspectiveObject->style().hasPerspective()) {
Expand All @@ -1575,7 +1569,6 @@ void RenderObject::getTransformFromContainer(const LayoutSize& offsetInContainer
transform = perspectiveMatrix * transform;
transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0);
}
#endif
}

void RenderObject::pushOntoTransformState(TransformState& transformState, OptionSet<MapCoordinatesMode> mode, const RenderLayerModelObject* repaintContainer, const RenderElement* container, const LayoutSize& offsetInContainer, bool containerSkipped) const
Expand Down
1 change: 0 additions & 1 deletion Source/cmake/OptionsWin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ WEBKIT_OPTION_BEGIN()

# FIXME: Most of these options should not be public.
# TODO: Audit the features list
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_3D_TRANSFORMS PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OVERFLOW_SCROLLING_TOUCH PUBLIC OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ATTACHMENT_ELEMENT PUBLIC ON)
Expand Down
1 change: 0 additions & 1 deletion Source/cmake/WebKitFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ macro(WEBKIT_OPTION_BEGIN)
set(ENABLE_UNIFIED_BUILDS_DEFAULT ON)
endif ()

WEBKIT_OPTION_DEFINE(ENABLE_3D_TRANSFORMS "Toggle 3D transforms support" PRIVATE ON)
WEBKIT_OPTION_DEFINE(ENABLE_ACCESSIBILITY_ISOLATED_TREE "Toggle accessibility isolated tree support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_API_TESTS "Enable public API unit tests" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_APPLE_PAY "Toggle Apple Pay support" PRIVATE OFF)
Expand Down
4 changes: 0 additions & 4 deletions Tools/Scripts/webkitperl/FeatureList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ my (
$systemMallocSupport,
$telephoneNumberDetectionSupport,
$textAutosizingSupport,
$threeDTransformsSupport,
$touchEventsSupport,
$unifiedBuildsSupport,
$userMessageHandlersSupport,
Expand Down Expand Up @@ -178,9 +177,6 @@ my @features = (
{ option => "fatal-warnings", desc => "Toggle warnings as errors (CMake only)",
define => "DEVELOPER_MODE_FATAL_WARNINGS", value => \$fatalWarnings },

{ option => "3d-rendering", desc => "Toggle 3D rendering support",
define => "ENABLE_3D_TRANSFORMS", value => \$threeDTransformsSupport },

{ option => "accessibility-isolated-tree", desc => "Toggle accessibility isolated tree support",
define => "ENABLE_ACCESSIBILITY_ISOLATED_TREE", value => \$accessibilityIsolatedTreeSupport },

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ END
/bin/sh -c /Users/u/Build/DumpRenderTree.build/Debug/Derived\\\ Sources.build/Script-0F18E7011D6B9CC60027E547.sh
Generating bindings for UIScriptController...
ruby /Users/u/Build/Debug/usr/local/include/wtf/Scripts/GeneratePreferences.rb --frontend WebKitLegacy --base /Users/u/Build/Debug/usr/local/include/wtf/Scripts/Preferences/WebPreferences.yaml --debug /Users/u/Build/Debug/usr/local/include/wtf/Scripts/Preferences/WebPreferencesDebug.yaml --experimental /Users/u/Build/Debug/usr/local/include/wtf/Scripts/Preferences/WebPreferencesExperimental.yaml --internal /Users/u/Build/Debug/usr/local/include/wtf/Scripts/Preferences/WebPreferencesInternal.yaml --template /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb
perl -I /Users/u/Build/Debug/WebCore.framework/Versions/A/PrivateHeaders -I /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/../TestRunnerShared/UIScriptContext/Bindings -I /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/Bindings /Users/u/Build/Debug/WebCore.framework/Versions/A/PrivateHeaders/generate-bindings.pl --defines "ENABLE_3D_TRANSFORMS WTF_PLATFORM_COCOA WTF_PLATFORM_MAC" --include /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/../TestRunnerShared/UIScriptContext/Bindings --outputDir . --generator DumpRenderTree --idlAttributesFile /Users/u/Build/Debug/WebCore.framework/Versions/A/PrivateHeaders/IDLAttributes.json /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/../TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
perl -I /Users/u/Build/Debug/WebCore.framework/Versions/A/PrivateHeaders -I /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/../TestRunnerShared/UIScriptContext/Bindings -I /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/Bindings /Users/u/Build/Debug/WebCore.framework/Versions/A/PrivateHeaders/generate-bindings.pl --defines "WTF_PLATFORM_COCOA WTF_PLATFORM_MAC" --include /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/../TestRunnerShared/UIScriptContext/Bindings --outputDir . --generator DumpRenderTree --idlAttributesFile /Users/u/Build/Debug/WebCore.framework/Versions/A/PrivateHeaders/IDLAttributes.json /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/../TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
ruby /Users/u/Build/Debug/usr/local/include/wtf/Scripts/GeneratePreferences.rb --frontend WebKitLegacy --base /Users/u/Build/Debug/usr/local/include/wtf/Scripts/Preferences/WebPreferences.yaml --debug /Users/u/Build/Debug/usr/local/include/wtf/Scripts/Preferences/WebPreferencesDebug.yaml --experimental /Users/u/Build/Debug/usr/local/include/wtf/Scripts/Preferences/WebPreferencesExperimental.yaml --internal /Users/u/Build/Debug/usr/local/include/wtf/Scripts/Preferences/WebPreferencesInternal.yaml --template /Users/u/WebKit/OpenSource/Tools/DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb
PhaseScriptExecution endtest
END
Expand Down

0 comments on commit 904dc91

Please sign in to comment.