| 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, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 { | 65 { |
| 66 return m_result; | 66 return m_result; |
| 67 } | 67 } |
| 68 | 68 |
| 69 PassRefPtr<StyleRuleList> ElementRuleCollector::matchedStyleRuleList() | 69 PassRefPtr<StyleRuleList> ElementRuleCollector::matchedStyleRuleList() |
| 70 { | 70 { |
| 71 ASSERT(m_mode == SelectorChecker::CollectingStyleRules); | 71 ASSERT(m_mode == SelectorChecker::CollectingStyleRules); |
| 72 return m_styleRuleList.release(); | 72 return m_styleRuleList.release(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 PassRefPtr<CSSRuleList> ElementRuleCollector::matchedCSSRuleList() | 75 PassRefPtrWillBeRawPtr<CSSRuleList> ElementRuleCollector::matchedCSSRuleList() |
| 76 { | 76 { |
| 77 ASSERT(m_mode == SelectorChecker::CollectingCSSRules); | 77 ASSERT(m_mode == SelectorChecker::CollectingCSSRules); |
| 78 return m_cssRuleList.release(); | 78 return m_cssRuleList.release(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 inline void ElementRuleCollector::addMatchedRule(const RuleData* rule, unsigned
specificity, CascadeScope cascadeScope, CascadeOrder cascadeOrder, unsigned styl
eSheetIndex, const CSSStyleSheet* parentStyleSheet) | 81 inline void ElementRuleCollector::addMatchedRule(const RuleData* rule, unsigned
specificity, CascadeScope cascadeScope, CascadeOrder cascadeOrder, unsigned styl
eSheetIndex, const CSSStyleSheet* parentStyleSheet) |
| 82 { | 82 { |
| 83 if (!m_matchedRules) | 83 if (!m_matchedRules) |
| 84 m_matchedRules = adoptPtr(new Vector<MatchedRule, 32>); | 84 m_matchedRules = adoptPtr(new Vector<MatchedRule, 32>); |
| 85 m_matchedRules->append(MatchedRule(rule, specificity, cascadeScope, cascadeO
rder, styleSheetIndex, parentStyleSheet)); | 85 m_matchedRules->append(MatchedRule(rule, specificity, cascadeScope, cascadeO
rder, styleSheetIndex, parentStyleSheet)); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // information about "scope". | 365 // information about "scope". |
| 366 int firstRuleIndex = -1, lastRuleIndex = -1; | 366 int firstRuleIndex = -1, lastRuleIndex = -1; |
| 367 RuleRange ruleRange(firstRuleIndex, lastRuleIndex); | 367 RuleRange ruleRange(firstRuleIndex, lastRuleIndex); |
| 368 // FIXME: Verify whether it's ok to ignore CascadeScope here. | 368 // FIXME: Verify whether it's ok to ignore CascadeScope here. |
| 369 collectMatchingRules(MatchRequest(ruleSet), ruleRange, SelectorChecker::Stay
sWithinTreeScope); | 369 collectMatchingRules(MatchRequest(ruleSet), ruleRange, SelectorChecker::Stay
sWithinTreeScope); |
| 370 | 370 |
| 371 return m_matchedRules && !m_matchedRules->isEmpty(); | 371 return m_matchedRules && !m_matchedRules->isEmpty(); |
| 372 } | 372 } |
| 373 | 373 |
| 374 } // namespace WebCore | 374 } // namespace WebCore |
| OLD | NEW |