OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // When comparing rules declared in inner treescopes, inner's rules win. | 73 // When comparing rules declared in inner treescopes, inner's rules win. |
74 CascadeOrder innerCascadeOrder = size(); | 74 CascadeOrder innerCascadeOrder = size(); |
75 | 75 |
76 for (DocumentOrderedList::iterator it = m_scopingNodes.begin(); it != m_scop
ingNodes.end(); ++it) { | 76 for (DocumentOrderedList::iterator it = m_scopingNodes.begin(); it != m_scop
ingNodes.end(); ++it) { |
77 const ContainerNode* scopingNode = toContainerNode(*it); | 77 const ContainerNode* scopingNode = toContainerNode(*it); |
78 CSSStyleSheetRuleSubSet* ruleSubSet = m_treeBoundaryCrossingRuleSetMap.g
et(scopingNode); | 78 CSSStyleSheetRuleSubSet* ruleSubSet = m_treeBoundaryCrossingRuleSetMap.g
et(scopingNode); |
79 bool isInnerTreeScope = element->treeScope().isInclusiveAncestorOf(scopi
ngNode->treeScope()); | 79 bool isInnerTreeScope = element->treeScope().isInclusiveAncestorOf(scopi
ngNode->treeScope()); |
80 | 80 |
81 CascadeOrder cascadeOrder = isInnerTreeScope ? innerCascadeOrder : outer
CascadeOrder; | 81 CascadeOrder cascadeOrder = isInnerTreeScope ? innerCascadeOrder : outer
CascadeOrder; |
82 for (CSSStyleSheetRuleSubSet::iterator it = ruleSubSet->begin(); it != r
uleSubSet->end(); ++it) { | 82 for (CSSStyleSheetRuleSubSet::iterator it = ruleSubSet->begin(); it != r
uleSubSet->end(); ++it) { |
83 MatchRequest request((*it)->ruleSet.get(), includeEmptyRules, scopin
gNode, (*it)->parentStyleSheet, true, (*it)->parentIndex); | 83 MatchRequest request((*it)->ruleSet.get(), includeEmptyRules, scopin
gNode, (*it)->parentStyleSheet, (*it)->parentIndex); |
84 collector.collectMatchingRules(request, ruleRange, SelectorChecker::
ScopeContainsLastMatchedElement, ignoreCascadeScope, cascadeOrder); | 84 collector.collectMatchingRules(request, ruleRange, ignoreCascadeScop
e, cascadeOrder); |
85 } | 85 } |
86 ++innerCascadeOrder; | 86 ++innerCascadeOrder; |
87 --outerCascadeOrder; | 87 --outerCascadeOrder; |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 void TreeBoundaryCrossingRules::reset(const ContainerNode* scopingNode) | 91 void TreeBoundaryCrossingRules::reset(const ContainerNode* scopingNode) |
92 { | 92 { |
93 m_treeBoundaryCrossingRuleSetMap.remove(scopingNode); | 93 m_treeBoundaryCrossingRuleSetMap.remove(scopingNode); |
94 m_scopingNodes.remove(scopingNode); | 94 m_scopingNodes.remove(scopingNode); |
(...skipping 18 matching lines...) Expand all Loading... |
113 visitor->trace(m_scopingNodes); | 113 visitor->trace(m_scopingNodes); |
114 #endif | 114 #endif |
115 } | 115 } |
116 | 116 |
117 void TreeBoundaryCrossingRules::RuleSubSet::trace(Visitor* visitor) | 117 void TreeBoundaryCrossingRules::RuleSubSet::trace(Visitor* visitor) |
118 { | 118 { |
119 visitor->trace(ruleSet); | 119 visitor->trace(ruleSet); |
120 } | 120 } |
121 | 121 |
122 } // namespace blink | 122 } // namespace blink |
OLD | NEW |