Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3e1e77d2baa093a43ae32ec53079b7e7aac4a41f
https://github.com/WebKit/WebKit/commit/3e1e77d2baa093a43ae32ec53079b7e7aac4a41f
Author: Elika Etemad <[email protected]>
Date: 2026-09-14 (Mon, 14 Sep 2026)
Changed paths:
A LayoutTests/fast/css/content-glyph-computed-style-expected.txt
A LayoutTests/fast/css/content-glyph-computed-style.html
A LayoutTests/fast/css/content-glyph-ua-only-expected.txt
A LayoutTests/fast/css/content-glyph-ua-only.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/border-rendering.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/checkmark-animation-002.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/focus-ring-rendering.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/picker-icon-animation-002.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-active.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-option.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-span.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-text.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-custom-button.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-dark-mode.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-default-button.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-disabled-option.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-disabled.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-font-inheriting.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-hover.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend-and-label.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-option-with-label.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-picker-select-border.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-switching-invalidation.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-writing-mode-vertical-lr-expected.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-writing-mode-vertical-lr.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-writing-mode-vertical-rl-expected.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-writing-mode-vertical-rl.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-base-appearance-computed-style-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-explicit-size.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-font-size.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-icon-color.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-open-invalidation.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-option-images.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-before-after.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-first-letter-first-line.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-highlight.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-selection.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-target-text.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-second-child-button.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-text-only.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/selectedcontent-color.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/update.css
M Source/WTF/wtf/unicode/CharacterNames.h
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/css/CSSValueKeywords.in
M Source/WebCore/css/html.css
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Content.cpp
M Source/WebCore/css/values/content/CSSContent.h
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
M Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp
A Source/WebCore/rendering/RenderGlyph.h
M Source/WebCore/rendering/RenderObject.h
M Source/WebCore/rendering/TextBoxPainter.cpp
M Source/WebCore/rendering/style/RenderStyleConstants.cpp
M Source/WebCore/rendering/style/RenderStyleConstants.h
M Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
M Source/WebCore/style/values/content/StyleContent.cpp
M Source/WebCore/style/values/content/StyleContent.h
M Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h
Log Message:
-----------
Use UA-drawn glyph for ::picker-icon to avoid negative margin hack
https://bugs.webkit.org/show_bug.cgi?id=322684
rdar://185952359
Reviewed by Alan Baradlay.
Our current UA stylesheet for ::picker-icon uses U+2335 COUNTERSINK and
adjusts its vertical position using a negative margin. This is super hacky
and not a good basis for a UA stylesheet.
The CSSWG agreed to adopt a new value for 'content' that would simply draw
the correct glyph (similar to 'list-style: square') rather than rendering
it as text, and use that for the ::picker-icon. This patch implements that
approach minimally, adding a UA stylesheet-only keyword which it then uses
in our UA stylesheet so that we can drop the negative margin. Future fixes
should generalize this as an author-facing feature, once the CSSWG adopts
an official name for it.
See
- https://github.com/w3c/csswg-drafts/issues/14317
- https://github.com/w3c/csswg-drafts/issues/14003
To handle reftest matching, this modifies update.css (which is managing
the difference between our implementation and the current upstream state)
to synthesize the new glyph shape with mask images.
* LayoutTests/fast/css/content-glyph-computed-style-expected.txt: Added.
* LayoutTests/fast/css/content-glyph-computed-style.html: Added.
* LayoutTests/fast/css/content-glyph-ua-only-expected.txt: Added.
* LayoutTests/fast/css/content-glyph-ua-only.html: Added.
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/border-rendering.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/checkmark-animation-002.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/focus-ring-rendering.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/picker-icon-animation-002.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-active.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-option.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-span.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-text.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-custom-button.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-dark-mode.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-default-button.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-disabled-option.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-disabled.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-font-inheriting.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-hover.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend-and-label.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-option-with-label.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-picker-select-border.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-switching-invalidation.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-writing-mode-vertical-lr-expected.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-writing-mode-vertical-lr.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-writing-mode-vertical-rl-expected.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-writing-mode-vertical-rl.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-base-appearance-computed-style-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-explicit-size.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-font-size.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-icon-color.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-open-invalidation.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-option-images.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-before-after.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-first-letter-first-line.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-highlight.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-selection.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-picker-pseudo-target-text.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-second-child-button.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-text-only.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/selectedcontent-color.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/update.css:
(select::picker-icon):
(.customizable-select-button::after):
(.customizable-select-button.vertical-rl::after):
(.customizable-select-button.vertical-lr::after):
(select::picker-icon,): Deleted.
* Source/WTF/wtf/unicode/CharacterNames.h:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::generatedContentAltText):
(WebCore::AccessibilityRenderObject::textUnderElement const):
(WebCore::AccessibilityRenderObject::computeIsIgnored const):
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/html.css:
(select::picker-icon):
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Content.cpp:
(WebCore::CSSPropertyParserHelpers::consumeUnresolvedContent):
* Source/WebCore/css/values/content/CSSContent.h:
(WebCore::CSS::ContentGlyph::switchOn const):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
* Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp:
(WebCore::LayoutIntegration::synthesizesGlyph):
(WebCore::LayoutIntegration::BoxTreeUpdater::createLayoutBox):
(WebCore::LayoutIntegration::BoxTreeUpdater::updateContent):
(WebCore::LayoutIntegration::markerTextSynthesizesGlyph): Deleted.
* Source/WebCore/rendering/RenderGlyph.h: Added.
* Source/WebCore/rendering/RenderObject.h:
(WebCore::RenderObject::isRenderGlyph const):
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::paintSynthesizedGlyph):
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::fallbackText):
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::createContentRenderer):
* Source/WebCore/style/values/content/StyleContent.cpp:
(WebCore::Style::ToCSS<Content::Data>::operator):
(WebCore::Style::ToStyle<CSS::Content::Data>::operator):
* Source/WebCore/style/values/content/StyleContent.h:
* Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h:
Canonical link: https://commits.webkit.org/321110@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications