Changeset 54929 in webkit


Ignore:
Timestamp:
Feb 17, 2010, 9:55:17 PM (15 years ago)
Author:
[email protected]
Message:

2010-02-17 Hayato Ito <[email protected]>

Reviewed by Eric Seidel.

Support CSS page-break-inside with a value of 'avoid'.

https://bugs.webkit.org/show_bug.cgi?id=34080

  • printing/page-break-inside-expected.txt: Added.
  • printing/page-break-inside.html: Added.
  • printing/script-tests/page-break-inside.js: Added. (createParagraph): (pageNumber):

2010-02-17 Hayato Ito <[email protected]>

Reviewed by Eric Seidel.

Support CSS page-break-inside with a value of 'avoid'.

https://bugs.webkit.org/show_bug.cgi?id=34080

Test: printing/page-break-inside.html

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChildren):
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r54927 r54929  
     12010-02-17  Hayato Ito  <[email protected]>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Support CSS page-break-inside with a value of 'avoid'.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=34080
     8
     9        * printing/page-break-inside-expected.txt: Added.
     10        * printing/page-break-inside.html: Added.
     11        * printing/script-tests/page-break-inside.js: Added.
     12        (createParagraph):
     13        (pageNumber):
     14
    1152010-02-17  Fumitoshi Ukai  <[email protected]>
    216
  • trunk/WebCore/ChangeLog

    r54927 r54929  
     12010-02-17  Hayato Ito  <[email protected]>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Support CSS page-break-inside with a value of 'avoid'.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=34080
     8
     9        Test: printing/page-break-inside.html
     10
     11        * rendering/RenderBlock.cpp:
     12        (WebCore::RenderBlock::paintChildren):
     13
    1142010-02-17  Fumitoshi Ukai  <[email protected]>
    215
  • trunk/WebCore/rendering/RenderBlock.cpp

    r54784 r54929  
    16611661            inRootBlockContext() && (ty + child->y()) > paintInfo.rect.y() &&
    16621662            (ty + child->y()) < paintInfo.rect.bottom()) {
     1663            view()->setBestTruncatedAt(ty + child->y(), this, true);
     1664            return;
     1665        }
     1666
     1667        // Check for page-break-inside: avoid, and it it's set, break and bail.
     1668        if (isPrinting && !childrenInline() && child->style()->pageBreakInside() == PBAVOID
     1669            && inRootBlockContext()
     1670            && ty + child->y() > paintInfo.rect.y()
     1671            && ty + child->y() < paintInfo.rect.bottom()
     1672            && ty + child->y() + child->height() > paintInfo.rect.bottom()) {
    16631673            view()->setBestTruncatedAt(ty + child->y(), this, true);
    16641674            return;
Note: See TracChangeset for help on using the changeset viewer.