Changeset 175383 in webkit


Ignore:
Timestamp:
Oct 30, 2014 2:39:27 PM (9 years ago)
Author:
mmaxfield@apple.com
Message:

Use references in calculateMinimumPageHeight() for non-optional arguments
https://bugs.webkit.org/show_bug.cgi?id=138231

Reviewed by Dean Jackson.

No new tests because there is no behavior change.

  • rendering/RenderBlockFlow.cpp:

(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r175381 r175383  
     12014-10-30  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Use references in calculateMinimumPageHeight() for non-optional arguments
     4        https://bugs.webkit.org/show_bug.cgi?id=138231
     5
     6        Reviewed by Dean Jackson.
     7
     8        No new tests because there is no behavior change.
     9
     10        * rendering/RenderBlockFlow.cpp:
     11        (WebCore::calculateMinimumPageHeight):
     12        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
     13
    1142014-10-30  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r175352 r175383  
    15891589}
    15901590
    1591 static inline LayoutUnit calculateMinimumPageHeight(RenderStyle* renderStyle, RootInlineBox* lastLine, LayoutUnit lineTop, LayoutUnit lineBottom)
     1591static inline LayoutUnit calculateMinimumPageHeight(RenderStyle& renderStyle, RootInlineBox& lastLine, LayoutUnit lineTop, LayoutUnit lineBottom)
    15921592{
    15931593    // We may require a certain minimum number of lines per page in order to satisfy
    15941594    // orphans and widows, and that may affect the minimum page height.
    1595     unsigned lineCount = std::max<unsigned>(renderStyle->hasAutoOrphans() ? 1 : renderStyle->orphans(), renderStyle->hasAutoWidows() ? 1 : renderStyle->widows());
     1595    unsigned lineCount = std::max<unsigned>(renderStyle.hasAutoOrphans() ? 1 : renderStyle.orphans(), renderStyle.hasAutoWidows() ? 1 : renderStyle.widows());
    15961596    if (lineCount > 1) {
    1597         RootInlineBox* line = lastLine;
     1597        RootInlineBox* line = &lastLine;
    15981598        for (unsigned i = 1; i < lineCount && line->prevRootBox(); i++)
    15991599            line = line->prevRootBox();
     
    16331633    LayoutUnit logicalBottom = std::max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
    16341634    LayoutUnit lineHeight = logicalBottom - logicalOffset;
    1635     updateMinimumPageHeight(logicalOffset, calculateMinimumPageHeight(&style(), lineBox, logicalOffset, logicalBottom));
     1635    updateMinimumPageHeight(logicalOffset, calculateMinimumPageHeight(style(), *lineBox, logicalOffset, logicalBottom));
    16361636    logicalOffset += delta;
    16371637    lineBox->setPaginationStrut(0);
Note: See TracChangeset for help on using the changeset viewer.