Unreviewed, rolling out r106909.
[WebKit-https.git] / Source / WebCore / html / HTMLKeygenElement.cpp
index 7d0794259daed138ac9756dcd1cde26d13388e58..777ee15729911638623117c736392e556566bc60 100644 (file)
@@ -85,9 +85,7 @@ inline HTMLKeygenElement::HTMLKeygenElement(const QualifiedName& tagName, Docume
         option->appendChild(Text::create(document, keys[i]), ec);
     }
 
-    ASSERT(!shadowRoot());
-    RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION);
-    root->appendChild(select, ec);
+    ensureShadowRoot()->appendChild(select, ec);
 }
 
 PassRefPtr<HTMLKeygenElement> HTMLKeygenElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form)