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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 invalidateDescendantInsertionPoints(); | 272 invalidateDescendantInsertionPoints(); |
273 } | 273 } |
274 | 274 |
275 void ShadowRoot::invalidateDescendantInsertionPoints() { | 275 void ShadowRoot::invalidateDescendantInsertionPoints() { |
276 m_descendantInsertionPointsIsValid = false; | 276 m_descendantInsertionPointsIsValid = false; |
277 m_shadowRootRareDataV0->clearDescendantInsertionPoints(); | 277 m_shadowRootRareDataV0->clearDescendantInsertionPoints(); |
278 } | 278 } |
279 | 279 |
280 const HeapVector<Member<InsertionPoint>>& | 280 const HeapVector<Member<InsertionPoint>>& |
281 ShadowRoot::descendantInsertionPoints() { | 281 ShadowRoot::descendantInsertionPoints() { |
| 282 ALLOW_UNSAFE_SINGLETON() |
282 DEFINE_STATIC_LOCAL(HeapVector<Member<InsertionPoint>>, emptyList, | 283 DEFINE_STATIC_LOCAL(HeapVector<Member<InsertionPoint>>, emptyList, |
283 (new HeapVector<Member<InsertionPoint>>)); | 284 (new HeapVector<Member<InsertionPoint>>)); |
284 if (m_shadowRootRareDataV0 && m_descendantInsertionPointsIsValid) | 285 if (m_shadowRootRareDataV0 && m_descendantInsertionPointsIsValid) |
285 return m_shadowRootRareDataV0->descendantInsertionPoints(); | 286 return m_shadowRootRareDataV0->descendantInsertionPoints(); |
286 | 287 |
287 m_descendantInsertionPointsIsValid = true; | 288 m_descendantInsertionPointsIsValid = true; |
288 | 289 |
289 if (!containsInsertionPoints()) | 290 if (!containsInsertionPoints()) |
290 return emptyList; | 291 return emptyList; |
291 | 292 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 ostream << "ShadowRootType::Open"; | 335 ostream << "ShadowRootType::Open"; |
335 break; | 336 break; |
336 case ShadowRootType::Closed: | 337 case ShadowRootType::Closed: |
337 ostream << "ShadowRootType::Closed"; | 338 ostream << "ShadowRootType::Closed"; |
338 break; | 339 break; |
339 } | 340 } |
340 return ostream; | 341 return ostream; |
341 } | 342 } |
342 | 343 |
343 } // namespace blink | 344 } // namespace blink |
OLD | NEW |