Changeset 148523 in webkit


Ignore:
Timestamp:
Apr 16, 2013 10:56:15 AM (11 years ago)
Author:
robert@webkit.org
Message:

Float at exact multiple of line-height affects too many lines
https://bugs.webkit.org/show_bug.cgi?id=112744

Reviewed by David Hyatt.

Source/WebCore:

Tests: fast/block/float/float-with-fractional-height-vertical-lr.html

fast/block/float/float-with-fractional-height.html

When adding floats to the interval tree used for testing floats' overlap with lineboxes
truncate the dimensions of the float rather than rounding them. This matches the
treatment of linebox dimensions so ensures the test for overlap is comparing like
with like.

  • rendering/RenderBlock.cpp:

(WebCore::::collectIfNeeded):
(WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject):
(WebCore::::string):

LayoutTests:

  • fast/block/float/float-with-fractional-height-expected.html: Added.
  • fast/block/float/float-with-fractional-height-vertical-lr-expected.html: Added.
  • fast/block/float/float-with-fractional-height-vertical-lr.html: Added.
  • fast/block/float/float-with-fractional-height.html: Added.
  • platform/mac/fast/backgrounds/background-position-parsing-expected.txt:
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r148522 r148523  
     12013-04-16  Robert Hogan  <robert@webkit.org>
     2
     3        Float at exact multiple of line-height affects too many lines
     4        https://bugs.webkit.org/show_bug.cgi?id=112744
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/block/float/float-with-fractional-height-expected.html: Added.
     9        * fast/block/float/float-with-fractional-height-vertical-lr-expected.html: Added.
     10        * fast/block/float/float-with-fractional-height-vertical-lr.html: Added.
     11        * fast/block/float/float-with-fractional-height.html: Added.
     12        * platform/mac/fast/backgrounds/background-position-parsing-expected.txt:
     13
    1142013-04-16  Chris Fleizach  <cfleizach@apple.com>
    215
  • trunk/LayoutTests/platform/mac/fast/backgrounds/background-position-parsing-expected.txt

    r133351 r148523  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x405
    4   RenderBlock {HTML} at (0,0) size 800x406
     4  RenderBlock {HTML} at (0,0) size 800x405
    55    RenderBody {BODY} at (8,16) size 784x18
    66      RenderBlock {P} at (0,0) size 784x18
     
    3434        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    3535          RenderBlock {DIV} at (8,8) size 59x34
    36       RenderBlock (floating) {DIV} at (1,95) size 82x57 [border: (3px solid #000000)]
     36      RenderBlock (floating) {DIV} at (1,94) size 82x57 [border: (3px solid #000000)]
    3737        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    3838          RenderBlock {DIV} at (8,8) size 59x34
    39       RenderBlock (floating) {DIV} at (86,95) size 82x57 [border: (3px solid #000000)]
     39      RenderBlock (floating) {DIV} at (86,94) size 82x57 [border: (3px solid #000000)]
    4040        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    4141          RenderBlock {DIV} at (8,8) size 59x34
    42       RenderBlock (floating) {DIV} at (170,95) size 82x57 [border: (3px solid #000000)]
     42      RenderBlock (floating) {DIV} at (170,94) size 82x57 [border: (3px solid #000000)]
    4343        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    4444          RenderBlock {DIV} at (8,8) size 59x34
    45       RenderBlock (floating) {DIV} at (255,95) size 82x57 [border: (3px solid #000000)]
     45      RenderBlock (floating) {DIV} at (255,94) size 82x57 [border: (3px solid #000000)]
    4646        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    4747          RenderBlock {DIV} at (8,8) size 59x34
    48       RenderBlock (floating) {DIV} at (340,95) size 82x57 [border: (3px solid #000000)]
     48      RenderBlock (floating) {DIV} at (340,94) size 82x57 [border: (3px solid #000000)]
    4949        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    5050          RenderBlock {DIV} at (8,8) size 59x34
    51       RenderBlock (floating) {DIV} at (424,95) size 82x57 [border: (3px solid #000000)]
     51      RenderBlock (floating) {DIV} at (424,94) size 82x57 [border: (3px solid #000000)]
    5252        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    5353          RenderBlock {DIV} at (8,8) size 59x34
    54       RenderBlock (floating) {DIV} at (509,95) size 82x57 [border: (3px solid #000000)]
     54      RenderBlock (floating) {DIV} at (509,94) size 82x57 [border: (3px solid #000000)]
    5555        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    5656          RenderBlock {DIV} at (8,8) size 59x34
    57       RenderBlock (floating) {DIV} at (593,95) size 82x57 [border: (3px solid #000000)]
     57      RenderBlock (floating) {DIV} at (593,94) size 82x57 [border: (3px solid #000000)]
    5858        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    5959          RenderBlock {DIV} at (8,8) size 59x34
    60       RenderBlock (floating) {DIV} at (678,95) size 82x57 [border: (3px solid #000000)]
     60      RenderBlock (floating) {DIV} at (678,94) size 82x57 [border: (3px solid #000000)]
    6161        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    6262          RenderBlock {DIV} at (8,8) size 59x34
    63       RenderBlock (floating) {DIV} at (1,154) size 82x57 [border: (3px solid #000000)]
     63      RenderBlock (floating) {DIV} at (1,153) size 82x57 [border: (3px solid #000000)]
    6464        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    6565          RenderBlock {DIV} at (8,8) size 59x34
    66       RenderBlock (floating) {DIV} at (86,154) size 82x57 [border: (3px solid #000000)]
     66      RenderBlock (floating) {DIV} at (86,153) size 82x57 [border: (3px solid #000000)]
    6767        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    6868          RenderBlock {DIV} at (8,8) size 59x34
    69       RenderBlock (floating) {DIV} at (170,154) size 82x57 [border: (3px solid #000000)]
     69      RenderBlock (floating) {DIV} at (170,153) size 82x57 [border: (3px solid #000000)]
    7070        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    7171          RenderBlock {DIV} at (8,8) size 59x34
    72       RenderBlock (floating) {DIV} at (255,154) size 82x57 [border: (3px solid #000000)]
     72      RenderBlock (floating) {DIV} at (255,153) size 82x57 [border: (3px solid #000000)]
    7373        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    7474          RenderBlock {DIV} at (8,8) size 59x34
    75       RenderBlock (floating) {DIV} at (340,154) size 82x57 [border: (3px solid #000000)]
     75      RenderBlock (floating) {DIV} at (340,153) size 82x57 [border: (3px solid #000000)]
    7676        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    7777          RenderBlock {DIV} at (8,8) size 59x34
    78       RenderBlock (floating) {DIV} at (424,154) size 82x57 [border: (3px solid #000000)]
     78      RenderBlock (floating) {DIV} at (424,153) size 82x57 [border: (3px solid #000000)]
    7979        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    8080          RenderBlock {DIV} at (8,8) size 59x34
    81       RenderBlock (floating) {DIV} at (509,154) size 82x57 [border: (3px solid #000000)]
     81      RenderBlock (floating) {DIV} at (509,153) size 82x57 [border: (3px solid #000000)]
    8282        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    8383          RenderBlock {DIV} at (8,8) size 59x34
    84       RenderBlock (floating) {DIV} at (593,154) size 82x57 [border: (3px solid #000000)]
     84      RenderBlock (floating) {DIV} at (593,153) size 82x57 [border: (3px solid #000000)]
    8585        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    8686          RenderBlock {DIV} at (8,8) size 59x34
    87       RenderBlock (floating) {DIV} at (678,154) size 82x57 [border: (3px solid #000000)]
     87      RenderBlock (floating) {DIV} at (678,153) size 82x57 [border: (3px solid #000000)]
    8888        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    8989          RenderBlock {DIV} at (8,8) size 59x34
    90       RenderBlock (floating) {DIV} at (1,213) size 82x57 [border: (3px solid #000000)]
     90      RenderBlock (floating) {DIV} at (1,212) size 82x57 [border: (3px solid #000000)]
    9191        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    9292          RenderBlock {DIV} at (8,8) size 59x34
    93       RenderBlock (floating) {DIV} at (86,213) size 82x57 [border: (3px solid #000000)]
     93      RenderBlock (floating) {DIV} at (86,212) size 82x57 [border: (3px solid #000000)]
    9494        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    9595          RenderBlock {DIV} at (8,8) size 59x34
    96       RenderBlock (floating) {DIV} at (170,213) size 82x57 [border: (3px solid #000000)]
     96      RenderBlock (floating) {DIV} at (170,212) size 82x57 [border: (3px solid #000000)]
    9797        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    9898          RenderBlock {DIV} at (8,8) size 59x34
    99       RenderBlock (floating) {DIV} at (255,213) size 82x57 [border: (3px solid #000000)]
     99      RenderBlock (floating) {DIV} at (255,212) size 82x57 [border: (3px solid #000000)]
    100100        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    101101          RenderBlock {DIV} at (8,8) size 59x34
    102       RenderBlock (floating) {DIV} at (340,213) size 82x57 [border: (3px solid #000000)]
     102      RenderBlock (floating) {DIV} at (340,212) size 82x57 [border: (3px solid #000000)]
    103103        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    104104          RenderBlock {DIV} at (8,8) size 59x34
    105       RenderBlock (floating) {DIV} at (424,213) size 82x57 [border: (3px solid #000000)]
     105      RenderBlock (floating) {DIV} at (424,212) size 82x57 [border: (3px solid #000000)]
    106106        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    107107          RenderBlock {DIV} at (8,8) size 59x34
    108       RenderBlock (floating) {DIV} at (509,213) size 82x57 [border: (3px solid #000000)]
     108      RenderBlock (floating) {DIV} at (509,212) size 82x57 [border: (3px solid #000000)]
    109109        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    110110          RenderBlock {DIV} at (8,8) size 59x34
    111       RenderBlock (floating) {DIV} at (593,213) size 82x57 [border: (3px solid #000000)]
     111      RenderBlock (floating) {DIV} at (593,212) size 82x57 [border: (3px solid #000000)]
    112112        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    113113          RenderBlock {DIV} at (8,8) size 59x34
    114       RenderBlock (floating) {DIV} at (678,213) size 82x57 [border: (3px solid #000000)]
     114      RenderBlock (floating) {DIV} at (678,212) size 82x57 [border: (3px solid #000000)]
    115115        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    116116          RenderBlock {DIV} at (8,8) size 59x34
    117       RenderBlock (floating) {DIV} at (1,272) size 82x57 [border: (3px solid #000000)]
     117      RenderBlock (floating) {DIV} at (1,271) size 82x57 [border: (3px solid #000000)]
    118118        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    119119          RenderBlock {DIV} at (8,8) size 59x34
    120       RenderBlock (floating) {DIV} at (86,272) size 82x57 [border: (3px solid #000000)]
     120      RenderBlock (floating) {DIV} at (86,271) size 82x57 [border: (3px solid #000000)]
    121121        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    122122          RenderBlock {DIV} at (8,8) size 59x34
    123       RenderBlock (floating) {DIV} at (170,272) size 82x57 [border: (3px solid #000000)]
     123      RenderBlock (floating) {DIV} at (170,271) size 82x57 [border: (3px solid #000000)]
    124124        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    125125          RenderBlock {DIV} at (8,8) size 59x34
    126       RenderBlock (floating) {DIV} at (255,272) size 82x57 [border: (3px solid #000000)]
     126      RenderBlock (floating) {DIV} at (255,271) size 82x57 [border: (3px solid #000000)]
    127127        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    128128          RenderBlock {DIV} at (8,8) size 59x34
    129       RenderBlock (floating) {DIV} at (340,272) size 82x57 [border: (3px solid #000000)]
     129      RenderBlock (floating) {DIV} at (340,271) size 82x57 [border: (3px solid #000000)]
    130130        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    131131          RenderBlock {DIV} at (8,8) size 59x34
    132       RenderBlock (floating) {DIV} at (424,272) size 82x57 [border: (3px solid #000000)]
     132      RenderBlock (floating) {DIV} at (424,271) size 82x57 [border: (3px solid #000000)]
    133133        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    134134          RenderBlock {DIV} at (8,8) size 59x34
    135       RenderBlock (floating) {DIV} at (509,272) size 82x57 [border: (3px solid #000000)]
     135      RenderBlock (floating) {DIV} at (509,271) size 82x57 [border: (3px solid #000000)]
    136136        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    137137          RenderBlock {DIV} at (8,8) size 59x34
    138       RenderBlock (floating) {DIV} at (593,272) size 82x57 [border: (3px solid #000000)]
     138      RenderBlock (floating) {DIV} at (593,271) size 82x57 [border: (3px solid #000000)]
    139139        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    140140          RenderBlock {DIV} at (8,8) size 59x34
    141       RenderBlock (floating) {DIV} at (678,272) size 82x57 [border: (3px solid #000000)]
     141      RenderBlock (floating) {DIV} at (678,271) size 82x57 [border: (3px solid #000000)]
    142142        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    143143          RenderBlock {DIV} at (8,8) size 59x34
    144       RenderBlock (floating) {DIV} at (1,331) size 82x57 [border: (3px solid #000000)]
     144      RenderBlock (floating) {DIV} at (1,330) size 82x57 [border: (3px solid #000000)]
    145145        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    146146          RenderBlock {DIV} at (8,8) size 59x34
    147       RenderBlock (floating) {DIV} at (86,331) size 82x57 [border: (3px solid #000000)]
     147      RenderBlock (floating) {DIV} at (86,330) size 82x57 [border: (3px solid #000000)]
    148148        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    149149          RenderBlock {DIV} at (8,8) size 59x34
    150       RenderBlock (floating) {DIV} at (170,331) size 82x57 [border: (3px solid #000000)]
     150      RenderBlock (floating) {DIV} at (170,330) size 82x57 [border: (3px solid #000000)]
    151151        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    152152          RenderBlock {DIV} at (8,8) size 59x34
    153       RenderBlock (floating) {DIV} at (255,331) size 82x57 [border: (3px solid #000000)]
     153      RenderBlock (floating) {DIV} at (255,330) size 82x57 [border: (3px solid #000000)]
    154154        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    155155          RenderBlock {DIV} at (8,8) size 59x34
    156       RenderBlock (floating) {DIV} at (340,331) size 82x57 [border: (3px solid #000000)]
     156      RenderBlock (floating) {DIV} at (340,330) size 82x57 [border: (3px solid #000000)]
    157157        RenderBlock {DIV} at (3,3) size 75x50 [bgcolor=#FFFFCC]
    158158          RenderBlock {DIV} at (8,8) size 59x34
  • trunk/Source/WebCore/ChangeLog

    r148522 r148523  
     12013-04-16  Robert Hogan  <robert@webkit.org>
     2
     3        Float at exact multiple of line-height affects too many lines
     4        https://bugs.webkit.org/show_bug.cgi?id=112744
     5
     6        Reviewed by David Hyatt.
     7
     8        Tests: fast/block/float/float-with-fractional-height-vertical-lr.html
     9               fast/block/float/float-with-fractional-height.html
     10
     11        When adding floats to the interval tree used for testing floats' overlap with lineboxes
     12        truncate the dimensions of the float rather than rounding them. This matches the
     13        treatment of linebox dimensions so ensures the test for overlap is comparing like
     14        with like.
     15
     16        * rendering/RenderBlock.cpp:
     17        (WebCore::::collectIfNeeded):
     18        (WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject):
     19        (WebCore::::string):
     20
    1212013-04-16  Chris Fleizach  <cfleizach@apple.com>
    222
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r148258 r148523  
    42864286
    42874287    // All the objects returned from the tree should be already placed.
    4288     ASSERT(r->isPlaced() && rangesIntersect(m_renderer->pixelSnappedLogicalTopForFloat(r), m_renderer->pixelSnappedLogicalBottomForFloat(r), m_lowValue, m_highValue));
     4288    ASSERT(r->isPlaced() && rangesIntersect(m_renderer->logicalTopForFloat(r), m_renderer->logicalBottomForFloat(r), m_lowValue, m_highValue));
    42894289
    42904290    if (FloatTypeValue == FloatingObject::FloatLeft
     
    79067906{
    79077907    if (m_horizontalWritingMode)
    7908         return RenderBlock::FloatingObjectInterval(floatingObject->frameRect().pixelSnappedY(), floatingObject->frameRect().pixelSnappedMaxY(), floatingObject);
    7909     return RenderBlock::FloatingObjectInterval(floatingObject->frameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedMaxX(), floatingObject);
     7908        return RenderBlock::FloatingObjectInterval(floatingObject->frameRect().y(), floatingObject->frameRect().maxY(), floatingObject);
     7909    return RenderBlock::FloatingObjectInterval(floatingObject->frameRect().x(), floatingObject->frameRect().maxX(), floatingObject);
    79107910}
    79117911
     
    81258125String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::FloatingObject* floatingObject)
    81268126{
    8127     return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->frameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floatingObject->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnappedMaxY());
     8127    return String::format("%p (%ix%i %ix%i)", floatingObject, floatingObject->frameRect().x().toInt(), floatingObject->frameRect().y().toInt(), floatingObject->frameRect().maxX().toInt(), floatingObject->frameRect().maxY().toInt());
    81288128}
    81298129
Note: See TracChangeset for help on using the changeset viewer.