Title: [96834] trunk
Revision
96834
Author
[email protected]
Date
2011-10-06 11:04:27 -0700 (Thu, 06 Oct 2011)

Log Message

<rdar://problem/10232866> Assertion failure beneath blockSelectionGaps() when a selected node is removed

Reviewed by Ryosuke Niwa.

Source/WebCore: 

Test: editing/selection/invalid-in-RenderView.html

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateAppearance): Ensure that the VisibleSelection used to set the selection
in the RenderView is valid, by reconstructing it from the current selection.

LayoutTests: 

* editing/selection/invalid-in-RenderView-expected.txt: Added.
* editing/selection/invalid-in-RenderView.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (96833 => 96834)


--- trunk/LayoutTests/ChangeLog	2011-10-06 18:03:11 UTC (rev 96833)
+++ trunk/LayoutTests/ChangeLog	2011-10-06 18:04:27 UTC (rev 96834)
@@ -1,3 +1,12 @@
+2011-10-06  Dan Bernstein  <[email protected]>
+
+        <rdar://problem/10232866> Assertion failure beneath blockSelectionGaps() when a selected node is removed
+
+        Reviewed by Ryosuke Niwa.
+
+        * editing/selection/invalid-in-RenderView-expected.txt: Added.
+        * editing/selection/invalid-in-RenderView.html: Added.
+
 2011-10-06  Alejandro G. Castro  <[email protected]>
 
         [WK2] [GTK] Add Skipped file for Webkit2 test runner

Added: trunk/LayoutTests/editing/selection/invalid-in-RenderView-expected.txt (0 => 96834)


--- trunk/LayoutTests/editing/selection/invalid-in-RenderView-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/selection/invalid-in-RenderView-expected.txt	2011-10-06 18:04:27 UTC (rev 96834)
@@ -0,0 +1 @@
+

Added: trunk/LayoutTests/editing/selection/invalid-in-RenderView.html (0 => 96834)


--- trunk/LayoutTests/editing/selection/invalid-in-RenderView.html	                        (rev 0)
+++ trunk/LayoutTests/editing/selection/invalid-in-RenderView.html	2011-10-06 18:04:27 UTC (rev 96834)
@@ -0,0 +1,21 @@
+<script>
+    var frameset;
+    var topFrame;
+    var selection;
+
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    _onload_ = function()
+    {
+        frameset = document.getElementById("frameset");
+        topFrame = document.getElementById("topFrame");
+        selection = getSelection();
+        selection.setBaseAndExtent(frameset.parentNode, 0, frameset, 4);
+        topFrame.parentNode.removeChild(topFrame);
+    }
+</script>
+<frameset id="frameset">
+    <frame id="topFrame"/>
+    <frame/>
+</frameset>

Modified: trunk/Source/WebCore/ChangeLog (96833 => 96834)


--- trunk/Source/WebCore/ChangeLog	2011-10-06 18:03:11 UTC (rev 96833)
+++ trunk/Source/WebCore/ChangeLog	2011-10-06 18:04:27 UTC (rev 96834)
@@ -1,3 +1,15 @@
+2011-10-06  Dan Bernstein  <[email protected]>
+
+        <rdar://problem/10232866> Assertion failure beneath blockSelectionGaps() when a selected node is removed
+
+        Reviewed by Ryosuke Niwa.
+
+        Test: editing/selection/invalid-in-RenderView.html
+
+        * editing/FrameSelection.cpp:
+        (WebCore::FrameSelection::updateAppearance): Ensure that the VisibleSelection used to set the selection
+        in the RenderView is valid, by reconstructing it from the current selection.
+
 2011-10-06  Andreas Kling  <[email protected]>
 
         InlineBox's virtualLogicalHeight() partially limited to builds with SVG.

Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (96833 => 96834)


--- trunk/Source/WebCore/editing/FrameSelection.cpp	2011-10-06 18:03:11 UTC (rev 96833)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp	2011-10-06 18:04:27 UTC (rev 96834)
@@ -1680,7 +1680,7 @@
     if (!view)
         return;
 
-    VisibleSelection selection = this->selection();
+    VisibleSelection selection(m_selection.visibleStart(), m_selection.visibleEnd());
 
     if (!selection.isRange()) {
         view->clearSelection();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to