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

Unified Diff: Source/core/css/resolver/ScopedStyleResolver.h

Issue 931143002: Start moving tree-boundary-crossing rules to ScopedStyleResolver. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | « Source/core/css/TreeBoundaryCrossingRules.cpp ('k') | Source/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/ScopedStyleResolver.h
diff --git a/Source/core/css/resolver/ScopedStyleResolver.h b/Source/core/css/resolver/ScopedStyleResolver.h
index b85705d5423400e352d3dfd729f168a01ab00dd3..d8ab51dc51f2966db4acdbec9ad5933335482c99 100644
--- a/Source/core/css/resolver/ScopedStyleResolver.h
+++ b/Source/core/css/resolver/ScopedStyleResolver.h
@@ -56,13 +56,12 @@ public:
const TreeScope& treeScope() const { return *m_scope; }
ScopedStyleResolver* parent() const;
-public:
StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* animationName);
- void addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyframes>);
- unsigned appendCSSStyleSheet(CSSStyleSheet*);
+ void appendCSSStyleSheet(CSSStyleSheet&, const MediaQueryEvaluator&);
void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRules, CascadeOrder = ignoreCascadeOrder);
void collectMatchingShadowHostRules(ElementRuleCollector&, bool includeEmptyRules, CascadeOrder = ignoreCascadeOrder);
+ void collectMatchingTreeBoundaryCrossingRules(ElementRuleCollector&, bool includeEmptyRules, CascadeOrder);
void matchPageRules(PageRuleCollector&);
void collectFeaturesTo(RuleFeatureSet&, HashSet<const StyleSheetContents*>& visitedSharedStyleSheetContents) const;
void resetAuthorStyle();
@@ -76,12 +75,42 @@ private:
{
}
+ void addTreeBoundaryCrossingRules(const RuleSet&, CSSStyleSheet*, unsigned sheetIndex);
+ void addKeyframeRules(const RuleSet&);
+ void addFontFaceRules(const RuleSet&);
+ void addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyframes>);
+
RawPtrWillBeMember<TreeScope> m_scope;
- WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets;
+ WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet>> m_authorStyleSheets;
- typedef WillBeHeapHashMap<const StringImpl*, RefPtrWillBeMember<StyleRuleKeyframes> > KeyframesRuleMap;
+ typedef WillBeHeapHashMap<const StringImpl*, RefPtrWillBeMember<StyleRuleKeyframes>> KeyframesRuleMap;
KeyframesRuleMap m_keyframesRuleMap;
+
+ class RuleSubSet final : public NoBaseWillBeGarbageCollected<RuleSubSet> {
+ public:
+ static PassOwnPtrWillBeRawPtr<RuleSubSet> create(CSSStyleSheet* sheet, unsigned index, PassOwnPtrWillBeRawPtr<RuleSet> rules)
+ {
+ return adoptPtrWillBeNoop(new RuleSubSet(sheet, index, rules));
+ }
+
+ CSSStyleSheet* m_parentStyleSheet;
+ unsigned m_parentIndex;
+ OwnPtrWillBeMember<RuleSet> m_ruleSet;
+
+ void trace(Visitor*);
+
+ private:
+ RuleSubSet(CSSStyleSheet* sheet, unsigned index, PassOwnPtrWillBeRawPtr<RuleSet> rules)
+ : m_parentStyleSheet(sheet)
+ , m_parentIndex(index)
+ , m_ruleSet(rules)
+ {
+ }
+ };
+ typedef WillBeHeapVector<OwnPtrWillBeMember<RuleSubSet>> CSSStyleSheetRuleSubSet;
+
+ OwnPtrWillBeMember<CSSStyleSheetRuleSubSet> m_treeBoundaryCrossingRuleSet;
};
} // namespace blink
« no previous file with comments | « Source/core/css/TreeBoundaryCrossingRules.cpp ('k') | Source/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698