Chromium Code Reviews| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 308 RefPtrWillBeRawPtr<MediaControlOverlayPlayButtonElement> button = adoptRefWi llBeNoop(new MediaControlOverlayPlayButtonElement(mediaControls)); | 308 RefPtrWillBeRawPtr<MediaControlOverlayPlayButtonElement> button = adoptRefWi llBeNoop(new MediaControlOverlayPlayButtonElement(mediaControls)); |
| 309 button->ensureUserAgentShadowRoot(); | 309 button->ensureUserAgentShadowRoot(); |
| 310 button->setType(InputTypeNames::button); | 310 button->setType(InputTypeNames::button); |
| 311 button->setShadowPseudoId(AtomicString("-webkit-media-controls-overlay-play- button", AtomicString::ConstructFromLiteral)); | 311 button->setShadowPseudoId(AtomicString("-webkit-media-controls-overlay-play- button", AtomicString::ConstructFromLiteral)); |
| 312 return button.release(); | 312 return button.release(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 void MediaControlOverlayPlayButtonElement::defaultEventHandler(Event* event) | 315 void MediaControlOverlayPlayButtonElement::defaultEventHandler(Event* event) |
| 316 { | 316 { |
| 317 if (event->type() == EventTypeNames::click && mediaElement().paused()) { | 317 if (event->type() == EventTypeNames::click && mediaElement().paused()) { |
| 318 mediaElement().play(); | 318 mediaElement().playInternal(); |
|
philipj_slow
2016/02/02 09:56:33
Also potentially risky.
mlamouri (slow - plz ping)
2016/02/03 19:28:58
Reverted.
| |
| 319 updateDisplayType(); | 319 updateDisplayType(); |
| 320 event->setDefaultHandled(); | 320 event->setDefaultHandled(); |
| 321 } | 321 } |
| 322 } | 322 } |
| 323 | 323 |
| 324 void MediaControlOverlayPlayButtonElement::updateDisplayType() | 324 void MediaControlOverlayPlayButtonElement::updateDisplayType() |
| 325 { | 325 { |
| 326 setIsWanted(mediaElement().shouldShowControls() && mediaElement().paused()); | 326 setIsWanted(mediaElement().shouldShowControls() && mediaElement().paused()); |
| 327 } | 327 } |
| 328 | 328 |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 648 } | 648 } |
| 649 | 649 |
| 650 PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurren tTimeDisplayElement::create(MediaControls& mediaControls) | 650 PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurren tTimeDisplayElement::create(MediaControls& mediaControls) |
| 651 { | 651 { |
| 652 RefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> element = adoptRef WillBeNoop(new MediaControlCurrentTimeDisplayElement(mediaControls)); | 652 RefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> element = adoptRef WillBeNoop(new MediaControlCurrentTimeDisplayElement(mediaControls)); |
| 653 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display", AtomicString::ConstructFromLiteral)); | 653 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display", AtomicString::ConstructFromLiteral)); |
| 654 return element.release(); | 654 return element.release(); |
| 655 } | 655 } |
| 656 | 656 |
| 657 } // namespace blink | 657 } // namespace blink |
| OLD | NEW |