OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 313 matching lines...) Loading... |
324 if (!isHTMLContentElement(*element)) | 324 if (!isHTMLContentElement(*element)) |
325 continue; | 325 continue; |
326 const CSSSelectorList& list = toHTMLContentElement(*element).selectorLis
t(); | 326 const CSSSelectorList& list = toHTMLContentElement(*element).selectorLis
t(); |
327 for (const CSSSelector* selector = list.first(); selector; selector = CS
SSelectorList::next(*selector)) { | 327 for (const CSSSelector* selector = list.first(); selector; selector = CS
SSelectorList::next(*selector)) { |
328 for (const CSSSelector* component = selector; component; component =
component->tagHistory()) | 328 for (const CSSSelector* component = selector; component; component =
component->tagHistory()) |
329 m_selectFeatures.collectFeaturesFromSelector(*component); | 329 m_selectFeatures.collectFeaturesFromSelector(*component); |
330 } | 330 } |
331 } | 331 } |
332 } | 332 } |
333 | 333 |
334 void ElementShadow::didAffectSelector(AffectedSelectorMask mask) | 334 void ElementShadow::distributedNodePseudoStateChanged(CSSSelector::PseudoType ps
eudo) |
335 { | 335 { |
336 if (ensureSelectFeatureSet().hasSelectorFor(mask)) | 336 if (ensureSelectFeatureSet().hasSelectorForPseudoType(pseudo)) |
337 setNeedsDistributionRecalc(); | 337 setNeedsDistributionRecalc(); |
338 } | 338 } |
339 | 339 |
340 void ElementShadow::willAffectSelector() | 340 void ElementShadow::willAffectSelector() |
341 { | 341 { |
342 for (ElementShadow* shadow = this; shadow; shadow = shadow->containingShadow
()) { | 342 for (ElementShadow* shadow = this; shadow; shadow = shadow->containingShadow
()) { |
343 if (shadow->needsSelectFeatureSet()) | 343 if (shadow->needsSelectFeatureSet()) |
344 break; | 344 break; |
345 shadow->setNeedsSelectFeatureSet(); | 345 shadow->setNeedsSelectFeatureSet(); |
346 } | 346 } |
(...skipping 14 matching lines...) Loading... |
361 visitor->trace(m_nodeToInsertionPoints); | 361 visitor->trace(m_nodeToInsertionPoints); |
362 visitor->trace(m_selectFeatures); | 362 visitor->trace(m_selectFeatures); |
363 // Shadow roots are linked with previous and next pointers which are traced. | 363 // Shadow roots are linked with previous and next pointers which are traced. |
364 // It is therefore enough to trace one of the shadow roots here and the | 364 // It is therefore enough to trace one of the shadow roots here and the |
365 // rest will be traced from there. | 365 // rest will be traced from there. |
366 visitor->trace(m_shadowRoots.head()); | 366 visitor->trace(m_shadowRoots.head()); |
367 #endif | 367 #endif |
368 } | 368 } |
369 | 369 |
370 } // namespace | 370 } // namespace |
OLD | NEW |