Changeset 140171 in webkit


Ignore:
Timestamp:
Jan 18, 2013 10:02:08 AM (11 years ago)
Author:
tony@chromium.org
Message:

Incorrect scrollable height during simplified layout
https://bugs.webkit.org/show_bug.cgi?id=107193

Reviewed by Ojan Vafai.

Source/WebCore:

Test: fast/overflow/height-during-simplified-layout.html

When computing overflow, we use the height of the block before it was clamped
(i.e., before updateLogicalHeight() has been called).

During simplfied layout, we use the previous sizes rather than doing a full
layout. We still compute overflow, but we were using the clamped height rather
than the full height.

This caused us to incorrectly compute the overflow by the vertical padding.
Since we were passing in the already clamped clientHeight to RenderBlock::computeOverflow,
we would only include the overflow from our children sizes and not include the overflow
from ourselves caused by padding + content.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::simplifiedLayout): Use the scrollable height rather than the
already clamped height.

LayoutTests:

  • fast/overflow/height-during-simplified-layout-expected.txt: Added.
  • fast/overflow/height-during-simplified-layout.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140163 r140171  
     12013-01-18  Tony Chang  <tony@chromium.org>
     2
     3        Incorrect scrollable height during simplified layout
     4        https://bugs.webkit.org/show_bug.cgi?id=107193
     5
     6        Reviewed by Ojan Vafai.
     7
     8        * fast/overflow/height-during-simplified-layout-expected.txt: Added.
     9        * fast/overflow/height-during-simplified-layout.html: Added.
     10
    1112013-01-18  Dominik Röttsches  <dominik.rottsches@intel.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r140168 r140171  
     12013-01-18  Tony Chang  <tony@chromium.org>
     2
     3        Incorrect scrollable height during simplified layout
     4        https://bugs.webkit.org/show_bug.cgi?id=107193
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Test: fast/overflow/height-during-simplified-layout.html
     9
     10        When computing overflow, we use the height of the block before it was clamped
     11        (i.e., before updateLogicalHeight() has been called).
     12
     13        During simplfied layout, we use the previous sizes rather than doing a full
     14        layout. We still compute overflow, but we were using the clamped height rather
     15        than the full height.
     16
     17        This caused us to incorrectly compute the overflow by the vertical padding.
     18        Since we were passing in the already clamped clientHeight to RenderBlock::computeOverflow,
     19        we would only include the overflow from our children sizes and not include the overflow
     20        from ourselves caused by padding + content.
     21
     22        * rendering/RenderBlock.cpp:
     23        (WebCore::RenderBlock::simplifiedLayout): Use the scrollable height rather than the
     24        already clamped height.
     25
    1262013-01-18  Joe Mason  <jmason@rim.com>
    227
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r140068 r140171  
    25972597    // lowestPosition on every relayout so it's not a regression.
    25982598    m_overflow.clear();
    2599     computeOverflow(clientLogicalBottom(), true);
     2599    LayoutUnit logicalScrollHeight = style()->isHorizontalWritingMode() ? scrollHeight() : scrollWidth();
     2600    computeOverflow(borderBefore() + logicalScrollHeight, true);
    26002601
    26012602    statePusher.pop();
Note: See TracChangeset for help on using the changeset viewer.