summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLProgressElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/HTMLProgressElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLProgressElement.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/WebCore/html/HTMLProgressElement.cpp b/Source/WebCore/html/HTMLProgressElement.cpp
index 960f15782..0c2372581 100644
--- a/Source/WebCore/html/HTMLProgressElement.cpp
+++ b/Source/WebCore/html/HTMLProgressElement.cpp
@@ -75,14 +75,14 @@ const AtomicString& HTMLProgressElement::formControlType() const
return progress;
}
-void HTMLProgressElement::parseMappedAttribute(Attribute* attribute)
+void HTMLProgressElement::parseAttribute(Attribute* attribute)
{
if (attribute->name() == valueAttr)
didElementStateChange();
else if (attribute->name() == maxAttr)
didElementStateChange();
else
- HTMLFormControlElement::parseMappedAttribute(attribute);
+ HTMLFormControlElement::parseAttribute(attribute);
}
void HTMLProgressElement::attach()
@@ -153,11 +153,14 @@ void HTMLProgressElement::didElementStateChange()
void HTMLProgressElement::createShadowSubtree()
{
+ ASSERT(!shadowRoot());
+
RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document());
m_value = ProgressValueElement::create(document());
- ExceptionCode ec = 0;
- bar->appendChild(m_value, ec);
- ensureShadowRoot()->appendChild(bar, ec);
+ bar->appendChild(m_value, ASSERT_NO_EXCEPTION);
+
+ RefPtr<ShadowRoot> root = ShadowRoot::create(this, ShadowRoot::CreatingUserAgentShadowRoot, ASSERT_NO_EXCEPTION);
+ root->appendChild(bar, ASSERT_NO_EXCEPTION);
}
} // namespace