[webkit-changes] [WebKit/WebKit] 3ab8a9: Support devolvable widgets

lilyspiniolas noreply at github.com
Wed Dec 11 15:33:05 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3ab8a97346bf39e21ca83e1c2b79354baafa3dd7
      https://github.com/WebKit/WebKit/commit/3ab8a97346bf39e21ca83e1c2b79354baafa3dd7
  Author: Lily Spiniolas <lily_spiniolas at apple.com>
  Date:   2024-12-11 (Wed, 11 Dec 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/fast/forms/auto-fill-button/input-auto-filled-and-obscured.html
    R LayoutTests/fast/forms/hidpi-textfield-background-bleeding-expected.html
    R LayoutTests/fast/forms/hidpi-textfield-background-bleeding.html
    M LayoutTests/fast/forms/input-background-ua-media-query-expected.html
    M LayoutTests/fast/forms/input-background-ua-media-query.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-ui/compute-kind-widget-no-fallback-props-001.html
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/gtk/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/ios/fast/forms/select-background-none-expected.txt
    M LayoutTests/platform/ios/fast/forms/select-style-expected.txt
    M LayoutTests/platform/mac-wk1/TestExpectations
    R LayoutTests/platform/mac/fast/forms/hidpi-textfield-background-bleeding-expected.html
    M LayoutTests/platform/mac/fast/forms/select-style-expected.png
    M LayoutTests/platform/mac/fast/forms/select-style-expected.txt
    M LayoutTests/platform/win/TestExpectations
    M LayoutTests/platform/wpe/TestExpectations
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/CSSProperty.h
    M Source/WebCore/css/process-css-properties.py
    M Source/WebCore/dom/Element.h
    M Source/WebCore/html/HTMLButtonElement.h
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/HTMLInputElement.h
    M Source/WebCore/html/HTMLMeterElement.h
    M Source/WebCore/html/HTMLProgressElement.h
    M Source/WebCore/html/HTMLSelectElement.h
    M Source/WebCore/html/HTMLTextAreaElement.h
    M Source/WebCore/rendering/RenderTheme.cpp
    M Source/WebCore/rendering/RenderTheme.h
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/style/RenderStyleInlines.h
    M Source/WebCore/rendering/style/RenderStyleSetters.h
    M Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
    M Source/WebCore/rendering/style/StyleRareNonInheritedData.h
    M Source/WebCore/style/PropertyCascade.cpp
    M Source/WebCore/style/PropertyCascade.h
    M Source/WebCore/style/StyleBuilder.cpp
    M Source/WebCore/style/StyleBuilder.h
    M Tools/Scripts/webkitpy/style/checkers/jsonchecker.py

  Log Message:
  -----------
  Support devolvable widgets
https://bugs.webkit.org/show_bug.cgi?id=243899
rdar://134273374

Reviewed by Antti Koivisto and Abrar Rahman Protyasha.

CSS properties which should cause devolvable widgets to show a primitive appearance
instead of a native appearance now do so
(https://drafts.csswg.org/css-ui-4/#appearance-disabling-properties). Layout tests
which used these properties on devolvable widgets have been updated to account for
the new change in appearance. These changes are based on Vitaly Dyachkov's
(@obyknovenius) earlier proposal.

Test and test result changes:

LayoutTests/fast/forms/auto-fill-button/input-auto-filled-and-obscured.html:
The expected sets the background-color to match the autofill appearance,
but this causes primitive appearance now. The test has been updated to use
primitive appearance from the start to match the expected case.

LayoutTests/fast/forms/hidpi-textfield-background-bleeding.html: Removed.
LayoutTests/platform/mac/fast/forms/hidpi-textfield-background-bleeding-expected.html: Removed.

This test was originally added to detect regressions for a bug where
textfields with background-colors may show the color overflowing due to
AppKit behavior, but now platform/native appearance is disabled when
background color is set, so this issue is no longer possible.

LayoutTests/fast/forms/input-background-ua-media-query-expected.html:
LayoutTests/fast/forms/input-background-ua-media-query.html:

These tests ensure that an input with a parent who has a background color set
does not cause the input to use that background color. It does this by
comparing an input with a parent with a background color to an input
with background color explicitly set to white, which now causes devolution.
The test and the expected have been updated to explicitly use primitive appearance.

LayoutTests/imported/w3c/web-platform-tests/css/css-ui/compute-kind-widget-no-fallback-props-001.html:

This test has been upddated to include the longhands for background-position
in the list of styles that should cause primtive appearance  since getComputedStyles
doesn't return the shorthands.

LayoutTests/platform/ios/fast/forms/select-background-none-expected.txt:

Previously, 'background: none' caused the select element to display as
if it had 'appearance: none' on iOS. This is no longer the case; although
style 'background' causes native appearance to be disabled, we still want
to show the dropdown arrow unless 'appearance:none' is explicitly set.
This matches the behavior of Chrome and Firefox.

LayoutTests/platform/ios/fast/forms/select-style-expected.txt:
LayoutTests/platform/mac/fast/forms/select-style-expected.png:
LayoutTests/platform/mac/fast/forms/select-style-expected.txt:

These tests all check the appearances of select elements when they
are styled with background. Previously, background-image:none would
not cause devolution since it matched the user agent style, but since
this is an author level style and background-image causes devolution,
a primtive appearance is used.

* LayoutTests/TestExpectations:
* LayoutTests/fast/forms/auto-fill-button/input-auto-filled-and-obscured.html:
* LayoutTests/fast/forms/hidpi-textfield-background-bleeding-expected.html: Removed.
* LayoutTests/fast/forms/hidpi-textfield-background-bleeding.html: Removed.
* LayoutTests/fast/forms/input-background-ua-media-query-expected.html:
* LayoutTests/fast/forms/input-background-ua-media-query.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-ui/compute-kind-widget-no-fallback-props-001.html:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/ios/fast/forms/select-background-none-expected.txt:
* LayoutTests/platform/ios/fast/forms/select-style-expected.txt:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac/fast/forms/hidpi-textfield-background-bleeding-expected.html: Removed.
* LayoutTests/platform/mac/fast/forms/select-style-expected.png:
* LayoutTests/platform/mac/fast/forms/select-style-expected.txt:
* LayoutTests/platform/win/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSProperty.h:
* Source/WebCore/css/process-css-properties.py:
(StylePropertyCodeGenProperties):
(GenerateCSSPropertyNames):
* Source/WebCore/dom/Element.h:
(WebCore::Element::isDevolvableWidget const):
* Source/WebCore/html/HTMLButtonElement.h:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isDevolvableWidget const):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLMeterElement.h:
* Source/WebCore/html/HTMLProgressElement.h:
* Source/WebCore/html/HTMLSelectElement.h:
* Source/WebCore/html/HTMLTextAreaElement.h:
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::devolvableWidgetsEnabledAndSupported):
(WebCore::RenderTheme::adjustStyle):
* Source/WebCore/rendering/RenderTheme.h:
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::RenderStyle::nativeAppearanceDisabled const):
* Source/WebCore/rendering/style/RenderStyleSetters.h:
(WebCore::RenderStyle::setNativeAppearanceDisabled):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::setPropertyInternal):
* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyCustomPropertyImpl):
(WebCore::Style::Builder::applyCascadeProperty):
(WebCore::Style::Builder::applyRollbackCascadeProperty):
(WebCore::Style::Builder::applyProperty):
* Source/WebCore/style/StyleBuilder.h:
* Tools/Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONCSSPropertiesChecker.check_codegen_properties):

Canonical link: https://commits.webkit.org/287702@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