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

Unified Diff: Source/core/rendering/RenderTreeAsText.cpp

Issue 197283025: Use new is*Element() helper functions more in rendering 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/rendering/RenderTheme.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTreeAsText.cpp
diff --git a/Source/core/rendering/RenderTreeAsText.cpp b/Source/core/rendering/RenderTreeAsText.cpp
index 532144e960732759d3eb7209c74fd8e042ad0338..f0dad98a953570da6cbe8086d4a0a4925408d833 100644
--- a/Source/core/rendering/RenderTreeAsText.cpp
+++ b/Source/core/rendering/RenderTreeAsText.cpp
@@ -114,17 +114,17 @@ static String getTagName(Node* n)
static bool isEmptyOrUnstyledAppleStyleSpan(const Node* node)
{
- if (!node || !node->isHTMLElement() || !node->hasTagName(spanTag))
+ if (!isHTMLSpanElement(node))
return false;
- const HTMLElement* elem = toHTMLElement(node);
- if (elem->getAttribute(classAttr) != "Apple-style-span")
+ const HTMLElement& elem = toHTMLElement(*node);
+ if (elem.getAttribute(classAttr) != "Apple-style-span")
return false;
- if (!node->hasChildren())
+ if (!elem.hasChildren())
return true;
- const StylePropertySet* inlineStyleDecl = elem->inlineStyle();
+ const StylePropertySet* inlineStyleDecl = elem.inlineStyle();
return (!inlineStyleDecl || inlineStyleDecl->isEmpty());
}
« no previous file with comments | « Source/core/rendering/RenderTheme.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698