[CSS Exclusions] shape-outside on floats for rectangle shapes positioning
https://bugs.webkit.org/show_bug.cgi?id=100399

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-01-21
Reviewed by David Hyatt.

Source/WebCore:

When a float has a shape-outside with non-zero x or y, the float's
exclusion behavior can happen at a completely different location than
where the float's content is painted. This patch brings initial
support for this behavior.

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

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::flipFloatForWritingModeForChild): If called
    during painting, make sure to pass that state down to the float
    positioning so that it can use the proper position.
(WebCore::RenderBlock::paintFloats): Since this is concerned with
    painting, use the position of the float, not the shape.
(WebCore::RenderBlock::positionNewFloats): Set the correct location
    for the float, relative to the location of the shape.
(WebCore::RenderBlock::addOverhangingFloats): Add FIXME.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::xPositionForFloatIncludingMargin):
(WebCore::RenderBlock::yPositionForFloatIncludingMargin): Since the
    position of the shape (FloatingObject) can be different from the
    position of the float's box (RenderBox), the position needs to be
    computed differently for painting than for determining layout.
(WebCore::RenderBlock::flipFloatForWritingModeForChild): Change
    signature to take painting flag.

LayoutTests:

* fast/exclusions/shape-outside-floats/shape-outside-floats-positioning-expected.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-positioning.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html:
    This test had incorrect coordinates for some of the shapes, causing them to break now that x and y are supported for the shapes.

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