Changeset 82303 in webkit


Ignore:
Timestamp:
Mar 29, 2011, 12:47:35 PM (14 years ago)
Author:
[email protected]
Message:

<rdar://problem/9194927> REGRESSION (r81691): Page at www.mondaynote.com lays out incorrectly

Reviewed by Simon Fraser.

Back out the optimization that stopped when it hit the first float. This was an incorrect optimization
and can't be done without more work.

Source/WebCore:

Added fast/block/float/float-forced-below-other-floats.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):

LayoutTests:

Added fast/block/float/float-below-other-floats.html

  • fast/block/float/float-forced-below-other-floats.html: Added.
  • platform/mac/fast/block/float/float-forced-below-other-floats-expected.checksum: Added.
  • platform/mac/fast/block/float/float-forced-below-other-floats-expected.png: Added.
  • platform/mac/fast/block/float/float-forced-below-other-floats-expected.txt: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82301 r82303  
     12011-03-29  David Hyatt  <[email protected]>
     2
     3        Reviewed by Simon Fraser.
     4
     5        <rdar://problem/9194927> REGRESSION (r81691): Page at www.mondaynote.com lays out incorrectly
     6       
     7        Back out the optimization that stopped when it hit the first float. This was an incorrect optimization
     8        and can't be done without more work.
     9
     10        Added fast/block/float/float-below-other-floats.html
     11
     12        * fast/block/float/float-forced-below-other-floats.html: Added.
     13        * platform/mac/fast/block/float/float-forced-below-other-floats-expected.checksum: Added.
     14        * platform/mac/fast/block/float/float-forced-below-other-floats-expected.png: Added.
     15        * platform/mac/fast/block/float/float-forced-below-other-floats-expected.txt: Added.
     16
    1172011-03-29  Adam Roben  <[email protected]>
    218
  • trunk/Source/WebCore/ChangeLog

    r82297 r82303  
     12011-03-29  David Hyatt  <[email protected]>
     2
     3        Reviewed by Simon Fraser.
     4
     5        <rdar://problem/9194927> REGRESSION (r81691): Page at www.mondaynote.com lays out incorrectly
     6       
     7        Back out the optimization that stopped when it hit the first float. This was an incorrect optimization
     8        and can't be done without more work.
     9
     10        Added fast/block/float/float-forced-below-other-floats.html
     11
     12        * rendering/RenderBlock.cpp:
     13        (WebCore::RenderBlock::logicalLeftOffsetForLine):
     14        (WebCore::RenderBlock::logicalRightOffsetForLine):
     15
    1162011-03-29  Eric Seidel  <[email protected]>
    217
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r82123 r82303  
    34563456}
    34573457
     3458// FIXME: The logicalLeftOffsetForLine/logicalRightOffsetForLine functions are very slow if there are many floats
     3459// present. We need to add a structure to floating objects to represent "lines" of floats.  Then instead of checking
     3460// each float individually, we'd just walk backwards through the "lines" and stop when we hit a line that is fully above
     3461// the vertical offset that we'd like to check.  Computing the "lines" would be rather complicated, but could replace the left
     3462// objects and right objects count hack that is currently used here.
    34583463int RenderBlock::logicalLeftOffsetForLine(int logicalTop, int fixedOffset, bool applyTextIndent, int* heightRemaining) const
    34593464{
     
    34753480                && r->type() == FloatingObject::FloatLeft
    34763481                && logicalRightForFloat(r) > left) {
    3477                 left = logicalRightForFloat(r);
     3482                left = max(left, logicalRightForFloat(r));
    34783483                if (heightRemaining)
    34793484                    *heightRemaining = logicalBottomForFloat(r) - logicalTop;
    3480                 break;
    34813485            }
    34823486        } while (it != begin);
     
    35133517                && r->type() == FloatingObject::FloatRight
    35143518                && logicalLeftForFloat(r) < right) {
    3515                 right = logicalLeftForFloat(r);
     3519                right = min(right, logicalLeftForFloat(r));
    35163520                if (heightRemaining)
    35173521                    *heightRemaining = logicalBottomForFloat(r) - logicalTop;
    3518                 break;
    35193522            }
    35203523        } while (it != begin);
Note: See TracChangeset for help on using the changeset viewer.