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

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

Issue 196683003: Use new is*Element() helper functions more in editing code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/core/editing/IndentOutdentCommand.cpp ('k') | Source/core/editing/InsertListCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/InsertLineBreakCommand.cpp
diff --git a/Source/core/editing/InsertLineBreakCommand.cpp b/Source/core/editing/InsertLineBreakCommand.cpp
index 5270238d9484c1824f62e95d00a0d919b2ccc811..4c2699d2afa4afda2807d8f98fdda45bfb38fb21 100644
--- a/Source/core/editing/InsertLineBreakCommand.cpp
+++ b/Source/core/editing/InsertLineBreakCommand.cpp
@@ -90,7 +90,7 @@ void InsertLineBreakCommand::doApply()
// FIXME: Need to merge text nodes when inserting just after or before text.
if (isEndOfParagraph(caret) && !lineBreakExistsAtVisiblePosition(caret)) {
- bool needExtraLineBreak = !pos.deprecatedNode()->hasTagName(hrTag) && !pos.deprecatedNode()->hasTagName(tableTag);
+ bool needExtraLineBreak = !isHTMLHRElement(*pos.deprecatedNode()) && !isHTMLTableElement(*pos.deprecatedNode());
insertNodeAt(nodeToInsert.get(), pos);
« no previous file with comments | « Source/core/editing/IndentOutdentCommand.cpp ('k') | Source/core/editing/InsertListCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698