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

Unified Diff: sky/engine/core/css/resolver/StyleResolver.h

Issue 844873002: Simplify the style sharing list code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | sky/engine/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/StyleResolver.h
diff --git a/sky/engine/core/css/resolver/StyleResolver.h b/sky/engine/core/css/resolver/StyleResolver.h
index 480dcecacfdbbf6ce38ff154d5f7ba9ad56666b8..aee85869348bf0b5ccfa596d1a212b27d60af223 100644
--- a/sky/engine/core/css/resolver/StyleResolver.h
+++ b/sky/engine/core/css/resolver/StyleResolver.h
@@ -65,8 +65,7 @@ class StyleRuleKeyframes;
class MatchResult;
const unsigned styleSharingListSize = 15;
-const unsigned styleSharingMaxDepth = 32;
-typedef Deque<RawPtr<Element>, styleSharingListSize> StyleSharingList;
+typedef Deque<Element*, styleSharingListSize> StyleSharingList;
struct CSSPropertyValue {
STACK_ALLOCATED();
@@ -126,7 +125,7 @@ public:
void notifyResizeForViewportUnits();
- StyleSharingList& styleSharingList();
+ StyleSharingList& styleSharingList() { return m_styleSharingList; }
void addToStyleSharingList(Element&);
void clearStyleSharingList();
@@ -141,9 +140,6 @@ public:
unsigned accessCount() const { return m_accessCount; }
void didAccess() { ++m_accessCount; }
- void increaseStyleSharingDepth() { ++m_styleSharingDepth; }
- void decreaseStyleSharingDepth() { --m_styleSharingDepth; }
-
private:
// FIXME: This should probably go away, folded into FontBuilder.
void updateFont(StyleResolverState&);
@@ -191,8 +187,7 @@ private:
StyleResourceLoader m_styleResourceLoader;
- unsigned m_styleSharingDepth;
- Vector<OwnPtr<StyleSharingList>, styleSharingMaxDepth> m_styleSharingLists;
+ StyleSharingList m_styleSharingList;
OwnPtr<StyleResolverStats> m_styleResolverStats;
OwnPtr<StyleResolverStats> m_styleResolverStatsTotals;
« no previous file with comments | « no previous file | sky/engine/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698