Changeset 161384 in webkit


Ignore:
Timestamp:
Jan 6, 2014 4:42:41 PM (10 years ago)
Author:
zoltan@webkit.org
Message:

[CSS Regions][CSS Shapes] ASSERTION FAILED: m_segmentRanges.size() < m_segments.size()
https://bugs.webkit.org/show_bug.cgi?id=125770

Reviewed by Bem Jones-Bey.

Source/WebCore:

When we have an e.g. up-side-down triangle, when the content doesn't fit in the bottom part of the shape,
and the adjusted content flows into the next region with a shape, we need to update the actual shape
and region. Since it wasn't updated, it led to a shape mismatch, which led to assert/layout error.

Test: fast/regions/shape-inside/shape-inside-on-multiple-regions-bottom-adjustment.html

  • rendering/RenderBlockLineLayout.cpp:

(WebiCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread): Update current shape
and region, when adjustment occured.

LayoutTests:

  • fast/regions/shape-inside/shape-inside-on-multiple-regions-bottom-adjustment-expected.html: Added.
  • fast/regions/shape-inside/shape-inside-on-multiple-regions-bottom-adjustment.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r161383 r161384  
     12014-01-06  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Regions][CSS Shapes] ASSERTION FAILED: m_segmentRanges.size() < m_segments.size()
     4        https://bugs.webkit.org/show_bug.cgi?id=125770
     5
     6        Reviewed by Bem Jones-Bey.
     7
     8        * fast/regions/shape-inside/shape-inside-on-multiple-regions-bottom-adjustment-expected.html: Added.
     9        * fast/regions/shape-inside/shape-inside-on-multiple-regions-bottom-adjustment.html: Added.
     10
    1112014-01-06  Brent Fulgham  <bfulgham@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r161382 r161384  
     12014-01-06  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Regions][CSS Shapes] ASSERTION FAILED: m_segmentRanges.size() < m_segments.size()
     4        https://bugs.webkit.org/show_bug.cgi?id=125770
     5
     6        Reviewed by Bem Jones-Bey.
     7
     8        When we have an e.g. up-side-down triangle, when the content doesn't fit in the bottom part of the shape,
     9        and the adjusted content flows into the next region with a shape, we need to update the actual shape
     10        and region. Since it wasn't updated, it led to a shape mismatch, which led to assert/layout error.
     11
     12        Test: fast/regions/shape-inside/shape-inside-on-multiple-regions-bottom-adjustment.html
     13
     14        * rendering/RenderBlockLineLayout.cpp:
     15        (WebiCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread): Update current shape
     16        and region, when adjustment occured.
     17
    1182014-01-06  Seokju Kwon  <seokju@webkit.org>
    219
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r161316 r161384  
    11691169
    11701170    bool lineOverLapsWithShapeBottom = shapeBottomInFlowThread < logicalLineBottomInFlowThread;
    1171     bool lineOverLapsWithRegionBottom = logicalLineBottomInFlowThread > logicalRegionBottomInFlowThread;
     1171    bool lineTopAdjustedIntoNextRegion = layoutState.adjustedLogicalLineTop() >= currentRegion->logicalHeight();
     1172    bool lineOverLapsWithRegionBottom = logicalLineBottomInFlowThread > logicalRegionBottomInFlowThread || lineTopAdjustedIntoNextRegion;
    11721173    bool overFlowsToNextRegion = nextRegion && (lineOverLapsWithShapeBottom || lineOverLapsWithRegionBottom);
    11731174
     
    11851186        logicalRegionTopInFlowThread = currentRegion->logicalTopForFlowThreadContent();
    11861187        logicalRegionBottomInFlowThread = logicalRegionTopInFlowThread + currentRegion->logicalHeight() - currentRegion->borderAndPaddingBefore() - currentRegion->borderAndPaddingAfter();
     1188
     1189        if (lineTopAdjustedIntoNextRegion)
     1190            layoutState.setAdjustedLogicalLineTop(0);
    11871191    }
    11881192
Note: See TracChangeset for help on using the changeset viewer.