Changeset 55067 in webkit
- Timestamp:
- Feb 21, 2010 8:12:46 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55040 r55067 1 2010-02-07 Yuzo Fujishima <yuzo@google.com> 2 3 Reviewed by Eric Seidel. 4 5 When page-break-{after,before} is set to always, force page breaks even for overflow-specified elements. 6 RenderBlock::inRootBlockContext() was introduced by Changeset 5611. Although it is a reasonable criteria for choosing an optional page break location, it is not for a mandatory page break as specified by http://dev.w3.org/csswg/css3-page/#forced-pg-brk. The method is removed because it is not used anywhere else. 7 Note: this patch makes page break work for overflow-specified elements. For tables and floated elements, more work is needed. 8 https://bugs.webkit.org/show_bug.cgi?id=9526 9 10 * printing/page-break-always-for-overflow-expected.txt: Added. 11 * printing/page-break-always-for-overflow.html: Added. 12 * printing/script-tests/page-break-always-for-overflow.js: Added. 13 1 14 2010-02-19 Eric Seidel <eric@webkit.org> 2 15 -
trunk/WebCore/ChangeLog
r55066 r55067 1 2010-02-07 Yuzo Fujishima <yuzo@google.com> 2 3 Reviewed by Eric Seidel. 4 5 When page-break-{after,before} is set to always, force page breaks even for overflow-specified elements. 6 RenderBlock::inRootBlockContext() was introduced by Changeset 5611. Although it is a reasonable criteria for choosing an optional page break location, it is not for a mandatory page break as specified by http://dev.w3.org/csswg/css3-page/#forced-pg-brk. The method is removed because it is not used anywhere else. 7 Note: this patch makes page break work for overflow-specified elements. For tables and floated elements, more work is needed. 8 https://bugs.webkit.org/show_bug.cgi?id=9526 9 10 Test: printing/page-break-always-for-overflow.html 11 12 * rendering/RenderBlock.cpp: 13 (WebCore::RenderBlock::paintChildren): 14 * rendering/RenderBlock.h: 15 1 16 2010-02-21 Julien Chaffraix <jchaffraix@webkit.org> 2 17 -
trunk/WebCore/rendering/RenderBlock.cpp
r54982 r55067 1658 1658 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 1659 1659 // Check for page-break-before: always, and if it's set, break and bail. 1660 if (isPrinting && !childrenInline() && child->style()->pageBreakBefore() == PBALWAYS &&1661 inRootBlockContext() && (ty + child->y()) > paintInfo.rect.y() &&1662 (ty + child->y()) < paintInfo.rect.bottom()) {1660 if (isPrinting && !childrenInline() && child->style()->pageBreakBefore() == PBALWAYS 1661 && (ty + child->y()) > paintInfo.rect.y() 1662 && (ty + child->y()) < paintInfo.rect.bottom()) { 1663 1663 view()->setBestTruncatedAt(ty + child->y(), this, true); 1664 1664 return; … … 1667 1667 // Check for page-break-inside: avoid, and it it's set, break and bail. 1668 1668 if (isPrinting && !childrenInline() && child->style()->pageBreakInside() == PBAVOID 1669 && inRootBlockContext()1670 1669 && ty + child->y() > paintInfo.rect.y() 1671 1670 && ty + child->y() < paintInfo.rect.bottom() … … 1679 1678 1680 1679 // Check for page-break-after: always, and if it's set, break and bail. 1681 if (isPrinting && !childrenInline() && child->style()->pageBreakAfter() == PBALWAYS &&1682 inRootBlockContext() && (ty + child->y() + child->height()) > paintInfo.rect.y() &&1683 (ty + child->y() + child->height()) < paintInfo.rect.bottom()) {1680 if (isPrinting && !childrenInline() && child->style()->pageBreakAfter() == PBALWAYS 1681 && (ty + child->y() + child->height()) > paintInfo.rect.y() 1682 && (ty + child->y() + child->height()) < paintInfo.rect.bottom()) { 1684 1683 view()->setBestTruncatedAt(ty + child->y() + child->height() + max(0, child->collapsedMarginBottom()), this, true); 1685 1684 return; … … 4711 4710 } 4712 4711 4713 bool RenderBlock::inRootBlockContext() const4714 {4715 if (isTableCell() || isFloatingOrPositioned() || hasOverflowClip())4716 return false;4717 4718 if (isRoot() || isRenderView())4719 return true;4720 4721 return containingBlock()->inRootBlockContext();4722 }4723 4724 4712 // Helper methods for obtaining the last line, computing line counts and heights for line counts 4725 4713 // (crawling into blocks). -
trunk/WebCore/rendering/RenderBlock.h
r54784 r55067 318 318 // children. 319 319 virtual RenderBlock* firstLineBlock() const; 320 bool inRootBlockContext() const;321 320 322 321 virtual IntRect rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, int outlineWidth);
Note: See TracChangeset
for help on using the changeset viewer.