Changeset 145736 in webkit
- Timestamp:
- Mar 13, 2013 12:28:59 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r145735 r145736 1 2013-03-13 Tony Chang <tony@chromium.org> 2 3 Regression(r143542): -webkit-align-items: center with overflow: auto/scroll has extra bottom padding 4 https://bugs.webkit.org/show_bug.cgi?id=112047 5 6 Reviewed by Ojan Vafai. 7 8 * css3/flexbox/negative-overflow-expected.txt: Added. 9 * css3/flexbox/negative-overflow.html: Added. 10 * resources/check-layout.js: Add attributes for checking scroll width and scroll height. 11 1 12 2013-03-13 Nate Chapin <japhet@chromium.org> 2 13 -
trunk/LayoutTests/resources/check-layout.js
r141147 r145736 61 61 if (node.clientHeight != parseInt(expectedHeight)) 62 62 failures.push("Expected " + expectedHeight + " for clientHeight, but got " + node.clientHeight + ". "); 63 } 64 65 var expectedWidth = node.getAttribute && node.getAttribute("data-expected-scroll-width"); 66 if (expectedWidth) { 67 if (node.scrollWidth != parseInt(expectedWidth)) 68 failures.push("Expected " + expectedWidth + " for scrollWidth, but got " + node.scrollWidth + ". "); 69 } 70 71 var expectedHeight = node.getAttribute && node.getAttribute("data-expected-scroll-height"); 72 if (expectedHeight) { 73 if (node.scrollHeight != parseInt(expectedHeight)) 74 failures.push("Expected " + expectedHeight + " for scrollHeight, but got " + node.scrollHeight + ". "); 63 75 } 64 76 -
trunk/Source/WebCore/ChangeLog
r145735 r145736 1 2013-03-13 Tony Chang <tony@chromium.org> 2 3 Regression(r143542): -webkit-align-items: center with overflow: auto/scroll has extra bottom padding 4 https://bugs.webkit.org/show_bug.cgi?id=112047 5 6 Reviewed by Ojan Vafai. 7 8 Add a new pass for computing the client bottom edge that runs after we've repositioned children 9 due to wrap-reverse, flex-end or vertical centering. 10 11 Test: css3/flexbox/negative-overflow.html 12 13 * rendering/RenderFlexibleBox.cpp: 14 (WebCore::RenderFlexibleBox::layoutBlock): Remove the code to use clientLogicalBottom() that was computed before 15 repositioning. The repositioning can change the edge. 16 (WebCore::RenderFlexibleBox::clientLogicalBottomAfterRepositioning): Compute the new bottom based on the final position 17 of flex items. 18 * rendering/RenderFlexibleBox.h: 19 (RenderFlexibleBox): 20 1 21 2013-03-13 Nate Chapin <japhet@chromium.org> 2 22 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r145457 r145736 356 356 layoutFlexItems(relayoutChildren, lineContexts); 357 357 358 LayoutUnit oldClientAfterEdge = clientLogicalBottom();359 358 updateLogicalHeight(); 360 359 repositionLogicalHeightDependentFlexItems(lineContexts); … … 371 370 repaintChildrenDuringLayoutIfMoved(oldChildRects); 372 371 // FIXME: css3/flexbox/repaint-rtl-column.html seems to repaint more overflow than it needs to. 373 computeOverflow( oldClientAfterEdge);372 computeOverflow(clientLogicalBottomAfterRepositioning()); 374 373 statePusher.pop(); 375 374 … … 434 433 // direction:rtl + flex-direction:column means the cross-axis direction is flipped. 435 434 flipForRightToLeftColumn(); 435 } 436 437 LayoutUnit RenderFlexibleBox::clientLogicalBottomAfterRepositioning() 438 { 439 LayoutUnit maxChildLogicalBottom = 0; 440 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 441 if (child->isOutOfFlowPositioned()) 442 continue; 443 LayoutUnit childLogicalBottom = logicalTopForChild(child) + logicalHeightForChild(child) + marginAfterForChild(child); 444 maxChildLogicalBottom = std::max(maxChildLogicalBottom, childLogicalBottom); 445 } 446 return std::max(clientLogicalBottom(), maxChildLogicalBottom); 436 447 } 437 448 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r145457 r145736 147 147 bool updateAutoMarginsInCrossAxis(RenderBox* child, LayoutUnit availableAlignmentSpace); 148 148 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&); 149 LayoutUnit clientLogicalBottomAfterRepositioning(); 149 150 void appendChildFrameRects(ChildFrameRects&); 150 151 void repaintChildrenDuringLayoutIfMoved(const ChildFrameRects&);
Note: See TracChangeset
for help on using the changeset viewer.