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

Unified Diff: Source/core/css/TreeBoundaryCrossingRules.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 | « no previous file | Source/core/css/TreeBoundaryCrossingRules.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/TreeBoundaryCrossingRules.h
diff --git a/Source/core/css/TreeBoundaryCrossingRules.h b/Source/core/css/TreeBoundaryCrossingRules.h
index 85e9cccb791da4a027976e944fd0892c7a60d067..2855bf1b6d7df212bb1873e5b4529fde69ccdc49 100644
--- a/Source/core/css/TreeBoundaryCrossingRules.h
+++ b/Source/core/css/TreeBoundaryCrossingRules.h
@@ -23,7 +23,6 @@
#ifndef TreeBoundaryCrossingRules_h
#define TreeBoundaryCrossingRules_h
-#include "core/css/RuleSet.h"
#include "core/dom/DocumentOrderedList.h"
#include "wtf/OwnPtr.h"
@@ -32,51 +31,23 @@
namespace blink {
-class CSSStyleSheet;
class ContainerNode;
+class Element;
class ElementRuleCollector;
-class RuleFeatureSet;
class TreeBoundaryCrossingRules final {
DISALLOW_ALLOCATION();
public:
- void addTreeBoundaryCrossingRules(const RuleSet&, CSSStyleSheet*, unsigned sheetIndex, ContainerNode&);
-
- void reset(const ContainerNode* scopingNode);
- void collectFeaturesTo(RuleFeatureSet&);
+ void addScope(ContainerNode&);
+ void removeScope(const ContainerNode&);
void collectTreeBoundaryCrossingRules(Element*, ElementRuleCollector&, bool includeEmptyRules);
void trace(Visitor*);
private:
size_t size() const { return m_scopingNodes.size(); }
- 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* parentStyleSheet;
- unsigned parentIndex;
- OwnPtrWillBeMember<RuleSet> ruleSet;
-
- void trace(Visitor*);
-
- private:
- RuleSubSet(CSSStyleSheet* sheet, unsigned index, PassOwnPtrWillBeRawPtr<RuleSet> rules)
- : parentStyleSheet(sheet)
- , parentIndex(index)
- , ruleSet(rules)
- {
- }
- };
- typedef WillBeHeapVector<OwnPtrWillBeMember<RuleSubSet> > CSSStyleSheetRuleSubSet;
- void collectFeaturesFromRuleSubSet(CSSStyleSheetRuleSubSet*, RuleFeatureSet&);
DocumentOrderedList m_scopingNodes;
- typedef WillBeHeapHashMap<RawPtrWillBeMember<const ContainerNode>, OwnPtrWillBeMember<CSSStyleSheetRuleSubSet> > TreeBoundaryCrossingRuleSetMap;
- TreeBoundaryCrossingRuleSetMap m_treeBoundaryCrossingRuleSetMap;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/css/TreeBoundaryCrossingRules.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698