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

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

Issue 1914983003: Add outputs for DCHECKs in InsertParagraphSeparatorCommand.cpp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | 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/InsertParagraphSeparatorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
index 2862fab6126122d07e929f92dbc183e7436225e3..840e371f4f81d4b43c0f337b1f8dfaf187dc0103 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
@@ -394,7 +394,7 @@ void InsertParagraphSeparatorCommand::doApply(EditingState* editingState)
// after the preserved newline, causing the newline to be turned into a nbsp.
if (leadingWhitespace.isNotNull() && leadingWhitespace.anchorNode()->isTextNode()) {
Text* textNode = toText(leadingWhitespace.anchorNode());
- DCHECK(!textNode->layoutObject() || textNode->layoutObject()->style()->collapseWhiteSpace());
+ DCHECK(!textNode->layoutObject() || textNode->layoutObject()->style()->collapseWhiteSpace()) << textNode;
replaceTextInNodePreservingMarkers(textNode, leadingWhitespace.computeOffsetInContainerNode(), 1, nonBreakingSpaceString());
}
@@ -473,7 +473,7 @@ void InsertParagraphSeparatorCommand::doApply(EditingState* editingState)
// use |VisiblePosition::characterAfter()|.
if (!isRenderedCharacter(positionAfterSplit)) {
// Clear out all whitespace and insert one non-breaking space
- DCHECK(!positionAfterSplit.computeContainerNode()->layoutObject() || positionAfterSplit.computeContainerNode()->layoutObject()->style()->collapseWhiteSpace());
+ DCHECK(!positionAfterSplit.computeContainerNode()->layoutObject() || positionAfterSplit.computeContainerNode()->layoutObject()->style()->collapseWhiteSpace()) << positionAfterSplit;
deleteInsignificantTextDownstream(positionAfterSplit);
if (positionAfterSplit.anchorNode()->isTextNode())
insertTextIntoNode(toText(positionAfterSplit.computeContainerNode()), 0, nonBreakingSpaceString());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698