Find on page selection color isn't adapted for dark mode.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2018 21:48:45 +0000 (21:48 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2018 21:48:45 +0000 (21:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187072
Source/WebCore:

Unreviewed, revert part of r233280.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Use pure yellow again.

LayoutTests:

rdar://problem/40354841

Unreviewed test gardening.

* fast/css/apple-system-control-colors-expected.txt: Use pure yellow for find.
* fast/text/mark-matches-broken-line-rendering-expected.html:
* fast/text/mark-matches-rendering-expected.html:
Use -apple-system-find-highlight-background to work on all macOS versions.
* platform/mac-sierra/fast/css/apple-system-control-colors-expected.txt: Use pure yellow for find.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233329 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/css/apple-system-control-colors-expected.txt
LayoutTests/fast/text/mark-matches-broken-line-rendering-expected.html
LayoutTests/fast/text/mark-matches-rendering-expected.html
LayoutTests/platform/mac-sierra/fast/css/apple-system-control-colors-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderThemeMac.mm

index 3bf1efa..d885f6c 100644 (file)
@@ -1,3 +1,17 @@
+2018-06-28  Timothy Hatcher  <timothy@apple.com>
+
+        Find on page selection color isn't adapted for dark mode.
+        https://bugs.webkit.org/show_bug.cgi?id=187072
+        rdar://problem/40354841
+
+        Unreviewed test gardening.
+
+        * fast/css/apple-system-control-colors-expected.txt: Use pure yellow for find.
+        * fast/text/mark-matches-broken-line-rendering-expected.html:
+        * fast/text/mark-matches-rendering-expected.html:
+        Use -apple-system-find-highlight-background to work on all macOS versions.
+        * platform/mac-sierra/fast/css/apple-system-control-colors-expected.txt: Use pure yellow for find.
+
 2018-06-28  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Make imported/mozilla/css-animations/test_animation-starttime.html pass reliably
index 3bfcca2..bfdf270 100644 (file)
@@ -12,7 +12,7 @@
 -apple-system-selected-text-background : rgb(181, 213, 255)
 -apple-system-unemphasized-selected-text-background : rgb(212, 212, 212)
 -apple-system-placeholder-text : rgba(0, 0, 0, 0.247059)
--apple-system-find-highlight-background : rgb(255, 204, 0)
+-apple-system-find-highlight-background : rgb(255, 255, 0)
 -apple-system-label : rgba(0, 0, 0, 0.85098)
 -apple-system-secondary-label : rgba(0, 0, 0, 0.498039)
 -apple-system-tertiary-label : rgba(0, 0, 0, 0.247059)
index ab2a818..30d7cf4 100644 (file)
@@ -6,7 +6,7 @@ p {
 }
 
 span {
-    background-color: rgb(255, 204, 0);
+    background-color: -apple-system-find-highlight-background;
     color: -apple-system-label;
 }
 </style>
index 1051793..cdd7266 100644 (file)
@@ -1,3 +1,3 @@
-<p style="display: inline-block; background-color: rgb(255, 204, 0); color: -apple-system-label">
+<p style="display: inline-block; background-color: -apple-system-find-highlight-background; color: -apple-system-label">
 Quo usque tandem abutere, Catilina, patientia nostra?
 </p>
index 3bfcca2..bfdf270 100644 (file)
@@ -12,7 +12,7 @@
 -apple-system-selected-text-background : rgb(181, 213, 255)
 -apple-system-unemphasized-selected-text-background : rgb(212, 212, 212)
 -apple-system-placeholder-text : rgba(0, 0, 0, 0.247059)
--apple-system-find-highlight-background : rgb(255, 204, 0)
+-apple-system-find-highlight-background : rgb(255, 255, 0)
 -apple-system-label : rgba(0, 0, 0, 0.85098)
 -apple-system-secondary-label : rgba(0, 0, 0, 0.498039)
 -apple-system-tertiary-label : rgba(0, 0, 0, 0.247059)
index 1ad2b1f..3a39482 100644 (file)
@@ -1,3 +1,13 @@
+2018-06-28  Timothy Hatcher  <timothy@apple.com>
+
+        Find on page selection color isn't adapted for dark mode.
+        https://bugs.webkit.org/show_bug.cgi?id=187072
+
+        Unreviewed, revert part of r233280.
+
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Use pure yellow again.
+
 2018-06-28  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Make imported/mozilla/css-animations/test_animation-starttime.html pass reliably
index c2b8063..0e9c241 100644 (file)
@@ -398,7 +398,7 @@ Color RenderThemeMac::platformActiveTextSearchHighlightColor(OptionSet<StyleColo
     return colorFromNSColor([NSColor findHighlightColor]);
 #else
     UNUSED_PARAM(options);
-    return Color(255, 204, 0); // Yellow.
+    return Color(255, 255, 0); // Yellow.
 #endif
 }