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

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

Issue 335773002: Don't move uneditable paragraph contents in CompositeEditCommand::moveParagraphContentsToNewBlockIfN (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/justy-center-with-uneditable-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/CompositeEditCommand.cpp
diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp
index f450f39a50e55eebb6626fb0c77c8c62a4e63225..04354411c54eef667da88bd1f51727e719b225f8 100644
--- a/Source/core/editing/CompositeEditCommand.cpp
+++ b/Source/core/editing/CompositeEditCommand.cpp
@@ -902,6 +902,9 @@ PassRefPtrWillBeRawPtr<Element> CompositeEditCommand::moveParagraphContentsToNew
document().updateLayoutIgnorePendingStylesheets();
+ if (!isEditablePosition(pos, ContentIsEditable, DoNotUpdateStyle))
Yuta Kitamura 2014/06/13 07:29:01 I'm not 100% certain whether this check should liv
yosin_UTC9 2014/06/13 09:01:27 Agree. It should be caller's responsibility.
+ return nullptr;
+
// It's strange that this function is responsible for verifying that pos has not been invalidated
// by an earlier call to this function. The caller, applyBlockStyle, should do this.
VisiblePosition visiblePos(pos, VP_DEFAULT_AFFINITY);
« no previous file with comments | « LayoutTests/editing/execCommand/justy-center-with-uneditable-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698