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

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

Issue 16879016: Use toElement instead of static_cast<Element*> and static_cast<const Element*> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index 6414c4db61ddcbe640572c0dd43b5aa0e52041fd..47a76bae3415b13e543c8f77e88de2a7fa4d1265 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -1475,7 +1475,7 @@ void CaretBase::paintCaret(Node* node, GraphicsContext* context, const LayoutPoi
void FrameSelection::debugRenderer(RenderObject *r, bool selected) const
{
if (r->node()->isElementNode()) {
- Element* element = static_cast<Element *>(r->node());
+ Element* element = toElement(r->node());
fprintf(stderr, "%s%s\n", selected ? "==> " : " ", element->localName().string().utf8().data());
} else if (r->isText()) {
RenderText* textRenderer = toRenderText(r);

Powered by Google App Engine
This is Rietveld 408576698