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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp

Issue 2322853004: Convert an assertion to if-condition in ReplaceSelectionCommand::doApply() (Closed)
Patch Set: 2016-09-09T17:11:56 Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/platform/win/editing/pasteboard/paste-text-009-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
index 0003284950c9157f204502f4c97f3429eca29054..16f62db723846de5faf1a9c31f4e7d46651da523 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
@@ -1148,7 +1148,6 @@ void ReplaceSelectionCommand::doApply(EditingState* editingState)
// Adjust insertionPos to prevent nesting.
// If the start was in a Mail blockquote, we will have already handled adjusting insertionPos above.
if (m_preventNesting && enclosingBlockOfInsertionPos && !isTableCell(enclosingBlockOfInsertionPos) && !startIsInsideMailBlockquote) {
- DCHECK_NE(enclosingBlockOfInsertionPos, currentRoot);
Xiaocheng 2016/09/12 04:58:56 What's the reason the assertion was introduced? Is
yosin_UTC9 2016/09/12 05:21:38 This assertion is introduced by https://bugs.webki
VisiblePosition visibleInsertionPos = createVisiblePosition(insertionPos);
if (isEndOfBlock(visibleInsertionPos) && !(isStartOfBlock(visibleInsertionPos) && fragment.hasInterchangeNewlineAtEnd()))
insertionPos = Position::inParentAfterNode(*enclosingBlockOfInsertionPos);
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/editing/pasteboard/paste-text-009-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698