Changeset 143357 in webkit


Ignore:
Timestamp:
Feb 19, 2013 11:00:35 AM (11 years ago)
Author:
eae@chromium.org
Message:

LayoutUnit::epsilon shouldn't be necessary to place floats
https://bugs.webkit.org/show_bug.cgi?id=94000

Reviewed by Levi Weintraub.

Currently, to get float placement correct, we need to have an
epsilon tolerance in RenderBlock::computeLogicalLocationForFloat
for the width of the line to fit them on. This really shouldn't
be necessary, and probably indicates we're losing precision
elsewhere.

Remove epsilon as it no longer appears to be needed. All layout
tests pass without it.

No new tests, covered by existing tests.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computeLogicalLocationForFloat):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r143356 r143357  
     12013-02-19  Emil A Eklund  <eae@chromium.org>
     2
     3        LayoutUnit::epsilon shouldn't be necessary to place floats
     4        https://bugs.webkit.org/show_bug.cgi?id=94000
     5
     6        Reviewed by Levi Weintraub.
     7       
     8        Currently, to get float placement correct, we need to have an
     9        epsilon tolerance in RenderBlock::computeLogicalLocationForFloat
     10        for the width of the line to fit them on. This really shouldn't
     11        be necessary, and probably indicates we're losing precision
     12        elsewhere.
     13       
     14        Remove epsilon as it no longer appears to be needed. All layout
     15        tests pass without it.
     16
     17        No new tests, covered by existing tests.
     18
     19        * rendering/RenderBlock.cpp:
     20        (WebCore::RenderBlock::computeLogicalLocationForFloat):
     21
    1222013-02-19  Tim Volodine  <timvolodine@chromium.org>
    223
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r143293 r143357  
    39973997        LayoutUnit heightRemainingRight = 1;
    39983998        floatLogicalLeft = logicalLeftOffsetForLine(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
    3999         // FIXME: LayoutUnit::epsilon is probably only necessary here due to lost precision elsewhere https://bugs.webkit.org/show_bug.cgi?id=94000
    4000         while (logicalRightOffsetForLine(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight) - floatLogicalLeft + LayoutUnit::epsilon() < floatLogicalWidth) {
     3999        while (logicalRightOffsetForLine(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight) - floatLogicalLeft < floatLogicalWidth) {
    40014000            logicalTopOffset += min(heightRemainingLeft, heightRemainingRight);
    40024001            floatLogicalLeft = logicalLeftOffsetForLine(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
     
    40134012        LayoutUnit heightRemainingRight = 1;
    40144013        floatLogicalLeft = logicalRightOffsetForLine(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
    4015         // FIXME: LayoutUnit::epsilon is probably only necessary here due to lost precision elsewhere https://bugs.webkit.org/show_bug.cgi?id=94000
    4016         while (floatLogicalLeft - logicalLeftOffsetForLine(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft) + LayoutUnit::epsilon() < floatLogicalWidth) {
     4014        while (floatLogicalLeft - logicalLeftOffsetForLine(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft) < floatLogicalWidth) {
    40174015            logicalTopOffset += min(heightRemainingLeft, heightRemainingRight);
    40184016            floatLogicalLeft = logicalRightOffsetForLine(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
Note: See TracChangeset for help on using the changeset viewer.