⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 167541 in webkit


Ignore:
Timestamp:
Apr 19, 2014, 11:57:46 AM (12 years ago)
Author:
Darin Adler
Message:

[CSS Regions] Harden the layout in case there are no regions
https://bugs.webkit.org/show_bug.cgi?id=131517

Patch by Andrei Bucur <abucur@adobe.com> on 2014-04-19
Reviewed by Mihnea Ovidenie.

Source/WebCore:
The patch fixes the cases when the content of a flow thread is not
properly invalidated when all the regions of its chain are removed.

Test: fast/regions/simplified-layout-no-regions.html

  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):

  • rendering/RenderRegion.cpp:

(WebCore::RenderRegion::ensureOverflowForBox):

LayoutTests:
Add a test that verifies the content of a flow thread is updated when all
the regions are removed.

  • fast/regions/simplified-layout-no-regions-expected.txt: Added.
  • fast/regions/simplified-layout-no-regions.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167539 r167541  
     12014-04-19  Andrei Bucur  <abucur@adobe.com>
     2
     3        [CSS Regions] Harden the layout in case there are no regions
     4        https://bugs.webkit.org/show_bug.cgi?id=131517
     5
     6        Reviewed by Mihnea Ovidenie.
     7
     8        Add a test that verifies the content of a flow thread is updated when all
     9        the regions are removed.
     10
     11        * fast/regions/simplified-layout-no-regions-expected.txt: Added.
     12        * fast/regions/simplified-layout-no-regions.html: Added.
     13
    1142014-04-19  Darin Adler  <darin@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r167538 r167541  
     12014-04-19  Andrei Bucur  <abucur@adobe.com>
     2
     3        [CSS Regions] Harden the layout in case there are no regions
     4        https://bugs.webkit.org/show_bug.cgi?id=131517
     5
     6        Reviewed by Mihnea Ovidenie.
     7
     8        The patch fixes the cases when the content of a flow thread is not
     9        properly invalidated when all the regions of its chain are removed.
     10
     11        Test: fast/regions/simplified-layout-no-regions.html
     12
     13        * rendering/RenderFlowThread.cpp:
     14        (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
     15        * rendering/RenderRegion.cpp:
     16        (WebCore::RenderRegion::ensureOverflowForBox):
     17
    1182014-04-19  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/Source/WebCore/rendering/RenderFlowThread.cpp

    r167335 r167541  
    591591void RenderFlowThread::logicalWidthChangedInRegionsForBlock(const RenderBlock* block, bool& relayoutChildren)
    592592{
    593     if (!hasValidRegionInfo())
    594         return;
     593    if (!hasValidRegionInfo()) {
     594        // FIXME: Remove once we stop laying out flow threads without regions.
     595        // If we had regions but don't any more, relayout the children because the code below
     596        // can't properly detect this scenario.
     597        relayoutChildren |= previousRegionCountChanged();
     598        return;
     599    }
    595600
    596601    auto it = m_regionRangeMap.find(block);
  • trunk/Source/WebCore/rendering/RenderRegion.cpp

    r166867 r167541  
    431431void RenderRegion::ensureOverflowForBox(const RenderBox* box, RefPtr<RenderOverflow>& overflow, bool forceCreation)
    432432{
     433    ASSERT(m_flowThread->renderRegionList().contains(this));
    433434    ASSERT(isValid());
    434435
Note: See TracChangeset for help on using the changeset viewer.