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

Unified Diff: sky/engine/core/css/StyleSheetContents.h

Issue 791633010: StyleSheetContents doesn't need a set of clients. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/CSSStyleSheet.cpp ('k') | sky/engine/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/StyleSheetContents.h
diff --git a/sky/engine/core/css/StyleSheetContents.h b/sky/engine/core/css/StyleSheetContents.h
index 482d79ebca24406b73629ca0a2249a724a2d8220..3c225f5071edd3010173d6abf38a4fe23d46985b 100644
--- a/sky/engine/core/css/StyleSheetContents.h
+++ b/sky/engine/core/css/StyleSheetContents.h
@@ -43,9 +43,9 @@ class StyleRuleFontFace;
class StyleSheetContents : public RefCounted<StyleSheetContents> {
public:
- static PassRefPtr<StyleSheetContents> create(const CSSParserContext& context)
+ static PassRefPtr<StyleSheetContents> create(Document* document, const CSSParserContext& context)
{
- return adoptRef(new StyleSheetContents(context));
+ return adoptRef(new StyleSheetContents(document, context));
}
~StyleSheetContents();
@@ -58,22 +58,18 @@ public:
const Vector<RefPtr<StyleRuleBase> >& childRules() const { return m_childRules; }
- void registerClient(CSSStyleSheet*);
- void unregisterClient(CSSStyleSheet*);
-
void shrinkToFit();
RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); }
RuleSet& ensureRuleSet(AddRuleFlags);
- void clearRuleSet();
private:
- explicit StyleSheetContents(const CSSParserContext&);
+ explicit StyleSheetContents(Document* document, const CSSParserContext&);
OwnPtr<RuleSet> m_ruleSet;
Vector<RefPtr<StyleRuleBase> > m_childRules;
CSSParserContext m_parserContext;
- HashSet<RawPtr<CSSStyleSheet> > m_clients;
+ RefPtr<Document> m_document;
};
} // namespace
« no previous file with comments | « sky/engine/core/css/CSSStyleSheet.cpp ('k') | sky/engine/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698