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

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: 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') | Source/core/html/TimeRangesTest.cpp » ('J')
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 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 if (previousSeekStillPending) 1982 if (previousSeekStillPending)
1983 return; 1983 return;
1984 // FIXME: There must be a stable state before timeupdate+seeked are dispatched and seeking 1984 // FIXME: There must be a stable state before timeupdate+seeked are dispatched and seeking
1985 // is reset to false. See http://crbug.com/266631 1985 // is reset to false. See http://crbug.com/266631
1986 scheduleTimeupdateEvent(false); 1986 scheduleTimeupdateEvent(false);
1987 scheduleEvent(EventTypeNames::seeked); 1987 scheduleEvent(EventTypeNames::seeked);
1988 } 1988 }
1989 m_seeking = false; 1989 m_seeking = false;
1990 return; 1990 return;
1991 } 1991 }
1992 time = seekableRanges->nearest(time); 1992 time = seekableRanges->nearest(time, now);
1993 1993
1994 if (m_playing) { 1994 if (m_playing) {
1995 if (m_lastSeekTime < now) 1995 if (m_lastSeekTime < now)
1996 addPlayedRange(m_lastSeekTime, now); 1996 addPlayedRange(m_lastSeekTime, now);
1997 } 1997 }
1998 m_lastSeekTime = time; 1998 m_lastSeekTime = time;
1999 m_sentEndEvent = false; 1999 m_sentEndEvent = false;
2000 2000
2001 // 8 - Queue a task to fire a simple event named seeking at the element. 2001 // 8 - Queue a task to fire a simple event named seeking at the element.
2002 scheduleEvent(EventTypeNames::seeking); 2002 scheduleEvent(EventTypeNames::seeking);
(...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
3970 3970
3971 #if ENABLE(WEB_AUDIO) 3971 #if ENABLE(WEB_AUDIO)
3972 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3972 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3973 { 3973 {
3974 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3974 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3975 audioSourceProvider()->setClient(0); 3975 audioSourceProvider()->setClient(0);
3976 } 3976 }
3977 #endif 3977 #endif
3978 3978
3979 } 3979 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/TimeRanges.h » ('j') | Source/core/html/TimeRangesTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698