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

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

Issue 559993004: Fix TimeRanges::nearest() to actually calculate nearest time. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comments. 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 | « no previous file | Source/core/html/TimeRanges.h » ('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 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 if (previousSeekStillPending) 1985 if (previousSeekStillPending)
1986 return; 1986 return;
1987 // FIXME: There must be a stable state before timeupdate+seeked are dispatched and seeking 1987 // FIXME: There must be a stable state before timeupdate+seeked are dispatched and seeking
1988 // is reset to false. See http://crbug.com/266631 1988 // is reset to false. See http://crbug.com/266631
1989 scheduleTimeupdateEvent(false); 1989 scheduleTimeupdateEvent(false);
1990 scheduleEvent(EventTypeNames::seeked); 1990 scheduleEvent(EventTypeNames::seeked);
1991 } 1991 }
1992 m_seeking = false; 1992 m_seeking = false;
1993 return; 1993 return;
1994 } 1994 }
1995 time = seekableRanges->nearest(time); 1995 time = seekableRanges->nearest(time, now);
1996 1996
1997 if (m_playing) { 1997 if (m_playing) {
1998 if (m_lastSeekTime < now) 1998 if (m_lastSeekTime < now)
1999 addPlayedRange(m_lastSeekTime, now); 1999 addPlayedRange(m_lastSeekTime, now);
2000 } 2000 }
2001 m_lastSeekTime = time; 2001 m_lastSeekTime = time;
2002 m_sentEndEvent = false; 2002 m_sentEndEvent = false;
2003 2003
2004 // 10 - Queue a task to fire a simple event named seeking at the element. 2004 // 10 - Queue a task to fire a simple event named seeking at the element.
2005 scheduleEvent(EventTypeNames::seeking); 2005 scheduleEvent(EventTypeNames::seeking);
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
3983 3983
3984 #if ENABLE(WEB_AUDIO) 3984 #if ENABLE(WEB_AUDIO)
3985 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3985 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3986 { 3986 {
3987 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3987 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3988 audioSourceProvider()->setClient(0); 3988 audioSourceProvider()->setClient(0);
3989 } 3989 }
3990 #endif 3990 #endif
3991 3991
3992 } 3992 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/TimeRanges.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698