Bug 56892 - Adding floats to an empty block is O(n^2)
Summary: Adding floats to an empty block is O(n^2)
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:
 
Reported: 2011-03-22 20:06 PDT by Dave Hyatt
Modified: 2011-03-22 20:27 PDT (History)
0 users

See Also:


Attachments
Patch (8.09 KB, patch)
2011-03-22 20:09 PDT, Dave Hyatt
mitz: 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 20:06:53 PDT
If you just add floats back to back to an empty block, the addition is essentially O(n^2) once the floats move below your current line position.  This is because we repeatedly ask for the available width for the line from scratch every time we add a float, regardless of whether the float even vertically intersected our current line position.
Comment 1 Dave Hyatt 2011-03-22 20:09:49 PDT
Created attachment 86563 [details]
Patch
Comment 2 mitz 2011-03-22 20:15:45 PDT
Comment on attachment 86563 [details]
Patch

I assume all tests pass :-)
Comment 3 Dave Hyatt 2011-03-22 20:27:27 PDT
Fixed in r81746.