| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 MediaControlTimelineElement* timeline = new MediaControlTimelineElement(medi
aControls); | 565 MediaControlTimelineElement* timeline = new MediaControlTimelineElement(medi
aControls); |
| 566 timeline->ensureUserAgentShadowRoot(); | 566 timeline->ensureUserAgentShadowRoot(); |
| 567 timeline->setType(InputTypeNames::range); | 567 timeline->setType(InputTypeNames::range); |
| 568 timeline->setAttribute(stepAttr, "any"); | 568 timeline->setAttribute(stepAttr, "any"); |
| 569 timeline->setShadowPseudoId(AtomicString("-webkit-media-controls-timeline"))
; | 569 timeline->setShadowPseudoId(AtomicString("-webkit-media-controls-timeline"))
; |
| 570 return timeline; | 570 return timeline; |
| 571 } | 571 } |
| 572 | 572 |
| 573 void MediaControlTimelineElement::defaultEventHandler(Event* event) | 573 void MediaControlTimelineElement::defaultEventHandler(Event* event) |
| 574 { | 574 { |
| 575 if (event->isMouseEvent() && toMouseEvent(event)->button() != LeftButton) | 575 if (event->isMouseEvent() && toMouseEvent(event)->button() != static_cast<sh
ort>(WebPointerProperties::Button::Left)) |
| 576 return; | 576 return; |
| 577 | 577 |
| 578 if (!isConnected() || !document().isActive()) | 578 if (!isConnected() || !document().isActive()) |
| 579 return; | 579 return; |
| 580 | 580 |
| 581 if (event->type() == EventTypeNames::mousedown) { | 581 if (event->type() == EventTypeNames::mousedown) { |
| 582 Platform::current()->recordAction(UserMetricsAction("Media.Controls.Scru
bbingBegin")); | 582 Platform::current()->recordAction(UserMetricsAction("Media.Controls.Scru
bbingBegin")); |
| 583 mediaControls().beginScrubbing(); | 583 mediaControls().beginScrubbing(); |
| 584 } | 584 } |
| 585 | 585 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 slider->ensureUserAgentShadowRoot(); | 645 slider->ensureUserAgentShadowRoot(); |
| 646 slider->setType(InputTypeNames::range); | 646 slider->setType(InputTypeNames::range); |
| 647 slider->setAttribute(stepAttr, "any"); | 647 slider->setAttribute(stepAttr, "any"); |
| 648 slider->setAttribute(maxAttr, "1"); | 648 slider->setAttribute(maxAttr, "1"); |
| 649 slider->setShadowPseudoId(AtomicString("-webkit-media-controls-volume-slider
")); | 649 slider->setShadowPseudoId(AtomicString("-webkit-media-controls-volume-slider
")); |
| 650 return slider; | 650 return slider; |
| 651 } | 651 } |
| 652 | 652 |
| 653 void MediaControlVolumeSliderElement::defaultEventHandler(Event* event) | 653 void MediaControlVolumeSliderElement::defaultEventHandler(Event* event) |
| 654 { | 654 { |
| 655 if (event->isMouseEvent() && toMouseEvent(event)->button() != LeftButton) | 655 if (event->isMouseEvent() && toMouseEvent(event)->button() != static_cast<sh
ort>(WebPointerProperties::Button::Left)) |
| 656 return; | 656 return; |
| 657 | 657 |
| 658 if (!isConnected() || !document().isActive()) | 658 if (!isConnected() || !document().isActive()) |
| 659 return; | 659 return; |
| 660 | 660 |
| 661 MediaControlInputElement::defaultEventHandler(event); | 661 MediaControlInputElement::defaultEventHandler(event); |
| 662 | 662 |
| 663 if (event->type() == EventTypeNames::mouseover || event->type() == EventType
Names::mouseout || event->type() == EventTypeNames::mousemove) | 663 if (event->type() == EventTypeNames::mouseover || event->type() == EventType
Names::mouseout || event->type() == EventTypeNames::mousemove) |
| 664 return; | 664 return; |
| 665 | 665 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 } | 852 } |
| 853 | 853 |
| 854 MediaControlCurrentTimeDisplayElement* MediaControlCurrentTimeDisplayElement::cr
eate(MediaControls& mediaControls) | 854 MediaControlCurrentTimeDisplayElement* MediaControlCurrentTimeDisplayElement::cr
eate(MediaControls& mediaControls) |
| 855 { | 855 { |
| 856 MediaControlCurrentTimeDisplayElement* element = new MediaControlCurrentTime
DisplayElement(mediaControls); | 856 MediaControlCurrentTimeDisplayElement* element = new MediaControlCurrentTime
DisplayElement(mediaControls); |
| 857 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time
-display")); | 857 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time
-display")); |
| 858 return element; | 858 return element; |
| 859 } | 859 } |
| 860 | 860 |
| 861 } // namespace blink | 861 } // namespace blink |
| OLD | NEW |