WebKit Bugzilla
Attachment 340772 Details for
Bug 185797
: [css-masking] Update clip-path box mapping to unified box
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185797-20180519085905.patch (text/plain), 27.77 KB, created by
Dirk Schulze
on 2018-05-18 23:59:10 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dirk Schulze
Created:
2018-05-18 23:59:10 PDT
Size:
27.77 KB
patch
obsolete
>Subversion Revision: 231798 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 599e2edfe19ae197494989db2bc06c9e441459a7..ff2d75825c1b8e48e346457b521cd2b99fc9763b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,52 @@ >+2018-05-18 Dirk Schulze <krit@webkit.org> >+ >+ [css-masking] Update clip-path box mapping to unified box >+ https://bugs.webkit.org/show_bug.cgi?id=185797 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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): >+ > 2018-05-15 Antoine Quint <graouts@apple.com> > > [Web Animations] Expose Web Animations CSS integration as an experimental feature >diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h >index 15e1645c1bc82bd5c89b47500fdbeb452d67a74b..eb4c40902acbded25ad64f6d7ab7ffb1f75bb3c5 100644 >--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h >+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h >@@ -4917,11 +4917,11 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSBoxType cssBox) > case ContentBox: > m_value.valueID = CSSValueContentBox; > break; >- case Fill: >- m_value.valueID = CSSValueFill; >+ case FillBox: >+ m_value.valueID = CSSValueFillBox; > break; >- case Stroke: >- m_value.valueID = CSSValueStroke; >+ case StrokeBox: >+ m_value.valueID = CSSValueStrokeBox; > break; > case ViewBox: > m_value.valueID = CSSValueViewBox; >@@ -4945,10 +4945,10 @@ template<> inline CSSPrimitiveValue::operator CSSBoxType() const > case CSSValueContentBox: > return ContentBox; > // The following are used in an SVG context. >- case CSSValueFill: >- return Fill; >- case CSSValueStroke: >- return Stroke; >+ case CSSValueFillBox: >+ return FillBox; >+ case CSSValueStrokeBox: >+ return StrokeBox; > case CSSValueViewBox: > return ViewBox; > default: >diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in >index 143344476db891c4643e64b52e3eb62cc2811762..c407d70b1370778811478cc4358bdaffd4975cda 100644 >--- a/Source/WebCore/css/CSSValueKeywords.in >+++ b/Source/WebCore/css/CSSValueKeywords.in >@@ -873,6 +873,7 @@ verso > margin-box > > // clip-path >+stroke-box > view-box > > // >diff --git a/Source/WebCore/css/StyleBuilderConverter.h b/Source/WebCore/css/StyleBuilderConverter.h >index 6c37c9fd33f72fcadd04a5302ffbc09edce8d30d..39760b316ad9c9389f80e7e60e8ce79e54077342 100644 >--- a/Source/WebCore/css/StyleBuilderConverter.h >+++ b/Source/WebCore/css/StyleBuilderConverter.h >@@ -545,8 +545,8 @@ inline RefPtr<ClipPathOperation> StyleBuilderConverter::convertClipPath(StyleRes > || primitiveValue.valueID() == CSSValueBorderBox > || primitiveValue.valueID() == CSSValuePaddingBox > || primitiveValue.valueID() == CSSValueMarginBox >- || primitiveValue.valueID() == CSSValueFill >- || primitiveValue.valueID() == CSSValueStroke >+ || primitiveValue.valueID() == CSSValueFillBox >+ || primitiveValue.valueID() == CSSValueStrokeBox > || primitiveValue.valueID() == CSSValueViewBox); > ASSERT(referenceBox == BoxMissing); > referenceBox = primitiveValue; >diff --git a/Source/WebCore/css/parser/CSSPropertyParser.cpp b/Source/WebCore/css/parser/CSSPropertyParser.cpp >index bcece703db0fcf264ec83d6de0b5fe3b6607dbab..98925fbc8a21e92fbbc7ba7af11edeb203d186fa 100644 >--- a/Source/WebCore/css/parser/CSSPropertyParser.cpp >+++ b/Source/WebCore/css/parser/CSSPropertyParser.cpp >@@ -2619,7 +2619,7 @@ static RefPtr<CSSValue> consumeBasicShapeOrBox(CSSParserTokenRange& range, const > componentValue = consumeBasicShape(range, context); > shapeFound = true; > } else if (range.peek().type() == IdentToken && !boxFound) { >- componentValue = consumeIdent<CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, CSSValueMarginBox, CSSValueFill, CSSValueStroke, CSSValueViewBox>(range); >+ componentValue = consumeIdent<CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, CSSValueMarginBox, CSSValueFillBox, CSSValueStrokeBox, CSSValueViewBox>(range); > boxFound = true; > } > if (!componentValue) >diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp >index a30bb39cb178028eb963ad01b4bb7c287310a7e6..a8bf8e58c05934d82e0486632497a9e7b629db84 100644 >--- a/Source/WebCore/rendering/RenderBlock.cpp >+++ b/Source/WebCore/rendering/RenderBlock.cpp >@@ -1998,8 +1998,8 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu > referenceBoxRect = contentBoxRect(); > break; > case CSSBoxType::BoxMissing: >- case CSSBoxType::Fill: >- case CSSBoxType::Stroke: >+ case CSSBoxType::FillBox: >+ case CSSBoxType::StrokeBox: > case CSSBoxType::ViewBox: > referenceBoxRect = borderBoxRect(); > } >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 08c0ee613774ba7144059f504594edc57fd3662b..f814370f4ba1ec87e9bbfbacccd708e83ade33e6 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -4095,6 +4095,7 @@ static inline LayoutRect computeReferenceBox(const RenderObject& renderer, const > const auto& box = downcast<RenderBox>(renderer); > switch (clippingPath.referenceBox()) { > case ContentBox: >+ case FillBox: > referenceBox = box.contentBoxRect(); > referenceBox.move(offsetFromRoot); > break; >@@ -4105,9 +4106,8 @@ static inline LayoutRect computeReferenceBox(const RenderObject& renderer, const > // FIXME: Support margin-box. Use bounding client rect for now. > // https://bugs.webkit.org/show_bug.cgi?id=127984 > case MarginBox: >- // fill, stroke, view-box compute to border-box for HTML elements. >- case Fill: >- case Stroke: >+ // stroke-box, view-box compute to border-box for HTML elements. >+ case StrokeBox: > case ViewBox: > case BorderBox: > case BoxMissing: >diff --git a/Source/WebCore/rendering/shapes/BoxShape.cpp b/Source/WebCore/rendering/shapes/BoxShape.cpp >index dba19e76fad45778b3aa7bccaddb0d74d9d8ea4a..ba9c44183557bf964930c9e2a3a68abbe2e728a5 100644 >--- a/Source/WebCore/rendering/shapes/BoxShape.cpp >+++ b/Source/WebCore/rendering/shapes/BoxShape.cpp >@@ -83,8 +83,8 @@ RoundedRect computeRoundedRectForBoxShape(CSSBoxType box, const RenderBox& rende > renderer.paddingLeft() + renderer.borderLeft(), renderer.paddingRight() + renderer.borderRight()); > // fill, stroke, view-box compute to border-box for HTML elements. > case BorderBox: >- case Fill: >- case Stroke: >+ case FillBox: >+ case StrokeBox: > case ViewBox: > case BoxMissing: > return style.getRoundedBorderFor(renderer.borderBoxRect()); >diff --git a/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp b/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp >index fe89bb840c3545cc0a5ddd887614f6301012e264..9f210bf05a6e421633c9e1cb98c5892c8a57d45f 100644 >--- a/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp >+++ b/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp >@@ -104,8 +104,8 @@ void ShapeOutsideInfo::setReferenceBoxLogicalSize(LayoutSize newReferenceBoxLogi > else > newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderAndPaddingExtent(), m_renderer.horizontalBorderAndPaddingExtent()); > break; >- case Fill: >- case Stroke: >+ case FillBox: >+ case StrokeBox: > case ViewBox: > case BoxMissing: > ASSERT_NOT_REACHED(); >@@ -228,8 +228,8 @@ LayoutUnit ShapeOutsideInfo::logicalTopOffset() const > case BorderBox: return LayoutUnit(); > case PaddingBox: return borderBeforeInWritingMode(m_renderer, m_renderer.containingBlock()->style().writingMode()); > case ContentBox: return borderAndPaddingBeforeInWritingMode(m_renderer, m_renderer.containingBlock()->style().writingMode()); >- case Fill: break; >- case Stroke: break; >+ case FillBox: break; >+ case StrokeBox: break; > case ViewBox: break; > case BoxMissing: break; > } >@@ -276,8 +276,8 @@ LayoutUnit ShapeOutsideInfo::logicalLeftOffset() const > case BorderBox: return LayoutUnit(); > case PaddingBox: return borderStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style()); > case ContentBox: return borderAndPaddingStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style()); >- case Fill: break; >- case Stroke: break; >+ case FillBox: break; >+ case StrokeBox: break; > case ViewBox: break; > case BoxMissing: break; > } >diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h >index 29fb7f251367fb46a9bb06e1cd4fd292154d1ddc..a5d4ed77ac506560a17c05ab34a44cc5cc768993 100644 >--- a/Source/WebCore/rendering/style/RenderStyleConstants.h >+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h >@@ -692,7 +692,7 @@ enum TextIndentType { TextIndentNormal, TextIndentHanging }; > enum Isolation { IsolationAuto, IsolationIsolate }; > > // Fill, Stroke, ViewBox are just used for SVG. >-enum CSSBoxType { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox, Fill, Stroke, ViewBox }; >+enum CSSBoxType { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox, FillBox, StrokeBox, ViewBox }; > > #if ENABLE(TOUCH_EVENTS) > enum class TouchAction { >diff --git a/Source/WebCore/rendering/svg/SVGRenderingContext.cpp b/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >index 67aedb4ba4a7df1498826df79e365741306f5ce6..3f5cebeb635882cc2e73a4f40b64d743764f0278 100644 >--- a/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >+++ b/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >@@ -137,10 +137,12 @@ void SVGRenderingContext::prepareToRenderSVGContent(RenderElement& renderer, Pai > if (is<ShapeClipPathOperation>(clipPathOperation)) { > auto& clipPath = downcast<ShapeClipPathOperation>(*clipPathOperation); > FloatRect referenceBox; >- if (clipPath.referenceBox() == Stroke) >+ if (clipPath.referenceBox() == StrokeBox || clipPath.referenceBox() == MarginBox >+ || clipPath.referenceBox() == BorderBox) >+ { > // FIXME: strokeBoundingBox() takes dasharray into account but shouldn't. > referenceBox = renderer.strokeBoundingBox(); >- else if (clipPath.referenceBox() == ViewBox && renderer.element()) { >+ } else if (clipPath.referenceBox() == ViewBox && renderer.element()) { > FloatSize viewportSize; > SVGLengthContext(downcast<SVGElement>(renderer.element())).determineViewport(viewportSize); > referenceBox.setWidth(viewportSize.width()); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 7ed5aaef64551e47da34687d501cef01e209f740..b2a92394e5fd58d4402381e77889d7aeae0a42ea 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,25 @@ >+2018-05-18 Dirk Schulze <krit@webkit.org> >+ >+ [css-masking] Update clip-path box mapping to unified box >+ https://bugs.webkit.org/show_bug.cgi?id=185797 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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: >+ > 2018-05-15 Antoine Quint <graouts@apple.com> > > [Web Animations] Expose Web Animations CSS integration as an experimental feature >diff --git a/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt b/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt >index b844985342e5d7ea9b4ed66e7d1cf639b5b7f4a9..26ea3364696a3c8f4e7d2e6cf59ca19fc39bf1cf 100644 >--- a/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt >+++ b/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt >@@ -28,8 +28,8 @@ PASS innerStyle("-webkit-clip-path", "content-box") is "content-box" > PASS innerStyle("-webkit-clip-path", "padding-box") is "padding-box" > PASS innerStyle("-webkit-clip-path", "border-box") is "border-box" > PASS innerStyle("-webkit-clip-path", "margin-box") is "margin-box" >-PASS innerStyle("-webkit-clip-path", "fill") is "fill" >-PASS innerStyle("-webkit-clip-path", "stroke") is "stroke" >+PASS innerStyle("-webkit-clip-path", "fill-box") is "fill-box" >+PASS innerStyle("-webkit-clip-path", "stroke-box") is "stroke-box" > PASS innerStyle("-webkit-clip-path", "view-box") is "view-box" > PASS innerStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box") is "circle(50% at 50% 50%) content-box" > PASS innerStyle("-webkit-clip-path", "circle(50% at 50% 50%) padding-box") is "circle(50% at 50% 50%) padding-box" >@@ -40,14 +40,14 @@ PASS computedStyle("-webkit-clip-path", "content-box") is "content-box" > PASS computedStyle("-webkit-clip-path", "padding-box") is "padding-box" > PASS computedStyle("-webkit-clip-path", "border-box") is "border-box" > PASS computedStyle("-webkit-clip-path", "margin-box") is "margin-box" >-PASS computedStyle("-webkit-clip-path", "fill") is "fill" >-PASS computedStyle("-webkit-clip-path", "stroke") is "stroke" >+PASS computedStyle("-webkit-clip-path", "fill-box") is "fill-box" >+PASS computedStyle("-webkit-clip-path", "stroke-box") is "stroke-box" > PASS computedStyle("-webkit-clip-path", "view-box") is "view-box" > PASS computedStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box") is "circle(50% at 50% 50%) content-box" > PASS computedStyle("-webkit-clip-path", "circle(50% at 50% 50%) padding-box") is "circle(50% at 50% 50%) padding-box" > PASS computedStyle("-webkit-clip-path", "margin-box circle(50% at 50% 50%)") is "circle(50% at 50% 50%) margin-box" > PASS computedStyle("-webkit-clip-path", "border-box circle(50% at 50% 50%)") is "circle(50% at 50% 50%) border-box" >-PASS computedStyle("-webkit-clip-path", "circle(50% at 50% 50%) fill") is "circle(50% at 50% 50%) fill" >+PASS computedStyle("-webkit-clip-path", "circle(50% at 50% 50%) fill-box") is "circle(50% at 50% 50%) fill-box" > PASS innerStyle("-webkit-clip-path", "circle(1 at 1px 1px)") is "" > PASS computedStyle("-webkit-clip-path", "circle(1 at 1px 1px)") is "none" > PASS innerStyle("-webkit-clip-path", "circle(px at 1px 1px)") is "" >@@ -66,14 +66,14 @@ PASS innerStyle("-webkit-clip-path", "ellipse(-1em 1em at 1em 1em)") is "" > PASS computedStyle("-webkit-clip-path", "ellipse(-1em 1em at 1em 1em)") is "none" > PASS innerStyle("-webkit-clip-path", "ellipse(1em -1em at 1em 1em)") is "" > PASS computedStyle("-webkit-clip-path", "ellipse(1em -1em at 1em 1em)") is "none" >-PASS innerStyle("-webkit-clip-path", "fill circle(50% at 50% 50%) content-box") is "" >-PASS computedStyle("-webkit-clip-path", "fill circle(50% at 50% 50%) content-box") is "none" >+PASS innerStyle("-webkit-clip-path", "fill-box circle(50% at 50% 50%) content-box") is "" >+PASS computedStyle("-webkit-clip-path", "fill-box circle(50% at 50% 50%) content-box") is "none" > PASS innerStyle("-webkit-clip-path", "margin-box padding-box") is "" > PASS computedStyle("-webkit-clip-path", "margin-box padding-box") is "none" > PASS innerStyle("-webkit-clip-path", "padding-box border-box circle(50% at 50% 50%)") is "" > PASS computedStyle("-webkit-clip-path", "padding-box border-box circle(50% at 50% 50%)") is "none" >-PASS innerStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box stroke") is "" >-PASS computedStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box stroke") is "none" >+PASS innerStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box stroke-box") is "" >+PASS computedStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box stroke-box") is "none" > PASS innerStyle("-webkit-clip-path", "content-box margin-box padding-box") is "" > PASS computedStyle("-webkit-clip-path", "content-box margin-box padding-box") is "none" > PASS innerStyle("-webkit-clip-path", "none content-box") is "" >diff --git a/LayoutTests/fast/masking/parsing-clip-path-shape.html b/LayoutTests/fast/masking/parsing-clip-path-shape.html >index 632d1b546d04d70344448148e010653d60e2cc10..67021aaae05c3aba2b306acd1d508cf1f40d24b5 100644 >--- a/LayoutTests/fast/masking/parsing-clip-path-shape.html >+++ b/LayoutTests/fast/masking/parsing-clip-path-shape.html >@@ -77,8 +77,8 @@ testInner("-webkit-clip-path", "content-box", "content-box"); > testInner("-webkit-clip-path", "padding-box", "padding-box"); > testInner("-webkit-clip-path", "border-box", "border-box"); > testInner("-webkit-clip-path", "margin-box", "margin-box"); >-testInner("-webkit-clip-path", "fill", "fill"); >-testInner("-webkit-clip-path", "stroke", "stroke"); >+testInner("-webkit-clip-path", "fill-box", "fill-box"); >+testInner("-webkit-clip-path", "stroke-box", "stroke-box"); > testInner("-webkit-clip-path", "view-box", "view-box"); > testInner("-webkit-clip-path", "circle(50% at 50% 50%) content-box", "circle(50% at 50% 50%) content-box"); > testInner("-webkit-clip-path", "circle(50% at 50% 50%) padding-box", "circle(50% at 50% 50%) padding-box"); >@@ -90,14 +90,14 @@ testComputed("-webkit-clip-path", "content-box", "content-box"); > testComputed("-webkit-clip-path", "padding-box", "padding-box"); > testComputed("-webkit-clip-path", "border-box", "border-box"); > testComputed("-webkit-clip-path", "margin-box", "margin-box"); >-testComputed("-webkit-clip-path", "fill", "fill"); >-testComputed("-webkit-clip-path", "stroke", "stroke"); >+testComputed("-webkit-clip-path", "fill-box", "fill-box"); >+testComputed("-webkit-clip-path", "stroke-box", "stroke-box"); > testComputed("-webkit-clip-path", "view-box", "view-box"); > testComputed("-webkit-clip-path", "circle(50% at 50% 50%) content-box", "circle(50% at 50% 50%) content-box"); > testComputed("-webkit-clip-path", "circle(50% at 50% 50%) padding-box", "circle(50% at 50% 50%) padding-box"); > testComputed("-webkit-clip-path", "margin-box circle(50% at 50% 50%)", "circle(50% at 50% 50%) margin-box"); > testComputed("-webkit-clip-path", "border-box circle(50% at 50% 50%)", "circle(50% at 50% 50%) border-box"); >-testComputed("-webkit-clip-path", "circle(50% at 50% 50%) fill", "circle(50% at 50% 50%) fill"); >+testComputed("-webkit-clip-path", "circle(50% at 50% 50%) fill-box", "circle(50% at 50% 50%) fill-box"); > > // reject non-lengths > negativeTest("-webkit-clip-path", "circle(1 at 1px 1px)"); >@@ -113,10 +113,10 @@ negativeTest("-webkit-clip-path", "ellipse(-1em 1em at 1em 1em)"); > negativeTest("-webkit-clip-path", "ellipse(1em -1em at 1em 1em)"); > > // reject multiple <box> values >-negativeTest("-webkit-clip-path", "fill circle(50% at 50% 50%) content-box"); >+negativeTest("-webkit-clip-path", "fill-box circle(50% at 50% 50%) content-box"); > negativeTest("-webkit-clip-path", "margin-box padding-box"); > negativeTest("-webkit-clip-path", "padding-box border-box circle(50% at 50% 50%)"); >-negativeTest("-webkit-clip-path", "circle(50% at 50% 50%) content-box stroke"); >+negativeTest("-webkit-clip-path", "circle(50% at 50% 50%) content-box stroke-box"); > negativeTest("-webkit-clip-path", "content-box margin-box padding-box"); > negativeTest("-webkit-clip-path", "none content-box"); > negativeTest("-webkit-clip-path", "url(#test) padding-box"); >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-border-box-expected.svg b/LayoutTests/svg/clip-path/clip-path-shape-border-box-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..61ce12183b6177b1b01c4652a476caf8cbd9c167 >--- /dev/null >+++ b/LayoutTests/svg/clip-path/clip-path-shape-border-box-expected.svg >@@ -0,0 +1,6 @@ >+<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> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-border-box.svg b/LayoutTests/svg/clip-path/clip-path-shape-border-box.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..98483ff06c7822d563e3b96e5df6329f645417db >--- /dev/null >+++ b/LayoutTests/svg/clip-path/clip-path-shape-border-box.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> >+<rect x="10" y="10" width="180" height="180" fill="green" stroke="green" stroke-width="20" style="-webkit-clip-path: circle() border-box;"/> >+</svg> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-content-box-expected.svg b/LayoutTests/svg/clip-path/clip-path-shape-content-box-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..d8781dd971a1b4d2a99885a20d80288e8f2d985b >--- /dev/null >+++ b/LayoutTests/svg/clip-path/clip-path-shape-content-box-expected.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+<rect width="200" height="200" fill="green" stroke="green" stroke-width="10" style="-webkit-clip-path: circle();"/> >+</svg> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-content-box.svg b/LayoutTests/svg/clip-path/clip-path-shape-content-box.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..39742379bd2be71f01458708746f7d83be008fe2 >--- /dev/null >+++ b/LayoutTests/svg/clip-path/clip-path-shape-content-box.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+<rect width="200" height="200" fill="green" stroke="green" stroke-width="10" style="-webkit-clip-path: circle() content-box;"/> >+</svg> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-fill.svg b/LayoutTests/svg/clip-path/clip-path-shape-fill.svg >index e709dcd660aebbd1b2af72aa447cdf770d8e0e4a..eeff05fe87769be226ffa474b0a298fb2c94465a 100644 >--- a/LayoutTests/svg/clip-path/clip-path-shape-fill.svg >+++ b/LayoutTests/svg/clip-path/clip-path-shape-fill.svg >@@ -1,3 +1,3 @@ > <svg xmlns="http://www.w3.org/2000/svg"> >-<rect width="200" height="200" fill="green" stroke="green" stroke-width="10" style="-webkit-clip-path: circle() fill;"/> >+<rect width="200" height="200" fill="green" stroke="green" stroke-width="10" style="-webkit-clip-path: circle() fill-box;"/> > </svg> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-margin-box-expected.svg b/LayoutTests/svg/clip-path/clip-path-shape-margin-box-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..61ce12183b6177b1b01c4652a476caf8cbd9c167 >--- /dev/null >+++ b/LayoutTests/svg/clip-path/clip-path-shape-margin-box-expected.svg >@@ -0,0 +1,6 @@ >+<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> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-margin-box.svg b/LayoutTests/svg/clip-path/clip-path-shape-margin-box.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..b285d90fd24e75840c4dc07e3ea495dcb84c1b81 >--- /dev/null >+++ b/LayoutTests/svg/clip-path/clip-path-shape-margin-box.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> >+<rect x="10" y="10" width="180" height="180" fill="green" stroke="green" stroke-width="20" style="-webkit-clip-path: circle() margin-box;"/> >+</svg> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-padding-box-expected.svg b/LayoutTests/svg/clip-path/clip-path-shape-padding-box-expected.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..d8781dd971a1b4d2a99885a20d80288e8f2d985b >--- /dev/null >+++ b/LayoutTests/svg/clip-path/clip-path-shape-padding-box-expected.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+<rect width="200" height="200" fill="green" stroke="green" stroke-width="10" style="-webkit-clip-path: circle();"/> >+</svg> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-padding-box.svg b/LayoutTests/svg/clip-path/clip-path-shape-padding-box.svg >new file mode 100644 >index 0000000000000000000000000000000000000000..caa17181057c4a869ee63ae101c3cefc5122f6b4 >--- /dev/null >+++ b/LayoutTests/svg/clip-path/clip-path-shape-padding-box.svg >@@ -0,0 +1,3 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+<rect width="200" height="200" fill="green" stroke="green" stroke-width="10" style="-webkit-clip-path: circle() padding-box;"/> >+</svg> >\ No newline at end of file >diff --git a/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg b/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg >index 7dbb9f7167cac1292200f4053a730026882cff76..f4eeadad33cf97f3e1f908102282704ca3ae71ed 100644 >--- a/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg >+++ b/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg >@@ -1,3 +1,3 @@ > <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> >-<rect x="10" y="10" width="180" height="180" fill="green" stroke="green" stroke-width="20" style="-webkit-clip-path: circle() stroke;"/> >+<rect x="10" y="10" width="180" height="180" fill="green" stroke="green" stroke-width="20" style="-webkit-clip-path: circle() stroke-box;"/> > </svg> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185797
:
340772
|
343734
|
343795