| 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. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 const Element& element, | 167 const Element& element, |
| 168 HeapVector<Member<ScopedStyleResolver>, 8>& resolvers) { | 168 HeapVector<Member<ScopedStyleResolver>, 8>& resolvers) { |
| 169 ElementShadow* shadow = element.shadow(); | 169 ElementShadow* shadow = element.shadow(); |
| 170 if (!shadow) | 170 if (!shadow) |
| 171 return; | 171 return; |
| 172 | 172 |
| 173 // Adding scoped resolver for active shadow roots for shadow host styling. | 173 // Adding scoped resolver for active shadow roots for shadow host styling. |
| 174 for (ShadowRoot* shadowRoot = &shadow->youngestShadowRoot(); shadowRoot; | 174 for (ShadowRoot* shadowRoot = &shadow->youngestShadowRoot(); shadowRoot; |
| 175 shadowRoot = shadowRoot->olderShadowRoot()) { | 175 shadowRoot = shadowRoot->olderShadowRoot()) { |
| 176 if (ScopedStyleResolver* resolver = shadowRoot->scopedStyleResolver()) | 176 if (ScopedStyleResolver* resolver = shadowRoot->scopedStyleResolver()) |
| 177 resolvers.append(resolver); | 177 resolvers.push_back(resolver); |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 StyleResolver::StyleResolver(Document& document) : m_document(document) { | 181 StyleResolver::StyleResolver(Document& document) : m_document(document) { |
| 182 updateMediaType(); | 182 updateMediaType(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 StyleResolver::~StyleResolver() {} | 185 StyleResolver::~StyleResolver() {} |
| 186 | 186 |
| 187 void StyleResolver::dispose() { | 187 void StyleResolver::dispose() { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 322 |
| 323 static void matchSlottedRules(const Element& element, | 323 static void matchSlottedRules(const Element& element, |
| 324 ElementRuleCollector& collector) { | 324 ElementRuleCollector& collector) { |
| 325 HTMLSlotElement* slot = element.assignedSlot(); | 325 HTMLSlotElement* slot = element.assignedSlot(); |
| 326 if (!slot) | 326 if (!slot) |
| 327 return; | 327 return; |
| 328 | 328 |
| 329 HeapVector<Member<ScopedStyleResolver>> resolvers; | 329 HeapVector<Member<ScopedStyleResolver>> resolvers; |
| 330 for (; slot; slot = slot->assignedSlot()) { | 330 for (; slot; slot = slot->assignedSlot()) { |
| 331 if (ScopedStyleResolver* resolver = slot->treeScope().scopedStyleResolver()) | 331 if (ScopedStyleResolver* resolver = slot->treeScope().scopedStyleResolver()) |
| 332 resolvers.append(resolver); | 332 resolvers.push_back(resolver); |
| 333 } | 333 } |
| 334 for (auto it = resolvers.rbegin(); it != resolvers.rend(); ++it) { | 334 for (auto it = resolvers.rbegin(); it != resolvers.rend(); ++it) { |
| 335 collector.clearMatchedRules(); | 335 collector.clearMatchedRules(); |
| 336 (*it)->collectMatchingTreeBoundaryCrossingRules(collector); | 336 (*it)->collectMatchingTreeBoundaryCrossingRules(collector); |
| 337 collector.sortAndTransferMatchedRules(); | 337 collector.sortAndTransferMatchedRules(); |
| 338 collector.finishAddingAuthorRulesForTreeScope(); | 338 collector.finishAddingAuthorRulesForTreeScope(); |
| 339 } | 339 } |
| 340 } | 340 } |
| 341 | 341 |
| 342 static void matchElementScopeRules(const Element& element, | 342 static void matchElementScopeRules(const Element& element, |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 return true; | 1196 return true; |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 StyleRuleKeyframes* StyleResolver::findKeyframesRule( | 1199 StyleRuleKeyframes* StyleResolver::findKeyframesRule( |
| 1200 const Element* element, | 1200 const Element* element, |
| 1201 const AtomicString& animationName) { | 1201 const AtomicString& animationName) { |
| 1202 HeapVector<Member<ScopedStyleResolver>, 8> resolvers; | 1202 HeapVector<Member<ScopedStyleResolver>, 8> resolvers; |
| 1203 collectScopedResolversForHostedShadowTrees(*element, resolvers); | 1203 collectScopedResolversForHostedShadowTrees(*element, resolvers); |
| 1204 if (ScopedStyleResolver* scopedResolver = | 1204 if (ScopedStyleResolver* scopedResolver = |
| 1205 element->treeScope().scopedStyleResolver()) | 1205 element->treeScope().scopedStyleResolver()) |
| 1206 resolvers.append(scopedResolver); | 1206 resolvers.push_back(scopedResolver); |
| 1207 | 1207 |
| 1208 for (auto& resolver : resolvers) { | 1208 for (auto& resolver : resolvers) { |
| 1209 if (StyleRuleKeyframes* keyframesRule = | 1209 if (StyleRuleKeyframes* keyframesRule = |
| 1210 resolver->keyframeStylesForAnimation(animationName.impl())) | 1210 resolver->keyframeStylesForAnimation(animationName.impl())) |
| 1211 return keyframesRule; | 1211 return keyframesRule; |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 for (auto& resolver : resolvers) | 1214 for (auto& resolver : resolvers) |
| 1215 resolver->setHasUnresolvedKeyframesRule(); | 1215 resolver->setHasUnresolvedKeyframesRule(); |
| 1216 return nullptr; | 1216 return nullptr; |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1977 DEFINE_TRACE(StyleResolver) { | 1977 DEFINE_TRACE(StyleResolver) { |
| 1978 visitor->trace(m_matchedPropertiesCache); | 1978 visitor->trace(m_matchedPropertiesCache); |
| 1979 visitor->trace(m_selectorFilter); | 1979 visitor->trace(m_selectorFilter); |
| 1980 visitor->trace(m_styleSharingLists); | 1980 visitor->trace(m_styleSharingLists); |
| 1981 visitor->trace(m_pendingStyleSheets); | 1981 visitor->trace(m_pendingStyleSheets); |
| 1982 visitor->trace(m_document); | 1982 visitor->trace(m_document); |
| 1983 visitor->trace(m_tracker); | 1983 visitor->trace(m_tracker); |
| 1984 } | 1984 } |
| 1985 | 1985 |
| 1986 } // namespace blink | 1986 } // namespace blink |
| OLD | NEW |