Changeset 69336 in webkit


Ignore:
Timestamp:
Oct 7, 2010 1:59:40 PM (14 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/8142645> REGRESSION (r47440): Printing Mail messages with large fonts does not fill page
https://bugs.webkit.org/show_bug.cgi?id=47374

Reviewed by Simon Fraser.

In the legacy (paint-time pagination) printing model, when there are overlapping lines,
adjustPageHeightDeprecated() was not idempotent, since the truncation point imposed by line n,
namely the top of line n, was above the bottom of line n-1, so in the next round, line n-1
moved the truncation point up again.

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::paint): Consider the top of the next line when deciding if the
current line extends below the truncation point.

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r69334 r69336  
     12010-10-07  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        <rdar://problem/8142645> REGRESSION (r47440): Printing Mail messages with large fonts does not fill page
     6        https://bugs.webkit.org/show_bug.cgi?id=47374
     7
     8        In the legacy (paint-time pagination) printing model, when there are overlapping lines,
     9        adjustPageHeightDeprecated() was not idempotent, since the truncation point imposed by line n,
     10        namely the top of line n, was above the bottom of line n-1, so in the next round, line n-1
     11        moved the truncation point up again.
     12
     13        * rendering/RenderLineBoxList.cpp:
     14        (WebCore::RenderLineBoxList::paint): Consider the top of the next line when deciding if the
     15        current line extends below the truncation point.
     16
    1172010-10-07  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/WebCore/rendering/RenderLineBoxList.cpp

    r68475 r69336  
    204204            if (bottomForPaginationCheck - topForPaginationCheck <= v->printRect().height()) {
    205205                if (ty + bottomForPaginationCheck > v->printRect().bottom()) {
     206                    if (RootInlineBox* nextRootBox = curr->root()->nextRootBox())
     207                        bottomForPaginationCheck = min(bottomForPaginationCheck, min(nextRootBox->topVisibleOverflow(), nextRootBox->lineTop()));
     208                }
     209                if (ty + bottomForPaginationCheck > v->printRect().bottom()) {
    206210                    if (ty + topForPaginationCheck < v->truncatedAt())
    207211                        v->setBestTruncatedAt(ty + topForPaginationCheck, renderer);
Note: See TracChangeset for help on using the changeset viewer.