Fix bugs related to setting reflected floating point DOM attributes
[WebKit-https.git] / Source / WebCore / html / shadow / MediaControlElements.cpp
index 64f2c1a..8e6229e 100644 (file)
@@ -885,12 +885,12 @@ bool MediaControlTimelineElement::willRespondToMouseClickEvents()
 
 void MediaControlTimelineElement::setPosition(double currentTime)
 {
-    setValue(String::number(currentTime));
+    setValue(String::numberToStringECMAScript(currentTime));
 }
 
 void MediaControlTimelineElement::setDuration(double duration)
 {
-    setAttribute(maxAttr, AtomicString::number(std::isfinite(duration) ? duration : 0));
+    setAttribute(maxAttr, AtomicString::number(duration));
 }
 
 // ----------------------------