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

Unified Diff: Source/core/css/StyleSheetList.cpp

Issue 192373005: Use new is*Element() helper functions in CSS 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/css/StyleInvalidationAnalysis.cpp ('k') | Source/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleSheetList.cpp
diff --git a/Source/core/css/StyleSheetList.cpp b/Source/core/css/StyleSheetList.cpp
index bc6b0df930638eda87328d74902cea1a6434bbfd..38649f33e222f70d46ee8d2070543087ce56f5de 100644
--- a/Source/core/css/StyleSheetList.cpp
+++ b/Source/core/css/StyleSheetList.cpp
@@ -76,9 +76,7 @@ HTMLStyleElement* StyleSheetList::getNamedItem(const AtomicString& name) const
// But unicity of stylesheet ids is good practice anyway ;)
// FIXME: We should figure out if we should change this or fix the spec.
Element* element = m_treeScope->getElementById(name);
- if (element && element->hasTagName(styleTag))
- return toHTMLStyleElement(element);
- return 0;
+ return isHTMLStyleElement(element) ? toHTMLStyleElement(element) : 0;
}
CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name)
« no previous file with comments | « Source/core/css/StyleInvalidationAnalysis.cpp ('k') | Source/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698