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

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 35033002: Remove HTMLMediaElement.initialTime (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/HTMLMediaElement.h ('k') | Source/core/html/HTMLMediaElement.idl » ('j') | 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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 1975
1976 void HTMLMediaElement::setCurrentTime(double time, ExceptionState& es) 1976 void HTMLMediaElement::setCurrentTime(double time, ExceptionState& es)
1977 { 1977 {
1978 if (m_mediaController) { 1978 if (m_mediaController) {
1979 es.throwUninformativeAndGenericDOMException(InvalidStateError); 1979 es.throwUninformativeAndGenericDOMException(InvalidStateError);
1980 return; 1980 return;
1981 } 1981 }
1982 seek(time, es); 1982 seek(time, es);
1983 } 1983 }
1984 1984
1985 double HTMLMediaElement::initialTime() const
1986 {
1987 if (m_fragmentStartTime != MediaPlayer::invalidTime())
1988 return m_fragmentStartTime;
1989
1990 return 0;
1991 }
1992
1993 double HTMLMediaElement::duration() const 1985 double HTMLMediaElement::duration() const
1994 { 1986 {
1995 if (!m_player || m_readyState < HAVE_METADATA) 1987 if (!m_player || m_readyState < HAVE_METADATA)
1996 return numeric_limits<double>::quiet_NaN(); 1988 return numeric_limits<double>::quiet_NaN();
1997 1989
1998 // FIXME: Refactor so m_duration is kept current (in both MSE and 1990 // FIXME: Refactor so m_duration is kept current (in both MSE and
1999 // non-MSE cases) once we have transitioned from HAVE_NOTHING -> 1991 // non-MSE cases) once we have transitioned from HAVE_NOTHING ->
2000 // HAVE_METADATA. Currently, m_duration may be out of date for at least MSE 1992 // HAVE_METADATA. Currently, m_duration may be out of date for at least MSE
2001 // case because MediaSourceBase and SourceBuffer do not notify the element 1993 // case because MediaSourceBase and SourceBuffer do not notify the element
2002 // directly upon duration changes caused by endOfStream, remove, or append 1994 // directly upon duration changes caused by endOfStream, remove, or append
(...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after
3881 { 3873 {
3882 scheduleLayerUpdate(); 3874 scheduleLayerUpdate();
3883 } 3875 }
3884 3876
3885 bool HTMLMediaElement::isInteractiveContent() const 3877 bool HTMLMediaElement::isInteractiveContent() const
3886 { 3878 {
3887 return fastHasAttribute(controlsAttr); 3879 return fastHasAttribute(controlsAttr);
3888 } 3880 }
3889 3881
3890 } 3882 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLMediaElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698