Unreviewed, rolling out r106909.
[WebKit-https.git] / Source / WebCore / html / HTMLMeterElement.cpp
index 5925e49f8737c1ab8e3f543a17a076f99f59399d..e230ea697f4ef876e1bcad91f8d4aed8218c3552 100644 (file)
@@ -234,15 +234,11 @@ void HTMLMeterElement::didElementStateChange()
 
 void HTMLMeterElement::createShadowSubtree()
 {
-    ASSERT(!shadowRoot());
-
     RefPtr<MeterBarElement> bar = MeterBarElement::create(document());
     m_value = MeterValueElement::create(document());
     ExceptionCode ec = 0;
     bar->appendChild(m_value, ec);
-
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(bar, ec);
+    ensureShadowRoot()->appendChild(bar, ec);
 }
 
 } // namespace