Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: Source/core/html/shadow/MediaControlElements.cpp

Issue 517593003: Allow HTMLMediaElement.currentTime to be set before the transition to HAVE_METADATA (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/MediaController.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 MediaControlInputElement::defaultEventHandler(event); 400 MediaControlInputElement::defaultEventHandler(event);
401 401
402 if (event->type() == EventTypeNames::mouseover || event->type() == EventType Names::mouseout || event->type() == EventTypeNames::mousemove) 402 if (event->type() == EventTypeNames::mouseover || event->type() == EventType Names::mouseout || event->type() == EventTypeNames::mousemove)
403 return; 403 return;
404 404
405 double time = value().toDouble(); 405 double time = value().toDouble();
406 if (event->type() == EventTypeNames::input) { 406 if (event->type() == EventTypeNames::input) {
407 // FIXME: This will need to take the timeline offset into consideration 407 // FIXME: This will need to take the timeline offset into consideration
408 // once that concept is supported, see https://crbug.com/312699 408 // once that concept is supported, see https://crbug.com/312699
409 if (mediaElement().controller()) 409 if (mediaElement().controller())
410 mediaElement().controller()->setCurrentTime(time, IGNORE_EXCEPTION); 410 mediaElement().controller()->setCurrentTime(time);
411 else 411 else
412 mediaElement().setCurrentTime(time, IGNORE_EXCEPTION); 412 mediaElement().setCurrentTime(time, IGNORE_EXCEPTION);
413 } 413 }
414 414
415 RenderSlider* slider = toRenderSlider(renderer()); 415 RenderSlider* slider = toRenderSlider(renderer());
416 if (slider && slider->inDragMode()) 416 if (slider && slider->inDragMode())
417 mediaControls().updateCurrentTimeDisplay(); 417 mediaControls().updateCurrentTimeDisplay();
418 } 418 }
419 419
420 bool MediaControlTimelineElement::willRespondToMouseClickEvents() 420 bool MediaControlTimelineElement::willRespondToMouseClickEvents()
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 float fontSize = smallestDimension * 0.05f; 714 float fontSize = smallestDimension * 0.05f;
715 if (fontSize != m_fontSize) { 715 if (fontSize != m_fontSize) {
716 m_fontSize = fontSize; 716 m_fontSize = fontSize;
717 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX); 717 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX);
718 } 718 }
719 } 719 }
720 720
721 // ---------------------------- 721 // ----------------------------
722 722
723 } // namespace blink 723 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/MediaController.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698