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

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

Issue 2406163004: Simplify the usage of PositionWithAffinity (Closed)
Patch Set: Created 4 years, 2 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
Index: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
index d9d2bd2ca3645ae6735577a7f8662c36f38f31f4..510ebf148c61bfe1822878fee1f804fbcb9e94c5 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
@@ -186,10 +186,9 @@ void ApplyBlockElementCommand::formatSelection(
if (endAfterSelection.isNotNull() && !endAfterSelection.isConnected())
break;
// Sanity check: Make sure our moveParagraph calls didn't remove
- // endOfNextParagraph.position().anchorNode() If somehow, e.g. mutation
+ // endOfNextParagraph.anchorNode() If somehow, e.g. mutation
// event handler, we did, return to prevent crashes.
- if (endOfNextParagraph.isNotNull() &&
- !endOfNextParagraph.position().isConnected())
+ if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.isConnected())
return;
document().updateStyleAndLayoutIgnorePendingStylesheets();

Powered by Google App Engine
This is Rietveld 408576698