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

Unified Diff: third_party/WebKit/Source/core/html/TimeRanges.h

Issue 2280123002: Fix under-invalidation of media buffered ranges (Closed)
Patch Set: Synchronize buffered ranges when the current play time changes Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/TimeRanges.h
diff --git a/third_party/WebKit/Source/core/html/TimeRanges.h b/third_party/WebKit/Source/core/html/TimeRanges.h
index 336191f1dbf7a7706ba425656742e0eb5b19d063..40e4f147dc8fd78e56b441df479b57c3f15ad6bd 100644
--- a/third_party/WebKit/Source/core/html/TimeRanges.h
+++ b/third_party/WebKit/Source/core/html/TimeRanges.h
@@ -113,6 +113,8 @@ public:
DEFINE_INLINE_TRACE() { }
private:
+ friend bool operator==(const TimeRanges&, const TimeRanges&);
+
TimeRanges() { }
TimeRanges(double start, double end);
@@ -122,6 +124,11 @@ private:
Vector<Range> m_ranges;
};
+inline bool operator==(const TimeRanges::Range& a, const TimeRanges::Range& b) { return a.m_start == b.m_start && a.m_end == b.m_end; }
+inline bool operator!=(const TimeRanges::Range& a, const TimeRanges::Range& b) { return !(a == b); }
+inline bool operator==(const TimeRanges& a, const TimeRanges& b) { return a.m_ranges == b.m_ranges; }
+inline bool operator!=(const TimeRanges& a, const TimeRanges& b) { return !(a == b); }
+
} // namespace blink
#endif // TimeRanges_h

Powered by Google App Engine
This is Rietveld 408576698