Unreviewed, rolling out r106909.
[WebKit-https.git] / Source / WebCore / html / HTMLProgressElement.cpp
index 1b2461c82077eaeb89102db24cee1cbbb5971253..ba4a88342bf875e8073f5605d3b02e36dfe86310 100644 (file)
@@ -153,14 +153,11 @@ void HTMLProgressElement::didElementStateChange()
 
 void HTMLProgressElement::createShadowSubtree()
 {
-    ASSERT(!shadowRoot());
-
     RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document());
     m_value = ProgressValueElement::create(document());
-    bar->appendChild(m_value, ASSERT_NO_EXCEPTION);
-
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(bar, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    bar->appendChild(m_value, ec);
+    ensureShadowRoot()->appendChild(bar, ec);
 }
 
 } // namespace