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

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

Issue 338673002: Reduce the number of CachedUAStyles (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Return a create that somehow escaped Created 6 years, 6 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/resolver/StyleResolver.cpp ('k') | Source/core/rendering/RenderTheme.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.h
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index ae3d449711839c157eb5a9e4a7786ff3a477efa9..2a723ba471b0b802d0a3928aa6daa59073cae1df 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -100,9 +100,14 @@ public:
// and constructing it is expensive so we avoid it if possible.
if (!style()->hasAppearance())
return;
- m_cachedUAStyle = CachedUAStyle(style());
+
+ m_cachedUAStyle = CachedUAStyle::create(style());
+ }
+
+ const CachedUAStyle* cachedUAStyle() const
+ {
+ return m_cachedUAStyle.get();
}
- const CachedUAStyle& cachedUAStyle() const { return m_cachedUAStyle; }
ElementStyleResources& elementStyleResources() { return m_elementStyleResources; }
const CSSToStyleMap& styleMap() const { return m_styleMap; }
@@ -150,7 +155,7 @@ private:
FontBuilder m_fontBuilder;
- CachedUAStyle m_cachedUAStyle;
+ OwnPtr<CachedUAStyle> m_cachedUAStyle;
ElementStyleResources m_elementStyleResources;
// CSSToStyleMap is a pure-logic class and only contains
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/rendering/RenderTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698