Title: [233302] trunk
Revision
233302
Author
[email protected]
Date
2018-06-28 00:37:28 -0700 (Thu, 28 Jun 2018)

Log Message

[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:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (233301 => 233302)


--- trunk/LayoutTests/ChangeLog	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/LayoutTests/ChangeLog	2018-06-28 07:37:28 UTC (rev 233302)
@@ -1,3 +1,25 @@
+2018-06-28  Dirk Schulze  <[email protected]>
+
+        [css-masking] Update clip-path box mapping to unified box
+        https://bugs.webkit.org/show_bug.cgi?id=185797
+
+        Reviewed by Simon Fraser.
+
+        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-06-27  Ryan Haddad  <[email protected]>
 
         Mark imported/blink/storage/indexeddb/blob-delete-objectstore-db.html as flaky.

Modified: trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt (233301 => 233302)


--- trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt	2018-06-28 07:37:28 UTC (rev 233302)
@@ -28,8 +28,8 @@
 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", "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 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 ""

Modified: trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html (233301 => 233302)


--- trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html	2018-06-28 07:37:28 UTC (rev 233302)
@@ -77,8 +77,8 @@
 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", "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)");
 
 // 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");

Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-border-box-expected.svg (0 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-border-box-expected.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-border-box-expected.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Copied: trunk/LayoutTests/svg/clip-path/clip-path-shape-border-box.svg (from rev 233301, trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg) (0 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-border-box.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-border-box.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Copied: trunk/LayoutTests/svg/clip-path/clip-path-shape-content-box-expected.svg (from rev 233301, trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg) (0 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-content-box-expected.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-content-box-expected.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Copied: trunk/LayoutTests/svg/clip-path/clip-path-shape-content-box.svg (from rev 233301, trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg) (0 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-content-box.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-content-box.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Modified: trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg (233301 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-margin-box-expected.svg (0 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-margin-box-expected.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-margin-box-expected.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Copied: trunk/LayoutTests/svg/clip-path/clip-path-shape-margin-box.svg (from rev 233301, trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg) (0 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-margin-box.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-margin-box.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Copied: trunk/LayoutTests/svg/clip-path/clip-path-shape-padding-box-expected.svg (from rev 233301, trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg) (0 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-padding-box-expected.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-padding-box-expected.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Copied: trunk/LayoutTests/svg/clip-path/clip-path-shape-padding-box.svg (from rev 233301, trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg) (0 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-padding-box.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-padding-box.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Modified: trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg (233301 => 233302)


--- trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg	2018-06-28 07:37:28 UTC (rev 233302)
@@ -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

Modified: trunk/Source/WebCore/ChangeLog (233301 => 233302)


--- trunk/Source/WebCore/ChangeLog	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/ChangeLog	2018-06-28 07:37:28 UTC (rev 233302)
@@ -1,3 +1,52 @@
+2018-06-28  Dirk Schulze  <[email protected]>
+
+        [css-masking] Update clip-path box mapping to unified box
+        https://bugs.webkit.org/show_bug.cgi?id=185797
+
+        Reviewed by Simon Fraser.
+
+        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-06-27  Timothy Hatcher  <[email protected]>
 
         Don't expose new semantic -apple-system color keywords on iOS.

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (233301 => 233302)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2018-06-28 07:37:28 UTC (rev 233302)
@@ -4918,11 +4918,11 @@
     case CSSBoxType::ContentBox:
         m_value.valueID = CSSValueContentBox;
         break;
-    case CSSBoxType::Fill:
-        m_value.valueID = CSSValueFill;
+    case CSSBoxType::FillBox:
+        m_value.valueID = CSSValueFillBox;
         break;
-    case CSSBoxType::Stroke:
-        m_value.valueID = CSSValueStroke;
+    case CSSBoxType::StrokeBox:
+        m_value.valueID = CSSValueStrokeBox;
         break;
     case CSSBoxType::ViewBox:
         m_value.valueID = CSSValueViewBox;
@@ -4946,10 +4946,10 @@
     case CSSValueContentBox:
         return CSSBoxType::ContentBox;
     // The following are used in an SVG context.
-    case CSSValueFill:
-        return CSSBoxType::Fill;
-    case CSSValueStroke:
-        return CSSBoxType::Stroke;
+    case CSSValueFillBox:
+        return CSSBoxType::FillBox;
+    case CSSValueStrokeBox:
+        return CSSBoxType::StrokeBox;
     case CSSValueViewBox:
         return CSSBoxType::ViewBox;
     default:

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (233301 => 233302)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2018-06-28 07:37:28 UTC (rev 233302)
@@ -888,6 +888,7 @@
 margin-box
 
 // clip-path
+stroke-box
 view-box
 
 //

Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (233301 => 233302)


--- trunk/Source/WebCore/css/StyleBuilderConverter.h	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h	2018-06-28 07:37:28 UTC (rev 233302)
@@ -545,8 +545,8 @@
                 || 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 == CSSBoxType::BoxMissing);
             referenceBox = primitiveValue;

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (233301 => 233302)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2018-06-28 07:37:28 UTC (rev 233302)
@@ -2619,7 +2619,7 @@
             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)

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (233301 => 233302)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2018-06-28 07:37:28 UTC (rev 233302)
@@ -1998,8 +1998,8 @@
                 referenceBoxRect = contentBoxRect();
                 break;
             case CSSBoxType::BoxMissing:
-            case CSSBoxType::Fill:
-            case CSSBoxType::Stroke:
+            case CSSBoxType::FillBox:
+            case CSSBoxType::StrokeBox:
             case CSSBoxType::ViewBox:
                 referenceBoxRect = borderBoxRect();
             }

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (233301 => 233302)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-06-28 07:37:28 UTC (rev 233302)
@@ -4094,6 +4094,7 @@
     const auto& box = downcast<RenderBox>(renderer);
     switch (boxType) {
     case CSSBoxType::ContentBox:
+    case CSSBoxType::FillBox:
         referenceBox = box.contentBoxRect();
         referenceBox.move(offsetFromRoot);
         break;
@@ -4104,9 +4105,8 @@
     // FIXME: Support margin-box. Use bounding client rect for now.
     // https://bugs.webkit.org/show_bug.cgi?id=127984
     case CSSBoxType::MarginBox:
-    // fill, stroke, view-box compute to border-box for HTML elements.
-    case CSSBoxType::Fill:
-    case CSSBoxType::Stroke:
+    // stroke-box, view-box compute to border-box for HTML elements.
+    case CSSBoxType::StrokeBox:
     case CSSBoxType::ViewBox:
     case CSSBoxType::BorderBox:
     case CSSBoxType::BoxMissing:

Modified: trunk/Source/WebCore/rendering/shapes/BoxShape.cpp (233301 => 233302)


--- trunk/Source/WebCore/rendering/shapes/BoxShape.cpp	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/rendering/shapes/BoxShape.cpp	2018-06-28 07:37:28 UTC (rev 233302)
@@ -83,8 +83,8 @@
             renderer.paddingLeft() + renderer.borderLeft(), renderer.paddingRight() + renderer.borderRight());
     // fill, stroke, view-box compute to border-box for HTML elements.
     case CSSBoxType::BorderBox:
-    case CSSBoxType::Fill:
-    case CSSBoxType::Stroke:
+    case CSSBoxType::FillBox:
+    case CSSBoxType::StrokeBox:
     case CSSBoxType::ViewBox:
     case CSSBoxType::BoxMissing:
         return style.getRoundedBorderFor(renderer.borderBoxRect());

Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (233301 => 233302)


--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp	2018-06-28 07:37:28 UTC (rev 233302)
@@ -104,8 +104,8 @@
         else
             newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderAndPaddingExtent(), m_renderer.horizontalBorderAndPaddingExtent());
         break;
-    case CSSBoxType::Fill:
-    case CSSBoxType::Stroke:
+    case CSSBoxType::FillBox:
+    case CSSBoxType::StrokeBox:
     case CSSBoxType::ViewBox:
     case CSSBoxType::BoxMissing:
         ASSERT_NOT_REACHED();
@@ -232,9 +232,9 @@
         return borderBeforeInWritingMode(m_renderer, m_renderer.containingBlock()->style().writingMode());
     case CSSBoxType::ContentBox:
         return borderAndPaddingBeforeInWritingMode(m_renderer, m_renderer.containingBlock()->style().writingMode());
-    case CSSBoxType::Fill:
+    case CSSBoxType::FillBox:
         break;
-    case CSSBoxType::Stroke:
+    case CSSBoxType::StrokeBox:
         break;
     case CSSBoxType::ViewBox:
         break;
@@ -288,9 +288,9 @@
         return borderStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style());
     case CSSBoxType::ContentBox:
         return borderAndPaddingStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style());
-    case CSSBoxType::Fill:
+    case CSSBoxType::FillBox:
         break;
-    case CSSBoxType::Stroke:
+    case CSSBoxType::StrokeBox:
         break;
     case CSSBoxType::ViewBox:
         break;

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (233301 => 233302)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2018-06-28 07:37:28 UTC (rev 233302)
@@ -1073,8 +1073,8 @@
     BorderBox,
     PaddingBox,
     ContentBox,
-    Fill,
-    Stroke,
+    FillBox,
+    StrokeBox,
     ViewBox
 };
 

Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (233301 => 233302)


--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp	2018-06-28 07:27:52 UTC (rev 233301)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp	2018-06-28 07:37:28 UTC (rev 233302)
@@ -137,7 +137,9 @@
     if (is<ShapeClipPathOperation>(clipPathOperation)) {
         auto& clipPath = downcast<ShapeClipPathOperation>(*clipPathOperation);
         FloatRect referenceBox;
-        if (clipPath.referenceBox() == CSSBoxType::Stroke) {
+        if (clipPath.referenceBox() == CSSBoxType::StrokeBox || clipPath.referenceBox() == CSSBoxType::MarginBox
+            || clipPath.referenceBox() == CSSBoxType::BorderBox)
+        {
             // FIXME: strokeBoundingBox() takes dasharray into account but shouldn't.
             referenceBox = renderer.strokeBoundingBox();
         } else if (clipPath.referenceBox() == CSSBoxType::ViewBox && renderer.element()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to