Unreviewed, rolling out r106909.
[WebKit-https.git] / Source / WebCore / html / HTMLSummaryElement.cpp
index d5f4c156e1b19be7b736b2ae80a1d54c2c42a169..758d889be45ad651006bbf778496fa99e7d71f0c 100644 (file)
@@ -73,10 +73,9 @@ RenderObject* HTMLSummaryElement::createRenderer(RenderArena* arena, RenderStyle
 
 void HTMLSummaryElement::createShadowSubtree()
 {
-    ASSERT(!shadowRoot());
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(DetailsMarkerControl::create(document()), ASSERT_NO_EXCEPTION, true);
-    root->appendChild(SummaryContentElement::create(document()), ASSERT_NO_EXCEPTION, true);
+    ExceptionCode ec = 0;
+    ensureShadowRoot()->appendChild(DetailsMarkerControl::create(document()), ec, true);
+    ensureShadowRoot()->appendChild(SummaryContentElement::create(document()), ec, true);
 }
 
 HTMLDetailsElement* HTMLSummaryElement::detailsElement() const