Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 04d7deac7dec7497cc16c0a4de96d45a6e1c7a6b
      
https://github.com/WebKit/WebKit/commit/04d7deac7dec7497cc16c0a4de96d45a6e1c7a6b
  Author: Lily Spiniolas <lily_spinio...@apple.com>
  Date:   2025-03-05 (Wed, 05 Mar 2025)

  Changed paths:
    M Source/WebCore/rendering/RenderTheme.cpp
    M Source/WebCore/rendering/ios/RenderThemeIOS.mm

  Log Message:
  -----------
  Skip unnecessary checks for control styling when devolvable widgets are 
enabled
https://bugs.webkit.org/show_bug.cgi?id=289139
rdar://146145732

Reviewed by Aditya Keerthi and Wenson Hsieh.

For platforms besides Mac & iOS, all of the checks in `isControlStyled(...)`
are for border and background styling which would cause the
RenderStyle's `nativeAppearanceDisabled` flag to be set anyways. Thus,
it is not necessary to check `isControlStyled` on non-Mac & non-iOS
platforms when the devolvable widgets feature is enabled.

On Mac, `isControlStyled` contains an additional check for zoom
styling and writing mode styling for menu lists due to an issue
which prevents the control from being scaled. This issue does not
occur when vector-based controls are enabled. Thus, it is not
necessary to check `isControlStyled` on Mac when both vector-based
controls and devolvable widgets are enabled.

On iOS, `isControlStyled` contains an additional check for list
buttons, disabling native appearance if the style has content set
or content:none in order to hide the button. These change move
this logic to the control's paint method, which simply draws
nothing if these styles are set. With this logic moved, it is
no longer necessary to check `isControlStyled` on iOS when the
devolvable widgets feature is enabled.

* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::shouldCheckLegacyStylesForNativeAppearance):
(WebCore::RenderTheme::adjustStyle):
* Source/WebCore/rendering/ios/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::isControlStyled const):
(WebCore::RenderThemeIOS::paintListButton):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to