Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2412923002: Top-align table cells in rows that cross fragmentainer boundaries. (Closed)
Patch Set: Let's keep the pagination strut substraction thing a bit longer, since removing it affects some DRT… Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 5483 matching lines...) Expand 10 before | Expand all | Expand 10 after
5494 // part of the latter (i.e. one whole page length of remaining space). 5494 // part of the latter (i.e. one whole page length of remaining space).
5495 remainingHeight = intMod(remainingHeight, pageLogicalHeight); 5495 remainingHeight = intMod(remainingHeight, pageLogicalHeight);
5496 } 5496 }
5497 return remainingHeight; 5497 return remainingHeight;
5498 } 5498 }
5499 5499
5500 return flowThread->pageRemainingLogicalHeightForOffset(offset, 5500 return flowThread->pageRemainingLogicalHeightForOffset(offset,
5501 pageBoundaryRule); 5501 pageBoundaryRule);
5502 } 5502 }
5503 5503
5504 bool LayoutBox::crossesPageBoundary(LayoutUnit offset,
5505 LayoutUnit logicalHeight) const {
5506 if (!view()->layoutState()->pageLogicalHeight())
5507 return false;
5508 return pageRemainingLogicalHeightForOffset(offset, AssociateWithLatterPage) <
5509 logicalHeight;
5510 }
5511
5504 LayoutUnit LayoutBox::calculatePaginationStrutToFitContent( 5512 LayoutUnit LayoutBox::calculatePaginationStrutToFitContent(
5505 LayoutUnit offset, 5513 LayoutUnit offset,
5506 LayoutUnit strutToNextPage, 5514 LayoutUnit strutToNextPage,
5507 LayoutUnit contentLogicalHeight) const { 5515 LayoutUnit contentLogicalHeight) const {
5508 ASSERT(strutToNextPage == 5516 ASSERT(strutToNextPage ==
5509 pageRemainingLogicalHeightForOffset(offset, AssociateWithLatterPage)); 5517 pageRemainingLogicalHeightForOffset(offset, AssociateWithLatterPage));
5510 LayoutUnit nextPageLogicalTop = offset + strutToNextPage; 5518 LayoutUnit nextPageLogicalTop = offset + strutToNextPage;
5511 if (pageLogicalHeightForOffset(nextPageLogicalTop) >= contentLogicalHeight) 5519 if (pageLogicalHeightForOffset(nextPageLogicalTop) >= contentLogicalHeight)
5512 return strutToNextPage; // Content fits just fine in the next page or 5520 return strutToNextPage; // Content fits just fine in the next page or
5513 // column. 5521 // column.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
5576 LayoutRect rect = frameRect(); 5584 LayoutRect rect = frameRect();
5577 5585
5578 LayoutBlock* block = containingBlock(); 5586 LayoutBlock* block = containingBlock();
5579 if (block) 5587 if (block)
5580 block->adjustChildDebugRect(rect); 5588 block->adjustChildDebugRect(rect);
5581 5589
5582 return rect; 5590 return rect;
5583 } 5591 }
5584 5592
5585 } // namespace blink 5593 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698