[CSS Shapes][CSS Regions] Respect bottom positioned shapes and content adjustment inside shapes
https://bugs.webkit.org/show_bug.cgi?id=117599

Reviewed by David Hyatt.

In r150478 I added support for multiple positioned shape-insides on regions, this patch covers the cases when a shape
is positioned to the bottom of the region or the region contains a shape which forces the content to be adjusted inside
the shape (e.g. we have a triangle shape and the first line needs to be started at the first position where it fits).
I introduced a new helper function to update the current shape and the current line segments in the flow thread cases. With
this new helper function all the logic which calculates the segments for shape-inside on regions is located in one function.

Source/WebCore:

Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes.html
       fast/regions/shape-inside/shape-inside-on-regions-block-content-polygon-with-adjustment.html
       fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes.html
       fast/regions/shape-inside/shape-inside-on-regions-inline-content-polygon-with-adjustment.html

* rendering/RenderBlock.h: Add new helper's declaration
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineLayoutState::LineLayoutState): Add a member to carry adjustment for flow thread cases.
(WebCore::LineLayoutState::adjustedLogicalLineTop): Add new member.
(WebCore::LineLayoutState::setAdjustedLogicalLineTop): Add new setter for the new member.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Move flow thread case to its helper function.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Added new helper for flow thread cases.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): Save adjustment for flow thread cases.

LayoutTests:

* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes-expected.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-block-content-polygon-with-adjustment-expected.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-block-content-polygon-with-adjustment.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes-expected.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-polygon-with-adjustment-expected.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-polygon-with-adjustment.html: Added.


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