REGRESSION (r167652): SelectionState is not set properly for non leaf objects in...
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 May 2014 08:05:58 +0000 (08:05 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 May 2014 08:05:58 +0000 (08:05 +0000)
commit1a72feaeea58929a827ebc06e2e0825657f3f395
treefa829ea47ea72bb29d8f7fb2e792954d780b4600
parent13e02bf2f9fc0de2fb04367dfebe68d3d50bbeb8
REGRESSION (r167652): SelectionState is not set properly for non leaf objects in pages with regions
https://bugs.webkit.org/show_bug.cgi?id=132493

Reviewed by David Hyatt.

Source/WebCore:
Non selection leaf elements were not included in the selection ranges,
that was causing that their selection state was not set properly and
when one of the element was removed as it was marked as SelectionNone
current selection was not removed.

Due to this fix, the regression detected in bug #131982 arose again.
Reverted changes from r167675 and reopened bug as previous fix was not
right. Updated TestExpectations accordingly.

Test: fast/regions/selection/crash-select-all.html

* rendering/RenderView.cpp:
(WebCore::RenderView::splitSelectionBetweenSubtrees): We need to include
non selection leafs in the range, otherwise we won't be marking
selection state of some elements properly.

LayoutTests:
* TestExpectations: Marked
fast/regions/cssom/region-range-for-box-crash.html as crashing on
debug due to regression detected in bug #131982.
* fast/regions/selection/crash-select-all-expected.txt: Added.
* fast/regions/selection/crash-select-all.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/regions/selection/crash-select-all-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/selection/crash-select-all.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderView.cpp