diff options
Diffstat (limited to 'WebCore/rendering/MediaControlElements.cpp')
-rw-r--r-- | WebCore/rendering/MediaControlElements.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/WebCore/rendering/MediaControlElements.cpp b/WebCore/rendering/MediaControlElements.cpp index 9c56756..2b7a8c8 100644 --- a/WebCore/rendering/MediaControlElements.cpp +++ b/WebCore/rendering/MediaControlElements.cpp @@ -504,7 +504,7 @@ void MediaControlSeekButtonElement::defaultEventHandler(Event* event) m_capturing = true; frame->eventHandler()->setCapturingMouseEventsNode(this); } - m_mediaElement->pause(); + m_mediaElement->pause(event->fromUserGesture()); m_seekTimer.startRepeating(cSeekRepeatDelay); event->setDefaultHandled(); } else if (event->type() == eventNames().mouseupEvent) { @@ -731,30 +731,9 @@ void MediaControlTimeDisplayElement::setVisible(bool visible) renderer()->setStyle(style.get()); } -String MediaControlTimeDisplayElement::formatTime(float time) -{ - if (!isfinite(time)) - time = 0; - int seconds = (int)fabsf(time); - int hours = seconds / (60 * 60); - int minutes = (seconds / 60) % 60; - seconds %= 60; - if (hours) { - if (hours > 9) - return String::format("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds); - - return String::format("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds); - } - - return String::format("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds); -} - void MediaControlTimeDisplayElement::setCurrentValue(float time) { m_currentValue = time; - - ExceptionCode ec; - setInnerText(formatTime(m_currentValue), ec); } |