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

Unified Diff: Source/core/css/resolver/ScopedStyleResolver.h

Issue 27537009: Avoid always style recalc when removing stylesheets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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/css/resolver/ScopedStyleResolver.h
diff --git a/Source/core/css/resolver/ScopedStyleResolver.h b/Source/core/css/resolver/ScopedStyleResolver.h
index 09b1edf48cee02c62852197f1eac396cf8037838..fee466f337bced28bff8908632768069e310df06 100644
--- a/Source/core/css/resolver/ScopedStyleResolver.h
+++ b/Source/core/css/resolver/ScopedStyleResolver.h
@@ -100,6 +100,12 @@ public:
ScopedStyleTree() : m_scopedResolverForDocument(0), m_buildInDocumentOrder(true) { }
ScopedStyleResolver* ensureScopedStyleResolver(const ContainerNode& scopingNode);
+ ScopedStyleResolver* lookupScopedStyleResolverFor(const ContainerNode* scopingNode)
+ {
+ HashMap<const ContainerNode*, OwnPtr<ScopedStyleResolver> >::iterator it = m_authorStyles.find(scopingNode);
+ return it != m_authorStyles.end() ? it->value.get() : 0;
+ }
+
ScopedStyleResolver* scopedStyleResolverFor(const ContainerNode& scopingNode);
ScopedStyleResolver* addScopedStyleResolver(const ContainerNode& scopingNode, bool& isNewEntry);
void clear();

Powered by Google App Engine
This is Rietveld 408576698