Changeset 167617 in webkit


Ignore:
Timestamp:
Apr 21, 2014 1:20:27 PM (10 years ago)
Author:
hyatt@apple.com
Message:

[New Multicolumn] Column set drawing under horizontal scrollbar.
https://bugs.webkit.org/show_bug.cgi?id=131812.

Reviewed by Sam Weinig.

Source/WebCore:
Added fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):

  • rendering/RenderBlockFlow.h:

Pass in relayoutChildren as a reference boolean to checkForPaginationLogicalHeightChange.
The new columns need to be able to set it to true if the amount of available column
height ever changes, so that the RenderFlowThread and the sets get a layout call.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setColumnStylesFromPaginationMode):
Make sure that the pagination mode is set up with an auto column-fill specified. You
don't ever want to balance when you set a pagination mode on the RenderView.

LayoutTests:

  • fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb-expected.html: Added.
  • fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167607 r167617  
     12014-04-21  David Hyatt  <hyatt@apple.com>
     2
     3        [New Multicolumn] Column set drawing under horizontal scrollbar.
     4        https://bugs.webkit.org/show_bug.cgi?id=131812.
     5
     6        Reviewed by Sam Weinig.
     7
     8        * fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb-expected.html: Added.
     9        * fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html: Added.
     10
    1112014-04-21  Alexey Proskuryakov  <ap@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r167616 r167617  
     12014-04-21  David Hyatt  <hyatt@apple.com>
     2
     3        [New Multicolumn] Column set drawing under horizontal scrollbar.
     4        https://bugs.webkit.org/show_bug.cgi?id=131812.
     5
     6        Reviewed by Sam Weinig.
     7
     8        Added fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html.
     9
     10        * rendering/RenderBlockFlow.cpp:
     11        (WebCore::RenderBlockFlow::layoutBlock):
     12        (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
     13        * rendering/RenderBlockFlow.h:
     14        Pass in relayoutChildren as a reference boolean to checkForPaginationLogicalHeightChange.
     15        The new columns need to be able to set it to true if the amount of available column
     16        height ever changes, so that the RenderFlowThread and the sets get a layout call.
     17
     18        * rendering/style/RenderStyle.cpp:
     19        (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
     20        Make sure that the pagination mode is set up with an auto column-fill specified. You
     21        don't ever want to balance when you set a pagination mode on the RenderView.
     22
    1232014-04-21  Tim Horton  <timothy_horton@apple.com>
    224
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r167602 r167617  
    344344    bool pageLogicalHeightChanged = false;
    345345    bool hasSpecifiedPageLogicalHeight = false;
    346     checkForPaginationLogicalHeightChange(pageLogicalHeight, pageLogicalHeightChanged, hasSpecifiedPageLogicalHeight);
     346    checkForPaginationLogicalHeightChange(relayoutChildren, pageLogicalHeight, pageLogicalHeightChanged, hasSpecifiedPageLogicalHeight);
    347347
    348348    const RenderStyle& styleToUse = style();
     
    35583558}
    35593559
    3560 void RenderBlockFlow::checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight)
     3560void RenderBlockFlow::checkForPaginationLogicalHeightChange(bool& relayoutChildren, LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight)
    35613561{
    35623562    // If we don't use either of the two column implementations or a flow thread, then bail.
     
    35693569        computeLogicalHeight(LayoutUnit(), logicalTop(), computedValues);
    35703570        LayoutUnit columnHeight = computedValues.m_extent - borderAndPaddingLogicalHeight() - scrollbarLogicalHeight();
     3571        LayoutUnit oldHeightAvailable = flowThread->columnHeightAvailable();
    35713572        flowThread->setColumnHeightAvailable(std::max<LayoutUnit>(columnHeight, 0));
     3573        if (oldHeightAvailable != flowThread->columnHeightAvailable())
     3574            relayoutChildren = true;
    35723575    } else if (hasColumns()) {
    35733576        ColumnInfo* colInfo = columnInfo();
  • trunk/Source/WebCore/rendering/RenderBlockFlow.h

    r167463 r167617  
    458458    virtual RenderObject* layoutSpecialExcludedChild(bool /*relayoutChildren*/);
    459459
    460     void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight);
     460    void checkForPaginationLogicalHeightChange(bool& relayoutChildren, LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight);
    461461   
    462462    virtual void paintInlineChildren(PaintInfo&, const LayoutPoint&) override;
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r167281 r167617  
    17661766    if (paginationMode == Pagination::Unpaginated)
    17671767        return;
    1768        
     1768   
     1769    setColumnFill(ColumnFillAuto);
     1770   
    17691771    switch (paginationMode) {
    17701772    case Pagination::LeftToRightPaginated:
Note: See TracChangeset for help on using the changeset viewer.