Bug 114483

Summary: TimeRanges::nearest() returns incorrect results.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, esprehn+autocc, philn, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 114484    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch eric.carlson: review+, buildbot: commit-queue-

Description Jer Noble 2013-04-11 17:35:30 PDT
TimeRanges::nearest() returns incorrect results.
Comment 1 Jer Noble 2013-04-11 17:36:27 PDT
"TimeRanges [1,2] -> nearest(0)" will return "0".
Comment 2 Jer Noble 2013-04-11 17:42:39 PDT
Created attachment 197704 [details]
Patch
Comment 3 Build Bot 2013-04-11 18:08:29 PDT
Comment on attachment 197704 [details]
Patch

Attachment 197704 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/105048
Comment 4 Jer Noble 2013-04-11 21:53:18 PDT
Created attachment 197714 [details]
Patch

Fixed windows build errors by adding symbols needed by WebCoreTestSupport to exports list.
Comment 5 Jer Noble 2013-04-11 22:45:57 PDT
Created attachment 197716 [details]
Patch

Added missing symbols to GTK build system.
Comment 6 Jer Noble 2013-04-11 23:55:45 PDT
Created attachment 197723 [details]
Patch

Now with more semicolons!
Comment 7 Eric Carlson 2013-04-12 09:53:57 PDT
Comment on attachment 197723 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=197723&action=review

> Source/WebCore/testing/Internals.cpp:2149
> +    unsigned count = std::min(startTimes->length(), endTimes->length());

std::min() is unnecessary because you ASSERT above if the lengths are different.
Comment 8 Build Bot 2013-04-12 10:33:44 PDT
Comment on attachment 197723 [details]
Patch

Attachment 197723 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/131087
Comment 9 Jer Noble 2013-04-12 10:56:52 PDT
Committed r148288: <http://trac.webkit.org/changeset/148288>