Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Unified Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 277213004: Oilpan: add transition types to shadow DOM supporting objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove incorrect FINAL decl Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/shadow/ShadowRoot.cpp
diff --git a/Source/core/dom/shadow/ShadowRoot.cpp b/Source/core/dom/shadow/ShadowRoot.cpp
index 1f5b2d83fda38f696c833624c2f05aea28b763b2..9a63cfa9eaa7fd987a4ff37ce9889c17db265959 100644
--- a/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/Source/core/dom/shadow/ShadowRoot.cpp
@@ -263,7 +263,7 @@ HTMLShadowElement* ShadowRoot::shadowInsertionPointOfYoungerShadowRoot() const
return m_shadowRootRareData ? m_shadowRootRareData->shadowInsertionPointOfYoungerShadowRoot() : 0;
}
-void ShadowRoot::setShadowInsertionPointOfYoungerShadowRoot(PassRefPtr<HTMLShadowElement> shadowInsertionPoint)
+void ShadowRoot::setShadowInsertionPointOfYoungerShadowRoot(PassRefPtrWillBeRawPtr<HTMLShadowElement> shadowInsertionPoint)
{
if (!m_shadowRootRareData && !shadowInsertionPoint)
return;
@@ -306,19 +306,28 @@ void ShadowRoot::invalidateDescendantInsertionPoints()
m_shadowRootRareData->clearDescendantInsertionPoints();
}
-const Vector<RefPtr<InsertionPoint> >& ShadowRoot::descendantInsertionPoints()
+const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >& ShadowRoot::descendantInsertionPoints()
{
+#if ENABLE(OILPAN)
+ DEFINE_STATIC_LOCAL(Persistent<const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> > >, emptyList, (new WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >()));
+#else
DEFINE_STATIC_LOCAL(const Vector<RefPtr<InsertionPoint> >, emptyList, ());
haraken 2014/05/12 12:21:38 I'd prefer: DEFINE_STATIC_LOCAL(WillBePersistentH
sof 2014/05/12 12:37:49 Oh, nice - that will work here. Switched.
+#endif
if (m_shadowRootRareData && m_descendantInsertionPointsIsValid)
return m_shadowRootRareData->descendantInsertionPoints();
m_descendantInsertionPointsIsValid = true;
- if (!containsInsertionPoints())
+ if (!containsInsertionPoints()) {
+#if ENABLE(OILPAN)
+ return *emptyList;
+#else
return emptyList;
+#endif
+ }
- Vector<RefPtr<InsertionPoint> > insertionPoints;
+ WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> > insertionPoints;
for (Element* element = ElementTraversal::firstWithin(*this); element; element = ElementTraversal::next(*element, this)) {
if (element->isInsertionPoint())
insertionPoints.append(toInsertionPoint(element));

Powered by Google App Engine
This is Rietveld 408576698