The formula used to compute sepia in the CIFilter is very different from that in the CSS filters spec, so it needs to change to use a Color Matrix filter to get the formula right.
<rdar://problem/10621337>
Created attachment 121930 [details] Patch
Comment on attachment 121930 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=121930&action=review > Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm:706 > +static double interp(double from, double to, double t) > +{ > + return from * (1 - t) + to * t; > +} This is what WebCore::blend() is for. > Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm:761 > + if (t < 0) > + t = 0; > + else if (t > 1) > + t = 1; Use std::min/max? > Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm:765 > + [caFilter setValue:[CIVector vectorWithX:interp(1, 0.393, t) Y:interp(0, 0.769, t) Z:interp(0, 0.189, t) W:0] forKey:@"inputRVector"]; > + [caFilter setValue:[CIVector vectorWithX:interp(0, 0.349, t) Y:interp(1, 0.686, t) Z:interp(0, 0.168, t) W:0] forKey:@"inputGVector"]; > + [caFilter setValue:[CIVector vectorWithX:interp(0, 0.272, t) Y:interp(0, 0.534, t) Z:interp(1, 0.131, t) W:0] forKey:@"inputBVector"]; Is there a canonical reference for those numeric values? > LayoutTests/ChangeLog:8 > + Updated hw sepia tone results to match changes. Updated sw results because hw -> hardware, or more specifically "Core Image filter on Core Animation layer"
Committed r104652: <http://trac.webkit.org/changeset/104652>