Title: [192567] trunk
Revision
192567
Author
carlo...@webkit.org
Date
2015-11-17 23:52:47 -0800 (Tue, 17 Nov 2015)

Log Message

Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
https://bugs.webkit.org/show_bug.cgi?id=151187

Reviewed by Darin Adler.

Source/WebCore:

This is a merge of Blink r174671:
https://codereview.chromium.org/291143002

Fixes imported/blink/editing/execCommand/indent-button-crash.html.

* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::doApply):

LayoutTests:

Unskip the test.

* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (192566 => 192567)


--- trunk/LayoutTests/ChangeLog	2015-11-18 07:48:06 UTC (rev 192566)
+++ trunk/LayoutTests/ChangeLog	2015-11-18 07:52:47 UTC (rev 192567)
@@ -1,3 +1,15 @@
+2015-11-17  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
+        https://bugs.webkit.org/show_bug.cgi?id=151187
+
+        Reviewed by Darin Adler.
+
+        Unskip the test.
+
+        * platform/gtk/TestExpectations:
+        * platform/win/TestExpectations:
+
 2015-11-17  Zalan Bujtas  <za...@apple.com>
 
         Simple line layout: Add letter-spacing support.

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (192566 => 192567)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2015-11-18 07:48:06 UTC (rev 192566)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2015-11-18 07:52:47 UTC (rev 192567)
@@ -699,8 +699,6 @@
 
 webkit.org/b/144771 editing/selection/selection-invalid-offset.html [ Crash ]
 
-webkit.org/b/151260 imported/blink/editing/execCommand/indent-button-crash.html [ Crash ]
-
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of Crashing tests
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/win/TestExpectations (192566 => 192567)


--- trunk/LayoutTests/platform/win/TestExpectations	2015-11-18 07:48:06 UTC (rev 192566)
+++ trunk/LayoutTests/platform/win/TestExpectations	2015-11-18 07:52:47 UTC (rev 192567)
@@ -3232,7 +3232,6 @@
 # Imported Blink tests.
 imported/blink/compositing/iframes/ancestor-clipping-layer.html [ Skip ]
 imported/blink/compositing/perspective-origin-overflow-hidden.html [ Skip ]
-imported/blink/editing/execCommand/indent-button-crash.html [ Skip ]
 imported/blink/http/tests/plugins/get-url-notify-on-removal.html [ Skip ]
 imported/blink/plugins/empty-per-context-data.html [ Skip ]
 imported/blink/animations/animation-iteration-event-short-iterations.html [ Failure Pass ]

Modified: trunk/Source/WebCore/ChangeLog (192566 => 192567)


--- trunk/Source/WebCore/ChangeLog	2015-11-18 07:48:06 UTC (rev 192566)
+++ trunk/Source/WebCore/ChangeLog	2015-11-18 07:52:47 UTC (rev 192567)
@@ -1,5 +1,20 @@
 2015-11-17  Carlos Garcia Campos  <cgar...@igalia.com>
 
+        Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
+        https://bugs.webkit.org/show_bug.cgi?id=151187
+
+        Reviewed by Darin Adler.
+
+        This is a merge of Blink r174671:
+        https://codereview.chromium.org/291143002
+
+        Fixes imported/blink/editing/execCommand/indent-button-crash.html.
+
+        * editing/ApplyBlockElementCommand.cpp:
+        (WebCore::ApplyBlockElementCommand::doApply):
+
+2015-11-17  Carlos Garcia Campos  <cgar...@igalia.com>
+
         REGRESSION(r192459): [GTK] User agent string is broken after r192459
         https://bugs.webkit.org/show_bug.cgi?id=151347
 

Modified: trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp (192566 => 192567)


--- trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp	2015-11-18 07:48:06 UTC (rev 192566)
+++ trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp	2015-11-18 07:52:47 UTC (rev 192567)
@@ -70,8 +70,12 @@
     // FIXME: We paint the gap before some paragraphs that are indented with left 
     // margin/padding, but not others.  We should make the gap painting more consistent and 
     // then use a left margin/padding rule here.
-    if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd))
-        setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary), endingSelection().isDirectional()));
+    if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd)) {
+        VisibleSelection newSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary), endingSelection().isDirectional());
+        if (newSelection.isNone())
+            return;
+        setEndingSelection(newSelection);
+    }
 
     VisibleSelection selection = selectionForParagraphIteration(endingSelection());
     VisiblePosition startOfSelection = selection.visibleStart();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to