Changeset 167707 in webkit


Ignore:
Timestamp:
Apr 23, 2014 6:36:30 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[New Multicolumn] fast/multicol/overflow-content.html displays red
https://bugs.webkit.org/show_bug.cgi?id=131809

Patch by Morten Stenshorne <mstensho@opera.com> on 2014-04-23
Reviewed by David Hyatt.

Source/WebCore:
Insert a break at end of content on our own in the multicol code, to make sure
that overflow is accounted for, and also to make sure that we account for all
content in non-final sets (i.e. those preceding spanners).

In other words, this will additionally fix balancing issues in sets preceding
a spanner. Added a test for that.

Tests: fast/multicol/break-in-columns-before-spanner.html

fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html

  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::regionInRange): Deleted.

  • rendering/RenderFlowThread.h:
  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::distributeImplicitBreaks):

  • rendering/RenderNamedFlowThread.cpp:

(WebCore::RenderNamedFlowThread::applyBreakAfterContent):

  • rendering/RenderNamedFlowThread.h:

LayoutTests:

  • fast/multicol/break-in-columns-before-spanner-expected.html: Added.
  • fast/multicol/break-in-columns-before-spanner.html: Added.
  • fast/multicol/newmulticol/compare-with-old-impl/overflow-content-expected.html: Added.
  • fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html: Added.
Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167706 r167707  
     12014-04-23  Morten Stenshorne  <mstensho@opera.com>
     2
     3        [New Multicolumn] fast/multicol/overflow-content.html displays red
     4        https://bugs.webkit.org/show_bug.cgi?id=131809
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/multicol/break-in-columns-before-spanner-expected.html: Added.
     9        * fast/multicol/break-in-columns-before-spanner.html: Added.
     10        * fast/multicol/newmulticol/compare-with-old-impl/overflow-content-expected.html: Added.
     11        * fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html: Added.
     12
    1132014-04-23  Morten Stenshorne  <mstensho@opera.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r167706 r167707  
     12014-04-23  Morten Stenshorne  <mstensho@opera.com>
     2
     3        [New Multicolumn] fast/multicol/overflow-content.html displays red
     4        https://bugs.webkit.org/show_bug.cgi?id=131809
     5
     6        Reviewed by David Hyatt.
     7
     8        Insert a break at end of content on our own in the multicol code, to make sure
     9        that overflow is accounted for, and also to make sure that we account for all
     10        content in non-final sets (i.e. those preceding spanners).
     11
     12        In other words, this will additionally fix balancing issues in sets preceding
     13        a spanner. Added a test for that.
     14
     15        Tests: fast/multicol/break-in-columns-before-spanner.html
     16               fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html
     17
     18        * rendering/RenderFlowThread.cpp:
     19        (WebCore::RenderFlowThread::regionInRange): Deleted.
     20        * rendering/RenderFlowThread.h:
     21        * rendering/RenderMultiColumnSet.cpp:
     22        (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
     23        * rendering/RenderNamedFlowThread.cpp:
     24        (WebCore::RenderNamedFlowThread::applyBreakAfterContent):
     25        * rendering/RenderNamedFlowThread.h:
     26
    1272014-04-23  Morten Stenshorne  <mstensho@opera.com>
    228
  • trunk/Source/WebCore/rendering/RenderFlowThread.cpp

    r167541 r167707  
    790790}
    791791
    792 void RenderFlowThread::applyBreakAfterContent(LayoutUnit clientHeight)
    793 {
    794     // Simulate a region break at height. If it points inside an auto logical height region,
    795     // then it may determine the region computed autoheight.
    796     addForcedRegionBreak(this, clientHeight, this, false);
    797 }
    798 
    799792bool RenderFlowThread::regionInRange(const RenderRegion* targetRegion, const RenderRegion* startRegion, const RenderRegion* endRegion) const
    800793{
  • trunk/Source/WebCore/rendering/RenderFlowThread.h

    r167335 r167707  
    148148
    149149    virtual bool addForcedRegionBreak(const RenderBlock*, LayoutUnit, RenderBox* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0);
    150     void applyBreakAfterContent(LayoutUnit);
     150    virtual void applyBreakAfterContent(LayoutUnit) { }
    151151
    152152    virtual bool isPageLogicalHeightKnown() const { return true; }
  • trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp

    r167678 r167707  
    192192void RenderMultiColumnSet::distributeImplicitBreaks()
    193193{
    194     unsigned breakCount = forcedBreaksCount();
    195 
    196194#ifndef NDEBUG
    197195    // There should be no implicit breaks assumed at this point.
    198     for (unsigned i = 0; i < breakCount; i++)
     196    for (unsigned i = 0; i < forcedBreaksCount(); i++)
    199197        ASSERT(!m_contentRuns[i].assumedImplicitBreaks());
    200198#endif // NDEBUG
    201199
    202     if (!breakCount) {
    203         // The flow thread would normally insert a forced break at end of content, but if this set
    204         // isn't last in the multicol container, we have to do it ourselves.
    205         addForcedBreak(logicalBottomInFlowThread());
    206         breakCount = 1;
    207     }
     200    // Insert a final content run to encompass all content. This will include overflow if this is
     201    // the last set.
     202    addForcedBreak(logicalBottomInFlowThread());
     203    unsigned breakCount = forcedBreaksCount();
    208204
    209205    // If there is room for more breaks (to reach the used value of column-count), imagine that we
  • trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp

    r166867 r167707  
    797797}
    798798
     799void RenderNamedFlowThread::applyBreakAfterContent(LayoutUnit clientHeight)
     800{
     801    // Simulate a region break at height. If it points inside an auto logical height region,
     802    // then it may determine the region computed autoheight.
     803    addForcedRegionBreak(this, clientHeight, this, false);
     804}
     805
    799806bool RenderNamedFlowThread::collectsGraphicsLayersUnderRegions() const
    800807{
  • trunk/Source/WebCore/rendering/RenderNamedFlowThread.h

    r167652 r167707  
    8282    void getRanges(Vector<RefPtr<Range>>&, const RenderNamedFlowFragment*) const;
    8383
     84    virtual void applyBreakAfterContent(LayoutUnit) override final;
     85
    8486    virtual bool collectsGraphicsLayersUnderRegions() const override;
    8587
Note: See TracChangeset for help on using the changeset viewer.