Bug 56859 - Reduce float iteration in logicalLeft/RightOffsetForLine
Summary: Reduce float iteration in logicalLeft/RightOffsetForLine
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks: 57093
  Show dependency treegraph
 
Reported: 2011-03-22 13:09 PDT by Dave Hyatt
Modified: 2011-03-29 18:09 PDT (History)
0 users

See Also:


Attachments
Patch (4.18 KB, patch)
2011-03-22 13:12 PDT, Dave Hyatt
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2011-03-22 13:09:48 PDT
Floats in the floating object list are ordered in the order that they are positioned.  Following normal positioning rules, this means that the rightmost float in the set of left objects and the leftmost float in the set of right objects that actually intersect the vertical position specified in logicalLeftOffsetForLine and logicalRightOffsetForLine are the only floats we need to check.
Comment 1 Dave Hyatt 2011-03-22 13:12:50 PDT
Created attachment 86496 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-03-22 13:17:39 PDT
Comment on attachment 86496 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        Floats in the floating object list occur in the order that they are positioned.  This means
> +        that for a given vertical offset, the last left object in the list that intersects that offset
> +        will be the rightmost float.  There is no need to check any previous floats, since they have to be
> +        further left than that rightmost float.  The same rules hold true for right-aligned floats.

One space after periods!
Comment 3 Dave Hyatt 2011-03-28 11:08:11 PDT
Fixed.