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

Unified Diff: sky/engine/core/css/CSSStyleSheet.cpp

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 | « no previous file | sky/engine/core/css/StyleSheetContents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/CSSStyleSheet.cpp
diff --git a/sky/engine/core/css/CSSStyleSheet.cpp b/sky/engine/core/css/CSSStyleSheet.cpp
index 03e5280523bf580ae8d5ee514acd0a7e6da4a571..536b622d902be117bd302f6eb056b15ae6cdc4ab 100644
--- a/sky/engine/core/css/CSSStyleSheet.cpp
+++ b/sky/engine/core/css/CSSStyleSheet.cpp
@@ -52,7 +52,7 @@ PassRefPtr<CSSStyleSheet> CSSStyleSheet::create(PassRefPtr<StyleSheetContents> s
PassRefPtr<CSSStyleSheet> CSSStyleSheet::create(Node* ownerNode, const KURL& baseURL)
{
CSSParserContext parserContext(ownerNode->document(), 0, baseURL);
- RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(parserContext);
+ RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(&ownerNode->document(), parserContext);
return adoptRef(new CSSStyleSheet(sheet.release(), ownerNode));
}
@@ -61,12 +61,10 @@ CSSStyleSheet::CSSStyleSheet(PassRefPtr<StyleSheetContents> contents, Node* owne
, m_ownerNode(ownerNode)
{
ASSERT(isAcceptableCSSStyleSheetParent(ownerNode));
- m_contents->registerClient(this);
}
CSSStyleSheet::~CSSStyleSheet()
{
- m_contents->unregisterClient(this);
}
void CSSStyleSheet::setMediaQueries(PassRefPtr<MediaQuerySet> mediaQueries)
@@ -81,8 +79,6 @@ void CSSStyleSheet::clearOwnerNode()
{
if (Document* owner = ownerDocument())
owner->modifiedStyleSheet(this);
- if (m_ownerNode)
- m_contents->unregisterClient(this);
m_ownerNode = nullptr;
}
« no previous file with comments | « no previous file | sky/engine/core/css/StyleSheetContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698