OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 for (auto& rule : sheet->contents()->ruleSet().keyframesRules()) { | 105 for (auto& rule : sheet->contents()->ruleSet().keyframesRules()) { |
106 if (rule->name() == animationName) | 106 if (rule->name() == animationName) |
107 return rule.get(); | 107 return rule.get(); |
108 } | 108 } |
109 } | 109 } |
110 return nullptr; | 110 return nullptr; |
111 } | 111 } |
112 | 112 |
113 void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle
ctor, CascadeOrder cascadeOrder) | 113 void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle
ctor, CascadeOrder cascadeOrder) |
114 { | 114 { |
115 RuleRange ruleRange = collector.matchedResult().ranges.authorRuleRange(); | |
116 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { | 115 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { |
117 MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet()
, m_authorStyleSheets[i].get(), i); | 116 MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet()
, m_authorStyleSheets[i].get(), i); |
118 collector.collectMatchingRules(matchRequest, ruleRange, cascadeOrder); | 117 collector.collectMatchingRules(matchRequest, cascadeOrder); |
119 } | 118 } |
120 } | 119 } |
121 | 120 |
122 void ScopedStyleResolver::collectMatchingHostRules(ElementRuleCollector& collect
or, CascadeOrder cascadeOrder) | 121 void ScopedStyleResolver::collectMatchingHostRules(ElementRuleCollector& collect
or, CascadeOrder cascadeOrder) |
123 { | 122 { |
124 RuleRange ruleRange = collector.matchedResult().ranges.authorRuleRange(); | |
125 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { | 123 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { |
126 MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet()
, m_authorStyleSheets[i].get(), i); | 124 MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet()
, m_authorStyleSheets[i].get(), i); |
127 collector.collectMatchingHostRules(matchRequest, ruleRange, cascadeOrder
); | 125 collector.collectMatchingHostRules(matchRequest, cascadeOrder); |
128 } | 126 } |
129 } | 127 } |
130 | 128 |
131 } // namespace blink | 129 } // namespace blink |
OLD | NEW |