[webkit-changes] [WebKit/WebKit] 1e3210: Revive `transform-style: optimized-3d` and make it...

Etienne Segonzac noreply at github.com
Tue Oct 8 07:18:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1e3210939c1bb2129e593fbbb64a5bbe02496ab5
      https://github.com/WebKit/WebKit/commit/1e3210939c1bb2129e593fbbb64a5bbe02496ab5
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2024-10-08 (Tue, 08 Oct 2024)

  Changed paths:
    A LayoutTests/platform/visionos/transforms/separated-expected.txt
    A LayoutTests/platform/visionos/transforms/separated.html
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WTF/wtf/PlatformEnable.h
    M Source/WebCore/css/CSSPrimitiveValueMappings.h
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/CSSValueKeywords.in
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/css/parser/CSSParserContext.cpp
    M Source/WebCore/css/parser/CSSParserContext.h
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/ios/RenderThemeIOS.h
    M Source/WebCore/rendering/ios/RenderThemeIOS.mm
    M Source/WebCore/rendering/style/RenderStyleConstants.cpp
    M Source/WebCore/rendering/style/RenderStyleConstants.h
    M Source/WebKit/UIProcess/API/APIPageConfiguration.h
    M Source/WebKit/UIProcess/API/C/WKPreferences.cpp
    M Source/WebKit/UIProcess/API/C/WKPreferencesRef.h
    M Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
    M Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm

  Log Message:
  -----------
  Revive `transform-style: optimized-3d` and make it configurable
https://bugs.webkit.org/show_bug.cgi?id=280976
<rdar://137132284>

Reviewed by Tim Nguyen.

Revive the old `transform-style: optimized-3d` experiment:
- rename it to `separated` for now, to match its actual effect on layers
- remove a bitrotten RenderTheme experiment
- make it configurable
- add a first test (skipped for now since this is still behind a compile
  time flag)

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformEnable.h:
* Source/WebCore/css/CSSPrimitiveValueMappings.h:
(WebCore::toCSSValueID):
(WebCore::fromCSSValueID):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle const):
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::add):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
Rename the preference, CSS value and compile time flag.

* Source/WebCore/rendering/ios/RenderThemeIOS.h:
* Source/WebCore/rendering/ios/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::adjustCheckboxStyle const):
(WebCore::RenderThemeIOS::adjustRadioStyle const):
(WebCore::RenderThemeIOS::adjustMenuListButtonStyle const):
(WebCore::RenderThemeIOS::adjustButtonStyle const):
(WebCore::RenderThemeIOS::adjustStyleForAlternateFormControlDesignTransition const): Deleted.
(WebCore::RenderThemeIOS::adjustColorWellStyle const): Deleted.
Remove an old experiment with controls.

* Source/WebKit/UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::cssTransformStyleSeparatedEnabled const):
(API::PageConfiguration::setCSSTransformStyleSeparatedEnabled):
* Source/WebKit/UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesGetCSSTransformStyleSeparatedEnabled):
(WKPreferencesSetCSSTransformStyleSeparatedEnabled):
* Source/WebKit/UIProcess/API/C/WKPreferencesRef.h:
* Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setCSSTransformStyleSeparatedEnabled:]):
(-[WKPreferences _cssTransformStyleSeparatedEnabled]):
* Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:withPool:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration encodeWithCoder:]):
(-[WKWebViewConfiguration initWithCoder:]):
(-[WKWebViewConfiguration _cssTransformStyleSeparatedEnabled]):
(-[WKWebViewConfiguration _setCSSTransformStyleSeparatedEnabled:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):
Introduce a new flag on WKWebViewConfiguration to enable the separated
transform style.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
(dumpCALayer):
* LayoutTests/platform/visionos/transforms/separated-expected.txt: Added.
* LayoutTests/platform/visionos/transforms/separated.html: Added.
Add a layer-tree-based test for separated layers.

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list