Lines 30-35
Link Here
|
30 |
|
30 |
|
31 |
#include "third_party/blink/public/platform/web_time_range.h" |
31 |
#include "third_party/blink/public/platform/web_time_range.h" |
32 |
|
32 |
|
|
|
33 |
#include <limits> |
33 |
#include <cmath> |
34 |
#include <cmath> |
34 |
|
35 |
|
35 |
namespace blink { |
36 |
namespace blink { |
Lines 90-97
Link Here
|
90 |
|
91 |
|
91 |
void WebTimeRanges::Invert() { |
92 |
void WebTimeRanges::Invert() { |
92 |
WebTimeRanges inverted; |
93 |
WebTimeRanges inverted; |
93 |
double pos_inf = std::numeric_limits<double>::infinity(); |
94 |
double pos_inf = ::std::numeric_limits<double>::infinity(); |
94 |
double neg_inf = -std::numeric_limits<double>::infinity(); |
95 |
double neg_inf = -::std::numeric_limits<double>::infinity(); |
95 |
|
96 |
|
96 |
if (!size()) { |
97 |
if (!size()) { |
97 |
inverted.Add(neg_inf, pos_inf); |
98 |
inverted.Add(neg_inf, pos_inf); |
Lines 129-135
Link Here
|
129 |
double WebTimeRanges::Nearest(double new_playback_position, |
130 |
double WebTimeRanges::Nearest(double new_playback_position, |
130 |
double current_playback_position) const { |
131 |
double current_playback_position) const { |
131 |
double best_match = 0; |
132 |
double best_match = 0; |
132 |
double best_delta = std::numeric_limits<double>::infinity(); |
133 |
double best_delta = ::std::numeric_limits<double>::infinity(); |
133 |
for (const WebTimeRange& range : *this) { |
134 |
for (const WebTimeRange& range : *this) { |
134 |
double start_time = range.start; |
135 |
double start_time = range.start; |
135 |
double end_time = range.end; |
136 |
double end_time = range.end; |