haikuwebkit/LayoutTests/transitions/clip-path-path-transitions-...

6 lines
543 B
Plaintext
Raw Permalink Normal View History

PASS - "-webkit-clip-path" property for "path1" element at 1s saw something close to: path("M 80 40 l 20 0 l 0 60 l 20 0 l 0 -20 l -50 0 l 0 -20 l 80 0 l 0 60 l -60 0 l 0 -80 Z")
PASS - "-webkit-clip-path" property for "path2" element at 1s saw something close to: path("M 100 40 l 20 0 l 0 60 l 0 -20 l -60 0 l 0 -20 l 80 0 l 0 60 l -60 0 l 0 -80 Z")
PASS - "-webkit-clip-path" property for "path3" element at 1s saw something close to: path(evenodd, "M 100 40 l 20 0 l 0 60 l 20 0 l 0 -20 l -60 0 l 0 -20 l 80 0 l 0 60 l -60 0 l 0 -80 Z")
Support bezier paths in clip-path property https://bugs.webkit.org/show_bug.cgi?id=149996 Reviewed by Darin Adler. Source/WebCore: Support path() in the -webkit-clip-path property, as specified in https://drafts.csswg.org/css-shapes-2/#supported-basic-shapes Added BasicShapePath and CSSBasicShapePath, which both represent the path as a SVGPathByteStream and wind rule. Make BasicShape::canBlend() a virtual function, and implement it on each subclass. Make various BasicShape subclass function overrides private, other than windRule() wich is called on derived classes in a few places. Add SVGPathBlender::canBlendPaths() which returns true if the given paths can be interpolated. Uses the same logic as blendAnimatedPath(), without doing any interpolation. RenderElement::createsGroup() is fixed to have clip-path trigger a group, which fixes rendering of clip-path with a descendant compositing layer. Tests: compositing/masks/clip-path-composited-descendent.html css3/masking/clip-path-with-path.html transitions/clip-path-path-transitions.html * css/BasicShapeFunctions.cpp: (WebCore::valueForBasicShape): (WebCore::basicShapeForValue): * css/CSSBasicShapes.cpp: (WebCore::CSSBasicShapePath::CSSBasicShapePath): (WebCore::CSSBasicShapePath::pathData): (WebCore::buildPathString): (WebCore::CSSBasicShapePath::cssText): (WebCore::CSSBasicShapePath::equals): * css/CSSBasicShapes.h: * css/CSSParser.cpp: (WebCore::CSSParser::parseBasicShapePath): (WebCore::CSSParser::parseBasicShape): * css/CSSParser.h: * rendering/RenderElement.h: (WebCore::RenderElement::createsGroup): * rendering/style/BasicShapes.cpp: (WebCore::BasicShapeCircle::canBlend): (WebCore::BasicShapeEllipse::canBlend): (WebCore::BasicShapePolygon::canBlend): (WebCore::BasicShapePath::BasicShapePath): (WebCore::BasicShapePath::path): (WebCore::BasicShapePath::operator==): (WebCore::BasicShapePath::canBlend): (WebCore::BasicShapePath::blend): (WebCore::BasicShapeInset::canBlend): (WebCore::BasicShape::canBlend): Deleted. * rendering/style/BasicShapes.h: * svg/SVGPathBlender.cpp: (WebCore::SVGPathBlender::addAnimatedPath): (WebCore::SVGPathBlender::blendAnimatedPath): (WebCore::SVGPathBlender::canBlendPaths): (WebCore::SVGPathBlender::SVGPathBlender): (WebCore::SVGPathBlender::blendMoveToSegment): (WebCore::SVGPathBlender::blendLineToSegment): (WebCore::SVGPathBlender::blendLineToHorizontalSegment): (WebCore::SVGPathBlender::blendLineToVerticalSegment): (WebCore::SVGPathBlender::blendCurveToCubicSegment): (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment): (WebCore::SVGPathBlender::blendCurveToQuadraticSegment): (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment): (WebCore::SVGPathBlender::blendArcToSegment): * svg/SVGPathBlender.h: * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::operator==): * svg/SVGPathUtilities.cpp: (WebCore::canBlendSVGPathByteStreams): * svg/SVGPathUtilities.h: LayoutTests: Tests for compositing with clip-path and a composited descendant, a ref test which tests clip-paths with evenodd, comparing to SVG rendering, and a transition test to test path blendability. * compositing/masks/clip-path-composited-descendent-expected.txt: Added. * compositing/masks/clip-path-composited-descendent.html: Added. * css3/masking/clip-path-with-path-expected.html: Added. * css3/masking/clip-path-with-path.html: Added. * transitions/clip-path-path-transitions-expected.txt: Added. * transitions/clip-path-path-transitions.html: Added. * transitions/resources/transition-test-helpers.js: Add some basic parsing support for paths. (extractPathValues): (parseClipPath): * transitions/svg-transitions-expected.txt: Canonical link: https://commits.webkit.org/168698@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-10-26 04:57:46 +00:00