Semantic colors should not be transformed by color-filter
[WebKit-https.git] / Source / WebCore / rendering / RenderThemeMac.mm
index 1e334a1b5061c9dc76544d5242d5a58629e92dfd..0c881c50f714d01fcf54d98ce78f6d942baf76af 100644 (file)
@@ -505,7 +505,7 @@ Color RenderThemeMac::systemColor(CSSValueID cssValueID, OptionSet<StyleColor::O
         // Only use NSColor when the system appearance is desired, otherwise use RenderTheme's default.
         if (useSystemAppearance) {
             if (!m_systemVisitedLinkColor.isValid())
-                m_systemVisitedLinkColor = colorFromNSColor([NSColor systemPurpleColor]);
+                m_systemVisitedLinkColor = semanticColorFromNSColor([NSColor systemPurpleColor]);
             return m_systemVisitedLinkColor;
         }
 
@@ -667,7 +667,7 @@ Color RenderThemeMac::systemColor(CSSValueID cssValueID, OptionSet<StyleColor::O
 
         if (auto selector = selectCocoaColor()) {
             if (auto color = wtfObjcMsgSend<NSColor *>([NSColor class], selector))
-                return colorFromNSColor(color);
+                return semanticColorFromNSColor(color);
         }
 
         switch (cssValueID) {
@@ -695,7 +695,7 @@ Color RenderThemeMac::systemColor(CSSValueID cssValueID, OptionSet<StyleColor::O
             NSArray<NSColor *> *alternateColors = [NSColor controlAlternatingRowBackgroundColors];
 #endif
             ASSERT(alternateColors.count >= 2);
-            return colorFromNSColor(alternateColors[0]);
+            return semanticColorFromNSColor(alternateColors[0]);
         }
 
         case CSSValueAppleSystemOddAlternatingContentBackground: {
@@ -705,7 +705,7 @@ Color RenderThemeMac::systemColor(CSSValueID cssValueID, OptionSet<StyleColor::O
             NSArray<NSColor *> *alternateColors = [NSColor controlAlternatingRowBackgroundColors];
 #endif
             ASSERT(alternateColors.count >= 2);
-            return colorFromNSColor(alternateColors[1]);
+            return semanticColorFromNSColor(alternateColors[1]);
         }
 
         case CSSValueBackground: