[CSS Regions] Implement visual overflow computation for inline elements
https://bugs.webkit.org/show_bug.cgi?id=125291
Reviewed by David Hyatt.
Source/WebCore:
The patch implements visual overflow computation for inline elements per region. The algorithm
uses the container region of each root line box to determine the lines in a region generated by
a RenderInline. The overflow of a RenderInline inside a region is the smallest rectangle that fits
all the line boxes belonging to that region.
The patch also correctly flips for writing mode the overflow of a renderer before clipping with it.
Tests: fast/regions/overflow-in-variable-width-regions-inline-bt.html
fast/regions/overflow-in-variable-width-regions-inline-continuation.html
fast/regions/overflow-in-variable-width-regions-inline-lr.html
fast/regions/overflow-in-variable-width-regions-inline-rl.html
fast/regions/overflow-in-variable-width-regions-inline.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::updateAlwaysCreateLineBoxes): Always create line boxes for RenderInline
(WebCore::RenderInline::linesVisualOverflowBoundingBoxInRegion):
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
LayoutTests:
Tests for inline elements overflow correct painting inside regions.
* fast/regions/overflow-in-variable-width-regions-inline-bt-expected.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline-bt.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline-continuation-expected.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline-continuation.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline-expected.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline-lr-expected.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline-lr.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline-rl-expected.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline-rl.html: Added.
* fast/regions/overflow-in-variable-width-regions-inline.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed