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

Unified Diff: Source/core/dom/ShadowTreeStyleSheetCollection.cpp

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/ShadowTreeStyleSheetCollection.cpp
diff --git a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
index 6a74608c5ea5a0763d8bd10e0ecda4c116a17014..3e819928f682563f59ad05d4799d7d80e77992bf 100644
--- a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
+++ b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
@@ -53,14 +53,14 @@ void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine* engine, Sty
StyleSheet* sheet = 0;
CSSStyleSheet* activeSheet = 0;
- if (!node->isHTMLElement() || !node->hasTagName(styleTag))
+ if (!isHTMLStyleElement(*node))
continue;
- Element* element = toElement(node);
+ HTMLStyleElement* element = toHTMLStyleElement(node);
const AtomicString& title = element->fastGetAttribute(titleAttr);
bool enabledViaScript = false;
- sheet = toHTMLStyleElement(node)->sheet();
+ sheet = element->sheet();
if (sheet && !sheet->disabled() && sheet->isCSSStyleSheet())
activeSheet = toCSSStyleSheet(sheet);

Powered by Google App Engine
This is Rietveld 408576698