Changeset 136039 in webkit


Ignore:
Timestamp:
Nov 28, 2012 12:05:47 PM (11 years ago)
Author:
Alexandru Chiculita
Message:

[CSS Regions] Auto-height regions will not calculate the height correctly when the content changes dynamically
https://bugs.webkit.org/show_bug.cgi?id=102954

Reviewed by David Hyatt.

Source/WebCore:

Whenever the flow changes, we need to reset the region computed auto-heights.
However, when we reset the region heights to "auto" or "un-computed", we also need to make
sure that all the region breaks are counted again, so that we split regions correctly during the new layout.
I've reused the m_regionsInvalidated property to force the flow do a complete layout.

Test: fast/regions/autoheight-dynamic-update.html

  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight):

LayoutTests:

Added test to check for auto-height region size update after an element is added to the flow.
In this case the first region will need to resize to accommodate the size of the added elements.

  • fast/regions/autoheight-dynamic-update-expected.html: Added.
  • fast/regions/autoheight-dynamic-update.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r136038 r136039  
     12012-11-28  Alexandru Chiculita  <achicu@adobe.com>
     2
     3        [CSS Regions] Auto-height regions will not calculate the height correctly when the content changes dynamically
     4        https://bugs.webkit.org/show_bug.cgi?id=102954
     5
     6        Reviewed by David Hyatt.
     7
     8        Added test to check for auto-height region size update after an element is added to the flow.
     9        In this case the first region will need to resize to accommodate the size of the added elements.
     10
     11        * fast/regions/autoheight-dynamic-update-expected.html: Added.
     12        * fast/regions/autoheight-dynamic-update.html: Added.
     13
    1142012-11-28  Andrew Scherkus  <scherkus@chromium.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r136037 r136039  
     12012-11-28  Alexandru Chiculita  <achicu@adobe.com>
     2
     3        [CSS Regions] Auto-height regions will not calculate the height correctly when the content changes dynamically
     4        https://bugs.webkit.org/show_bug.cgi?id=102954
     5
     6        Reviewed by David Hyatt.
     7
     8        Whenever the flow changes, we need to reset the region computed auto-heights.
     9        However, when we reset the region heights to "auto" or "un-computed", we also need to make
     10        sure that all the region breaks are counted again, so that we split regions correctly during the new layout.
     11        I've reused the m_regionsInvalidated property to force the flow do a complete layout.
     12
     13        Test: fast/regions/autoheight-dynamic-update.html
     14
     15        * rendering/RenderFlowThread.cpp:
     16        (WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight):
     17
    1182012-11-28  Alexandru Chiculita  <achicu@adobe.com>
    219
  • trunk/Source/WebCore/rendering/RenderFlowThread.cpp

    r134395 r136039  
    738738    // We need to reset the override logical content height for regions with auto logical height
    739739    // only if the flow thread content needs layout.
    740     if (!selfNeedsLayout())
     740    if (!needsLayout())
    741741        return;
    742742
     
    754754        region->setNeedsLayout(true);
    755755    }
     756    // Make sure we don't skip any region breaks when we do the layout again.
     757    // Using m_regionsInvalidated to force all the RenderFlowThread children do the layout again.
     758    m_regionsInvalidated = true;
    756759}
    757760
Note: See TracChangeset for help on using the changeset viewer.