OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2011, 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 16 matching lines...) Expand all Loading... | |
27 #include "config.h" | 27 #include "config.h" |
28 #include "core/html/shadow/MediaControls.h" | 28 #include "core/html/shadow/MediaControls.h" |
29 | 29 |
30 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 30 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
31 #include "core/dom/ClientRect.h" | 31 #include "core/dom/ClientRect.h" |
32 #include "core/events/MouseEvent.h" | 32 #include "core/events/MouseEvent.h" |
33 #include "core/frame/Settings.h" | 33 #include "core/frame/Settings.h" |
34 #include "core/html/HTMLMediaElement.h" | 34 #include "core/html/HTMLMediaElement.h" |
35 #include "core/html/MediaController.h" | 35 #include "core/html/MediaController.h" |
36 #include "core/layout/LayoutTheme.h" | 36 #include "core/layout/LayoutTheme.h" |
37 #include "core/page/EventHandler.h" | |
37 | 38 |
38 namespace blink { | 39 namespace blink { |
39 | 40 |
40 // If you change this value, then also update the corresponding value in | 41 // If you change this value, then also update the corresponding value in |
41 // LayoutTests/media/media-controls.js. | 42 // LayoutTests/media/media-controls.js. |
42 static const double timeWithoutMouseMovementBeforeHidingMediaControls = 3; | 43 static const double timeWithoutMouseMovementBeforeHidingMediaControls = 3; |
43 | 44 |
44 static bool fullscreenIsSupported(const Document& document) | 45 static bool fullscreenIsSupported(const Document& document) |
45 { | 46 { |
46 return !document.settings() || document.settings()->fullscreenSupported(); | 47 return !document.settings() || document.settings()->fullscreenSupported(); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 updateCurrentTimeDisplay(); | 267 updateCurrentTimeDisplay(); |
267 | 268 |
268 startHideMediaControlsTimer(); | 269 startHideMediaControlsTimer(); |
269 } | 270 } |
270 | 271 |
271 void MediaControls::playbackProgressed() | 272 void MediaControls::playbackProgressed() |
272 { | 273 { |
273 m_timeline->setPosition(mediaElement().currentTime()); | 274 m_timeline->setPosition(mediaElement().currentTime()); |
274 updateCurrentTimeDisplay(); | 275 updateCurrentTimeDisplay(); |
275 | 276 |
277 if (m_panel->isOpaque() && document().frame()) | |
278 document().frame()->eventHandler().scheduleHoverStateUpdate(); | |
fs
2015/02/02 15:22:28
Did you consider doing something like:
unsigned b
| |
279 | |
276 if (shouldHideMediaControls()) | 280 if (shouldHideMediaControls()) |
277 makeTransparent(); | 281 makeTransparent(); |
278 } | 282 } |
279 | 283 |
280 void MediaControls::playbackStopped() | 284 void MediaControls::playbackStopped() |
281 { | 285 { |
282 updatePlayState(); | 286 updatePlayState(); |
283 m_timeline->setPosition(mediaElement().currentTime()); | 287 m_timeline->setPosition(mediaElement().currentTime()); |
284 updateCurrentTimeDisplay(); | 288 updateCurrentTimeDisplay(); |
285 makeOpaque(); | 289 makeOpaque(); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
565 visitor->trace(m_toggleClosedCaptionsButton); | 569 visitor->trace(m_toggleClosedCaptionsButton); |
566 visitor->trace(m_fullScreenButton); | 570 visitor->trace(m_fullScreenButton); |
567 visitor->trace(m_durationDisplay); | 571 visitor->trace(m_durationDisplay); |
568 visitor->trace(m_enclosure); | 572 visitor->trace(m_enclosure); |
569 visitor->trace(m_castButton); | 573 visitor->trace(m_castButton); |
570 visitor->trace(m_overlayCastButton); | 574 visitor->trace(m_overlayCastButton); |
571 HTMLDivElement::trace(visitor); | 575 HTMLDivElement::trace(visitor); |
572 } | 576 } |
573 | 577 |
574 } | 578 } |
OLD | NEW |