Changeset 147155 in webkit


Ignore:
Timestamp:
Mar 28, 2013 2:01:49 PM (11 years ago)
Author:
zoltan@webkit.org
Message:

[CSS Exclusions][CSS Regions] Block children do not layout inline content correctly in a region with shape-inside set
https://bugs.webkit.org/show_bug.cgi?id=112177

Reviewed by David Hyatt.

Source/WebCore:

When we had two multiple regions and a shape-inside was applied on the second region, but not on the first region and the content contained
paragraphs, the content was pushed down almost to the bottom in the second region. In a flow thread this behavior caused by the lack of the
proper updating of absoluteLogicalTop in RenderBlock::layoutRunsAndFloatsInRange function.

Tests: fast/regions/shape-inside/shape-inside-on-additional-regions.html

fast/regions/shape-inside/shape-inside-on-regions.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Update the value of absoluteLogicalTop in every run when we are in a flow thread.

LayoutTests:

Add a new subdirectory for regions shape-inside tests. Move old and add new test files to the directory.

  • fast/regions/shape-inside: Added.
  • fast/regions/shape-inside/shape-inside-on-additional-regions-expected.html: Added.
  • fast/regions/shape-inside/shape-inside-on-additional-regions.html: Added.
  • fast/regions/shape-inside/shape-inside-on-regions-expected.html: Renamed from LayoutTests/fast/regions/shape-inside-on-regions-expected.html.
  • fast/regions/shape-inside/shape-inside-on-regions.html: Renamed from LayoutTests/fast/regions/shape-inside-on-regions.html.
Location:
trunk
Files:
3 added
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147154 r147155  
     12013-03-28  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Exclusions][CSS Regions] Block children do not layout inline content correctly in a region with shape-inside set
     4        https://bugs.webkit.org/show_bug.cgi?id=112177
     5
     6        Reviewed by David Hyatt.
     7
     8        Add a new subdirectory for regions shape-inside tests. Move old and add new test files to the directory.
     9
     10        * fast/regions/shape-inside: Added.
     11        * fast/regions/shape-inside/shape-inside-on-additional-regions-expected.html: Added.
     12        * fast/regions/shape-inside/shape-inside-on-additional-regions.html: Added.
     13        * fast/regions/shape-inside/shape-inside-on-regions-expected.html: Renamed from LayoutTests/fast/regions/shape-inside-on-regions-expected.html.
     14        * fast/regions/shape-inside/shape-inside-on-regions.html: Renamed from LayoutTests/fast/regions/shape-inside-on-regions.html.
     15
    1162013-03-28  Alok Priyadarshi  <alokp@chromium.org>
    217
  • trunk/LayoutTests/fast/regions/shape-inside/shape-inside-on-regions-expected.html

    r147154 r147155  
    1212            width: 180px;
    1313            height: 100px;
    14             -webkit-shape-inside: rectangle(0, 0, 130px, 90px);
     14            -webkit-shape-inside: rectangle(0, 0, 130px, 100px);
    1515            margin-top: 10px;
    1616        }
  • trunk/LayoutTests/fast/regions/shape-inside/shape-inside-on-regions.html

    r147154 r147155  
    1717            width: 180px;
    1818            height: 100px;
    19             -webkit-shape-inside: rectangle(0, 0, 130px, 90px);
     19            -webkit-shape-inside: rectangle(0, 0, 130px, 100px);
    2020            margin-top: 10px;
    2121        }
  • trunk/Source/WebCore/ChangeLog

    r147149 r147155  
     12013-03-28  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Exclusions][CSS Regions] Block children do not layout inline content correctly in a region with shape-inside set
     4        https://bugs.webkit.org/show_bug.cgi?id=112177
     5
     6        Reviewed by David Hyatt.
     7
     8        When we had two multiple regions and a shape-inside was applied on the second region, but not on the first region and the content contained
     9        paragraphs, the content was pushed down almost to the bottom in the second region. In a flow thread this behavior caused by the lack of the
     10        proper updating of absoluteLogicalTop in RenderBlock::layoutRunsAndFloatsInRange function.
     11
     12        Tests: fast/regions/shape-inside/shape-inside-on-additional-regions.html
     13               fast/regions/shape-inside/shape-inside-on-regions.html
     14
     15        * rendering/RenderBlockLineLayout.cpp:
     16        (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Update the value of absoluteLogicalTop in every run when we are in a flow thread.
     17
    1182013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
    219
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r146192 r147155  
    15771577        if (logicalHeight() + absoluteLogicalTop < exclusionShapeInsideInfo->shapeLogicalTop())
    15781578            setLogicalHeight(exclusionShapeInsideInfo->shapeLogicalTop() - absoluteLogicalTop);
     1579    }
     1580
     1581    if (layoutState.flowThread()) {
     1582        // In a flow thread we need to update absoluteLogicalTop in every run to match to the current logical top increased by the height of the current line to calculate the right values for the
     1583        // actual shape when a line is beginning in a new region which has a shape on it. Usecase: shape-inside is applied not on the first, but on either of the following regions in the region chain.
     1584        absoluteLogicalTop = logicalTop() + lineHeight(layoutState.lineInfo().isFirstLine(), isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
    15791585    }
    15801586#endif
Note: See TracChangeset for help on using the changeset viewer.