| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 if (!isHTMLContentElement(*element)) | 317 if (!isHTMLContentElement(*element)) |
| 318 continue; | 318 continue; |
| 319 const CSSSelectorList& list = toHTMLContentElement(*element).selectorLis
t(); | 319 const CSSSelectorList& list = toHTMLContentElement(*element).selectorLis
t(); |
| 320 for (const CSSSelector* selector = list.first(); selector; selector = CS
SSelectorList::next(*selector)) { | 320 for (const CSSSelector* selector = list.first(); selector; selector = CS
SSelectorList::next(*selector)) { |
| 321 for (const CSSSelector* component = selector; component; component =
component->tagHistory()) | 321 for (const CSSSelector* component = selector; component; component =
component->tagHistory()) |
| 322 m_selectFeatures.collectFeaturesFromSelector(*component); | 322 m_selectFeatures.collectFeaturesFromSelector(*component); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 void ElementShadow::didAffectSelector(AffectedSelectorMask mask) | |
| 328 { | |
| 329 if (ensureSelectFeatureSet().hasSelectorFor(mask)) | |
| 330 setNeedsDistributionRecalc(); | |
| 331 } | |
| 332 | |
| 333 void ElementShadow::willAffectSelector() | 327 void ElementShadow::willAffectSelector() |
| 334 { | 328 { |
| 335 for (ElementShadow* shadow = this; shadow; shadow = shadow->containingShadow
()) { | 329 for (ElementShadow* shadow = this; shadow; shadow = shadow->containingShadow
()) { |
| 336 if (shadow->needsSelectFeatureSet()) | 330 if (shadow->needsSelectFeatureSet()) |
| 337 break; | 331 break; |
| 338 shadow->setNeedsSelectFeatureSet(); | 332 shadow->setNeedsSelectFeatureSet(); |
| 339 } | 333 } |
| 340 setNeedsDistributionRecalc(); | 334 setNeedsDistributionRecalc(); |
| 341 } | 335 } |
| 342 | 336 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 354 visitor->trace(m_nodeToInsertionPoints); | 348 visitor->trace(m_nodeToInsertionPoints); |
| 355 visitor->trace(m_selectFeatures); | 349 visitor->trace(m_selectFeatures); |
| 356 // Shadow roots are linked with previous and next pointers which are traced. | 350 // Shadow roots are linked with previous and next pointers which are traced. |
| 357 // It is therefore enough to trace one of the shadow roots here and the | 351 // It is therefore enough to trace one of the shadow roots here and the |
| 358 // rest will be traced from there. | 352 // rest will be traced from there. |
| 359 visitor->trace(m_shadowRoots.head()); | 353 visitor->trace(m_shadowRoots.head()); |
| 360 #endif | 354 #endif |
| 361 } | 355 } |
| 362 | 356 |
| 363 } // namespace | 357 } // namespace |
| OLD | NEW |