| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 if (m_shadowRootRareData && m_descendantInsertionPointsIsValid) | 395 if (m_shadowRootRareData && m_descendantInsertionPointsIsValid) |
| 396 return m_shadowRootRareData->descendantInsertionPoints(); | 396 return m_shadowRootRareData->descendantInsertionPoints(); |
| 397 | 397 |
| 398 m_descendantInsertionPointsIsValid = true; | 398 m_descendantInsertionPointsIsValid = true; |
| 399 | 399 |
| 400 if (!containsInsertionPoints()) | 400 if (!containsInsertionPoints()) |
| 401 return emptyList; | 401 return emptyList; |
| 402 | 402 |
| 403 Vector<RefPtr<InsertionPoint> > insertionPoints; | 403 Vector<RefPtr<InsertionPoint> > insertionPoints; |
| 404 for (Element* element = ElementTraversal::firstWithin(this); element; elemen
t = ElementTraversal::next(element, this)) { | 404 for (Element* element = ElementTraversal::firstWithin(this); element; elemen
t = ElementTraversal::next(*element, this)) { |
| 405 if (element->isInsertionPoint()) | 405 if (element->isInsertionPoint()) |
| 406 insertionPoints.append(toInsertionPoint(element)); | 406 insertionPoints.append(toInsertionPoint(element)); |
| 407 } | 407 } |
| 408 | 408 |
| 409 ensureShadowRootRareData()->setDescendantInsertionPoints(insertionPoints); | 409 ensureShadowRootRareData()->setDescendantInsertionPoints(insertionPoints); |
| 410 | 410 |
| 411 return m_shadowRootRareData->descendantInsertionPoints(); | 411 return m_shadowRootRareData->descendantInsertionPoints(); |
| 412 } | 412 } |
| 413 | 413 |
| 414 StyleSheetList* ShadowRoot::styleSheets() | 414 StyleSheetList* ShadowRoot::styleSheets() |
| 415 { | 415 { |
| 416 if (!ensureShadowRootRareData()->styleSheets()) | 416 if (!ensureShadowRootRareData()->styleSheets()) |
| 417 m_shadowRootRareData->setStyleSheets(StyleSheetList::create(this)); | 417 m_shadowRootRareData->setStyleSheets(StyleSheetList::create(this)); |
| 418 | 418 |
| 419 return m_shadowRootRareData->styleSheets(); | 419 return m_shadowRootRareData->styleSheets(); |
| 420 } | 420 } |
| 421 | 421 |
| 422 } | 422 } |
| OLD | NEW |