Changeset 237262 in webkit
- Timestamp:
- Oct 18, 2018 1:02:49 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r237261 r237262 1 2018-10-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [GTK] fast/css/pseudo-visited-background-color-on-input.html is failing since r237425 4 https://bugs.webkit.org/show_bug.cgi?id=190712 5 6 Reviewed by Tim Horton. 7 8 Ensure that color inputs are enabled by default on GTK, and that color inputs have a `-webkit-appearance` of 9 `color-well` by default. Fixes fast/css/pseudo-visited-background-color-on-input.html on GTK. 10 11 * page/RuntimeEnabledFeatures.cpp: 12 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): 13 * rendering/RenderTheme.cpp: 14 (WebCore::RenderTheme::colorInputStyleSheet const): 15 * rendering/RenderTheme.h: 16 (WebCore::RenderTheme::platformUsesColorWellAppearance const): 17 (WebCore::RenderTheme::platformColorInputStyleSheet const): Deleted. 18 19 Replace this with a platform hook that determines whether we want to use `-webkit-appearance: color-well;` by 20 default for inputs of type color. For now, only iOS overrides this to return false; in the future, we should 21 support `-webkit-appearance: color-well;` on iOS, and remove this platform hook entirely. 22 23 * rendering/RenderThemeIOS.h: 24 * rendering/RenderThemeMac.h: 25 * rendering/RenderThemeMac.mm: 26 (WebCore::RenderThemeMac::platformColorInputStyleSheet const): Deleted. 27 1 28 2018-10-18 Youenn Fablet <youenn@apple.com> 2 29 -
trunk/Source/WebCore/page/RuntimeEnabledFeatures.cpp
r233119 r237262 47 47 m_isWebSocketEnabled = false; 48 48 #endif 49 #if PLATFORM(GTK) && ENABLE(INPUT_TYPE_COLOR) 50 m_isInputTypeColorEnabled = true; 51 #endif 49 52 } 50 53 -
trunk/Source/WebCore/rendering/RenderTheme.cpp
r237245 r237262 1040 1040 { 1041 1041 ASSERT(RuntimeEnabledFeatures::sharedFeatures().inputTypeColorEnabled()); 1042 return makeString(platformColorInputStyleSheet(), " input[type=\"color\"] { width: 44px; height: 23px; outline: none; }"_s); 1042 auto colorWellAppearanceStyle = emptyString(); 1043 if (platformUsesColorWellAppearance()) 1044 colorWellAppearanceStyle = "-webkit-appearance: color-well; "_s; 1045 return makeString("input[type=\"color\"] { "_s, WTFMove(colorWellAppearanceStyle), "width: 44px; height: 23px; outline: none; }"_s); 1043 1046 } 1044 1047 -
trunk/Source/WebCore/rendering/RenderTheme.h
r237245 r237262 351 351 352 352 #if ENABLE(INPUT_TYPE_COLOR) 353 virtual String platformColorInputStyleSheet() const { return { }; }353 virtual bool platformUsesColorWellAppearance() const { return true; } 354 354 #endif 355 355 -
trunk/Source/WebCore/rendering/RenderThemeIOS.h
r235380 r237262 146 146 #endif 147 147 148 #if ENABLE(INPUT_TYPE_COLOR) 149 bool platformUsesColorWellAppearance() const final 150 { 151 // FIXME: Support -webkit-appearance: color-well; for drawing color inputs on iOS. 152 return false; 153 } 154 #endif 155 148 156 const Color& shadowColor() const; 149 157 FloatRect addRoundedBorderClip(const RenderObject& box, GraphicsContext&, const IntRect&); -
trunk/Source/WebCore/rendering/RenderThemeMac.h
r237245 r237262 120 120 #endif 121 121 122 #if ENABLE(INPUT_TYPE_COLOR)123 String platformColorInputStyleSheet() const final;124 #endif125 126 122 bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) final; 127 123 void adjustTextFieldStyle(StyleResolver&, RenderStyle&, const Element*) const final; -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r237245 r237262 339 339 340 340 RenderTheme::purgeCaches(); 341 }342 343 String RenderThemeMac::platformColorInputStyleSheet() const344 {345 return "input[type=\"color\"] { -webkit-appearance: color-well; }"_s;346 341 } 347 342
Note: See TracChangeset
for help on using the changeset viewer.