Skip to content
Permalink
Browse files
[css-ui] Unexpose remaining media-* appearance values
https://bugs.webkit.org/show_bug.cgi?id=240484
<rdar://93376288>

Reviewed by Aditya Keerthi.

These are made UA sheet-only (since they're used in the mediaControls*.css sheets):
- media-fullscreen-volume-slider
- media-slider
- media-volume-slider

These are made internal (only used from C++ code):
- media-fullscreen-volume-slider-thumb
- media-sliderthumb
- media-volume-sliderthumb

Test: imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001.html

* LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
* Source/WebCore/css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
* Source/WebCore/html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::resolveCustomStyle):
(WebCore::SliderContainerElement::resolveCustomStyle):
* Source/WebCore/platform/ThemeTypes.h:
* Source/WebInspectorUI/UserInterface/External/CSSDocumentation/CSSDocumentation-overrides.json:
* Source/WebInspectorUI/UserInterface/External/CSSDocumentation/CSSDocumentation.js:

Canonical link: https://commits.webkit.org/250886@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
nt1m committed May 23, 2022
1 parent 2f21e0a commit 77744bf6cd05ec28155c6d42704fba308d5585a0
Showing 10 changed files with 35 additions and 53 deletions.
@@ -47,23 +47,23 @@ PASS -webkit-appearance: media-controls-light-bar-background (invalid)
PASS -webkit-appearance: media-current-time-display (invalid)
PASS -webkit-appearance: media-enter-fullscreen-button (invalid)
PASS -webkit-appearance: media-exit-fullscreen-button (invalid)
FAIL -webkit-appearance: media-fullscreen-volume-slider (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-fullscreen-volume-slider"
FAIL -webkit-appearance: media-fullscreen-volume-slider-thumb (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-fullscreen-volume-slider-thumb"
PASS -webkit-appearance: media-fullscreen-volume-slider (invalid)
PASS -webkit-appearance: media-fullscreen-volume-slider-thumb (invalid)
PASS -webkit-appearance: media-mute-button (invalid)
PASS -webkit-appearance: media-overlay-play-button (invalid)
PASS -webkit-appearance: media-play-button (invalid)
PASS -webkit-appearance: media-return-to-realtime-button (invalid)
PASS -webkit-appearance: media-rewind-button (invalid)
PASS -webkit-appearance: media-seek-back-button (invalid)
PASS -webkit-appearance: media-seek-forward-button (invalid)
FAIL -webkit-appearance: media-slider (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-slider"
FAIL -webkit-appearance: media-sliderthumb (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-sliderthumb"
PASS -webkit-appearance: media-slider (invalid)
PASS -webkit-appearance: media-sliderthumb (invalid)
PASS -webkit-appearance: media-time-remaining-display (invalid)
PASS -webkit-appearance: media-toggle-closed-captions-button (invalid)
FAIL -webkit-appearance: media-volume-slider (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-volume-slider"
PASS -webkit-appearance: media-volume-slider (invalid)
PASS -webkit-appearance: media-volume-slider-container (invalid)
PASS -webkit-appearance: media-volume-slider-mute-button (invalid)
FAIL -webkit-appearance: media-volume-sliderthumb (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-volume-sliderthumb"
PASS -webkit-appearance: media-volume-sliderthumb (invalid)
PASS -webkit-appearance: menuarrow (invalid)
PASS -webkit-appearance: menubar (invalid)
PASS -webkit-appearance: menucheckbox (invalid)
@@ -210,23 +210,23 @@ PASS appearance: media-controls-light-bar-background (invalid)
PASS appearance: media-current-time-display (invalid)
PASS appearance: media-enter-fullscreen-button (invalid)
PASS appearance: media-exit-fullscreen-button (invalid)
FAIL appearance: media-fullscreen-volume-slider (invalid) assert_equals: style.appearance expected "" but got "media-fullscreen-volume-slider"
FAIL appearance: media-fullscreen-volume-slider-thumb (invalid) assert_equals: style.appearance expected "" but got "media-fullscreen-volume-slider-thumb"
PASS appearance: media-fullscreen-volume-slider (invalid)
PASS appearance: media-fullscreen-volume-slider-thumb (invalid)
PASS appearance: media-mute-button (invalid)
PASS appearance: media-overlay-play-button (invalid)
PASS appearance: media-play-button (invalid)
PASS appearance: media-return-to-realtime-button (invalid)
PASS appearance: media-rewind-button (invalid)
PASS appearance: media-seek-back-button (invalid)
PASS appearance: media-seek-forward-button (invalid)
FAIL appearance: media-slider (invalid) assert_equals: style.appearance expected "" but got "media-slider"
FAIL appearance: media-sliderthumb (invalid) assert_equals: style.appearance expected "" but got "media-sliderthumb"
PASS appearance: media-slider (invalid)
PASS appearance: media-sliderthumb (invalid)
PASS appearance: media-time-remaining-display (invalid)
PASS appearance: media-toggle-closed-captions-button (invalid)
FAIL appearance: media-volume-slider (invalid) assert_equals: style.appearance expected "" but got "media-volume-slider"
PASS appearance: media-volume-slider (invalid)
PASS appearance: media-volume-slider-container (invalid)
PASS appearance: media-volume-slider-mute-button (invalid)
FAIL appearance: media-volume-sliderthumb (invalid) assert_equals: style.appearance expected "" but got "media-volume-sliderthumb"
PASS appearance: media-volume-sliderthumb (invalid)
PASS appearance: menuarrow (invalid)
PASS appearance: menubar (invalid)
PASS appearance: menucheckbox (invalid)
@@ -47,23 +47,23 @@ PASS -webkit-appearance: media-controls-light-bar-background (invalid)
PASS -webkit-appearance: media-current-time-display (invalid)
PASS -webkit-appearance: media-enter-fullscreen-button (invalid)
PASS -webkit-appearance: media-exit-fullscreen-button (invalid)
FAIL -webkit-appearance: media-fullscreen-volume-slider (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-fullscreen-volume-slider"
FAIL -webkit-appearance: media-fullscreen-volume-slider-thumb (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-fullscreen-volume-slider-thumb"
PASS -webkit-appearance: media-fullscreen-volume-slider (invalid)
PASS -webkit-appearance: media-fullscreen-volume-slider-thumb (invalid)
PASS -webkit-appearance: media-mute-button (invalid)
PASS -webkit-appearance: media-overlay-play-button (invalid)
PASS -webkit-appearance: media-play-button (invalid)
PASS -webkit-appearance: media-return-to-realtime-button (invalid)
PASS -webkit-appearance: media-rewind-button (invalid)
PASS -webkit-appearance: media-seek-back-button (invalid)
PASS -webkit-appearance: media-seek-forward-button (invalid)
FAIL -webkit-appearance: media-slider (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-slider"
FAIL -webkit-appearance: media-sliderthumb (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-sliderthumb"
PASS -webkit-appearance: media-slider (invalid)
PASS -webkit-appearance: media-sliderthumb (invalid)
PASS -webkit-appearance: media-time-remaining-display (invalid)
PASS -webkit-appearance: media-toggle-closed-captions-button (invalid)
FAIL -webkit-appearance: media-volume-slider (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-volume-slider"
PASS -webkit-appearance: media-volume-slider (invalid)
PASS -webkit-appearance: media-volume-slider-container (invalid)
PASS -webkit-appearance: media-volume-slider-mute-button (invalid)
FAIL -webkit-appearance: media-volume-sliderthumb (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-volume-sliderthumb"
PASS -webkit-appearance: media-volume-sliderthumb (invalid)
PASS -webkit-appearance: menuarrow (invalid)
PASS -webkit-appearance: menubar (invalid)
PASS -webkit-appearance: menucheckbox (invalid)
@@ -210,23 +210,23 @@ PASS appearance: media-controls-light-bar-background (invalid)
PASS appearance: media-current-time-display (invalid)
PASS appearance: media-enter-fullscreen-button (invalid)
PASS appearance: media-exit-fullscreen-button (invalid)
FAIL appearance: media-fullscreen-volume-slider (invalid) assert_equals: style.appearance expected "" but got "media-fullscreen-volume-slider"
FAIL appearance: media-fullscreen-volume-slider-thumb (invalid) assert_equals: style.appearance expected "" but got "media-fullscreen-volume-slider-thumb"
PASS appearance: media-fullscreen-volume-slider (invalid)
PASS appearance: media-fullscreen-volume-slider-thumb (invalid)
PASS appearance: media-mute-button (invalid)
PASS appearance: media-overlay-play-button (invalid)
PASS appearance: media-play-button (invalid)
PASS appearance: media-return-to-realtime-button (invalid)
PASS appearance: media-rewind-button (invalid)
PASS appearance: media-seek-back-button (invalid)
PASS appearance: media-seek-forward-button (invalid)
FAIL appearance: media-slider (invalid) assert_equals: style.appearance expected "" but got "media-slider"
FAIL appearance: media-sliderthumb (invalid) assert_equals: style.appearance expected "" but got "media-sliderthumb"
PASS appearance: media-slider (invalid)
PASS appearance: media-sliderthumb (invalid)
PASS appearance: media-time-remaining-display (invalid)
PASS appearance: media-toggle-closed-captions-button (invalid)
FAIL appearance: media-volume-slider (invalid) assert_equals: style.appearance expected "" but got "media-volume-slider"
PASS appearance: media-volume-slider (invalid)
PASS appearance: media-volume-slider-container (invalid)
PASS appearance: media-volume-slider-mute-button (invalid)
FAIL appearance: media-volume-sliderthumb (invalid) assert_equals: style.appearance expected "" but got "media-volume-sliderthumb"
PASS appearance: media-volume-sliderthumb (invalid)
PASS appearance: menuarrow (invalid)
PASS appearance: menubar (invalid)
PASS appearance: menucheckbox (invalid)
@@ -475,21 +475,12 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e)
case MediaSliderPart:
m_value.valueID = CSSValueMediaSlider;
break;
case MediaSliderThumbPart:
m_value.valueID = CSSValueMediaSliderthumb;
break;
case MediaVolumeSliderPart:
m_value.valueID = CSSValueMediaVolumeSlider;
break;
case MediaVolumeSliderThumbPart:
m_value.valueID = CSSValueMediaVolumeSliderthumb;
break;
case MediaFullScreenVolumeSliderPart:
m_value.valueID = CSSValueMediaFullscreenVolumeSlider;
break;
case MediaFullScreenVolumeSliderThumbPart:
m_value.valueID = CSSValueMediaFullscreenVolumeSliderThumb;
break;
case MenulistPart:
m_value.valueID = CSSValueMenulist;
break;
@@ -553,6 +544,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e)
#if ENABLE(DATALIST_ELEMENT)
case ListButtonPart:
#endif
case MediaFullScreenVolumeSliderThumbPart:
case MediaSliderThumbPart:
case MediaVolumeSliderThumbPart:
case SearchFieldDecorationPart:
case SearchFieldResultsDecorationPart:
case SearchFieldResultsButtonPart:
@@ -5165,12 +5165,6 @@
"square-button",
"button",
"listbox",
"media-fullscreen-volume-slider",
"media-fullscreen-volume-slider-thumb",
"media-slider",
"media-sliderthumb",
"media-volume-slider",
"media-volume-sliderthumb",
"menulist",
"menulist-button",
"meter",
@@ -842,11 +842,8 @@ button
default-button
listbox
media-fullscreen-volume-slider
media-fullscreen-volume-slider-thumb
media-slider
media-sliderthumb
media-volume-slider
media-volume-sliderthumb
menulist
menulist-button
meter
@@ -751,6 +751,9 @@ bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId
case CSSPropertyVisibility: // visible | hidden | collapse
return valueID == CSSValueVisible || valueID == CSSValueHidden || valueID == CSSValueCollapse;
case CSSPropertyAppearance: {
if (valueID == CSSValueMediaSlider || valueID == CSSValueMediaVolumeSlider || valueID == CSSValueMediaFullscreenVolumeSlider)
return isUASheetBehavior(context.mode);

if (valueID == CSSValueDefaultButton)
return context.useSystemAppearance;

@@ -595,11 +595,8 @@ std::optional<Style::ElementStyle> SliderThumbElement::resolveCustomStyle(const

switch (hostStyle->effectiveAppearance()) {
case MediaSliderPart:
case MediaSliderThumbPart:
case MediaVolumeSliderPart:
case MediaVolumeSliderThumbPart:
case MediaFullScreenVolumeSliderPart:
case MediaFullScreenVolumeSliderThumbPart:
m_shadowPseudoId = ShadowPseudoIds::webkitMediaSliderThumb();
break;
default:
@@ -646,11 +643,8 @@ std::optional<Style::ElementStyle> SliderContainerElement::resolveCustomStyle(co

switch (hostStyle->effectiveAppearance()) {
case MediaSliderPart:
case MediaSliderThumbPart:
case MediaVolumeSliderPart:
case MediaVolumeSliderThumbPart:
case MediaFullScreenVolumeSliderPart:
case MediaFullScreenVolumeSliderThumbPart:
m_shadowPseudoId = ShadowPseudoIds::webkitMediaSliderContainer();
break;
default:
@@ -43,11 +43,8 @@ enum ControlPart {
DefaultButtonPart,
ListboxPart,
MediaFullScreenVolumeSliderPart,
MediaFullScreenVolumeSliderThumbPart,
MediaSliderPart,
MediaSliderThumbPart,
MediaVolumeSliderPart,
MediaVolumeSliderThumbPart,
MenulistPart,
MenulistButtonPart,
MeterPart,
@@ -80,6 +77,9 @@ enum ControlPart {
#if ENABLE(DATALIST_ELEMENT)
ListButtonPart,
#endif
MediaFullScreenVolumeSliderThumbPart,
MediaSliderThumbPart,
MediaVolumeSliderThumbPart,
SearchFieldDecorationPart,
SearchFieldResultsDecorationPart,
SearchFieldResultsButtonPart,
@@ -4,6 +4,6 @@
},
"-webkit-appearance": {
"description": "Changes the appearance of buttons and other controls to resemble native controls.",
"syntax": "none | button | checkbox | listbox | media-slider | media-sliderthumb | media-volume-slider | media-volume-sliderthumb | menulist | menulist-button | meter | progress-bar | push-button | radio | searchfield | slider-horizontal | slider-vertical | square-button | textarea | textfield | -apple-pay-button"
"syntax": "none | button | checkbox | listbox | menulist | menulist-button | meter | progress-bar | push-button | radio | searchfield | slider-horizontal | slider-vertical | square-button | textarea | textfield | -apple-pay-button"
}
}
@@ -29,7 +29,7 @@ CSSDocumentation = {
},
"-webkit-appearance": {
"description": "Changes the appearance of buttons and other controls to resemble native controls.",
"syntax": "none | button | checkbox | listbox | media-slider | media-sliderthumb | media-volume-slider | media-volume-sliderthumb | menulist | menulist-button | meter | progress-bar | push-button | radio | searchfield | slider-horizontal | slider-vertical | square-button | textarea | textfield | -apple-pay-button"
"syntax": "none | button | checkbox | listbox | menulist | menulist-button | meter | progress-bar | push-button | radio | searchfield | slider-horizontal | slider-vertical | square-button | textarea | textfield | -apple-pay-button"
},
"-webkit-backdrop-filter": {
"description": "Applies a filter effect where the first filter in the list takes the element's background image as the input image."

0 comments on commit 77744bf

Please sign in to comment.