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

Unified Diff: Source/core/rendering/TextAutosizer.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/RenderView.cpp ('k') | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/TextAutosizer.cpp
diff --git a/Source/core/rendering/TextAutosizer.cpp b/Source/core/rendering/TextAutosizer.cpp
index 6b4ed51d54dc929cb6f80fef247ea30b26fb1751..1b836dfb9a0f72e3152c719035cf4033e05cae9e 100644
--- a/Source/core/rendering/TextAutosizer.cpp
+++ b/Source/core/rendering/TextAutosizer.cpp
@@ -105,7 +105,7 @@ static RenderObject* getAncestorList(const RenderObject* renderer)
// see http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-li-element
for (RenderObject* ancestor = renderer->parent(); ancestor; ancestor = ancestor->parent()) {
Node* parentNode = ancestor->generatingNode();
- if (parentNode && (parentNode->hasTagName(olTag) || parentNode->hasTagName(ulTag)))
+ if (parentNode && (isHTMLOListElement(*parentNode) || isHTMLUListElement(*parentNode)))
return ancestor;
}
return 0;
@@ -448,7 +448,7 @@ void TextAutosizer::setMultiplierForList(RenderObject* renderer, float multiplie
#ifndef NDEBUG
Node* parentNode = renderer->generatingNode();
ASSERT(parentNode);
- ASSERT(parentNode->hasTagName(olTag) || parentNode->hasTagName(ulTag));
+ ASSERT(isHTMLOListElement(parentNode) || isHTMLUListElement(parentNode));
#endif
setMultiplier(renderer, multiplier);
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698