OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void addTreeBoundaryCrossingRules(const RuleSet&, CSSStyleSheet*, unsigned s
heetIndex, ContainerNode&); | 43 void addTreeBoundaryCrossingRules(const RuleSet&, CSSStyleSheet*, unsigned s
heetIndex, ContainerNode&); |
44 | 44 |
45 void reset(const ContainerNode* scopingNode); | 45 void reset(const ContainerNode* scopingNode); |
46 void collectFeaturesTo(RuleFeatureSet&); | 46 void collectFeaturesTo(RuleFeatureSet&); |
47 void collectTreeBoundaryCrossingRules(Element*, ElementRuleCollector&, bool
includeEmptyRules); | 47 void collectTreeBoundaryCrossingRules(Element*, ElementRuleCollector&, bool
includeEmptyRules); |
48 | 48 |
49 void trace(Visitor*); | 49 void trace(Visitor*); |
50 | 50 |
51 private: | 51 private: |
52 size_t size() const { return m_scopingNodes.size(); } | 52 size_t size() const { return m_scopingNodes.size(); } |
53 class RuleSubSet { | 53 class RuleSubSet FINAL : public NoBaseWillBeGarbageCollected<RuleSubSet> { |
54 public: | 54 public: |
55 static PassOwnPtrWillBeRawPtr<RuleSubSet> create(CSSStyleSheet* sheet, u
nsigned index, PassOwnPtrWillBeRawPtr<RuleSet> rules) | 55 static PassOwnPtrWillBeRawPtr<RuleSubSet> create(CSSStyleSheet* sheet, u
nsigned index, PassOwnPtrWillBeRawPtr<RuleSet> rules) |
56 { | 56 { |
57 return adoptPtrWillBeNoop(new RuleSubSet(sheet, index, rules)); | 57 return adoptPtrWillBeNoop(new RuleSubSet(sheet, index, rules)); |
58 } | 58 } |
| 59 |
59 CSSStyleSheet* parentStyleSheet; | 60 CSSStyleSheet* parentStyleSheet; |
60 unsigned parentIndex; | 61 unsigned parentIndex; |
61 OwnPtr<RuleSet> ruleSet; | 62 OwnPtrWillBeMember<RuleSet> ruleSet; |
| 63 |
| 64 void trace(Visitor*); |
62 | 65 |
63 private: | 66 private: |
64 RuleSubSet(CSSStyleSheet* sheet, unsigned index, PassOwnPtrWillBeRawPtr<
RuleSet> rules) | 67 RuleSubSet(CSSStyleSheet* sheet, unsigned index, PassOwnPtrWillBeRawPtr<
RuleSet> rules) |
65 : parentStyleSheet(sheet) | 68 : parentStyleSheet(sheet) |
66 , parentIndex(index) | 69 , parentIndex(index) |
67 , ruleSet(rules) | 70 , ruleSet(rules) |
68 { | 71 { |
69 } | 72 } |
70 }; | 73 }; |
71 typedef WillBeHeapVector<OwnPtrWillBeMember<RuleSubSet> > CSSStyleSheetRuleS
ubSet; | 74 typedef WillBeHeapVector<OwnPtrWillBeMember<RuleSubSet> > CSSStyleSheetRuleS
ubSet; |
72 void collectFeaturesFromRuleSubSet(CSSStyleSheetRuleSubSet*, RuleFeatureSet&
); | 75 void collectFeaturesFromRuleSubSet(CSSStyleSheetRuleSubSet*, RuleFeatureSet&
); |
73 | 76 |
74 DocumentOrderedList m_scopingNodes; | 77 DocumentOrderedList m_scopingNodes; |
75 typedef WillBeHeapHashMap<RawPtrWillBeMember<const ContainerNode>, OwnPtrWil
lBeMember<CSSStyleSheetRuleSubSet> > TreeBoundaryCrossingRuleSetMap; | 78 typedef WillBeHeapHashMap<RawPtrWillBeMember<const ContainerNode>, OwnPtrWil
lBeMember<CSSStyleSheetRuleSubSet> > TreeBoundaryCrossingRuleSetMap; |
76 TreeBoundaryCrossingRuleSetMap m_treeBoundaryCrossingRuleSetMap; | 79 TreeBoundaryCrossingRuleSetMap m_treeBoundaryCrossingRuleSetMap; |
77 }; | 80 }; |
78 | 81 |
79 } // namespace blink | 82 } // namespace blink |
80 | 83 |
81 #endif // TreeBoundaryCrossingRules_h | 84 #endif // TreeBoundaryCrossingRules_h |
OLD | NEW |