| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 continue; | 141 continue; |
| 142 } | 142 } |
| 143 | 143 |
| 144 // FIXME: Exposing the non-standard getMatchedCSSRules API to web is the
only reason this is needed. | 144 // FIXME: Exposing the non-standard getMatchedCSSRules API to web is the
only reason this is needed. |
| 145 if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin()) | 145 if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin()) |
| 146 continue; | 146 continue; |
| 147 | 147 |
| 148 StyleRule* rule = ruleData.rule(); | 148 StyleRule* rule = ruleData.rule(); |
| 149 | 149 |
| 150 // If the rule has no properties to apply, then ignore it in the non-deb
ug mode. | 150 // If the rule has no properties to apply, then ignore it in the non-deb
ug mode. |
| 151 const StylePropertySet& properties = rule->properties(); | 151 if (!rule->shouldConsiderForMatchingRules(m_includeEmptyRules)) |
| 152 if (properties.isEmpty() && !m_includeEmptyRules) | |
| 153 continue; | 152 continue; |
| 154 | 153 |
| 155 SelectorChecker::MatchResult result; | 154 SelectorChecker::MatchResult result; |
| 156 context.selector = &ruleData.selector(); | 155 context.selector = &ruleData.selector(); |
| 157 if (!checker.match(context, result)) { | 156 if (!checker.match(context, result)) { |
| 158 rejected++; | 157 rejected++; |
| 159 continue; | 158 continue; |
| 160 } | 159 } |
| 161 if (m_pseudoStyleRequest.pseudoId != PseudoIdNone && m_pseudoStyleReques
t.pseudoId != result.dynamicPseudo) { | 160 if (m_pseudoStyleRequest.pseudoId != PseudoIdNone && m_pseudoStyleReques
t.pseudoId != result.dynamicPseudo) { |
| 162 rejected++; | 161 rejected++; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 // should not see the element's treescope. Because RuleSet has no | 329 // should not see the element's treescope. Because RuleSet has no |
| 331 // information about "scope". | 330 // information about "scope". |
| 332 MatchRequest matchRequest(ruleSet); | 331 MatchRequest matchRequest(ruleSet); |
| 333 collectMatchingRules(matchRequest); | 332 collectMatchingRules(matchRequest); |
| 334 collectMatchingShadowHostRules(matchRequest); | 333 collectMatchingShadowHostRules(matchRequest); |
| 335 | 334 |
| 336 return !m_matchedRules.isEmpty(); | 335 return !m_matchedRules.isEmpty(); |
| 337 } | 336 } |
| 338 | 337 |
| 339 } // namespace blink | 338 } // namespace blink |
| OLD | NEW |