12013-10-01 Zoltan Horvath <zoltan@webkit.org>
2
3 [CSS Shapes] Support block content with inline content around floats in shape-inside
4 https://bugs.webkit.org/show_bug.cgi?id=121616
5
6 Reviewed by NOBODY (OOPS!).
7
8 In r156022 and r156364, I added support for floats inside shape-inside with inline content. This change extends
9 the existing implementation to support block content with inline content (paragraphs). I added an extra text for
10 positioning a float inside shape-inside without text content around it.
11
12 Tests: fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-block-content.html
13 fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-block-content.html
14 fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle.html
15 fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-block-content.html
16 fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-block-content.html
17
18 * rendering/FloatingObjects.h:
19 (WebCore::FloatingObject::logicalSize): Add new function to return the FloatingObject logical size.
20 * rendering/LineWidth.cpp:
21 (WebCore::LineWidth::fitBelowFloats): When the lineBreaker code pushes down the content below the floating object,
22 we need to update the segments if we are in a shape-inside.
23 * rendering/RenderBlock.cpp:
24 (WebCore::RenderBlock::computeLogicalLocationForFloat): Do the positioning based on the float actual size, and use the
25 recent shapeInsideInfo. (Calling layoutShapeInsideInfo which deals with the layoutStates also instead of shapeInsideInfo.)
26 * rendering/RenderBlock.h:
27 * rendering/RenderBlockLineLayout.cpp:
28 (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): If we don't have inline content we still need to positionize
29 our float content in a shape-inside.
30 (WebCore::updateSegmentsForShapes): Use the right coordinates for block content with inline content.
31