-
https://bugs.webkit.org/show_bug.cgi?id=42605bdakin@apple.com authored
radius path-based drawing code has some issues with corner-joins Reviewed by Dan Bernstein. GraphicsContext::clipConvexPolygon() now takes a boolean parameter indicating whether or not the clip should be antialiased. * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::clipConvexPolygon): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::clipConvexPolygon): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::clipConvexPolygon): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clipConvexPolygon): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clipConvexPolygon): * platform/graphics/wince/GraphicsContextWince.cpp: (WebCore::GraphicsContext::clipConvexPolygon): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::clipConvexPolygon): Compute 4 booleans determining if each edge is a "matching" edge of not. Send the two appropriate values to clipBorderSidePolygon() so we can decide there whether or not to antialias the clip based on matchy-ness. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBorder): If both edges are matching, don't antialias. If neither edge matches, never antialias. If one edge matches and one does not, apply two clips to get the appropriate antialiasing in each corner. (WebCore::RenderBoxModelObject::clipBorderSidePolygon): * rendering/RenderBoxModelObject.h: LayoutTests: Some of these layout tests are updated results from the fix for https://bugs.webkit.org/show_bug.cgi?id=42605 New border- radius path-based drawing code has some issues with corner-joins. The others have been in need of an update since https://bugs.webkit.org/show_bug.cgi?id=9197 , but since the differences were only detectable visually and with a pixel-text tolerance of 0 (not the default), they slipped under the rug until now. Reviewed by Dan Bernstein. New test: * fast/borders/different-color-borders.html: Added. * platform/mac/fast/borders/border-radius-circle-expected.checksum: * platform/mac/fast/borders/border-radius-circle-expected.png: * platform/mac/fast/borders/border-radius-constraints-expected.checksum: * platform/mac/fast/borders/border-radius-constraints-expected.png: * platform/mac/fast/borders/border-radius-groove-01-expected.checksum: * platform/mac/fast/borders/border-radius-groove-01-expected.png: * platform/mac/fast/borders/border-radius-groove-02-expected.checksum: * platform/mac/fast/borders/border-radius-groove-02-expected.png: * platform/mac/fast/borders/border-radius-groove-03-expected.checksum: * platform/mac/fast/borders/border-radius-groove-03-expected.png: * platform/mac/fast/borders/border-radius-huge-assert-expected.checksum: * platform/mac/fast/borders/border-radius-huge-assert-expected.png: * platform/mac/fast/borders/border-radius-wide-border-02-expected.checksum: * platform/mac/fast/borders/border-radius-wide-border-02-expected.png: * platform/mac/fast/borders/border-radius-wide-border-03-expected.checksum: * platform/mac/fast/borders/border-radius-wide-border-03-expected.png: * platform/mac/fast/borders/border-radius-wide-border-04-expected.checksum: * platform/mac/fast/borders/border-radius-wide-border-04-expected.png: * platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.checksum: * platform/mac/fast/borders/borderRadiusAllStylesAllCorners-expected.png: * platform/mac/fast/borders/borderRadiusArcs01-expected.checksum: * platform/mac/fast/borders/borderRadiusArcs01-expected.png: * platform/mac/fast/borders/borderRadiusDashed01-expected.checksum: * platform/mac/fast/borders/borderRadiusDashed01-expected.png: * platform/mac/fast/borders/borderRadiusDashed02-expected.checksum: * platform/mac/fast/borders/borderRadiusDashed02-expected.png: * platform/mac/fast/borders/borderRadiusDashed03-expected.checksum: * platform/mac/fast/borders/borderRadiusDashed03-expected.png: * platform/mac/fast/borders/borderRadiusDashed04-expected.checksum: * platform/mac/fast/borders/borderRadiusDashed04-expected.png: * platform/mac/fast/borders/borderRadiusDotted02-expected.checksum: * platform/mac/fast/borders/borderRadiusDotted02-expected.png: * platform/mac/fast/borders/borderRadiusDotted03-expected.checksum: * platform/mac/fast/borders/borderRadiusDotted03-expected.png: * platform/mac/fast/borders/borderRadiusDotted04-expected.checksum: * platform/mac/fast/borders/borderRadiusDotted04-expected.png: * platform/mac/fast/borders/borderRadiusDotted06-expected.checksum: * platform/mac/fast/borders/borderRadiusDotted06-expected.png: * platform/mac/fast/borders/borderRadiusDouble01-expected.checksum: * platform/mac/fast/borders/borderRadiusDouble01-expected.png: * platform/mac/fast/borders/borderRadiusDouble02-expected.checksum: * platform/mac/fast/borders/borderRadiusDouble02-expected.png: * platform/mac/fast/borders/borderRadiusDouble03-expected.checksum: * platform/mac/fast/borders/borderRadiusDouble03-expected.png: * platform/mac/fast/borders/borderRadiusDouble05-expected.checksum: * platform/mac/fast/borders/borderRadiusDouble05-expected.png: * platform/mac/fast/borders/borderRadiusDouble06-expected.checksum: * platform/mac/fast/borders/borderRadiusDouble06-expected.png: * platform/mac/fast/borders/borderRadiusDouble08-expected.checksum: * platform/mac/fast/borders/borderRadiusDouble08-expected.png: * platform/mac/fast/borders/borderRadiusGroove01-expected.checksum: * platform/mac/fast/borders/borderRadiusGroove01-expected.png: * platform/mac/fast/borders/borderRadiusGroove02-expected.checksum: * platform/mac/fast/borders/borderRadiusGroove02-expected.png: * platform/mac/fast/borders/borderRadiusInset01-expected.checksum: * platform/mac/fast/borders/borderRadiusInset01-expected.png: * platform/mac/fast/borders/borderRadiusInvalidColor-expected.checksum: * platform/mac/fast/borders/borderRadiusInvalidColor-expected.png: * platform/mac/fast/borders/borderRadiusOutset01-expected.checksum: * platform/mac/fast/borders/borderRadiusOutset01-expected.png: * platform/mac/fast/borders/borderRadiusRidge01-expected.checksum: * platform/mac/fast/borders/borderRadiusRidge01-expected.png: * platform/mac/fast/borders/borderRadiusSolid01-expected.checksum: * platform/mac/fast/borders/borderRadiusSolid01-expected.png: * platform/mac/fast/borders/borderRadiusSolid02-expected.checksum: * platform/mac/fast/borders/borderRadiusSolid02-expected.png: * platform/mac/fast/borders/borderRadiusSolid03-expected.checksum: * platform/mac/fast/borders/borderRadiusSolid03-expected.png: * platform/mac/fast/borders/borderRadiusSolid04-expected.checksum: * platform/mac/fast/borders/borderRadiusSolid04-expected.png: * platform/mac/fast/borders/different-color-borders-expected.checksum: Added. * platform/mac/fast/borders/different-color-borders-expected.png: Added. * platform/mac/fast/borders/different-color-borders-expected.txt: Added. * platform/mac/fast/borders/fieldsetBorderRadius-expected.checksum: * platform/mac/fast/borders/fieldsetBorderRadius-expected.png: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39eeba47