[CSS Exclusions] Properly position multiple stacked floats with non rectangular shape outside
https://bugs.webkit.org/show_bug.cgi?id=110372

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

Source/WebCore:

Stacked floats get positioned based on the bounding box of the shape,
not on the shape contours itself. This patch causes that to happen.

Test: fast/exclusions/shape-outside-floats/shape-outside-floats-stacked.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeLogicalLocationForFloat): Use the
    "BoundingBoxOffset" mode so that we compute offsets based on the shape
    bounding boxes of previous floats, not the shape contour.
(WebCore::RenderBlock::logicalLeftOffsetForLine): Check the
    ShapeOutsideFloatOffsetMode to determine if the offset should be
    adjusted for the shape contour or not.
(WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalRightOffsetForLine): Add parameter for offset mode.
(WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): If the
    new float is being added on top of a previous float on the same line,
    undo the offset for the previous float's shape contour so that we
    position the new float based on the bounding box.

LayoutTests:

Tests demonstrating stacked floats properly working with shape-outside.

* fast/exclusions/shape-outside-floats/shape-outside-floats-stacked-expected.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-stacked.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline tests affected by r148049 or r148048.

* compositing/layer-creation/rotate3d-overlap-expected.txt:
* compositing/repaint/resize-repaint-expected.txt:
* compositing/repaint/resize-repaint.html: Allow the test to run
outside WTR/DRT.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148057 268f45cc-cd09-0410-ab3c-d52691b4dbfc