REGRESSION(r169105): fast/regions/cssom/region-range-for-box-crash.html is more crash...
authormihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 19:01:27 +0000 (19:01 +0000)
committermihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 19:01:27 +0000 (19:01 +0000)
commit18a710a59bf640a819c5d90000dc4d083ec91259
tree894c108ba37d2202f3171d173aa20419d7cdf156
parent05e4fc5498a3db310a041e5f2f8b4ccacaa891a2
REGRESSION(r169105): fast/regions/cssom/region-range-for-box-crash.html is more crashy than before
https://bugs.webkit.org/show_bug.cgi?id=133124

Reviewed by David Hyatt.

Source/WebCore:
When adjusting the end points of a subtree selection in the case of a document
with named flows, we have to make sure that we pass the computed end
points to the visible selection algorithm only if the end points are
part of the same subtree, otherwise assume a selection clear behavior.

The test fast/regions/cssom/region-range-for-box-crash.html is used to
test this behavior.

* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
(WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Moved to header file.
* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::selectionStartEndPositions):

LayoutTests:
Unskip the test file that used to crash.

* TestExpectations:

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