Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] Paint <datalist> indicator in RenderTheme
https://bugs.webkit.org/show_bug.cgi?id=231755 rdar://84261604 Reviewed by Tim Horton. Source/WebCore: Currently, the <datalist> indicator is painted using the 'content' property and an SVG image. With the existing implementation, it is not possible to tint the indicator, when an accent-color is supplied. To support control tinting, and better align with the way other native controls are painted, move the painting into RenderTheme. Covered by existing tests. * css/html.css: (input::-webkit-list-button): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): * rendering/RenderTheme.h: (WebCore::RenderTheme::paintListButton): * rendering/RenderThemeIOS.h: * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::isControlStyled const): Do not draw the native indicator if the style has content or the content has explicitly been set to none. This ensures we maintain compatibility for pages that still use 'content' to customize the indicator. (WebCore::RenderThemeIOS::paintListButton): Draw the indicator. The path is taken directly from the SVG. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: Add setHasExplicitlyClearedContent / hasExplicitlyClearedContent to detect whether the author has explicitly cleared content, in which case we do not paint the native indicator. (WebCore::RenderStyle::setHasExplicitlyClearedContent): (WebCore::RenderStyle::hasExplicitlyClearedContent const): (WebCore::RenderStyle::NonInheritedFlags::operator== const): * style/StyleBuilderCustom.h: (WebCore::Style::BuilderCustom::applyInitialContent): (WebCore::Style::BuilderCustom::applyValueContent): * style/StyleResolver.cpp: (WebCore::Style::elementTypeHasAppearanceFromUAStyle): Add the datalist button to the list of element types that have appearance from UA style, so that we can determine whether or not to drop native appearance. LayoutTests: Rebaseline tests. * platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt: * platform/ios-simulator/fast/forms/datalist/datalist-textinput-appearance-expected.txt: Canonical link: https://commits.webkit.org/243034@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
13 changed files
with
138 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters