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

Side by Side Diff: third_party/WebKit/Source/core/html/TimeRanges.h

Issue 2280123002: Fix under-invalidation of media buffered ranges (Closed)
Patch Set: Conditionally invalidate Created 4 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 | third_party/WebKit/Source/core/html/shadow/MediaControls.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, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2009 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 void add(double start, double end); 107 void add(double start, double end);
108 108
109 bool contain(double time) const; 109 bool contain(double time) const;
110 110
111 double nearest(double newPlaybackPosition, double currentPlaybackPosition) c onst; 111 double nearest(double newPlaybackPosition, double currentPlaybackPosition) c onst;
112 112
113 DEFINE_INLINE_TRACE() { } 113 DEFINE_INLINE_TRACE() { }
114 114
115 private: 115 private:
116 friend bool operator==(const TimeRanges&, const TimeRanges&);
117
116 TimeRanges() { } 118 TimeRanges() { }
117 119
118 TimeRanges(double start, double end); 120 TimeRanges(double start, double end);
119 121
120 void invert(); 122 void invert();
121 123
122 Vector<Range> m_ranges; 124 Vector<Range> m_ranges;
123 }; 125 };
124 126
127 inline bool operator==(const TimeRanges::Range& a, const TimeRanges::Range& b) { return a.m_start == b.m_start && a.m_end == b.m_end; }
128 inline bool operator!=(const TimeRanges::Range& a, const TimeRanges::Range& b) { return !(a == b); }
129 inline bool operator==(const TimeRanges& a, const TimeRanges& b) { return a.m_ra nges == b.m_ranges; }
130 inline bool operator!=(const TimeRanges& a, const TimeRanges& b) { return !(a == b); }
131
125 } // namespace blink 132 } // namespace blink
126 133
127 #endif // TimeRanges_h 134 #endif // TimeRanges_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698