Modified: trunk/LayoutTests/fast/css/apple-system-control-colors-expected.txt (232846 => 232847)
--- trunk/LayoutTests/fast/css/apple-system-control-colors-expected.txt 2018-06-14 18:04:34 UTC (rev 232846)
+++ trunk/LayoutTests/fast/css/apple-system-control-colors-expected.txt 2018-06-14 19:16:59 UTC (rev 232847)
@@ -2,9 +2,21 @@
-apple-system-text-background : rgb(255, 255, 255)
-apple-system-control-background : rgb(255, 255, 255)
-apple-system-alternate-selected-text : rgb(255, 255, 255)
+-apple-system-control-accent : rgb(0, 105, 217)
+-apple-system-even-alternating-content-background : rgb(255, 255, 255)
+-apple-system-odd-alternating-content-background : rgb(245, 245, 245)
+-apple-system-selected-content-background : rgb(0, 105, 217)
+-apple-system-unemphasized-selected-content-background : rgb(212, 212, 212)
+-apple-system-selected-text : rgb(0, 0, 0)
+-apple-system-unemphasized-selected-text : rgb(0, 0, 0)
+-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-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)
-apple-system-quaternary-label : rgba(0, 0, 0, 0.0980392)
-apple-system-grid : rgb(204, 204, 204)
+-apple-system-separator : rgb(204, 204, 204)
current-color with inherited -apple-system-label : rgba(0, 0, 0, 0.85098)
Modified: trunk/LayoutTests/fast/css/apple-system-control-colors.html (232846 => 232847)
--- trunk/LayoutTests/fast/css/apple-system-control-colors.html 2018-06-14 18:04:34 UTC (rev 232846)
+++ trunk/LayoutTests/fast/css/apple-system-control-colors.html 2018-06-14 19:16:59 UTC (rev 232847)
@@ -25,9 +25,21 @@
<div><span class="swatch" style="background-color: -apple-system-text-background"></span>-apple-system-text-background</div>
<div><span class="swatch" style="background-color: -apple-system-control-background"></span>-apple-system-control-background</div>
<div><span class="swatch" style="background-color: -apple-system-alternate-selected-text"></span>-apple-system-alternate-selected-text</div>
+<div><span class="swatch" style="background-color: -apple-system-control-accent"></span>-apple-system-control-accent</div>
+<div><span class="swatch" style="background-color: -apple-system-even-alternating-content-background"></span>-apple-system-even-alternating-content-background</div>
+<div><span class="swatch" style="background-color: -apple-system-odd-alternating-content-background"></span>-apple-system-odd-alternating-content-background</div>
+<div><span class="swatch" style="background-color: -apple-system-selected-content-background"></span>-apple-system-selected-content-background</div>
+<div><span class="swatch" style="background-color: -apple-system-unemphasized-selected-content-background"></span>-apple-system-unemphasized-selected-content-background</div>
+<div><span class="swatch" style="background-color: -apple-system-selected-text"></span>-apple-system-selected-text</div>
+<div><span class="swatch" style="background-color: -apple-system-unemphasized-selected-text"></span>-apple-system-unemphasized-selected-text</div>
+<div><span class="swatch" style="background-color: -apple-system-selected-text-background"></span>-apple-system-selected-text-background</div>
+<div><span class="swatch" style="background-color: -apple-system-unemphasized-selected-text-background"></span>-apple-system-unemphasized-selected-text-background</div>
+<div><span class="swatch" style="background-color: -apple-system-placeholder-text"></span>-apple-system-placeholder-text</div>
+<div><span class="swatch" style="background-color: -apple-system-find-highlight-background"></span>-apple-system-find-highlight-background</div>
<div><span class="swatch" style="background-color: -apple-system-label"></span>-apple-system-label</div>
<div><span class="swatch" style="background-color: -apple-system-secondary-label"></span>-apple-system-secondary-label</div>
<div><span class="swatch" style="background-color: -apple-system-tertiary-label"></span>-apple-system-tertiary-label</div>
<div><span class="swatch" style="background-color: -apple-system-quaternary-label"></span>-apple-system-quaternary-label</div>
<div><span class="swatch" style="background-color: -apple-system-grid"></span>-apple-system-grid</div>
+<div><span class="swatch" style="background-color: -apple-system-separator"></span>-apple-system-separator</div>
<div style="color: -apple-system-label"><span class="swatch" style="background-color: currentcolor;"></span>current-color with inherited -apple-system-label</div>
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/NSColorSPI.h (232846 => 232847)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/NSColorSPI.h 2018-06-14 18:04:34 UTC (rev 232846)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/NSColorSPI.h 2018-06-14 19:16:59 UTC (rev 232847)
@@ -42,6 +42,8 @@
+ (NSColor *)systemPurpleColor;
+ (NSColor *)systemGrayColor;
+ (NSColor *)linkColor;
++ (NSColor *)findHighlightColor;
++ (NSColor *)placeholderTextColor;
@end
#endif
Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (232846 => 232847)
--- trunk/Source/WebCore/css/CSSValueKeywords.in 2018-06-14 18:04:34 UTC (rev 232846)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in 2018-06-14 19:16:59 UTC (rev 232847)
@@ -226,11 +226,23 @@
-apple-system-text-background
-apple-system-control-background
-apple-system-alternate-selected-text
+-apple-system-control-accent
+-apple-system-even-alternating-content-background
+-apple-system-odd-alternating-content-background
+-apple-system-selected-content-background
+-apple-system-unemphasized-selected-content-background
+-apple-system-selected-text
+-apple-system-unemphasized-selected-text
+-apple-system-selected-text-background
+-apple-system-unemphasized-selected-text-background
+-apple-system-placeholder-text
+-apple-system-find-highlight-background
-apple-system-label
-apple-system-secondary-label
-apple-system-tertiary-label
-apple-system-quaternary-label
-apple-system-grid
+-apple-system-separator
-apple-wireless-playback-target-active
-apple-system-blue
-apple-system-brown
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (232846 => 232847)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2018-06-14 18:04:34 UTC (rev 232846)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2018-06-14 19:16:59 UTC (rev 232847)
@@ -574,6 +574,48 @@
return @selector(controlBackgroundColor);
case CSSValueAppleSystemAlternateSelectedText:
return @selector(alternateSelectedControlTextColor);
+ case CSSValueAppleSystemControlAccent:
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ return @selector(controlAccentColor);
+#else
+ return @selector(alternateSelectedControlColor);
+#endif
+ case CSSValueAppleSystemSelectedContentBackground:
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ return @selector(selectedContentBackgroundColor);
+#else
+ return @selector(alternateSelectedControlColor);
+#endif
+ case CSSValueAppleSystemUnemphasizedSelectedContentBackground:
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ return @selector(unemphasizedSelectedContentBackgroundColor);
+#else
+ return @selector(secondarySelectedControlColor);
+#endif
+ case CSSValueAppleSystemSelectedText:
+ return @selector(selectedTextColor);
+ case CSSValueAppleSystemUnemphasizedSelectedText:
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ return @selector(unemphasizedSelectedTextColor);
+#else
+ return @selector(textColor);
+#endif
+ case CSSValueAppleSystemSelectedTextBackground:
+ return @selector(selectedTextBackgroundColor);
+ case CSSValueAppleSystemUnemphasizedSelectedTextBackground:
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ return @selector(unemphasizedSelectedTextBackgroundColor);
+#else
+ return @selector(secondarySelectedControlColor);
+#endif
+ case CSSValueAppleSystemPlaceholderText:
+ return @selector(placeholderTextColor);
+ case CSSValueAppleSystemFindHighlightBackground:
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
+ return @selector(findHighlightColor);
+#else
+ return @selector(systemYellowColor);
+#endif
case CSSValueAppleSystemLabel:
return @selector(labelColor);
case CSSValueAppleSystemSecondaryLabel:
@@ -584,6 +626,12 @@
return @selector(quaternaryLabelColor);
case CSSValueAppleSystemGrid:
return @selector(gridColor);
+ case CSSValueAppleSystemSeparator:
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ return @selector(separatorColor);
+#else
+ return @selector(gridColor);
+#endif
case CSSValueAppleWirelessPlaybackTargetActive:
return @selector(systemBlueColor);
case CSSValueAppleSystemBlue:
@@ -618,19 +666,44 @@
case CSSValueActivebuttontext:
// No corresponding NSColor for this so we use a hard coded value.
return Color::white;
+
case CSSValueButtonface:
case CSSValueThreedface:
// We selected this value instead of [NSColor controlColor] to avoid website incompatibilities.
// We may want to consider changing to [NSColor controlColor] some day.
return 0xFFC0C0C0;
+
case CSSValueInfobackground:
// No corresponding NSColor for this so we use a hard coded value.
return 0xFFFBFCC5;
+
case CSSValueMenu:
return menuBackgroundColor();
+
+ case CSSValueAppleSystemEvenAlternatingContentBackground: {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ NSArray<NSColor *> *alternateColors = [NSColor alternatingContentBackgroundColors];
+#else
+ NSArray<NSColor *> *alternateColors = [NSColor controlAlternatingRowBackgroundColors];
+#endif
+ ASSERT(alternateColors.count >= 2);
+ return colorFromNSColor(alternateColors[0]);
+ }
+
+ case CSSValueAppleSystemOddAlternatingContentBackground: {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+ NSArray<NSColor *> *alternateColors = [NSColor alternatingContentBackgroundColors];
+#else
+ NSArray<NSColor *> *alternateColors = [NSColor controlAlternatingRowBackgroundColors];
+#endif
+ ASSERT(alternateColors.count >= 2);
+ return colorFromNSColor(alternateColors[1]);
+ }
+
case CSSValueBackground:
// Use platform-independent value returned by base class.
FALLTHROUGH;
+
default:
return RenderTheme::systemColor(cssValueID, options);
}