Semantic colors should not be transformed by color-filter
[WebKit-https.git] / Source / WebCore / platform / graphics / filters / FilterOperations.cpp
index 0273ac2337459090f6e600e2f2c6cd9c8f6324ec..14c473a3835fc8187f680ff3d461410ae0471540 100644 (file)
@@ -124,6 +124,9 @@ bool FilterOperations::transformColor(Color& color) const
 {
     if (isEmpty() || !color.isValid())
         return false;
+    // Color filter does not apply to semantic CSS colors (like "Windowframe").
+    if (color.isSemantic())
+        return false;
 
     FloatComponents components;
     color.getRGBA(components.components[0], components.components[1], components.components[2], components.components[3]);