[CSS Regions] Crash while painting block selection gaps in regions
https://bugs.webkit.org/show_bug.cgi?id=132720

Reviewed by David Hyatt.

Source/WebCore:
The fix for WebKit bug https://bugs.webkit.org/show_bug.cgi?id=131511
allowed selection highlight to match the DOM selection when the start
and end point of the selection were in different flow threads. In order
to enable that, the selection was performed separately on view and
render flow threads, considered selection subtrees.

However, the start and end points for each selection subtree were computed
by means of Range class but it is not always possible to construct a valid
Range from two pairs of RenderObjects and offsets.

This patch keeps the substrees approach but instead of storing the endpoints
for each subtree in a Range and continuously extending the Range, it stores them
using the already available SelectionSubtreeRoot class. After the end points are
computed for each subtree and before processing the subtree selection, the end points
are adjusted in a similar fashion as the one used in FrameSelection::updateAppearance(),
to make sure we are passing the same expected information to the method implementing
the visible selection processing.

Test: fast/regions/selection-gaps-paint-crash.html

* rendering/RenderView.cpp:
(WebCore::RenderView::splitSelectionBetweenSubtrees):
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::selectionClear):

LayoutTests:
* TestExpectations: Unskip a test that was crashing
* fast/regions/selection-gaps-paint-crash-expected.txt: Added.
* fast/regions/selection-gaps-paint-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(CMAKE): [GTK] Several WebKit2GTK+ unit tests are no longer built
https://bugs.webkit.org/show_bug.cgi?id=133117

Reviewed by Philippe Normand.

Bring back missing tests to the build.

* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Add polygon tests for shapes on regions and shapes on the content flow
https://bugs.webkit.org/show_bug.cgi?id=133107

Reviewed by Mihnea Ovidenie.

* fast/regions/shape-outside-floats/regions-shape-outside-region-polygon-floats-expected.html: Added.
* fast/regions/shape-outside-floats/regions-shape-outside-region-polygon-floats.html: Added.


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