haikuwebkit/LayoutTests/svg/clip-path/clip-path-shape-border-box-...

6 lines
234 B
XML
Raw Permalink Normal View History

[css-masking] Update clip-path box mapping to unified box https://bugs.webkit.org/show_bug.cgi?id=185797 Reviewed by Simon Fraser. Source/WebCore: The box mapping for fill-box, stroke-box, view-box on HTML elements and content-box, padding-box, margin-box, border-box for SVG elements was aligned with the transform-box CSS property. Furthermore, the keywords fill changed to fill-box and stroke changed to stroke-box. https://drafts.fxtf.org/css-masking-1/#typedef-geometry-box Update the -webkit-clip-path property. Tests: svg/clip-path/clip-path-shape-border-box-expected.svg svg/clip-path/clip-path-shape-border-box.svg svg/clip-path/clip-path-shape-content-box-expected.svg svg/clip-path/clip-path-shape-content-box.svg svg/clip-path/clip-path-shape-margin-box-expected.svg svg/clip-path/clip-path-shape-margin-box.svg svg/clip-path/clip-path-shape-padding-box-expected.svg svg/clip-path/clip-path-shape-padding-box.svg * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator CSSBoxType const): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertClipPath): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBasicShapeOrBox): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderLayer.cpp: (WebCore::computeReferenceBox): * rendering/shapes/BoxShape.cpp: (WebCore::computeRoundedRectForBoxShape): * rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize): (WebCore::ShapeOutsideInfo::logicalTopOffset const): (WebCore::ShapeOutsideInfo::logicalLeftOffset const): * rendering/style/RenderStyleConstants.h: * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::prepareToRenderSVGContent): LayoutTests: Update existing tests and add new tests to check the slightly different behavior. * fast/masking/parsing-clip-path-shape-expected.txt: * fast/masking/parsing-clip-path-shape.html: * svg/clip-path/clip-path-shape-border-box-expected.svg: Added. * svg/clip-path/clip-path-shape-border-box.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-stroke.svg. * svg/clip-path/clip-path-shape-content-box-expected.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-fill.svg. * svg/clip-path/clip-path-shape-content-box.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-fill.svg. * svg/clip-path/clip-path-shape-fill.svg: * svg/clip-path/clip-path-shape-margin-box-expected.svg: Added. * svg/clip-path/clip-path-shape-margin-box.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-stroke.svg. * svg/clip-path/clip-path-shape-padding-box-expected.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-fill.svg. * svg/clip-path/clip-path-shape-padding-box.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-fill.svg. * svg/clip-path/clip-path-shape-stroke.svg: Canonical link: https://commits.webkit.org/202389@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-06-28 07:37:28 +00:00
<svg xmlns="http://www.w3.org/2000/svg">
<clipPath id="clip">
<circle cx="100" cy="100" r="100"/>
</clipPath>
<rect x="10" y="10" width="180" height="180" fill="green" stroke="green" stroke-width="20" clip-path="url(#clip)"/>
</svg>