| Index: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| index b5a95e3f43509d32fd5744917377a56a92e13d7c..fd86d758e0c8d4c1299f4f3df03be11ce9205389 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| @@ -97,7 +97,11 @@ bool isUserInteractionEventForSlider(Event* event, LayoutObject* layoutObject) {
|
|
|
| const AtomicString& type = event->type();
|
| return type == EventTypeNames::mouseover ||
|
| - type == EventTypeNames::mouseout || type == EventTypeNames::mousemove;
|
| + type == EventTypeNames::mouseout ||
|
| + type == EventTypeNames::mousemove ||
|
| + type == EventTypeNames::pointerover ||
|
| + type == EventTypeNames::pointerout ||
|
| + type == EventTypeNames::pointermove;
|
| }
|
|
|
| Element* elementFromCenter(Element& element) {
|
| @@ -753,18 +757,15 @@ void MediaControlTimelineElement::defaultEventHandler(Event* event) {
|
|
|
| MediaControlInputElement::defaultEventHandler(event);
|
|
|
| - if (event->type() == EventTypeNames::mouseover ||
|
| - event->type() == EventTypeNames::mouseout ||
|
| - event->type() == EventTypeNames::mousemove)
|
| + if (event->type() != EventTypeNames::input)
|
| return;
|
|
|
| double time = value().toDouble();
|
| - if (event->type() == EventTypeNames::input) {
|
| - // FIXME: This will need to take the timeline offset into consideration
|
| - // once that concept is supported, see https://crbug.com/312699
|
| - if (mediaElement().seekable()->contain(time))
|
| - mediaElement().setCurrentTime(time);
|
| - }
|
| +
|
| + // FIXME: This will need to take the timeline offset into consideration
|
| + // once that concept is supported, see https://crbug.com/312699
|
| + if (mediaElement().seekable()->contain(time))
|
| + mediaElement().setCurrentTime(time);
|
|
|
| LayoutSliderItem slider = LayoutSliderItem(toLayoutSlider(layoutObject()));
|
| if (!slider.isNull() && slider.inDragMode())
|
| @@ -813,21 +814,11 @@ MediaControlVolumeSliderElement* MediaControlVolumeSliderElement::create(
|
| }
|
|
|
| void MediaControlVolumeSliderElement::defaultEventHandler(Event* event) {
|
| - if (event->isMouseEvent() &&
|
| - toMouseEvent(event)->button() !=
|
| - static_cast<short>(WebPointerProperties::Button::Left))
|
| - return;
|
| -
|
| if (!isConnected() || !document().isActive())
|
| return;
|
|
|
| MediaControlInputElement::defaultEventHandler(event);
|
|
|
| - if (event->type() == EventTypeNames::mouseover ||
|
| - event->type() == EventTypeNames::mouseout ||
|
| - event->type() == EventTypeNames::mousemove)
|
| - return;
|
| -
|
| if (event->type() == EventTypeNames::mousedown)
|
| Platform::current()->recordAction(
|
| UserMetricsAction("Media.Controls.VolumeChangeBegin"));
|
| @@ -836,9 +827,11 @@ void MediaControlVolumeSliderElement::defaultEventHandler(Event* event) {
|
| Platform::current()->recordAction(
|
| UserMetricsAction("Media.Controls.VolumeChangeEnd"));
|
|
|
| - double volume = value().toDouble();
|
| - mediaElement().setVolume(volume);
|
| - mediaElement().setMuted(false);
|
| + if (event->type() == EventTypeNames::input) {
|
| + double volume = value().toDouble();
|
| + mediaElement().setVolume(volume);
|
| + mediaElement().setMuted(false);
|
| + }
|
| }
|
|
|
| bool MediaControlVolumeSliderElement::willRespondToMouseMoveEvents() {
|
|
|