OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 }, this); | 161 }, this); |
162 } | 162 } |
163 | 163 |
164 bool CSSSelectorList::selectorHasShadowDistributed(size_t index) const | 164 bool CSSSelectorList::selectorHasShadowDistributed(size_t index) const |
165 { | 165 { |
166 return forEachTagSelector([](const CSSSelector& selector) -> bool { | 166 return forEachTagSelector([](const CSSSelector& selector) -> bool { |
167 return selector.relationIsAffectedByPseudoContent(); | 167 return selector.relationIsAffectedByPseudoContent(); |
168 }, selectorAt(index)); | 168 }, selectorAt(index)); |
169 } | 169 } |
170 | 170 |
| 171 bool CSSSelectorList::selectorHasShadowSlotted(size_t index) const |
| 172 { |
| 173 return forEachTagSelector([](const CSSSelector& selector) -> bool { |
| 174 return selector.relationIsAffectedByPseudoSlotted(); |
| 175 }, selectorAt(index)); |
| 176 } |
| 177 |
171 bool CSSSelectorList::selectorUsesDeepCombinatorOrShadowPseudo(size_t index) con
st | 178 bool CSSSelectorList::selectorUsesDeepCombinatorOrShadowPseudo(size_t index) con
st |
172 { | 179 { |
173 return forEachTagSelector([](const CSSSelector& selector) -> bool { | 180 return forEachTagSelector([](const CSSSelector& selector) -> bool { |
174 return selector.relation() == CSSSelector::ShadowDeep || selector.pseudo
Type() == CSSSelector::PseudoShadow; | 181 return selector.relation() == CSSSelector::ShadowDeep || selector.pseudo
Type() == CSSSelector::PseudoShadow; |
175 }, selectorAt(index)); | 182 }, selectorAt(index)); |
176 } | 183 } |
177 | 184 |
178 bool CSSSelectorList::selectorNeedsUpdatedDistribution(size_t index) const | 185 bool CSSSelectorList::selectorNeedsUpdatedDistribution(size_t index) const |
179 { | 186 { |
180 return forEachTagSelector([](const CSSSelector& selector) -> bool { | 187 return forEachTagSelector([](const CSSSelector& selector) -> bool { |
181 return selector.relationIsAffectedByPseudoContent() || selector.pseudoTy
pe() == CSSSelector::PseudoHostContext; | 188 return selector.relationIsAffectedByPseudoContent() || selector.relation
IsAffectedByPseudoSlotted() || selector.pseudoType() == CSSSelector::PseudoHostC
ontext; |
182 }, selectorAt(index)); | 189 }, selectorAt(index)); |
183 } | 190 } |
184 | 191 |
185 } // namespace blink | 192 } // namespace blink |
OLD | NEW |