Bug 114483 - TimeRanges::nearest() returns incorrect results.
Summary: TimeRanges::nearest() returns incorrect results.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks: 114484
  Show dependency treegraph
 
Reported: 2013-04-11 17:35 PDT by Jer Noble
Modified: 2013-04-12 10:56 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.75 KB, patch)
2013-04-11 17:42 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (11.26 KB, patch)
2013-04-11 21:53 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (12.69 KB, patch)
2013-04-11 22:45 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (12.69 KB, patch)
2013-04-11 23:55 PDT, Jer Noble
eric.carlson: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>