[CSS Shapes] Support for shape-margin in BoxShape
authorhmuller@adobe.com <hmuller@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Nov 2013 19:19:37 +0000 (19:19 +0000)
committerhmuller@adobe.com <hmuller@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Nov 2013 19:19:37 +0000 (19:19 +0000)
commit19dd7adc1735c8b27e2d6bb9b396c4f6ebb1ad19
treeb96134008bcda28dc0f23b4d3074799ca7805774
parent43260b5b98d9998811aade9eb6498348f5f9e28d
[CSS Shapes] Support for shape-margin in BoxShape
https://bugs.webkit.org/show_bug.cgi?id=124788

Source/WebCore:

Reviewed by Andreas Kling.

Corrected BoxShape's internal shape-margin/padding bounds FloatRoundedRect
initialization. Tests for the padding bounds will be added when the rest of
shape-padding for box shapes implementation is ready.

Tests: fast/shapes/shape-outside-floats/shape-outside-margin-boxes-001.html
       fast/shapes/shape-outside-floats/shape-outside-margin-boxes-002.html

* rendering/shapes/BoxShape.cpp: Use constructor shape-margin,shape-padding parameters.
(WebCore::BoxShape::BoxShape):
* rendering/shapes/BoxShape.h:
* rendering/shapes/Shape.cpp:
(WebCore::createBoxShape): Pass the shape-margin and shape-padding values along to the BoxShape constructor.
(WebCore::Shape::createShape): Ditto.

LayoutTests:

Verify that shape-margin has the expected effect on the four possible shape-outside box values
for left and right floats.

Reviewed by Andreas Kling.

* fast/shapes/shape-outside-floats/shape-outside-margin-boxes-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-margin-boxes-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-margin-boxes-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-margin-boxes-002.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/shapes/shape-outside-floats/shape-outside-margin-boxes-001-expected.html [new file with mode: 0644]
LayoutTests/fast/shapes/shape-outside-floats/shape-outside-margin-boxes-001.html [new file with mode: 0644]
LayoutTests/fast/shapes/shape-outside-floats/shape-outside-margin-boxes-002-expected.html [new file with mode: 0644]
LayoutTests/fast/shapes/shape-outside-floats/shape-outside-margin-boxes-002.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/shapes/BoxShape.cpp
Source/WebCore/rendering/shapes/BoxShape.h
Source/WebCore/rendering/shapes/Shape.cpp