Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Unified Diff: Source/core/editing/InsertListCommand.cpp

Issue 1298633002: [Editing] Make InsertListCommand check endingSelection() editability. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: nit pick Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/editing/execCommand/insert-ordered-list-crash2.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/InsertListCommand.cpp
diff --git a/Source/core/editing/InsertListCommand.cpp b/Source/core/editing/InsertListCommand.cpp
index 9ad50f6c0fa3954af9f4c7b3d439715462dd97c6..c69d02ec9a8339d97bb4278dd3be230881867462 100644
--- a/Source/core/editing/InsertListCommand.cpp
+++ b/Source/core/editing/InsertListCommand.cpp
@@ -172,7 +172,7 @@ void InsertListCommand::doApply()
// If endOfSelection is null, then some contents have been deleted from the document.
// This should never happen and if it did, exit early immediately because we've lost the loop invariant.
ASSERT(endOfSelection.isNotNull());
- if (endOfSelection.isNull())
+ if (endOfSelection.isNull() || !endOfSelection.rootEditableElement())
return;
startOfLastParagraph = startOfParagraph(endOfSelection, CanSkipOverEditingBoundary);
}
« no previous file with comments | « LayoutTests/editing/execCommand/insert-ordered-list-crash2.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698