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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 ElementShadow* shadow = element->shadow(); | 122 ElementShadow* shadow = element->shadow(); |
123 if (!shadow) | 123 if (!shadow) |
124 return; | 124 return; |
125 | 125 |
126 // Adding scoped resolver for active shadow roots for shadow host styling. | 126 // Adding scoped resolver for active shadow roots for shadow host styling. |
127 for (ShadowRoot* shadowRoot = shadow->youngestShadowRoot(); shadowRoot; shad
owRoot = shadowRoot->olderShadowRoot()) { | 127 for (ShadowRoot* shadowRoot = shadow->youngestShadowRoot(); shadowRoot; shad
owRoot = shadowRoot->olderShadowRoot()) { |
128 if (shadowRoot->hasScopedHTMLStyleChild()) { | 128 if (shadowRoot->hasScopedHTMLStyleChild()) { |
129 if (ScopedStyleResolver* resolver = scopedStyleResolverFor(*shadowRo
ot)) | 129 if (ScopedStyleResolver* resolver = scopedStyleResolverFor(*shadowRo
ot)) |
130 resolvers.append(resolver); | 130 resolvers.append(resolver); |
131 } | 131 } |
132 if (!shadowRoot->containsShadowElements()) | |
133 break; | |
134 } | 132 } |
135 } | 133 } |
136 | 134 |
137 void ScopedStyleTree::resolveScopedKeyframesRules(const Element* element, Vector
<ScopedStyleResolver*, 8>& resolvers) | 135 void ScopedStyleTree::resolveScopedKeyframesRules(const Element* element, Vector
<ScopedStyleResolver*, 8>& resolvers) |
138 { | 136 { |
139 Document& document = element->document(); | 137 Document& document = element->document(); |
140 TreeScope& treeScope = element->treeScope(); | 138 TreeScope& treeScope = element->treeScope(); |
141 bool applyAuthorStyles = treeScope.applyAuthorStyles(); | 139 bool applyAuthorStyles = treeScope.applyAuthorStyles(); |
142 | 140 |
143 // Add resolvers for shadow roots hosted by the given element. | 141 // Add resolvers for shadow roots hosted by the given element. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 return; | 215 return; |
218 | 216 |
219 reparentNodes(resolverRemoved, resolverRemoved->parent()); | 217 reparentNodes(resolverRemoved, resolverRemoved->parent()); |
220 if (m_cache.scopedResolver == resolverRemoved) | 218 if (m_cache.scopedResolver == resolverRemoved) |
221 m_cache.clear(); | 219 m_cache.clear(); |
222 | 220 |
223 m_authorStyles.remove(scopingNode); | 221 m_authorStyles.remove(scopingNode); |
224 } | 222 } |
225 | 223 |
226 } // namespace WebCore | 224 } // namespace WebCore |
OLD | NEW |