Title: [257050] trunk/Source/WebCore
- Revision
- 257050
- Author
- [email protected]
- Date
- 2020-02-20 02:40:31 -0800 (Thu, 20 Feb 2020)
Log Message
[WPE] Use custom colors for text and listbox selection
https://bugs.webkit.org/show_bug.cgi?id=207836
Reviewed by Adrian Perez de Castro.
* platform/wpe/RenderThemeWPE.cpp:
(WebCore::RenderThemeWPE::platformActiveSelectionBackgroundColor const):
(WebCore::RenderThemeWPE::platformInactiveSelectionBackgroundColor const):
(WebCore::RenderThemeWPE::platformActiveSelectionForegroundColor const):
(WebCore::RenderThemeWPE::platformInactiveSelectionForegroundColor const):
(WebCore::RenderThemeWPE::platformActiveListBoxSelectionBackgroundColor const):
(WebCore::RenderThemeWPE::platformInactiveListBoxSelectionBackgroundColor const):
(WebCore::RenderThemeWPE::platformActiveListBoxSelectionForegroundColor const):
(WebCore::RenderThemeWPE::platformInactiveListBoxSelectionForegroundColor const):
(WebCore::RenderThemeWPE::paintTextField):
* platform/wpe/RenderThemeWPE.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (257049 => 257050)
--- trunk/Source/WebCore/ChangeLog 2020-02-20 10:32:04 UTC (rev 257049)
+++ trunk/Source/WebCore/ChangeLog 2020-02-20 10:40:31 UTC (rev 257050)
@@ -1,5 +1,24 @@
2020-02-20 Carlos Garcia Campos <[email protected]>
+ [WPE] Use custom colors for text and listbox selection
+ https://bugs.webkit.org/show_bug.cgi?id=207836
+
+ Reviewed by Adrian Perez de Castro.
+
+ * platform/wpe/RenderThemeWPE.cpp:
+ (WebCore::RenderThemeWPE::platformActiveSelectionBackgroundColor const):
+ (WebCore::RenderThemeWPE::platformInactiveSelectionBackgroundColor const):
+ (WebCore::RenderThemeWPE::platformActiveSelectionForegroundColor const):
+ (WebCore::RenderThemeWPE::platformInactiveSelectionForegroundColor const):
+ (WebCore::RenderThemeWPE::platformActiveListBoxSelectionBackgroundColor const):
+ (WebCore::RenderThemeWPE::platformInactiveListBoxSelectionBackgroundColor const):
+ (WebCore::RenderThemeWPE::platformActiveListBoxSelectionForegroundColor const):
+ (WebCore::RenderThemeWPE::platformInactiveListBoxSelectionForegroundColor const):
+ (WebCore::RenderThemeWPE::paintTextField):
+ * platform/wpe/RenderThemeWPE.h:
+
+2020-02-20 Carlos Garcia Campos <[email protected]>
+
[WPE] Use the theme to render the focus ring
https://bugs.webkit.org/show_bug.cgi?id=207758
Modified: trunk/Source/WebCore/platform/wpe/RenderThemeWPE.cpp (257049 => 257050)
--- trunk/Source/WebCore/platform/wpe/RenderThemeWPE.cpp 2020-02-20 10:32:04 UTC (rev 257049)
+++ trunk/Source/WebCore/platform/wpe/RenderThemeWPE.cpp 2020-02-20 10:40:31 UTC (rev 257050)
@@ -45,7 +45,6 @@
static const int textFieldBorderSize = 1;
static const Color textFieldBorderColor = makeRGB(205, 199, 194);
-static const Color textFieldBorderActiveColor = makeRGB(52, 132, 228);
static const Color textFieldBorderDisabledColor = makeRGB(213, 208, 204);
static const Color textFieldBackgroundColor = makeRGB(255, 255, 255);
static const Color textFieldBackgroundDisabledColor = makeRGB(252, 252, 252);
@@ -108,6 +107,46 @@
return ThemeWPE::focusColor();
}
+Color RenderThemeWPE::platformActiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const
+{
+ return makeRGB(52, 132, 228);
+}
+
+Color RenderThemeWPE::platformInactiveSelectionBackgroundColor(OptionSet<StyleColor::Options> options) const
+{
+ return platformActiveSelectionBackgroundColor(options);
+}
+
+Color RenderThemeWPE::platformActiveSelectionForegroundColor(OptionSet<StyleColor::Options>) const
+{
+ return makeRGB(255, 255, 255);
+}
+
+Color RenderThemeWPE::platformInactiveSelectionForegroundColor(OptionSet<StyleColor::Options>) const
+{
+ return makeRGB(252, 252, 252);
+}
+
+Color RenderThemeWPE::platformActiveListBoxSelectionBackgroundColor(OptionSet<StyleColor::Options> options) const
+{
+ return platformActiveSelectionBackgroundColor(options);
+}
+
+Color RenderThemeWPE::platformInactiveListBoxSelectionBackgroundColor(OptionSet<StyleColor::Options> options) const
+{
+ return platformInactiveSelectionBackgroundColor(options);
+}
+
+Color RenderThemeWPE::platformActiveListBoxSelectionForegroundColor(OptionSet<StyleColor::Options> options) const
+{
+ return platformActiveSelectionForegroundColor(options);
+}
+
+Color RenderThemeWPE::platformInactiveListBoxSelectionForegroundColor(OptionSet<StyleColor::Options> options) const
+{
+ return platformInactiveSelectionForegroundColor(options);
+}
+
String RenderThemeWPE::extraDefaultStyleSheet()
{
return String(themeAdwaitaUserAgentStyleSheet, sizeof(themeAdwaitaUserAgentStyleSheet));
@@ -147,7 +186,7 @@
if (!isEnabled(renderObject) || isReadOnlyControl(renderObject))
graphicsContext.setFillColor(textFieldBorderDisabledColor);
else if (isFocused(renderObject))
- graphicsContext.setFillColor(textFieldBorderActiveColor);
+ graphicsContext.setFillColor(activeSelectionBackgroundColor({ }));
else
graphicsContext.setFillColor(textFieldBorderColor);
graphicsContext.fillPath(path);
Modified: trunk/Source/WebCore/platform/wpe/RenderThemeWPE.h (257049 => 257050)
--- trunk/Source/WebCore/platform/wpe/RenderThemeWPE.h 2020-02-20 10:32:04 UTC (rev 257049)
+++ trunk/Source/WebCore/platform/wpe/RenderThemeWPE.h 2020-02-20 10:40:31 UTC (rev 257050)
@@ -47,8 +47,19 @@
bool supportsFocusRing(const RenderStyle&) const override;
void updateCachedSystemFontDescription(CSSValueID, FontCascadeDescription&) const override;
+
Color platformFocusRingColor(OptionSet<StyleColor::Options>) const override;
+ Color platformActiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const override;
+ Color platformInactiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const override;
+ Color platformActiveSelectionForegroundColor(OptionSet<StyleColor::Options>) const override;
+ Color platformInactiveSelectionForegroundColor(OptionSet<StyleColor::Options>) const override;
+
+ Color platformActiveListBoxSelectionBackgroundColor(OptionSet<StyleColor::Options>) const override;
+ Color platformActiveListBoxSelectionForegroundColor(OptionSet<StyleColor::Options>) const override;
+ Color platformInactiveListBoxSelectionBackgroundColor(OptionSet<StyleColor::Options>) const override;
+ Color platformInactiveListBoxSelectionForegroundColor(OptionSet<StyleColor::Options>) const override;
+
bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override;
bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) override;
bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes