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

Unified Diff: sky/engine/core/dom/TreeScope.cpp

Issue 852703002: Merge StyleSheetCollection into ScopedStyleResolver. (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 | « sky/engine/core/dom/TreeScope.h ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/TreeScope.cpp
diff --git a/sky/engine/core/dom/TreeScope.cpp b/sky/engine/core/dom/TreeScope.cpp
index b1037d83818be219b92281f0da552e5a5ec20e0f..b9d07ed4d26e957c66349dc00506435ac88d3ef1 100644
--- a/sky/engine/core/dom/TreeScope.cpp
+++ b/sky/engine/core/dom/TreeScope.cpp
@@ -34,7 +34,6 @@
#include "sky/engine/core/dom/Element.h"
#include "sky/engine/core/dom/ElementTraversal.h"
#include "sky/engine/core/dom/NodeRenderStyle.h"
-#include "sky/engine/core/dom/StyleSheetCollection.h"
#include "sky/engine/core/dom/TreeScopeAdopter.h"
#include "sky/engine/core/dom/shadow/ElementShadow.h"
#include "sky/engine/core/dom/shadow/ShadowRoot.h"
@@ -56,7 +55,6 @@ TreeScope::TreeScope(ContainerNode& rootNode, Document& document)
, m_document(&document)
, m_parentTreeScope(&document)
, m_scopedStyleResolver(ScopedStyleResolver::create(*this))
- , m_styleSheets(StyleSheetCollection::create(*this))
, m_guardRefCount(0)
{
ASSERT(rootNode != document);
@@ -69,7 +67,6 @@ TreeScope::TreeScope(Document& document)
, m_document(&document)
, m_parentTreeScope(nullptr)
, m_scopedStyleResolver(ScopedStyleResolver::create(*this))
- , m_styleSheets(StyleSheetCollection::create(*this))
, m_guardRefCount(0)
{
m_rootNode->setTreeScope(this);
@@ -403,8 +400,8 @@ bool TreeScope::hasSameStyles(TreeScope& other)
{
if (this == &other)
return true;
- const Vector<RefPtr<blink::CSSStyleSheet> >& list = styleSheets().activeAuthorStyleSheets();
- const Vector<RefPtr<blink::CSSStyleSheet> >& otherList = other.styleSheets().activeAuthorStyleSheets();
+ const Vector<RefPtr<blink::CSSStyleSheet> >& list = scopedStyleResolver().authorStyleSheets();
+ const Vector<RefPtr<blink::CSSStyleSheet> >& otherList = other.scopedStyleResolver().authorStyleSheets();
if (list.size() != otherList.size())
return false;
« no previous file with comments | « sky/engine/core/dom/TreeScope.h ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698