Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6ab83507aa2657ca225b388838a63984c4003d51
      
https://github.com/WebKit/WebKit/commit/6ab83507aa2657ca225b388838a63984c4003d51
  Author: Lily Spiniolas <[email protected]>
  Date:   2025-06-11 (Wed, 11 Jun 2025)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebCore/html/shadow/TextControlInnerElements.cpp
    M Source/WebCore/page/FrameView.cpp
    M Source/WebCore/page/FrameView.h
    M Source/WebCore/platform/ScrollableArea.h
    M Source/WebCore/platform/mac/ScrollbarThemeMac.mm
    M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
    M Source/WebCore/rendering/RenderLayerScrollableArea.h
    M Source/WebCore/rendering/RenderTheme.cpp
    M Source/WebCore/rendering/cocoa/RenderThemeCocoa.h
    M Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm
    M Source/WebCore/rendering/ios/RenderThemeIOS.mm
    M Source/WebCore/rendering/mac/RenderThemeMac.mm
    M Source/WebCore/style/UserAgentStyle.cpp
    M Source/WebCore/style/UserAgentStyle.h
    M Source/WebKit/Shared/WebPreferencesDefaultValues.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm
    M Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h

  Log Message:
  -----------
  [Cocoa] Upstream form control refresh
https://bugs.webkit.org/show_bug.cgi?id=294302
rdar://153015216

Reviewed by Aditya Keerthi.

Upstream form control refresh for Cocoa platforms. Adds paint methods,
style adjustment methods, and various utilities used for the updated
control designs. The changes now use a single unified web preference
"FormControlRefresh".

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/html/shadow/TextControlInnerElements.cpp:
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::formControlRefreshEnabled const):
(WebCore::FrameView::vectorBasedControlsEnabled const): Deleted.
* Source/WebCore/page/FrameView.h:
* Source/WebCore/platform/ScrollableArea.h:
(WebCore::ScrollableArea::formControlRefreshEnabled const):
(WebCore::ScrollableArea::vectorBasedControlsEnabled const): Deleted.
* Source/WebCore/platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::paintScrollCorner):
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::formControlRefreshEnabled const):
(WebCore::RenderLayerScrollableArea::vectorBasedControlsEnabled const): Deleted.
* Source/WebCore/rendering/RenderLayerScrollableArea.h:
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::shouldCheckLegacyStylesForNativeAppearance):
* Source/WebCore/rendering/cocoa/RenderThemeCocoa.h:
* Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm:
(WebCore::formControlRefreshEnabled):
(WebCore::colorCompositedOverCanvasColor):
(WebCore::drawFocusRingForPathForVectorBasedControls):
(WebCore::highContrastOutlineColor):
(WebCore::drawHighContrastOutline):
(WebCore::renderThemePaintSwitchThumb):
(WebCore::renderThemePaintSwitchTrack):
(WebCore::additionalMediaControlsStyleSheets):
(WebCore::canShowCapsLockIndicator):
(WebCore::RenderThemeCocoa::singleton):
(WebCore::RenderThemeCocoa::purgeCaches):
(WebCore::RenderThemeCocoa::shouldHaveCapsLockIndicator const):
(WebCore::RenderThemeCocoa::pictureFrameColor):
(WebCore::RenderThemeCocoa::paintFileUploadIconDecorations):
(WebCore::RenderThemeCocoa::animationRepeatIntervalForProgressBar const):
(WebCore::RenderThemeCocoa::adjustApplePayButtonStyle const):
(WebCore::RenderThemeCocoa::mediaControlsStyleSheets):
(WebCore::RenderThemeCocoa::mediaControlsScripts):
(WebCore::RenderThemeCocoa::mediaControlsBase64StringForIconNameAndType):
(WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):
(WebCore::cssWeightOfSystemFont):
(WebCore::RenderThemeCocoa::attachmentBaseline const):
(WebCore::RenderThemeCocoa::paintAttachmentText):
(WebCore::RenderThemeCocoa::platformSpellingMarkerColor const):
(WebCore::RenderThemeCocoa::platformDictationAlternativesMarkerColor const):
(WebCore::RenderThemeCocoa::platformGrammarMarkerColor const):
(WebCore::RenderThemeCocoa::controlTintColor const):
(WebCore::RenderThemeCocoa::inflateRectForControlRenderer):
(WebCore::RenderThemeCocoa::inflateRectForControlRendererForVectorBasedControls 
const):
(WebCore::RenderThemeCocoa::canCreateControlPartForRendererForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::canCreateControlPartForBorderOnlyForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::canCreateControlPartForDecorationsForVectorBasedControls
 const):
(WebCore::controlIsFocusedWithOutlineStyleAutoForVectorBasedControls):
(WebCore::checkboxRadioIndicatorColorForVectorBasedControls):
(WebCore::colorWithContrastOverlay):
(WebCore::platformAdjustedColorForPressedState):
(WebCore::drawShapeWithBorder):
(WebCore::checkboxRadioBackgroundGradientForVectorBasedControls):
(WebCore::paintCheckboxRadioInnerShadowForVectorBasedControls):
(WebCore::checkboxRadioBorderColorForVectorBasedControls):
(WebCore::RenderThemeCocoa::checkboxRadioBackgroundColorForVectorBasedControls 
const):
(WebCore::RenderThemeCocoa::adjustCheckboxStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintCheckboxForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustRadioStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintRadioForVectorBasedControls):
(WebCore::nodeIsDateOrTimeRelatedInput):
(WebCore::RenderThemeCocoa::paintButtonForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustColorWellStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintColorWellForVectorBasedControls):
(WebCore::RenderThemeCocoa::paintColorWellSwatchForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustColorWellSwatchStyleForVectorBasedControls 
const):
(WebCore::RenderThemeCocoa::adjustColorWellSwatchWrapperStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::adjustColorWellSwatchOverlayStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::paintColorWellDecorationsForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustInnerSpinButtonStyleForVectorBasedControls 
const):
(WebCore::chevronDownPath):
(WebCore::chevronDownSemiboldPath):
(WebCore::chevronDownBoldPath):
(WebCore::chevronDownHeavyPath):
(WebCore::spinButtonIndicatorPath):
(WebCore::spinButtonDividerWidthRatioForControlSize):
(WebCore::spinButtonControlSizeForHeight):
(WebCore::spinButtonIndicatorWidthRatio):
(WebCore::spinButtonRectForContentRect):
(WebCore::RenderThemeCocoa::paintInnerSpinButtonStyleForVectorBasedControls):
(WebCore::applyEmPadding):
(WebCore::applyEmPaddingForNumberField):
(WebCore::RenderThemeCocoa::adjustTextFieldStyleForVectorBasedControls const):
(WebCore::listButtonControlSizeForBlockSize):
(WebCore::listButtonIndicatorSize):
(WebCore::listButtonCornerRadius):
(WebCore::cornerRadiusForConcentricTextBasedControl):
(WebCore::paintTextAreaOrTextFieldInnerShadow):
(WebCore::paintTextAreaOrTextField):
(WebCore::RenderThemeCocoa::paintTextFieldForVectorBasedControls):
(WebCore::RenderThemeCocoa::paintTextFieldDecorationsForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustTextAreaStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintTextAreaForVectorBasedControls):
(WebCore::RenderThemeCocoa::paintTextAreaDecorationsForVectorBasedControls):
(WebCore::applyCommonButtonPaddingToStyleForVectorBasedControls):
(WebCore::adjustSelectListButtonStyleForVectorBasedControls):
(WebCore::RenderThemeMeasureTextClientForVectorBasedControls::RenderThemeMeasureTextClientForVectorBasedControls):
(WebCore::adjustInputElementButtonStyleForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustMenuListStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintMenuListForVectorBasedControls):
(WebCore::RenderThemeCocoa::paintMenuListDecorationsForVectorBasedControls):
(WebCore::RenderThemeCocoa::paintMenuListButtonForVectorBasedControls):
(WebCore::adjustButtonLikeControlStyleForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustButtonStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::adjustMenuListButtonStyleForVectorBasedControls 
const):
(WebCore::RenderThemeCocoa::paintMenuListButtonDecorationsForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustMeterStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintMeterForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustListButtonStyleForVectorBasedControls const):
(WebCore::listButtonIndicatorPath):
(WebCore::RenderThemeCocoa::paintListButtonForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustProgressBarStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintProgressBarForVectorBasedControls):
(WebCore::hasVisibleSliderThumbDescendant):
(WebCore::paintSliderTicksForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustSliderTrackStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintSliderTrackForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustSliderThumbSizeForVectorBasedControls const):
(WebCore::RenderThemeCocoa::adjustSliderThumbStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintSliderThumbForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustSearchFieldStyleForVectorBasedControls const):
(WebCore::searchFieldCanBeCapsule):
(WebCore::RenderThemeCocoa::paintSearchFieldForVectorBasedControls):
(WebCore::RenderThemeCocoa::paintSearchFieldDecorationsForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustSearchFieldCancelButtonStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::paintSearchFieldCancelButtonForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustSearchFieldDecorationPartStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::paintSearchFieldDecorationPartForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustSearchFieldResultsDecorationPartStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::paintSearchFieldResultsDecorationPartForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustSearchFieldResultsButtonStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::paintSearchFieldResultsButtonForVectorBasedControls):
(WebCore::RenderThemeCocoa::adjustSwitchStyleForVectorBasedControls const):
(WebCore::RenderThemeCocoa::paintPlatformResizerForVectorBasedControls):
(WebCore::RenderThemeCocoa::paintPlatformResizerFrameForVectorBasedControls):
(WebCore::RenderThemeCocoa::supportsFocusRingForVectorBasedControls const):
(WebCore::shouldAdjustTextControlInnerElementStyles):
(WebCore::RenderThemeCocoa::adjustTextControlInnerContainerStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::adjustTextControlInnerPlaceholderStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::adjustTextControlInnerTextStyleForVectorBasedControls
 const):
(WebCore::RenderThemeCocoa::adjustCheckboxStyle const):
(WebCore::RenderThemeCocoa::paintCheckbox):
(WebCore::RenderThemeCocoa::adjustRadioStyle const):
(WebCore::RenderThemeCocoa::paintRadio):
(WebCore::RenderThemeCocoa::adjustButtonStyle const):
(WebCore::RenderThemeCocoa::paintButton):
(WebCore::RenderThemeCocoa::adjustColorWellStyle const):
(WebCore::RenderThemeCocoa::adjustColorWellSwatchStyle const):
(WebCore::RenderThemeCocoa::adjustColorWellSwatchOverlayStyle const):
(WebCore::RenderThemeCocoa::adjustColorWellSwatchWrapperStyle const):
(WebCore::RenderThemeCocoa::paintColorWellSwatch):
(WebCore::RenderThemeCocoa::paintColorWell):
(WebCore::RenderThemeCocoa::paintColorWellDecorations):
(WebCore::RenderThemeCocoa::adjustInnerSpinButtonStyle const):
(WebCore::RenderThemeCocoa::paintInnerSpinButton):
(WebCore::RenderThemeCocoa::adjustTextFieldStyle const):
(WebCore::RenderThemeCocoa::paintTextField):
(WebCore::RenderThemeCocoa::paintTextFieldDecorations):
(WebCore::RenderThemeCocoa::adjustTextAreaStyle const):
(WebCore::RenderThemeCocoa::paintTextArea):
(WebCore::RenderThemeCocoa::paintTextAreaDecorations):
(WebCore::RenderThemeCocoa::adjustMenuListStyle const):
(WebCore::RenderThemeCocoa::paintMenuList):
(WebCore::RenderThemeCocoa::paintMenuListDecorations):
(WebCore::RenderThemeCocoa::adjustMenuListButtonStyle const):
(WebCore::RenderThemeCocoa::paintMenuListButtonDecorations):
(WebCore::RenderThemeCocoa::paintMenuListButton):
(WebCore::RenderThemeCocoa::adjustMeterStyle const):
(WebCore::RenderThemeCocoa::paintMeter):
(WebCore::RenderThemeCocoa::adjustListButtonStyle const):
(WebCore::RenderThemeCocoa::paintListButton):
(WebCore::RenderThemeCocoa::adjustProgressBarStyle const):
(WebCore::RenderThemeCocoa::paintProgressBar):
(WebCore::RenderThemeCocoa::adjustSliderTrackStyle const):
(WebCore::RenderThemeCocoa::paintSliderTrack):
(WebCore::RenderThemeCocoa::adjustSliderThumbSize const):
(WebCore::RenderThemeCocoa::adjustSliderThumbStyle const):
(WebCore::RenderThemeCocoa::paintSliderThumb):
(WebCore::RenderThemeCocoa::adjustSearchFieldStyle const):
(WebCore::RenderThemeCocoa::paintSearchField):
(WebCore::RenderThemeCocoa::paintSearchFieldDecorations):
(WebCore::RenderThemeCocoa::adjustSearchFieldCancelButtonStyle const):
(WebCore::RenderThemeCocoa::paintSearchFieldCancelButton):
(WebCore::RenderThemeCocoa::adjustSearchFieldDecorationPartStyle const):
(WebCore::RenderThemeCocoa::paintSearchFieldDecorationPart):
(WebCore::RenderThemeCocoa::adjustSearchFieldResultsDecorationPartStyle const):
(WebCore::RenderThemeCocoa::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeCocoa::adjustSearchFieldResultsButtonStyle const):
(WebCore::RenderThemeCocoa::paintSearchFieldResultsButton):
(WebCore::RenderThemeCocoa::adjustSwitchStyle const):
(WebCore::RenderThemeCocoa::paintSwitchThumb):
(WebCore::RenderThemeCocoa::paintSwitchTrack):
(WebCore::RenderThemeCocoa::paintPlatformResizer):
(WebCore::RenderThemeCocoa::paintPlatformResizerFrame):
(WebCore::RenderThemeCocoa::supportsFocusRing const):
(WebCore::RenderThemeCocoa::adjustTextControlInnerContainerStyle const):
(WebCore::RenderThemeCocoa::adjustTextControlInnerPlaceholderStyle const):
(WebCore::RenderThemeCocoa::adjustTextControlInnerTextStyle const):
* Source/WebCore/rendering/ios/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::adjustCheckboxStyle const):
(WebCore::RenderThemeIOS::adjustRadioStyle const):
(WebCore::RenderThemeIOS::adjustTextFieldStyle const):
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::adjustTextAreaStyle const):
(WebCore::RenderThemeIOS::paintTextAreaDecorations):
(WebCore::RenderThemeIOS::adjustMenuListButtonStyle const):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
(WebCore::RenderThemeIOS::adjustSliderTrackStyle const):
(WebCore::RenderThemeIOS::paintSliderTrack):
(WebCore::RenderThemeIOS::adjustSliderThumbSize const):
(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::adjustSearchFieldStyle const):
(WebCore::RenderThemeIOS::paintSearchFieldDecorations):
(WebCore::RenderThemeIOS::adjustButtonStyle const):
(WebCore::RenderThemeIOS::supportsFocusRing const):
(WebCore::RenderThemeIOS::paintCheckbox):
(WebCore::RenderThemeIOS::paintRadio):
(WebCore::RenderThemeIOS::paintMeter):
(WebCore::RenderThemeIOS::paintListButton):
(WebCore::RenderThemeIOS::paintColorWellDecorations):
(WebCore::RenderThemeIOS::adjustSearchFieldDecorationPartStyle const):
(WebCore::RenderThemeIOS::paintSearchFieldDecorationPart):
* Source/WebCore/rendering/mac/RenderThemeMac.mm:
(WebCore::RenderThemeMac::canPaint const):
(WebCore::RenderThemeMac::canCreateControlPartForRenderer const):
(WebCore::RenderThemeMac::canCreateControlPartForBorderOnly const):
(WebCore::RenderThemeMac::canCreateControlPartForDecorations const):
(WebCore::RenderThemeMac::searchFieldShouldAppearAsTextField const):
(WebCore::RenderThemeMac::inflateRectForControlRenderer):
(WebCore::RenderThemeMac::adjustListButtonStyle const):
(WebCore::RenderThemeMac::adjustMenuListStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle const):
(WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle const):
(WebCore::RenderThemeMac::adjustSliderThumbSize const):
* Source/WebCore/style/UserAgentStyle.cpp:
(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
* Source/WebCore/style/UserAgentStyle.h:
* Source/WebKit/Shared/WebPreferencesDefaultValues.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm:
(WebKit::PDFPluginBase::formControlRefreshEnabled const):
(WebKit::PDFPluginBase::vectorBasedControlsEnabled const): Deleted.
* Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h:

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



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

Reply via email to