Fix TimeRanges::nearest() to actually calculate nearest time.
The existing implementation instead couldn't decide if it wanted to calculate the nearest time or how close a given time was to a range. The new implementation follows the HTML spec for TimeRanges where nearest() returns a time within the range closest to the desired time. Equidistant matches are resolved by distance from the current time. BUG=412562 TEST=new unittest. Review URL: https://codereview.chromium.org/559993004 git-svn-id: svn://svn.chromium.org/blink/trunk@181859 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment