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

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

Issue 420053002: Use tighter typing in editing: DeleteSelectionCommand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 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 | Source/core/editing/DeleteSelectionCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/CompositeEditCommand.cpp
diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp
index 52f748be811244a352308d2d5ecfce66a12f7e04..74dd2aa22abcb66a771543c65136835a1f639bd2 100644
--- a/Source/core/editing/CompositeEditCommand.cpp
+++ b/Source/core/editing/CompositeEditCommand.cpp
@@ -64,6 +64,7 @@
#include "core/events/ScopedEventQueue.h"
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLBRElement.h"
+#include "core/html/HTMLDivElement.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLSpanElement.h"
#include "core/rendering/InlineTextBox.h"
@@ -293,11 +294,12 @@ bool CompositeEditCommand::isRemovableBlock(const Node* node)
if (!isHTMLDivElement(*node))
return false;
- ContainerNode* parentNode = node->parentNode();
+ const HTMLDivElement& element = toHTMLDivElement(*node);
+ ContainerNode* parentNode = element.parentNode();
if (parentNode && parentNode->firstChild() != parentNode->lastChild())
return false;
- if (!toElement(node)->hasAttributes())
+ if (!element.hasAttributes())
return true;
return false;
« no previous file with comments | « no previous file | Source/core/editing/DeleteSelectionCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698