OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 390 |
391 if (m_shadowRootRareData && m_descendantInsertionPointsIsValid) | 391 if (m_shadowRootRareData && m_descendantInsertionPointsIsValid) |
392 return m_shadowRootRareData->descendantInsertionPoints(); | 392 return m_shadowRootRareData->descendantInsertionPoints(); |
393 | 393 |
394 m_descendantInsertionPointsIsValid = true; | 394 m_descendantInsertionPointsIsValid = true; |
395 | 395 |
396 if (!containsInsertionPoints()) | 396 if (!containsInsertionPoints()) |
397 return emptyList; | 397 return emptyList; |
398 | 398 |
399 Vector<RefPtr<InsertionPoint> > insertionPoints; | 399 Vector<RefPtr<InsertionPoint> > insertionPoints; |
400 for (Element* element = ElementTraversal::firstWithin(this); element; elemen
t = ElementTraversal::next(*element, this)) { | 400 for (Element* element = ElementTraversal::firstWithin(*this); element; eleme
nt = ElementTraversal::next(*element, this)) { |
401 if (element->isInsertionPoint()) | 401 if (element->isInsertionPoint()) |
402 insertionPoints.append(toInsertionPoint(element)); | 402 insertionPoints.append(toInsertionPoint(element)); |
403 } | 403 } |
404 | 404 |
405 ensureShadowRootRareData()->setDescendantInsertionPoints(insertionPoints); | 405 ensureShadowRootRareData()->setDescendantInsertionPoints(insertionPoints); |
406 | 406 |
407 return m_shadowRootRareData->descendantInsertionPoints(); | 407 return m_shadowRootRareData->descendantInsertionPoints(); |
408 } | 408 } |
409 | 409 |
410 StyleSheetList* ShadowRoot::styleSheets() | 410 StyleSheetList* ShadowRoot::styleSheets() |
411 { | 411 { |
412 if (!ensureShadowRootRareData()->styleSheets()) | 412 if (!ensureShadowRootRareData()->styleSheets()) |
413 m_shadowRootRareData->setStyleSheets(StyleSheetList::create(this)); | 413 m_shadowRootRareData->setStyleSheets(StyleSheetList::create(this)); |
414 | 414 |
415 return m_shadowRootRareData->styleSheets(); | 415 return m_shadowRootRareData->styleSheets(); |
416 } | 416 } |
417 | 417 |
418 } | 418 } |
OLD | NEW |