Title: [167675] trunk
Revision
167675
Author
r...@igalia.com
Date
2014-04-22 12:48:29 -0700 (Tue, 22 Apr 2014)

Log Message

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.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (167674 => 167675)


--- trunk/LayoutTests/ChangeLog	2014-04-22 19:22:28 UTC (rev 167674)
+++ trunk/LayoutTests/ChangeLog	2014-04-22 19:48:29 UTC (rev 167675)
@@ -1,3 +1,12 @@
+2014-04-22  Manuel Rego Casasnovas  <r...@igalia.com>
+
+        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.
+
+        * TestExpectations: Unskip fast/regions/cssom/region-range-for-box-crash.html.
+
 2014-04-22  Brent Fulgham  <bfulg...@apple.com>
 
         Check (rather than assume) element is a RenderTableSection before using it

Modified: trunk/LayoutTests/TestExpectations (167674 => 167675)


--- trunk/LayoutTests/TestExpectations	2014-04-22 19:22:28 UTC (rev 167674)
+++ trunk/LayoutTests/TestExpectations	2014-04-22 19:48:29 UTC (rev 167675)
@@ -106,5 +106,3 @@
 
 # Expando properties on attribute nodes disappear
 webkit.org/b/88045 fast/dom/gc-attribute-node.html [ Failure Pass ]
-
-webkit.org/b/131982 [ Debug ] fast/regions/cssom/region-range-for-box-crash.html [ Crash ]

Modified: trunk/Source/WebCore/ChangeLog (167674 => 167675)


--- trunk/Source/WebCore/ChangeLog	2014-04-22 19:22:28 UTC (rev 167674)
+++ trunk/Source/WebCore/ChangeLog	2014-04-22 19:48:29 UTC (rev 167675)
@@ -1,3 +1,17 @@
+2014-04-22  Manuel Rego Casasnovas  <r...@igalia.com>
+
+        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.
+
+        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.
+
 2014-04-22  Brady Eidson  <beid...@apple.com>
 
         Change Image Controls replacement to use selection and paste

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (167674 => 167675)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2014-04-22 19:22:28 UTC (rev 167674)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2014-04-22 19:48:29 UTC (rev 167675)
@@ -799,7 +799,7 @@
         renderSubtreesMap.set(namedFlowThread, nullptr);
 
     if (start && end) {
-        RefPtr<Range> initialRange = Range::create(document(), start->node(), startPos, end->node(), endPos);
+        RefPtr<Range> initialRange = Range::create(document(), start->node(), 0, end->node(), 0);
 
         Node* startNode = initialRange->startContainer();
         Node* endNode = initialRange->endContainer();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to