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

Unified Diff: Source/core/editing/TypingCommand.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/TextIterator.cpp ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TypingCommand.cpp
diff --git a/Source/core/editing/TypingCommand.cpp b/Source/core/editing/TypingCommand.cpp
index 1356b424d3d6dced77da555a7ea65c00726fafb1..fcca6cea1e23c7f813328760cde070fac3b37646 100644
--- a/Source/core/editing/TypingCommand.cpp
+++ b/Source/core/editing/TypingCommand.cpp
@@ -41,6 +41,7 @@
#include "core/editing/VisibleUnits.h"
#include "core/editing/htmlediting.h"
#include "core/frame/LocalFrame.h"
+#include "core/html/HTMLBRElement.h"
#include "core/rendering/RenderObject.h"
namespace WebCore {
@@ -384,7 +385,7 @@ bool TypingCommand::makeEditableRootEmpty()
if (root->firstChild() == root->lastChild()) {
Element* firstElementChild = ElementTraversal::firstWithin(*root);
- if (firstElementChild && firstElementChild->hasTagName(brTag)) {
+ if (isHTMLBRElement(firstElementChild)) {
// If there is a single child and it could be a placeholder, leave it alone.
if (root->renderer() && root->renderer()->isRenderBlockFlow())
return false;
« no previous file with comments | « Source/core/editing/TextIterator.cpp ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698