[CSS Shapes] New positioning model: Borders
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jul 2013 18:49:19 +0000 (18:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jul 2013 18:49:19 +0000 (18:49 +0000)
commita307f9ff3aba306c2050045207148a7aec077b42
tree8772383ba7d22d85a388bf582360d369cfff6f3c
parent4c430dcf12300711bc6a539175dbdc4e5b30a8ee
[CSS Shapes] New positioning model: Borders
https://bugs.webkit.org/show_bug.cgi?id=118822

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-23
Reviewed by Dean Jackson.

Source/WebCore:

Converting to the shape coordinate system was not properly accounting
for borders and padding. This has been fixed and a new convienence
method added because of the added complexity of the conversion.

Test: csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Update to use
    computeSegmentsForContainingBlockLine to do the coordinate
    conversion.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
    Add new method to do the coordinate conversion from the containing
    block coordinate system to the coordinate system of the shape so
    that the segments can be correctly calculated.

LayoutTests:

Test that the shape is properly respected when the float has a border.

* csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html: Added.
* csswg/submitted/shapes/shape-outside/w3c-import.log: Updated with new
    import information.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000-expected.html [new file with mode: 0644]
LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html [new file with mode: 0644]
LayoutTests/csswg/submitted/shapes/shape-outside/w3c-import.log
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
Source/WebCore/rendering/shapes/ShapeOutsideInfo.h