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

Unified Diff: Source/core/inspector/InspectorStyleSheet.cpp

Issue 308963002: Minimize calls to Node::nodeType() as it is virtual (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 years, 7 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/inspector/InspectorStyleSheet.cpp
diff --git a/Source/core/inspector/InspectorStyleSheet.cpp b/Source/core/inspector/InspectorStyleSheet.cpp
index b7c03a554331e9384fa0642aa700b1283d267ef0..5edb51bca492111af23c47aaacb95b813f25c356 100644
--- a/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/Source/core/inspector/InspectorStyleSheet.cpp
@@ -1531,7 +1531,7 @@ bool InspectorStyleSheet::resourceStyleSheetText(String* result) const
bool InspectorStyleSheet::inlineStyleSheetText(String* result) const
{
Node* ownerNode = m_pageStyleSheet->ownerNode();
- if (!ownerNode || ownerNode->nodeType() != Node::ELEMENT_NODE)
+ if (!ownerNode || !ownerNode->isElementNode())
return false;
Element& ownerElement = toElement(*ownerNode);

Powered by Google App Engine
This is Rietveld 408576698