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

Unified Diff: Source/core/dom/NodeRenderStyle.h

Issue 192293002: Use new is*Element() helper functions in DOM code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add is*Element(PassRefPtr) helper 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
Index: Source/core/dom/NodeRenderStyle.h
diff --git a/Source/core/dom/NodeRenderStyle.h b/Source/core/dom/NodeRenderStyle.h
index deef2fd5a6ecd6d6bfd7302d5bc07dca22189872..96b9fab2c72f3cd9b23e8285ecfcbd085344fb01 100644
--- a/Source/core/dom/NodeRenderStyle.h
+++ b/Source/core/dom/NodeRenderStyle.h
@@ -25,9 +25,9 @@
#ifndef NodeRenderStyle_h
#define NodeRenderStyle_h
-#include "HTMLNames.h"
#include "core/dom/Node.h"
#include "core/dom/NodeRenderingTraversal.h"
+#include "core/html/HTMLOptGroupElement.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/style/RenderStyle.h"
@@ -40,7 +40,7 @@ inline RenderStyle* Node::renderStyle() const
// <option> and <optgroup> can be styled even though they never get renderers,
// so they store their style internally and return it through nonRendererStyle().
// We check here explicitly to avoid the virtual call in the common case.
- if (hasTagName(HTMLNames::optgroupTag) || hasTagName(HTMLNames::optionTag))
+ if (isHTMLOptGroupElement(*this) || isHTMLOptionElement(this))
return nonRendererStyle();
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698