| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 void StyleResolver::matchAuthorRules(Element* element, ElementRuleCollector& col
lector) | 227 void StyleResolver::matchAuthorRules(Element* element, ElementRuleCollector& col
lector) |
| 228 { | 228 { |
| 229 collector.clearMatchedRules(); | 229 collector.clearMatchedRules(); |
| 230 collector.matchedResult().ranges.lastAuthorRule = collector.matchedResult().
matchedProperties.size() - 1; | 230 collector.matchedResult().ranges.lastAuthorRule = collector.matchedResult().
matchedProperties.size() - 1; |
| 231 | 231 |
| 232 // TODO(esprehn): Eliminate CascadeScope and CascadeOrder. | 232 // TODO(esprehn): Eliminate CascadeScope and CascadeOrder. |
| 233 CascadeScope cascadeScope = 0; | 233 CascadeScope cascadeScope = 0; |
| 234 CascadeOrder cascadeOrder = 0; | 234 CascadeOrder cascadeOrder = 0; |
| 235 | 235 |
| 236 // TODO(esprehn): Remove this. | |
| 237 bool includeEmptyRules = false; | |
| 238 | |
| 239 // TODO(esprehn): This can only match :host rules, we should just store | 236 // TODO(esprehn): This can only match :host rules, we should just store |
| 240 // them in a separate RuleSet. | 237 // them in a separate RuleSet. |
| 241 if (ShadowRoot* shadowRoot = element->shadowRoot()) | 238 if (ShadowRoot* shadowRoot = element->shadowRoot()) |
| 242 shadowRoot->scopedStyleResolver().collectMatchingAuthorRules(collector,
includeEmptyRules, cascadeScope, cascadeOrder++); | 239 shadowRoot->scopedStyleResolver().collectMatchingAuthorRules(collector,
cascadeScope, cascadeOrder++); |
| 243 | 240 |
| 244 ScopedStyleResolver& resolver = element->treeScope().scopedStyleResolver(); | 241 ScopedStyleResolver& resolver = element->treeScope().scopedStyleResolver(); |
| 245 resolver.collectMatchingAuthorRules(collector, includeEmptyRules, cascadeSco
pe, cascadeOrder); | 242 resolver.collectMatchingAuthorRules(collector, cascadeScope, cascadeOrder); |
| 246 | 243 |
| 247 collector.sortAndTransferMatchedRules(); | 244 collector.sortAndTransferMatchedRules(); |
| 248 } | 245 } |
| 249 | 246 |
| 250 void StyleResolver::matchUARules(ElementRuleCollector& collector) | 247 void StyleResolver::matchUARules(ElementRuleCollector& collector) |
| 251 { | 248 { |
| 252 collector.setMatchingUARules(true); | 249 collector.setMatchingUARules(true); |
| 253 | 250 |
| 254 collector.clearMatchedRules(); | 251 collector.clearMatchedRules(); |
| 255 collector.matchedResult().ranges.lastUARule = collector.matchedResult().matc
hedProperties.size() - 1; | 252 collector.matchedResult().ranges.lastUARule = collector.matchedResult().matc
hedProperties.size() - 1; |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 bool StyleResolver::mediaQueryAffectedByViewportChange() const | 785 bool StyleResolver::mediaQueryAffectedByViewportChange() const |
| 789 { | 786 { |
| 790 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { | 787 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { |
| 791 if (m_medium->eval(m_viewportDependentMediaQueryResults[i]->expression()
) != m_viewportDependentMediaQueryResults[i]->result()) | 788 if (m_medium->eval(m_viewportDependentMediaQueryResults[i]->expression()
) != m_viewportDependentMediaQueryResults[i]->result()) |
| 792 return true; | 789 return true; |
| 793 } | 790 } |
| 794 return false; | 791 return false; |
| 795 } | 792 } |
| 796 | 793 |
| 797 } // namespace blink | 794 } // namespace blink |
| OLD | NEW |