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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 inline bool ElementRuleCollector::ruleMatches(const RuleData& ruleData, const Co
ntainerNode* scope, SelectorChecker::ContextFlags contextFlags, SelectorChecker:
:MatchResult* result) | 260 inline bool ElementRuleCollector::ruleMatches(const RuleData& ruleData, const Co
ntainerNode* scope, SelectorChecker::ContextFlags contextFlags, SelectorChecker:
:MatchResult* result) |
261 { | 261 { |
262 SelectorChecker selectorChecker(m_context.element()->document(), m_mode); | 262 SelectorChecker selectorChecker(m_context.element()->document(), m_mode); |
263 SelectorChecker::SelectorCheckingContext context(ruleData.selector(), m_cont
ext.element(), SelectorChecker::VisitedMatchEnabled); | 263 SelectorChecker::SelectorCheckingContext context(ruleData.selector(), m_cont
ext.element(), SelectorChecker::VisitedMatchEnabled); |
264 context.elementStyle = m_style.get(); | 264 context.elementStyle = m_style.get(); |
265 context.scope = scope; | 265 context.scope = scope; |
266 context.pseudoId = m_pseudoStyleRequest.pseudoId; | 266 context.pseudoId = m_pseudoStyleRequest.pseudoId; |
267 context.scrollbar = m_pseudoStyleRequest.scrollbar; | 267 context.scrollbar = m_pseudoStyleRequest.scrollbar; |
268 context.scrollbarPart = m_pseudoStyleRequest.scrollbarPart; | 268 context.scrollbarPart = m_pseudoStyleRequest.scrollbarPart; |
| 269 context.isUARule = m_matchingUARules; |
269 context.contextFlags = contextFlags; | 270 context.contextFlags = contextFlags; |
270 SelectorChecker::Match match = selectorChecker.match(context, DOMSiblingTrav
ersalStrategy(), result); | 271 SelectorChecker::Match match = selectorChecker.match(context, DOMSiblingTrav
ersalStrategy(), result); |
271 if (match != SelectorChecker::SelectorMatches) | 272 if (match != SelectorChecker::SelectorMatches) |
272 return false; | 273 return false; |
273 if (m_pseudoStyleRequest.pseudoId != NOPSEUDO && m_pseudoStyleRequest.pseudo
Id != result->dynamicPseudo) | 274 if (m_pseudoStyleRequest.pseudoId != NOPSEUDO && m_pseudoStyleRequest.pseudo
Id != result->dynamicPseudo) |
274 return false; | 275 return false; |
275 return true; | 276 return true; |
276 } | 277 } |
277 | 278 |
278 void ElementRuleCollector::collectRuleIfMatches(const RuleData& ruleData, Select
orChecker::ContextFlags contextFlags, CascadeScope cascadeScope, CascadeOrder ca
scadeOrder, const MatchRequest& matchRequest, RuleRange& ruleRange) | 279 void ElementRuleCollector::collectRuleIfMatches(const RuleData& ruleData, Select
orChecker::ContextFlags contextFlags, CascadeScope cascadeScope, CascadeOrder ca
scadeOrder, const MatchRequest& matchRequest, RuleRange& ruleRange) |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 // information about "scope". | 343 // information about "scope". |
343 int firstRuleIndex = -1, lastRuleIndex = -1; | 344 int firstRuleIndex = -1, lastRuleIndex = -1; |
344 RuleRange ruleRange(firstRuleIndex, lastRuleIndex); | 345 RuleRange ruleRange(firstRuleIndex, lastRuleIndex); |
345 // FIXME: Verify whether it's ok to ignore CascadeScope here. | 346 // FIXME: Verify whether it's ok to ignore CascadeScope here. |
346 collectMatchingRules(MatchRequest(ruleSet), ruleRange, SelectorChecker::Defa
ultBehavior); | 347 collectMatchingRules(MatchRequest(ruleSet), ruleRange, SelectorChecker::Defa
ultBehavior); |
347 | 348 |
348 return m_matchedRules && !m_matchedRules->isEmpty(); | 349 return m_matchedRules && !m_matchedRules->isEmpty(); |
349 } | 350 } |
350 | 351 |
351 } // namespace WebCore | 352 } // namespace WebCore |
OLD | NEW |