REGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in...
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Apr 2014 19:48:29 +0000 (19:48 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Apr 2014 19:48:29 +0000 (19:48 +0000)
commit341391fcf7623ae6e70150678295b3d627895ca4
treee7d46aff3a0071182151d624b778f4b9791967b3
parentb611ead793e380ecab5a2257016c52de73bf30ae
REGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in debug mode
https://bugs.webkit.org/show_bug.cgi?id=131982

Reviewed by David Hyatt.

Source/WebCore:
The problem was creating the Range from the arguments received at RenderView::setSelection(). Specifically
in this test endPos is 1 when the element has not children which creates an invalid Range.

* rendering/RenderView.cpp:
(WebCore::RenderView::splitSelectionBetweenSubtrees): Pass 0 as startPos and endPos to Range::create() as we are
not interested in the positions at this point.

LayoutTests:
* TestExpectations: Unskip fast/regions/cssom/region-range-for-box-crash.html.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderView.cpp