Bug 1389844 - Part 2: Add Intervals::ContainsWithStrictEnd method. r=gerald, a=lizzard
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 16 Aug 2017 19:30:45 +0200
changeset 423695 e33243e16a3a020509d64f95490e7524e2528ef8
parent 423694 7f465d33e70a0f92a0afc405a8cd0c3371165115
child 423696 4600e5c1d8533ca46c68a9bd6788d5df83def5a9
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, lizzard
bugs1389844
milestone56.0
Bug 1389844 - Part 2: Add Intervals::ContainsWithStrictEnd method. r=gerald, a=lizzard MozReview-Commit-ID: JnIgYlmewUw
dom/media/Intervals.h
--- a/dom/media/Intervals.h
+++ b/dom/media/Intervals.h
@@ -628,16 +628,26 @@ public:
     for (const auto& interval : mIntervals) {
       if (interval.ContainsWithStrictEnd(aX)) {
         return true;
       }
     }
     return false;
   }
 
+  bool ContainsWithStrictEnd(const ElemType& aInterval) const
+  {
+    for (const auto& interval : mIntervals) {
+      if (interval.ContainsWithStrictEnd(aInterval)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
   // Shift all values by aOffset.
   SelfType& Shift(const T& aOffset)
   {
     for (auto& interval : mIntervals) {
       interval.mStart = interval.mStart + aOffset;
       interval.mEnd = interval.mEnd + aOffset;
     }
     return *this;