Changeset 140576 in webkit
- Timestamp:
- Jan 23, 2013, 12:54:07 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140570 r140576 1 2013-01-23 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 David Hyatt. 7 8 * fast/overflow/height-during-simplified-layout-expected.txt: Added. 9 * fast/overflow/height-during-simplified-layout.html: Added. 10 1 11 2013-01-23 Robert Hogan <robert@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r140575 r140576 1 2013-01-23 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 David Hyatt. 7 8 When computing overflow we need the height of the block before 9 it was clamped (i.e., before updateLogicalHeight() has been called). 10 11 During simplified layout, we don't have this information and we were 12 using the clamped height by mistake. To fix this, we now store the 13 pre-clamped height on RenderOverflow so we can properly compute 14 overflow. 15 16 Test: fast/overflow/height-during-simplified-layout.html 17 18 * rendering/RenderBlock.cpp: 19 (WebCore::RenderBlock::computeOverflow): Save the height if we have overflow. 20 (WebCore::RenderBlock::simplifiedLayout): If we have overflow, use the height that we saved 21 in computeOverflow. 22 * rendering/RenderOverflow.h: 23 (WebCore::RenderOverflow::layoutClientAfterEdge): 24 (WebCore::RenderOverflow::setLayoutClientAfterEdge): 25 (RenderOverflow): Add a member variable to save the height. 26 1 27 2013-01-23 Tom Sepez <tsepez@chromium.org> 2 28 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r140570 r140576 1675 1675 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max<LayoutUnit>(0, oldClientAfterEdge - clientRect.x()), 1); 1676 1676 addLayoutOverflow(rectToApply); 1677 if (hasRenderOverflow()) 1678 m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge); 1677 1679 } 1678 1680 … … 2607 2609 // For now just always recompute overflow. This is no worse performance-wise than the old code that called rightmostPosition and 2608 2610 // lowestPosition on every relayout so it's not a regression. 2611 // computeOverflow expects the bottom edge before we clamp our height. Since this information isn't available during 2612 // simplifiedLayout, we cache the value in m_overflow. 2613 LayoutUnit oldClientAfterEdge = hasRenderOverflow() ? m_overflow->layoutClientAfterEdge() : clientLogicalBottom(); 2609 2614 m_overflow.clear(); 2610 computeOverflow( clientLogicalBottom(), true);2615 computeOverflow(oldClientAfterEdge, true); 2611 2616 2612 2617 statePusher.pop(); -
trunk/Source/WebCore/rendering/RenderOverflow.h
r133779 r140576 68 68 void setVisualOverflow(const LayoutRect&); 69 69 70 LayoutUnit layoutClientAfterEdge() const { return m_layoutClientAfterEdge; } 71 void setLayoutClientAfterEdge(LayoutUnit clientAfterEdge) { m_layoutClientAfterEdge = clientAfterEdge; } 72 70 73 private: 71 74 LayoutRect m_layoutOverflow; 72 75 LayoutRect m_visualOverflow; 76 77 LayoutUnit m_layoutClientAfterEdge; 73 78 }; 74 79
Note:
See TracChangeset
for help on using the changeset viewer.