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 20 matching lines...) Expand all Loading... | |
| 31 #include "core/html/shadow/MediaControlElements.h" | 31 #include "core/html/shadow/MediaControlElements.h" |
| 32 | 32 |
| 33 #include "RuntimeEnabledFeatures.h" | 33 #include "RuntimeEnabledFeatures.h" |
| 34 #include "bindings/v8/ExceptionStatePlaceholder.h" | 34 #include "bindings/v8/ExceptionStatePlaceholder.h" |
| 35 #include "core/dom/DOMTokenList.h" | 35 #include "core/dom/DOMTokenList.h" |
| 36 #include "core/dom/FullscreenElementStack.h" | 36 #include "core/dom/FullscreenElementStack.h" |
| 37 #include "core/dom/shadow/ShadowRoot.h" | 37 #include "core/dom/shadow/ShadowRoot.h" |
| 38 #include "core/events/MouseEvent.h" | 38 #include "core/events/MouseEvent.h" |
| 39 #include "core/frame/LocalFrame.h" | 39 #include "core/frame/LocalFrame.h" |
| 40 #include "core/html/HTMLVideoElement.h" | 40 #include "core/html/HTMLVideoElement.h" |
| 41 #include "core/html/MediaController.h" | |
| 41 #include "core/html/shadow/MediaControls.h" | 42 #include "core/html/shadow/MediaControls.h" |
| 42 #include "core/html/track/TextTrack.h" | 43 #include "core/html/track/TextTrack.h" |
| 43 #include "core/html/track/vtt/VTTRegionList.h" | 44 #include "core/html/track/vtt/VTTRegionList.h" |
| 44 #include "core/page/EventHandler.h" | 45 #include "core/page/EventHandler.h" |
| 45 #include "core/rendering/RenderMediaControlElements.h" | 46 #include "core/rendering/RenderMediaControlElements.h" |
| 46 #include "core/rendering/RenderSlider.h" | 47 #include "core/rendering/RenderSlider.h" |
| 47 #include "core/rendering/RenderTheme.h" | 48 #include "core/rendering/RenderTheme.h" |
| 48 #include "core/rendering/RenderVideo.h" | 49 #include "core/rendering/RenderVideo.h" |
| 49 | 50 |
| 50 namespace WebCore { | 51 namespace WebCore { |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 365 | 366 |
| 366 if (event->type() == EventTypeNames::mouseup) | 367 if (event->type() == EventTypeNames::mouseup) |
| 367 mediaControls().endScrubbing(); | 368 mediaControls().endScrubbing(); |
| 368 | 369 |
| 369 MediaControlInputElement::defaultEventHandler(event); | 370 MediaControlInputElement::defaultEventHandler(event); |
| 370 | 371 |
| 371 if (event->type() == EventTypeNames::mouseover || event->type() == EventType Names::mouseout || event->type() == EventTypeNames::mousemove) | 372 if (event->type() == EventTypeNames::mouseover || event->type() == EventType Names::mouseout || event->type() == EventTypeNames::mousemove) |
| 372 return; | 373 return; |
| 373 | 374 |
| 374 double time = value().toDouble(); | 375 double time = value().toDouble(); |
| 375 if (event->type() == EventTypeNames::input && time != mediaControllerInterfa ce().currentTime()) | 376 if (event->type() == EventTypeNames::input) { |
| 376 mediaControllerInterface().setCurrentTime(time, IGNORE_EXCEPTION); | 377 if (mediaElement().controller()) |
| 378 mediaElement().controller()->setCurrentTime(time, IGNORE_EXCEPTION); | |
|
acolwell GONE FROM CHROMIUM
2014/03/31 23:23:13
nit: We should probably have a FIXME: here that in
philipj_slow
2014/04/01 03:22:31
getStartDate() returns the "timeline offset" which
| |
| 379 else | |
| 380 mediaElement().setCurrentTime(time, IGNORE_EXCEPTION); | |
| 381 } | |
| 377 | 382 |
| 378 RenderSlider* slider = toRenderSlider(renderer()); | 383 RenderSlider* slider = toRenderSlider(renderer()); |
| 379 if (slider && slider->inDragMode()) | 384 if (slider && slider->inDragMode()) |
| 380 mediaControls().updateCurrentTimeDisplay(); | 385 mediaControls().updateCurrentTimeDisplay(); |
| 381 } | 386 } |
| 382 | 387 |
| 383 bool MediaControlTimelineElement::willRespondToMouseClickEvents() | 388 bool MediaControlTimelineElement::willRespondToMouseClickEvents() |
| 384 { | 389 { |
| 385 return inDocument() && document().isActive(); | 390 return inDocument() && document().isActive(); |
| 386 } | 391 } |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 669 float fontSize = smallestDimension * 0.05f; | 674 float fontSize = smallestDimension * 0.05f; |
| 670 if (fontSize != m_fontSize) { | 675 if (fontSize != m_fontSize) { |
| 671 m_fontSize = fontSize; | 676 m_fontSize = fontSize; |
| 672 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX); | 677 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX); |
| 673 } | 678 } |
| 674 } | 679 } |
| 675 | 680 |
| 676 // ---------------------------- | 681 // ---------------------------- |
| 677 | 682 |
| 678 } // namespace WebCore | 683 } // namespace WebCore |
| OLD | NEW |