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

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

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/core.gni ('k') | sky/engine/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/ScopedStyleResolver.h
diff --git a/sky/engine/core/css/resolver/ScopedStyleResolver.h b/sky/engine/core/css/resolver/ScopedStyleResolver.h
index 31634352652ad7ff79543dccbb85b54a39a04e01..6f120eeddbd23975c558ec396078f951a114cbb0 100644
--- a/sky/engine/core/css/resolver/ScopedStyleResolver.h
+++ b/sky/engine/core/css/resolver/ScopedStyleResolver.h
@@ -28,7 +28,9 @@
#define SKY_ENGINE_CORE_CSS_RESOLVER_SCOPEDSTYLERESOLVER_H_
#include "sky/engine/core/css/ElementRuleCollector.h"
+#include "sky/engine/core/css/MediaQueryEvaluator.h"
#include "sky/engine/core/css/RuleSet.h"
+#include "sky/engine/core/dom/DocumentOrderedList.h"
#include "sky/engine/core/dom/TreeScope.h"
#include "sky/engine/wtf/HashMap.h"
#include "sky/engine/wtf/HashSet.h"
@@ -37,8 +39,11 @@
namespace blink {
-class StyleSheetContents;
+class CSSStyleSheet;
+class ContainerNode;
+class HTMLStyleElement;
class RuleFeatureSet;
+class StyleSheetContents;
// This class selects a RenderStyle for a given element based on a collection of stylesheets.
class ScopedStyleResolver final {
@@ -50,24 +55,35 @@ public:
return adoptPtr(new ScopedStyleResolver(scope));
}
- const TreeScope& treeScope() const { return *m_scope; }
+ const TreeScope& treeScope() const { return m_scope; }
const StyleRuleKeyframes* keyframeStylesForAnimation(String animationName);
void collectMatchingAuthorRules(ElementRuleCollector&, CascadeOrder = ignoreCascadeOrder);
void collectMatchingHostRules(ElementRuleCollector&, CascadeOrder = ignoreCascadeOrder);
- void addRulesFromSheet(CSSStyleSheet*);
- void resetAuthorStyle();
-
const RuleFeatureSet& features() const { return m_features; }
+ void updateActiveStyleSheets();
+
+ const MediaQueryResultList& viewportDependentMediaQueryResults() const;
+
+ Vector<RefPtr<CSSStyleSheet> >& authorStyleSheets() { return m_authorStyleSheets; }
+ const Vector<RefPtr<CSSStyleSheet> >& authorStyleSheets() const { return m_authorStyleSheets; }
+
+ void addStyleSheetCandidateNode(HTMLStyleElement&);
+ void removeStyleSheetCandidateNode(HTMLStyleElement&);
+
private:
explicit ScopedStyleResolver(TreeScope&);
- RawPtr<TreeScope> m_scope;
- Vector<RawPtr<CSSStyleSheet> > m_authorStyleSheets;
+ void appendStyleSheet(CSSStyleSheet&);
+ void collectStyleSheets(Vector<RefPtr<CSSStyleSheet>>& candidateSheets);
+ TreeScope& m_scope;
+ DocumentOrderedList m_styleSheetCandidateNodes;
+ Vector<RefPtr<CSSStyleSheet>> m_authorStyleSheets;
+ MediaQueryResultList m_viewportDependentMediaQueryResults;
RuleFeatureSet m_features;
};
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698