Source/WebCore/ChangeLog

 12013-06-12 Bem Jones-Bey <bjonesbe@adobe.com>
 2
 3 [CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry
 4 https://bugs.webkit.org/show_bug.cgi?id=116745
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 If ry is not supplied, it now defaults to the rx value. Also, if rx
 9 and ry are not supplied, they default to 0px. This also has the effect
 10 that the computed style for any rectangle or inset-rectangle now
 11 contains all six parameters.
 12
 13 If rx > width/2 then it is clamped to width/2, and if ry > height/2,
 14 then it is clamped to height/2. This happens at layout time because
 15 given mixed units and relative units, that is the only time this
 16 determination can be made.
 17
 18 Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-large-radius.html
 19 fast/exclusions/shape-outside-floats/shape-outside-floats-rounded-rectangle-large-radius.html
 20
 21 * css/BasicShapeFunctions.cpp:
 22 (WebCore::valueForBasicShape): Remove checks for undefined, since rx
 23 and ry cannot be undefined in BasicShapes anymore.
 24 (WebCore::basicShapeForValue): If radii are undefined in CSS, set
 25 default values in the BasicShape, per the spec.
 26 * rendering/ExclusionShape.cpp:
 27 (WebCore::ensureRadiiDoNotOverlap): Utility method to ensure radii
 28 don't overlap.
 29 (WebCore::ExclusionShape::createExclusionShape): Remove defaulting to
 30 zero, clamp radii per the spec.
 31 * rendering/style/BasicShapes.cpp:
 32 (WebCore::BasicShapeRectangle::path): Remove defaulting.
 33 (WebCore::BasicShapeRectangle::blend): Ditto.
 34 (WebCore::BasicShapeInsetRectangle::path): Ditto.
 35 (WebCore::BasicShapeInsetRectangle::blend): Ditto.
 36 * rendering/style/BasicShapes.h:
 37 (WebCore::BasicShapeRectangle::BasicShapeRectangle): Remove defaulting
 38 to undefined for radii.
 39 (WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle): Ditto.
 40
1412013-06-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
242
343 Support latest Web IDL indexed property getters

Source/WebCore/css/BasicShapeFunctions.cpp

@@PassRefPtr<CSSValue> valueForBasicShape(const BasicShape* basicShape)
5050 rectangleValue->setY(cssValuePool().createValue(rectangle->y()));
5151 rectangleValue->setWidth(cssValuePool().createValue(rectangle->width()));
5252 rectangleValue->setHeight(cssValuePool().createValue(rectangle->height()));
53  if (!rectangle->cornerRadiusX().isUndefined()) {
54  rectangleValue->setRadiusX(cssValuePool().createValue(rectangle->cornerRadiusX()));
55  if (!rectangle->cornerRadiusY().isUndefined())
56  rectangleValue->setRadiusY(cssValuePool().createValue(rectangle->cornerRadiusY()));
57  }
 53 rectangleValue->setRadiusX(cssValuePool().createValue(rectangle->cornerRadiusX()));
 54 rectangleValue->setRadiusY(cssValuePool().createValue(rectangle->cornerRadiusY()));
5855
5956 basicShapeValue = rectangleValue.release();
6057 break;

@@PassRefPtr<CSSValue> valueForBasicShape(const BasicShape* basicShape)
10299 rectangleValue->setRight(cssValuePool().createValue(rectangle->right()));
103100 rectangleValue->setBottom(cssValuePool().createValue(rectangle->bottom()));
104101 rectangleValue->setLeft(cssValuePool().createValue(rectangle->left()));
105  if (!rectangle->cornerRadiusX().isUndefined()) {
106  rectangleValue->setRadiusX(cssValuePool().createValue(rectangle->cornerRadiusX()));
107  if (!rectangle->cornerRadiusY().isUndefined())
108  rectangleValue->setRadiusY(cssValuePool().createValue(rectangle->cornerRadiusY()));
109  }
 102 rectangleValue->setRadiusX(cssValuePool().createValue(rectangle->cornerRadiusX()));
 103 rectangleValue->setRadiusY(cssValuePool().createValue(rectangle->cornerRadiusY()));
110104
111105 basicShapeValue = rectangleValue.release();
112106 break;

@@PassRefPtr<BasicShape> basicShapeForValue(const RenderStyle* style, const Render
136130 rect->setWidth(convertToLength(style, rootStyle, rectValue->width()));
137131 rect->setHeight(convertToLength(style, rootStyle, rectValue->height()));
138132 if (rectValue->radiusX()) {
139  rect->setCornerRadiusX(convertToLength(style, rootStyle, rectValue->radiusX()));
 133 Length radiusX = convertToLength(style, rootStyle, rectValue->radiusX());
 134 rect->setCornerRadiusX(radiusX);
140135 if (rectValue->radiusY())
141136 rect->setCornerRadiusY(convertToLength(style, rootStyle, rectValue->radiusY()));
 137 else
 138 rect->setCornerRadiusY(radiusX);
 139 } else {
 140 rect->setCornerRadiusX(Length(0, Fixed));
 141 rect->setCornerRadiusY(Length(0, Fixed));
142142 }
143143 basicShape = rect.release();
144144 break;

@@PassRefPtr<BasicShape> basicShapeForValue(const RenderStyle* style, const Render
187187 rect->setBottom(convertToLength(style, rootStyle, rectValue->bottom()));
188188 rect->setLeft(convertToLength(style, rootStyle, rectValue->left()));
189189 if (rectValue->radiusX()) {
190  rect->setCornerRadiusX(convertToLength(style, rootStyle, rectValue->radiusX()));
 190 Length radiusX = convertToLength(style, rootStyle, rectValue->radiusX());
 191 rect->setCornerRadiusX(radiusX);
191192 if (rectValue->radiusY())
192193 rect->setCornerRadiusY(convertToLength(style, rootStyle, rectValue->radiusY()));
 194 else
 195 rect->setCornerRadiusY(radiusX);
 196 } else {
 197 rect->setCornerRadiusX(Length(0, Fixed));
 198 rect->setCornerRadiusY(Length(0, Fixed));
193199 }
194200 basicShape = rect.release();
195201 break;

Source/WebCore/rendering/shapes/Shape.cpp

@@static inline FloatSize physicalSizeToLogical(const FloatSize& size, WritingMode
9090 return size.transposedSize();
9191}
9292
 93static inline void ensureRadiiDoNotOverlap(FloatRect &bounds, FloatSize &radii)
 94{
 95 float widthRatio = bounds.width() / (2 * radii.width());
 96 float heightRatio = bounds.height() / (2 * radii.height());
 97 float reductionRatio = std::min<float>(widthRatio, heightRatio);
 98 if (reductionRatio < 1) {
 99 radii.setWidth(reductionRatio * radii.width());
 100 radii.setHeight(reductionRatio * radii.height());
 101 }
 102}
 103
93104PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutSize& logicalBoxSize, WritingMode writingMode, Length margin, Length padding)
94105{
95106 ASSERT(basicShape);

@@PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS
108119 floatValueForLength(rectangle->y(), boxHeight),
109120 floatValueForLength(rectangle->width(), boxWidth),
110121 floatValueForLength(rectangle->height(), boxHeight));
111  Length radiusXLength = rectangle->cornerRadiusX();
112  Length radiusYLength = rectangle->cornerRadiusY();
113122 FloatSize cornerRadii(
114  radiusXLength.isUndefined() ? 0 : floatValueForLength(radiusXLength, boxWidth),
115  radiusYLength.isUndefined() ? 0 : floatValueForLength(radiusYLength, boxHeight));
 123 floatValueForLength(rectangle->cornerRadiusX(), boxWidth),
 124 floatValueForLength(rectangle->cornerRadiusY(), boxHeight));
 125 ensureRadiiDoNotOverlap(bounds, cornerRadii);
116126 FloatRect logicalBounds = physicalRectToLogical(bounds, logicalBoxSize.height(), writingMode);
117127
118128 shape = createRectangleShape(logicalBounds, physicalSizeToLogical(cornerRadii, writingMode));

@@PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS
169179 top,
170180 boxWidth - left - floatValueForLength(rectangle->right(), boxWidth),
171181 boxHeight - top - floatValueForLength(rectangle->bottom(), boxHeight));
172  Length radiusXLength = rectangle->cornerRadiusX();
173  Length radiusYLength = rectangle->cornerRadiusY();
174182 FloatSize cornerRadii(
175  radiusXLength.isUndefined() ? 0 : floatValueForLength(radiusXLength, boxWidth),
176  radiusYLength.isUndefined() ? 0 : floatValueForLength(radiusYLength, boxHeight));
 183 floatValueForLength(rectangle->cornerRadiusX(), boxWidth),
 184 floatValueForLength(rectangle->cornerRadiusY(), boxHeight));
 185 ensureRadiiDoNotOverlap(bounds, cornerRadii);
177186 FloatRect logicalBounds = physicalRectToLogical(bounds, logicalBoxSize.height(), writingMode);
178187
179188 shape = createRectangleShape(logicalBounds, physicalSizeToLogical(cornerRadii, writingMode));

Source/WebCore/rendering/style/BasicShapes.cpp

@@void BasicShapeRectangle::path(Path& path, const FloatRect& boundingBox)
6262 floatValueForLength(m_height, boundingBox.height())
6363 ),
6464 FloatSize(
65  m_cornerRadiusX.isUndefined() ? 0 : floatValueForLength(m_cornerRadiusX, boundingBox.width()),
66  m_cornerRadiusY.isUndefined() ? 0 : floatValueForLength(m_cornerRadiusY, boundingBox.height())
 65 floatValueForLength(m_cornerRadiusX, boundingBox.width()),
 66 floatValueForLength(m_cornerRadiusY, boundingBox.height())
6767 )
6868 );
6969}

@@PassRefPtr<BasicShape> BasicShapeRectangle::blend(const BasicShape* other, doubl
7878 result->setY(m_y.blend(o->y(), progress));
7979 result->setWidth(m_width.blend(o->width(), progress));
8080 result->setHeight(m_height.blend(o->height(), progress));
81  if (!m_cornerRadiusX.isUndefined() && !o->cornerRadiusX().isUndefined())
82  result->setCornerRadiusX(m_cornerRadiusX.blend(o->cornerRadiusX(), progress));
83  if (!m_cornerRadiusY.isUndefined() && !o->cornerRadiusY().isUndefined())
84  result->setCornerRadiusY(m_cornerRadiusY.blend(o->cornerRadiusY(), progress));
 81 result->setCornerRadiusX(m_cornerRadiusX.blend(o->cornerRadiusX(), progress));
 82 result->setCornerRadiusY(m_cornerRadiusY.blend(o->cornerRadiusY(), progress));
8583 return result.release();
8684}
8785

@@void BasicShapeInsetRectangle::path(Path& path, const FloatRect& boundingBox)
194192 std::max<float>(boundingBox.height() - top - floatValueForLength(m_bottom, boundingBox.height()), 0)
195193 ),
196194 FloatSize(
197  m_cornerRadiusX.isUndefined() ? 0 : floatValueForLength(m_cornerRadiusX, boundingBox.width()),
198  m_cornerRadiusY.isUndefined() ? 0 : floatValueForLength(m_cornerRadiusY, boundingBox.height())
 195 floatValueForLength(m_cornerRadiusX, boundingBox.width()),
 196 floatValueForLength(m_cornerRadiusY, boundingBox.height())
199197 )
200198 );
201199}

@@PassRefPtr<BasicShape> BasicShapeInsetRectangle::blend(const BasicShape* other,
210208 result->setRight(m_right.blend(o->right(), progress));
211209 result->setBottom(m_bottom.blend(o->bottom(), progress));
212210 result->setLeft(m_left.blend(o->left(), progress));
213  if (!m_cornerRadiusX.isUndefined() && !o->cornerRadiusX().isUndefined())
214  result->setCornerRadiusX(m_cornerRadiusX.blend(o->cornerRadiusX(), progress));
215  if (!m_cornerRadiusY.isUndefined() && !o->cornerRadiusY().isUndefined())
216  result->setCornerRadiusY(m_cornerRadiusY.blend(o->cornerRadiusY(), progress));
 211 result->setCornerRadiusX(m_cornerRadiusX.blend(o->cornerRadiusX(), progress));
 212 result->setCornerRadiusY(m_cornerRadiusY.blend(o->cornerRadiusY(), progress));
217213 return result.release();
218214}
219215}

Source/WebCore/rendering/style/BasicShapes.h

@@public:
8787
8888 virtual Type type() const { return BasicShapeRectangleType; }
8989private:
90  BasicShapeRectangle()
91  : m_cornerRadiusX(Undefined)
92  , m_cornerRadiusY(Undefined)
93  { }
 90 BasicShapeRectangle() { }
9491
9592 Length m_y;
9693 Length m_x;

@@public:
200197
201198 virtual Type type() const { return BasicShapeInsetRectangleType; }
202199private:
203  BasicShapeInsetRectangle()
204  : m_cornerRadiusX(Undefined)
205  , m_cornerRadiusY(Undefined)
206  { }
 200 BasicShapeInsetRectangle() { }
207201
208202 Length m_right;
209203 Length m_top;

LayoutTests/ChangeLog

 12013-06-12 Bem Jones-Bey <bjonesbe@adobe.com>
 2
 3 [CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry
 4 https://bugs.webkit.org/show_bug.cgi?id=116745
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Update tests to check for the rx and ry conditions.
 9
 10 * fast/exclusions/parsing/parsing-shape-inside-expected.txt: New results.
 11 * fast/exclusions/parsing/parsing-shape-outside-expected.txt: New results.
 12 * fast/exclusions/parsing/script-tests/parsing-shape-inside.js: Update
 13 to reflect that the computed value now always has rx and ry.
 14 * fast/exclusions/parsing/script-tests/parsing-shape-outside.js: Ditto.
 15 * fast/exclusions/parsing/script-tests/parsing-test-utils.js: Ditto.
 16 * fast/exclusions/resources/rounded-rectangle.js:
 17 (genLeftRightRoundedRectFloatShapeOutsideRefTest): Factor out left and
 18 right into separate methods so that they can be used in tests that
 19 only have left floats or only right floats.
 20 (genLeftRoundedRectFloatShapeOutsideRefTest): Ditto.
 21 (genRightRoundedRectFloatShapeOutsideRefTest): Ditto.
 22 * fast/exclusions/shape-inside/shape-inside-animation-expected.txt: New results.
 23 * fast/exclusions/shape-inside/shape-inside-animation.html: Change to
 24 reflect new computed style value.
 25 * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-large-radius-expected.html: Added.
 26 * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-large-radius.html: Added.
 27 * fast/exclusions/shape-outside-floats/shape-outside-floats-rounded-rectangle-large-radius-expected.html: Added.
 28 * fast/exclusions/shape-outside-floats/shape-outside-floats-rounded-rectangle-large-radius.html: Added.
 29 Note that the expected test here uses shape-inside, because we
 30 really are just testing that the behavior is the same as a
 31 shape-inside with rx and ry set to 50%, and it turned out to be
 32 very hard to construct an expected result that didn't use
 33 shape-inside and wasn't off by a pixel.
 34 * css3/masking/clip-path-animation.html: Update expected value.
 35 * css3/masking/clip-path-animation-expected.txt: New results.
 36
1372013-06-12 Kwang Yul Seo <skyul@company100.net>
238
339 Unreviewed gardening. Unskipping passing tests.

LayoutTests/css3/masking/clip-path-animation-expected.txt

11
2 PASS - "webkitClipPath" property for "rectangle-box" element at 1s saw something close to: rectangle(10%, 10%, 80%, 80%)
 2PASS - "webkitClipPath" property for "rectangle-box" element at 1s saw something close to: rectangle(10%, 10%, 80%, 80%, 0px, 0px)
33PASS - "webkitClipPath" property for "circle-box" element at 1s saw something close to: circle(35%, 35%, 35%)
44PASS - "webkitClipPath" property for "ellipse-box" element at 1s saw something close to: ellipse(35%, 35%, 35%, 30%)
55PASS - "webkitClipPath" property for "polygon-box" element at 1s saw something close to: polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)

LayoutTests/css3/masking/clip-path-animation.html

5353 <script type="text/javascript">
5454 const expectedValues = [
5555 // [animation-name, time, element-id, property, expected-value, tolerance]
56  ["rectangle-anim", 1, "rectangle-box", "webkitClipPath", "rectangle(10%, 10%, 80%, 80%)", 0.05],
 56 ["rectangle-anim", 1, "rectangle-box", "webkitClipPath", "rectangle(10%, 10%, 80%, 80%, 0px, 0px)", 0.05],
5757 ["circle-anim", 1, "circle-box", "webkitClipPath", "circle(35%, 35%, 35%)", 0.05],
5858 ["ellipse-anim", 1, "ellipse-box", "webkitClipPath", "ellipse(35%, 35%, 35%, 30%)", 0.05],
5959 ["polygon-anim", 1, "polygon-box", "webkitClipPath", "polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)", 0.05],

LayoutTests/fast/exclusions/parsing/parsing-shape-inside-expected.txt

@@On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
66PASS getCSSText("-webkit-shape-inside", "auto") is "auto"
77PASS getComputedStyleValue("-webkit-shape-inside", "auto") is "auto"
88PASS getCSSText("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)") is "rectangle(10px, 20px, 30px, 40px)"
9 PASS getComputedStyleValue("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)") is "rectangle(10px, 20px, 30px, 40px)"
 9PASS getComputedStyleValue("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)") is "rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
1010PASS getCSSText("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px, 5px)") is "rectangle(10px, 20px, 30px, 40px, 5px)"
11 PASS getComputedStyleValue("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px, 5px)") is "rectangle(10px, 20px, 30px, 40px, 5px)"
 11PASS getComputedStyleValue("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px, 5px)") is "rectangle(10px, 20px, 30px, 40px, 5px, 5px)"
1212PASS getCSSText("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px, 5px, 10px)") is "rectangle(10px, 20px, 30px, 40px, 5px, 10px)"
1313PASS getComputedStyleValue("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px, 5px, 10px)") is "rectangle(10px, 20px, 30px, 40px, 5px, 10px)"
1414PASS getCSSText("-webkit-shape-inside", "inset-rectangle(10px, 20px, 30px, 40px)") is "inset-rectangle(10px, 20px, 30px, 40px)"
15 PASS getComputedStyleValue("-webkit-shape-inside", "inset-rectangle(10px, 20px, 30px, 40px)") is "inset-rectangle(10px, 20px, 30px, 40px)"
 15PASS getComputedStyleValue("-webkit-shape-inside", "inset-rectangle(10px, 20px, 30px, 40px)") is "inset-rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
1616PASS getCSSText("-webkit-shape-inside", "inset-rectangle(10px, 20px, 30px, 40px, 5px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px)"
17 PASS getComputedStyleValue("-webkit-shape-inside", "inset-rectangle(10px, 20px, 30px, 40px, 5px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px)"
 17PASS getComputedStyleValue("-webkit-shape-inside", "inset-rectangle(10px, 20px, 30px, 40px, 5px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)"
1818PASS getCSSText("-webkit-shape-inside", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)"
1919PASS getComputedStyleValue("-webkit-shape-inside", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)"
2020PASS getCSSText("-webkit-shape-inside", "circle(10px, 20px, 30px)") is "circle(10px, 20px, 30px)"

@@PASS getCSSText("-webkit-shape-inside", "polygon(evenodd,12px)") is ""
9797PASS getComputedStyleValue("-webkit-shape-inside", "polygon(evenodd,12px)") is "outside-shape"
9898PASS getCSSText("-webkit-shape-inside", "polygon(10px, 20px, 30px, 40px, 40px, 50px)") is ""
9999PASS getComputedStyleValue("-webkit-shape-inside", "polygon(10px, 20px, 30px, 40px, 40px, 50px)") is "outside-shape"
100 PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "auto", "rectangle(10px, 20px, 30px, 40px)") is "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"
101 PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "outside-shape", "rectangle(10px, 20px, 30px, 40px)") is "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px)"
102 PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"
103 PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"
104 PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "inherit") is "parent: rectangle(10px, 20px, 30px, 40px), child: rectangle(10px, 20px, 30px, 40px)"
 100PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "auto", "rectangle(10px, 20px, 30px, 40px)") is "parent: auto, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
 101PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "outside-shape", "rectangle(10px, 20px, 30px, 40px)") is "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
 102PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: outside-shape"
 103PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: outside-shape"
 104PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "inherit") is "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
105105PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "", "inherit") is "parent: outside-shape, child: outside-shape"
106106PASS getParentAndChildComputedStylesString("-webkit-shape-inside", "auto", "inherit") is "parent: auto, child: auto"
107107PASS successfullyParsed is true

LayoutTests/fast/exclusions/parsing/parsing-shape-outside-expected.txt

@@On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
66PASS getCSSText("-webkit-shape-outside", "auto") is "auto"
77PASS getComputedStyleValue("-webkit-shape-outside", "auto") is "auto"
88PASS getCSSText("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)") is "rectangle(10px, 20px, 30px, 40px)"
9 PASS getComputedStyleValue("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)") is "rectangle(10px, 20px, 30px, 40px)"
 9PASS getComputedStyleValue("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)") is "rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
1010PASS getCSSText("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px, 5px)") is "rectangle(10px, 20px, 30px, 40px, 5px)"
11 PASS getComputedStyleValue("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px, 5px)") is "rectangle(10px, 20px, 30px, 40px, 5px)"
 11PASS getComputedStyleValue("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px, 5px)") is "rectangle(10px, 20px, 30px, 40px, 5px, 5px)"
1212PASS getCSSText("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px, 5px, 10px)") is "rectangle(10px, 20px, 30px, 40px, 5px, 10px)"
1313PASS getComputedStyleValue("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px, 5px, 10px)") is "rectangle(10px, 20px, 30px, 40px, 5px, 10px)"
1414PASS getCSSText("-webkit-shape-outside", "inset-rectangle(10px, 20px, 30px, 40px)") is "inset-rectangle(10px, 20px, 30px, 40px)"
15 PASS getComputedStyleValue("-webkit-shape-outside", "inset-rectangle(10px, 20px, 30px, 40px)") is "inset-rectangle(10px, 20px, 30px, 40px)"
 15PASS getComputedStyleValue("-webkit-shape-outside", "inset-rectangle(10px, 20px, 30px, 40px)") is "inset-rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
1616PASS getCSSText("-webkit-shape-outside", "inset-rectangle(10px, 20px, 30px, 40px, 5px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px)"
17 PASS getComputedStyleValue("-webkit-shape-outside", "inset-rectangle(10px, 20px, 30px, 40px, 5px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px)"
 17PASS getComputedStyleValue("-webkit-shape-outside", "inset-rectangle(10px, 20px, 30px, 40px, 5px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)"
1818PASS getCSSText("-webkit-shape-outside", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)"
1919PASS getComputedStyleValue("-webkit-shape-outside", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)") is "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)"
2020PASS getCSSText("-webkit-shape-outside", "circle(10px, 20px, 30px)") is "circle(10px, 20px, 30px)"

@@PASS getCSSText("-webkit-shape-outside", "polygon(10px, 20px, 30px, 40px, 40px,
9797PASS getComputedStyleValue("-webkit-shape-outside", "polygon(10px, 20px, 30px, 40px, 40px, 50px)") is "auto"
9898PASS getCSSText("-webkit-shape-outside", "outside-shape") is ""
9999PASS getComputedStyleValue("-webkit-shape-outside", "outside-shape") is "auto"
100 PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "auto", "rectangle(10px, 20px, 30px, 40px)") is "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"
101 PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
102 PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
103 PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "inherit") is "parent: rectangle(10px, 20px, 30px, 40px), child: rectangle(10px, 20px, 30px, 40px)"
 100PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "auto", "rectangle(10px, 20px, 30px, 40px)") is "parent: auto, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
 101PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: auto"
 102PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: auto"
 103PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "inherit") is "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"
104104PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "", "inherit") is "parent: auto, child: auto"
105105PASS getParentAndChildComputedStylesString("-webkit-shape-outside", "auto", "inherit") is "parent: auto, child: auto"
106106PASS successfullyParsed is true

LayoutTests/fast/exclusions/parsing/script-tests/parsing-shape-inside.js

@@if (window.internals)
88validShapeValues.concat("outside-shape").forEach(function(elt, i, a) {
99 var value = (elt instanceof Array) ? elt[0] : elt;
1010 var expectedValue = (elt instanceof Array) ? elt[1] : elt;
 11 var computedValue = (elt instanceof Array && elt.length > 2) ? elt[2] : expectedValue;
1112 testShapeSpecifiedProperty("-webkit-shape-inside", value, expectedValue);
12  testShapeComputedProperty("-webkit-shape-inside", value, expectedValue);
 13 testShapeComputedProperty("-webkit-shape-inside", value, computedValue);
1314});
1415
1516testLocalURLShapeProperty("-webkit-shape-inside", "url(\'image\')", "url(image)");

@@invalidShapeValues.forEach(function(value, i, a) {
2122applyToEachArglist(
2223 testNotInheritedShapeProperty,
2324 [// [property, parentValue, childValue, expectedValue]
24  ["-webkit-shape-inside", "auto", "rectangle(10px, 20px, 30px, 40px)", "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"],
25  ["-webkit-shape-inside", "outside-shape", "rectangle(10px, 20px, 30px, 40px)", "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px)"],
26  ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "initial", "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"],
27  ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "", "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"],
28  ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "inherit", "parent: rectangle(10px, 20px, 30px, 40px), child: rectangle(10px, 20px, 30px, 40px)"],
 25 ["-webkit-shape-inside", "auto", "rectangle(10px, 20px, 30px, 40px)", "parent: auto, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
 26 ["-webkit-shape-inside", "outside-shape", "rectangle(10px, 20px, 30px, 40px)", "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
 27 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "initial", "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: outside-shape"],
 28 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "", "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: outside-shape"],
 29 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "inherit", "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
2930 ["-webkit-shape-inside", "", "inherit", "parent: outside-shape, child: outside-shape"],
3031 ["-webkit-shape-inside", "auto", "inherit", "parent: auto, child: auto"]]
3132);

LayoutTests/fast/exclusions/parsing/script-tests/parsing-shape-outside.js

@@if (window.internals)
88validShapeValues.forEach(function(elt, i, a) {
99 var value = (elt instanceof Array) ? elt[0] : elt;
1010 var expectedValue = (elt instanceof Array) ? elt[1] : elt;
 11 var computedValue = (elt instanceof Array && elt.length > 2) ? elt[2] : expectedValue;
1112 testShapeSpecifiedProperty("-webkit-shape-outside", value, expectedValue);
12  testShapeComputedProperty("-webkit-shape-outside", value, expectedValue);
 13 testShapeComputedProperty("-webkit-shape-outside", value, computedValue);
1314});
1415
1516testLocalURLShapeProperty("-webkit-shape-outside", "url(\'image\')", "url(image)");

@@testShapePropertyParsingFailure("-webkit-shape-outside", "outside-shape", "auto"
2324applyToEachArglist(
2425 testNotInheritedShapeProperty,
2526 [// [property, parentValue, childValue, expectedValue]
26  ["-webkit-shape-outside", "auto", "rectangle(10px, 20px, 30px, 40px)", "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"],
27  ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "initial", "parent: rectangle(10px, 20px, 30px, 40px), child: auto"],
28  ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "", "parent: rectangle(10px, 20px, 30px, 40px), child: auto"],
29  ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "inherit", "parent: rectangle(10px, 20px, 30px, 40px), child: rectangle(10px, 20px, 30px, 40px)"],
 27 ["-webkit-shape-outside", "auto", "rectangle(10px, 20px, 30px, 40px)", "parent: auto, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
 28 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "initial", "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: auto"],
 29 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "", "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: auto"],
 30 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "inherit", "parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
3031 ["-webkit-shape-outside", "", "inherit", "parent: auto, child: auto"],
3132 ["-webkit-shape-outside", "auto", "inherit", "parent: auto, child: auto"]]
3233);

LayoutTests/fast/exclusions/parsing/script-tests/parsing-test-utils.js

11// Valid values for both shape-inside and shape-outside. Two values are specified when the shape property value
2 // differs from the specified value.
 2// differs from the specified value. Three values are specified when the computed shape property value differs
 3// from the specified value.
 4// eg: "specified value/CSS Text value/computed style value"
 5// or: ["specified value", "CSS Text value/computed style value"]
 6// or: ["specified value", "CSS Text value", "Computed style value"]
37var validShapeValues = [
48 "auto",
5  "rectangle(10px, 20px, 30px, 40px)",
6  "rectangle(10px, 20px, 30px, 40px, 5px)",
 9 ["rectangle(10px, 20px, 30px, 40px)", "rectangle(10px, 20px, 30px, 40px)", "rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
 10 ["rectangle(10px, 20px, 30px, 40px, 5px)", "rectangle(10px, 20px, 30px, 40px, 5px)", "rectangle(10px, 20px, 30px, 40px, 5px, 5px)"],
711 "rectangle(10px, 20px, 30px, 40px, 5px, 10px)",
812
9  "inset-rectangle(10px, 20px, 30px, 40px)",
10  "inset-rectangle(10px, 20px, 30px, 40px, 5px)",
 13 ["inset-rectangle(10px, 20px, 30px, 40px)", "inset-rectangle(10px, 20px, 30px, 40px)", "inset-rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
 14 ["inset-rectangle(10px, 20px, 30px, 40px, 5px)", "inset-rectangle(10px, 20px, 30px, 40px, 5px)", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)"],
1115 "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)",
1216
1317 "circle(10px, 20px, 30px)",

LayoutTests/fast/exclusions/resources/rounded-rectangle.js

@@function scanConvertRoundedRectangleOutside(r, height, lineHeight)
3030
3131function genLeftRightRoundedRectFloatShapeOutsideRefTest(args)
3232{
 33 genLeftRoundedRectFloatShapeOutsideRefTest(args);
 34 genRightRoundedRectFloatShapeOutsideRefTest(args);
 35}
 36
 37function genLeftRoundedRectFloatShapeOutsideRefTest(args)
 38{
3339 var leftRoundedRect = args.roundedRect;
3440 var leftRoundedRectIntervals = scanConvertRoundedRectangleOutside(leftRoundedRect, args.containerHeight, args.lineHeight);
3541 var leftFloatDivs = leftRoundedRectIntervals.map(function(interval) {

@@function genLeftRightRoundedRectFloatShapeOutsideRefTest(args)
3844 return '<div class="' + cls + '" style="width:' + width + 'px"></div>';
3945 });
4046 document.getElementById("left-" + args.insertElementIdSuffix).insertAdjacentHTML('afterend', leftFloatDivs.join("\n"));
 47}
4148
 49function genRightRoundedRectFloatShapeOutsideRefTest(args)
 50{
4251 var rightRoundedRect = Object.create(args.roundedRect);
4352 rightRoundedRect.x = args.containerWidth - args.roundedRect.width;
4453 var rightRoundedRectIntervals = scanConvertRoundedRectangleOutside(rightRoundedRect, args.containerHeight, args.lineHeight);

@@function genLeftRightRoundedRectFloatShapeOutsideRefTest(args)
4857 return '<div class="' + cls + '" style="width:' + width + 'px"></div>';
4958 });
5059 document.getElementById("right-" + args.insertElementIdSuffix).insertAdjacentHTML('afterend', rightFloatDivs.join("\n"));
51 }
 60}

LayoutTests/fast/exclusions/shape-inside/shape-inside-animation-expected.txt

11Moving Text Moving Text Moving Text Moving Text
2 PASS - "webkitShapeInside" property for "rectangle-box" element at 1s saw something close to: rectangle(10%, 10%, 80%, 80%)
 2PASS - "webkitShapeInside" property for "rectangle-box" element at 1s saw something close to: rectangle(10%, 10%, 80%, 80%, 0px, 0px)
33PASS - "webkitShapeInside" property for "circle-box" element at 1s saw something close to: circle(35%, 35%, 35%)
44PASS - "webkitShapeInside" property for "ellipse-box" element at 1s saw something close to: ellipse(35%, 35%, 35%, 30%)
55PASS - "webkitShapeInside" property for "polygon-box" element at 1s saw something close to: polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)

LayoutTests/fast/exclusions/shape-inside/shape-inside-animation.html

5656 <script type="text/javascript">
5757 const expectedValues = [
5858 // [animation-name, time, element-id, property, expected-value, tolerance]
59  ["rectangle-anim", 1, "rectangle-box", "webkitShapeInside", "rectangle(10%, 10%, 80%, 80%)", 0.05],
 59 ["rectangle-anim", 1, "rectangle-box", "webkitShapeInside", "rectangle(10%, 10%, 80%, 80%, 0px, 0px)", 0.05],
6060 ["circle-anim", 1, "circle-box", "webkitShapeInside", "circle(35%, 35%, 35%)", 0.05],
6161 ["ellipse-anim", 1, "ellipse-box", "webkitShapeInside", "ellipse(35%, 35%, 35%, 30%)", 0.05],
6262 ["polygon-anim", 1, "polygon-box", "webkitShapeInside", "polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)", 0.05],

LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle-large-radius-expected.html

 1<!DOCTYPE html>
 2<html>
 3<head>
 4<script>
 5 if (window.internals)
 6 window.internals.settings.setCSSExclusionsEnabled(true);
 7</script>
 8<style>
 9 /* The size of a square that just fits within a circle of radius r is r * sqrt(2). In this
 10 case that's the size of one Ahem character: 20 * sqrt(2) == 28.28.
 11 */
 12 .shape-inside {
 13 width: 40px;
 14 height: 40px;
 15 font: 28.28px/1 Ahem, sans-serif;
 16 color: green;
 17 border: 1px solid blue;
 18 border-radius: 20px;
 19 -webkit-shape-inside: rectangle(0px, 0px, 40px, 40px, 20px, 20px);
 20 }
 21</style>
 22</head>
 23<body>
 24 <h1>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=116745">116745</a>: [CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry</h1>
 25 <h2>Test that if rx > 50% width and ry > 50% height, they are properly clamped to 50% of the respective dimension when doing layout on the shape. All of the following tests should look identical, and the blue circle should wrap around the green square.</h2>
 26 <div class="shape-inside fixed-units">
 27 X
 28 </div>
 29 <div class="shape-inside different-units">
 30 X
 31 </div>
 32 <div class="shape-inside relative-units">
 33 X
 34 </div>
 35 <div class="shape-inside edge-case">
 36 X
 37 </div>
 38</body>
 39</html>

LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle-large-radius.html

 1<!DOCTYPE html>
 2<html>
 3<head>
 4<script>
 5 if (window.internals)
 6 window.internals.settings.setCSSExclusionsEnabled(true);
 7</script>
 8<style>
 9 /* The size of a square that just fits within a circle of radius r is r * sqrt(2). In this
 10 case that's the size of one Ahem character: 20 * sqrt(2) == 28.28.
 11 */
 12 .shape-inside {
 13 width: 40px;
 14 height: 40px;
 15 font: 28.28px/1 Ahem, sans-serif;
 16 color: green;
 17 border: 1px solid blue;
 18 border-radius: 20px;
 19 }
 20 .fixed-units {
 21 -webkit-shape-inside: rectangle(0px, 0px, 40px, 40px, 40px, 40px);
 22 }
 23 .different-units {
 24 -webkit-shape-inside: rectangle(0px, 0px, 40px, 40px, 100%, 100%);
 25 }
 26 .relative-units {
 27 -webkit-shape-inside: rectangle(0px, 0px, 100%, 100%, 700em, 700em);
 28 }
 29 .edge-case {
 30 -webkit-shape-inside: rectangle(0px, 0px, 100%, 100%, 50%, 50%);
 31 }
 32</style>
 33</head>
 34<body>
 35 <h1>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=116745">116745</a>: [CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry</h1>
 36 <h2>Test that if rx > 50% width and ry > 50% height, they are properly clamped to 50% of the respective dimension when doing layout on the shape. All of the following tests should look identical, and the blue circle should wrap around the green square.</h2>
 37 <div class="shape-inside fixed-units">
 38 X
 39 </div>
 40 <div class="shape-inside different-units">
 41 X
 42 </div>
 43 <div class="shape-inside relative-units">
 44 X
 45 </div>
 46 <div class="shape-inside edge-case">
 47 X
 48 </div>
 49</body>
 50</html>

LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-rounded-rectangle-large-radius-expected.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <style>
 5 .container {
 6 position: relative;
 7 font: 10px/1 Ahem, sans-serif;
 8 width: 80px;
 9 height: 40px;
 10 border: 1px solid black;
 11 }
 12 .rounded-rect {
 13 position: absolute;
 14 top: 0px;
 15 left: 0px;
 16 width: 40px;
 17 height: 40px;
 18 border: 1px solid blue;
 19 border-radius: 50%;
 20 margin: -1px; /* shape-outside layout is unaffected by the border */
 21 }
 22 .left-rounded-rect-float-line {
 23 float: left;
 24 clear: left;
 25 height: 10px;
 26 }
 27 </style>
 28 </head>
 29 <body>
 30 <h1>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=116745">116745</a>: [CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry</h1>
 31 <h2>Test that if rx > 50% width and ry > %50 height, they are properly clamped to 50% of the respective dimension when doing layout on the shape. All of the following tests should look identical, and the black blocks should wrap around the blue circle.</h2>
 32 <div class="container">
 33 <div id="left-fixed-units" class="rounded-rect"></div>
 34 X<br/>
 35 X<br/>
 36 X<br/>
 37 X
 38 </div>
 39 <div class="container">
 40 <div id="left-relative-units" class="rounded-rect"></div>
 41 X<br/>
 42 X<br/>
 43 X<br/>
 44 X
 45 </div>
 46 <div class="container">
 47 <div id="left-different-units" class="rounded-rect"></div>
 48 X<br/>
 49 X<br/>
 50 X<br/>
 51 X
 52 </div>
 53 <div class="container">
 54 <div id="left-edge-case" class="rounded-rect"></div>
 55 X<br/>
 56 X<br/>
 57 X<br/>
 58 X
 59 </div>
 60 <script src="../resources/rounded-rectangle.js"></script>
 61 <script src="../resources/subpixel-utils.js"></script>
 62 <script>
 63 genLeftRoundedRectFloatShapeOutsideRefTest({
 64 roundedRect: {x: 0, y: 0, width: 40, height: 40, rx: 20, ry: 20},
 65 containerWidth: 80,
 66 containerHeight: 40,
 67 lineHeight: 10,
 68 floatElementClassSuffix: "rounded-rect-float-line",
 69 insertElementIdSuffix: "fixed-units"
 70 });
 71 genLeftRoundedRectFloatShapeOutsideRefTest({
 72 roundedRect: {x: 0, y: 0, width: 40, height: 40, rx: 20, ry: 20},
 73 containerWidth: 80,
 74 containerHeight: 40,
 75 lineHeight: 10,
 76 floatElementClassSuffix: "rounded-rect-float-line",
 77 insertElementIdSuffix: "relative-units"
 78 });
 79 genLeftRoundedRectFloatShapeOutsideRefTest({
 80 roundedRect: {x: 0, y: 0, width: 40, height: 40, rx: 20, ry: 20},
 81 containerWidth: 80,
 82 containerHeight: 40,
 83 lineHeight: 10,
 84 floatElementClassSuffix: "rounded-rect-float-line",
 85 insertElementIdSuffix: "different-units"
 86 });
 87 genLeftRoundedRectFloatShapeOutsideRefTest({
 88 roundedRect: {x: 0, y: 0, width: 40, height: 40, rx: 20, ry: 20},
 89 containerWidth: 80,
 90 containerHeight: 40,
 91 lineHeight: 10,
 92 floatElementClassSuffix: "rounded-rect-float-line",
 93 insertElementIdSuffix: "edge-case"
 94 });
 95 </script>
 96 </body>
 97</html>

LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-rounded-rectangle-large-radius.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <script>
 5 if (window.internals)
 6 window.internals.settings.setCSSExclusionsEnabled(true);
 7 </script>
 8 <style>
 9 .container {
 10 font: 10px/1 Ahem, sans-serif;
 11 width: 80px;
 12 height: 40px;
 13 border: 1px solid black;
 14 }
 15 .float {
 16 float: left;
 17 width: 40px;
 18 height: 40px;
 19 border: 1px solid blue;
 20 border-radius: 50%;
 21 }
 22 .fixed-units {
 23 -webkit-shape-outside: rectangle(0px, 0px, 40px, 40px, 40px, 40px);
 24 }
 25 .different-units {
 26 -webkit-shape-outside: rectangle(0px, 0px, 40px, 40px, 100%, 100%);
 27 }
 28 .relative-units {
 29 -webkit-shape-outside: rectangle(0px, 0px, 100%, 100%, 700em, 700em);
 30 }
 31 .edge-case {
 32 -webkit-shape-outside: rectangle(0px, 0px, 100%, 100%, 50%, 50%);
 33 }
 34 </style>
 35 </head>
 36 <body>
 37 <h1>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=116745">116745</a>: [CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry</h1>
 38 <h2>Test that if rx > 50% width and ry > %50 height, they are properly clamped to 50% of the respective dimension when doing layout on the shape. All of the following tests should look identical, and the black blocks should wrap around the blue circle.</h2>
 39 <div class="container">
 40 <div class="float fixed-units"></div>
 41 X<br/>
 42 X<br/>
 43 X<br/>
 44 X
 45 </div>
 46 <div class="container">
 47 <div class="float relative-units"></div>
 48 X<br/>
 49 X<br/>
 50 X<br/>
 51 X
 52 </div>
 53 <div class="container">
 54 <div class="float different-units"></div>
 55 X<br/>
 56 X<br/>
 57 X<br/>
 58 X
 59 </div>
 60 <div class="container">
 61 <div class="float edge-case"></div>
 62 X<br/>
 63 X<br/>
 64 X<br/>
 65 X
 66 </div>
 67 </body>
 68</html>