Unreviewed, rolling out r106909.
[WebKit-https.git] / Source / WebCore / html / HTMLDetailsElement.cpp
index d53a063aba01b048a546158160f03805c6867941..17d86d21a4c6eb75f4d28600c946e48e8cf605cc 100644 (file)
@@ -109,10 +109,8 @@ RenderObject* HTMLDetailsElement::createRenderer(RenderArena* arena, RenderStyle
 void HTMLDetailsElement::createShadowSubtree()
 {
     ASSERT(!shadowRoot());
-
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(DetailsSummaryElement::create(document()), ASSERT_NO_EXCEPTION, true);
-    root->appendChild(DetailsContentElement::create(document()), ASSERT_NO_EXCEPTION, true);
+    ensureShadowRoot()->appendChild(DetailsSummaryElement::create(document()), ASSERT_NO_EXCEPTION, true);
+    ensureShadowRoot()->appendChild(DetailsContentElement::create(document()), ASSERT_NO_EXCEPTION, true);
 }
 
 Element* HTMLDetailsElement::findMainSummary() const