Changeset 141459 in webkit
- Timestamp:
- Jan 31, 2013, 12:00:12 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r141458 r141459 1 2013-01-31 Ojan Vafai <ojan@chromium.org> 2 3 REGRESSION(r128517): Percentage heights in quirks mode collapse when printing 4 https://bugs.webkit.org/show_bug.cgi?id=108382 5 6 Reviewed by David Hyatt. 7 8 * platform/chromium/fast/multicol/shrink-to-column-height-for-pagination-expected.txt: 9 We're just clipping more content that you can't scroll to anyways. This looks 10 like an improvement to me. 11 * printing/css2.1/page-break-inside-000-expected.txt: 12 We pass this test now! 13 * printing/quirks-percentage-height-body-expected.html: Added. 14 * printing/quirks-percentage-height-body.html: Added. 15 * printing/quirks-percentage-height-expected.html: Added. 16 * printing/quirks-percentage-height.html: Added. 17 * printing/standards-percentage-heights-expected.html: Added. 18 * printing/standards-percentage-heights.html: Added. 19 1 20 2013-01-31 Jessie Berlin <jberlin@apple.com> 2 21 -
trunk/LayoutTests/platform/chromium/fast/multicol/shrink-to-column-height-for-pagination-expected.txt
r123111 r141459 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 400x600 3 layer at (- 400,0) size 800x600 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x6004 RenderBlock {HTML} at (0,0) size 800x6003 layer at (-16,0) size 416x600 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600 4 RenderBlock {HTML} at (0,0) size 416x600 5 5 RenderBody {BODY} at (8,8) size 400x600 6 6 RenderBlock {DIV} at (0,0) size 400x600 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r141362 r141459 309 309 webkit.org/b/106405 http/tests/xmlhttprequest/remember-bad-password.html [ Failure ] 310 310 311 webkit.org/b/108507 printing/quirks-percentage-height-body.html [ Skip ] 312 webkit.org/b/108507 printing/quirks-percentage-height.html [ Skip ] 313 webkit.org/b/108507 printing/standards-percentage-heights.html [ Skip ] 314 311 315 webkit.org/b/107356 fast/css/sticky/sticky-top-zoomed.html [ ImageOnlyFailure ] 312 316 -
trunk/LayoutTests/printing/css2.1/page-break-inside-000-expected.txt
r55275 r141459 2 2 FIRST dummy dummy dummy dummy dummy dummy dummy dummy dummy FIRST 3 3 4 FAIL: expected page number of "test1" is 0. Was -1 5 FAIL: expected page number of "test2" is 1. Was 0 4 PASS: page number of "test1" is 0 5 PASS: page number of "test2" is 1 6 All tests passed -
trunk/Source/WebCore/ChangeLog
r141456 r141459 1 2013-01-31 Ojan Vafai <ojan@chromium.org> 2 3 REGRESSION(r128517): Percentage heights in quirks mode collapse when printing 4 https://bugs.webkit.org/show_bug.cgi?id=108382 5 6 Reviewed by David Hyatt. 7 8 r128517 clean up our containing block finding logic, but broke percentage 9 heights in quirks mode during printing since the RenderView would have 0 height. 10 Turns out we already had a long-standing bug where we'd incorrectly 11 treat collapse percentage heights on the body when printing as well. 12 13 Fix both bugs by changing the way we grab the logical height on the RenderView. 14 RenderView::computeLogicalHeight returns 0 when printing. For the purposes of 15 stretching and percentage heights, we instead need to return the pageLogicalHeight. 16 17 Tests: printing/quirks-percentage-height-body.html 18 printing/quirks-percentage-height.html 19 printing/standards-percentage-heights.html 20 21 * rendering/RenderBox.cpp: 22 (WebCore::RenderBox::computeLogicalHeight): 23 This FIXME is outdated and already fixed. Also, call viewLogicalHeightForPercentages 24 which does the same logic except also correctly handles column RenderViews. 25 (WebCore::RenderBox::viewLogicalHeightForPercentages): 26 (WebCore::RenderBox::computePercentageLogicalHeight): 27 * rendering/RenderBox.h: 28 29 * rendering/RenderBox.cpp: 30 (WebCore::RenderBox::computeLogicalHeight): 31 (WebCore::RenderBox::viewLogicalHeightForPercentages): 32 (WebCore): 33 (WebCore::RenderBox::computePercentageLogicalHeight): 34 * rendering/RenderBox.h: 35 (RenderBox): 36 1 37 2013-01-31 Dirk Schulze <krit@webkit.org> 2 38 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r140978 r141459 2417 2417 && (isRoot() || (isBody() && document()->documentElement()->renderer()->style()->logicalHeight().isPercent())); 2418 2418 if (stretchesToViewport() || paginatedContentNeedsBaseHeight) { 2419 // FIXME: Finish accounting for block flow here.2420 // https://bugs.webkit.org/show_bug.cgi?id=466032421 2419 LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter(); 2422 LayoutUnit visHeight; 2423 if (document()->printing()) 2424 visHeight = static_cast<LayoutUnit>(view()->pageLogicalHeight()); 2425 else { 2426 if (isHorizontalWritingMode()) 2427 visHeight = view()->viewHeight(); 2428 else 2429 visHeight = view()->viewWidth(); 2430 } 2420 LayoutUnit visibleHeight = viewLogicalHeightForPercentages(); 2431 2421 if (isRoot()) 2432 computedValues.m_extent = max(computedValues.m_extent, vis Height - margins);2422 computedValues.m_extent = max(computedValues.m_extent, visibleHeight - margins); 2433 2423 else { 2434 2424 LayoutUnit marginsBordersPadding = margins + parentBox()->marginBefore() + parentBox()->marginAfter() + parentBox()->borderAndPaddingLogicalHeight(); 2435 computedValues.m_extent = max(computedValues.m_extent, visHeight - marginsBordersPadding); 2436 } 2437 } 2425 computedValues.m_extent = max(computedValues.m_extent, visibleHeight - marginsBordersPadding); 2426 } 2427 } 2428 } 2429 2430 LayoutUnit RenderBox::viewLogicalHeightForPercentages() const 2431 { 2432 if (document()->printing()) 2433 return static_cast<LayoutUnit>(view()->pageLogicalHeight()); 2434 return view()->viewLogicalHeight(); 2438 2435 } 2439 2436 … … 2543 2540 availableHeight = max<LayoutUnit>(0, contentBoxHeight); 2544 2541 } 2545 } else if ( cb->isRenderView() ||isOutOfFlowPositionedWithSpecifiedHeight) {2542 } else if (isOutOfFlowPositionedWithSpecifiedHeight) { 2546 2543 // Don't allow this to affect the block' height() member variable, since this 2547 2544 // can get called while the block is still laying out its kids. … … 2549 2546 cb->computeLogicalHeight(cb->logicalHeight(), 0, computedValues); 2550 2547 availableHeight = computedValues.m_extent - cb->borderAndPaddingLogicalHeight() - cb->scrollbarLogicalHeight(); 2551 } 2548 } else if (cb->isRenderView()) 2549 availableHeight = viewLogicalHeightForPercentages(); 2552 2550 2553 2551 if (availableHeight == -1) -
trunk/Source/WebCore/rendering/RenderBox.h
r140978 r141459 642 642 LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode = true) const; 643 643 644 LayoutUnit viewLogicalHeightForPercentages() const; 645 644 646 void computePositionedLogicalHeight(LogicalExtentComputedValues&) const; 645 647 void computePositionedLogicalWidthUsing(SizeType, Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,
Note:
See TracChangeset
for help on using the changeset viewer.