[CSSRegions] Slider displayed wrong in regions
https://bugs.webkit.org/show_bug.cgi?id=132243

Reviewed by Mihnea Ovidenie.

Source/WebCore:
In case a box didn't have a range, getRegionRangeForBox was searching for
the top-most unplittable ancestor. This is not correct in every case. It's
possible to have a box with range that has children without ranges (e.g. an
absolutely positioned inline box with shadow descendants).

I've modified getRegionRangeForBox to search for the first ancestor that
has a cached range and use that instead of looking for an unsplittable box.
The range of the box is the region at the top of the box, clamped by the
range of the ancestor. This will be correct all the time once all the layout
systems are region range aware and are able to cache it.

Test: fast/regions/positioned-slider-in-regions.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::hasRegionRangeForBox):
(WebCore::RenderFlowThread::getRegionRangeForBox):
* rendering/RenderFlowThread.h:

LayoutTests:
Tests that the thumb of positioned slider inside regions is correctly painted.

* fast/regions/positioned-slider-in-regions-expected.html: Added.
* fast/regions/positioned-slider-in-regions.html: Added.


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