Changeset 145728 in webkit


Ignore:
Timestamp:
Mar 13, 2013 11:32:14 AM (11 years ago)
Author:
abucur@adobe.com
Message:

[CSS Regions] Break after doesn't work correctly with auto-height regions
https://bugs.webkit.org/show_bug.cgi?id=112241

Reviewed by David Hyatt.

Source/WebCore:

The change correctly returns the break position during the normal layout phase for
auto-height regions. The problem doesn't exist during the constrained layout phase
so it only affects the size of the auto-height regions by incorrectly positioning
the content inside the flow.

Test: fast/regions/autoheight-break-after.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::applyAfterBreak): Include the margin offset in the returned break position.

LayoutTests:

This reference test verifies the correct break positioned is computed when there are auto-height regions during
the normal layout phase.
The test includes an auto-height region, a region with a specified size and an auto-height region. The first
region ends with a paragraph with a forced break after. During the normal layout phase, if the paragraph margin
is not included in the break offset, the next paragraph is incorrectly positioned and it will result in an
incorrectly sized last region.
In the constrained layout phase, the break position is returned correctly, the paragraph is positioned further down
causing overflow in the auto-height region.

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r145726 r145728  
     12013-03-13  Andrei Bucur  <abucur@adobe.com>
     2
     3        [CSS Regions] Break after doesn't work correctly with auto-height regions
     4        https://bugs.webkit.org/show_bug.cgi?id=112241
     5
     6        Reviewed by David Hyatt.
     7
     8        This reference test verifies the correct break positioned is computed when there are auto-height regions during
     9        the normal layout phase.
     10        The test includes an auto-height region, a region with a specified size and an auto-height region. The first
     11        region ends with a paragraph with a forced break after. During the normal layout phase, if the paragraph margin
     12        is not included in the break offset, the next paragraph is incorrectly positioned and it will result in an
     13        incorrectly sized last region.
     14        In the constrained layout phase, the break position is returned correctly, the paragraph is positioned further down
     15        causing overflow in the auto-height region.
     16
     17        * fast/regions/autoheight-break-after-expected.html: Added.
     18        * fast/regions/autoheight-break-after.html: Added.
     19
    1202013-03-13  Philip Rogers  <pdr@google.com>
    221
  • trunk/Source/WebCore/ChangeLog

    r145727 r145728  
     12013-03-13  Andrei Bucur  <abucur@adobe.com>
     2
     3        [CSS Regions] Break after doesn't work correctly with auto-height regions
     4        https://bugs.webkit.org/show_bug.cgi?id=112241
     5
     6        Reviewed by David Hyatt.
     7
     8        The change correctly returns the break position during the normal layout phase for
     9        auto-height regions. The problem doesn't exist during the constrained layout phase
     10        so it only affects the size of the auto-height regions by incorrectly positioning
     11        the content inside the flow.
     12
     13        Test: fast/regions/autoheight-break-after.html
     14
     15        * rendering/RenderBlock.cpp:
     16        (WebCore::RenderBlock::applyAfterBreak): Include the margin offset in the returned break position.
     17
    1182013-03-12  Andrey Kosyakov  <caseq@chromium.org>
    219
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r145610 r145728  
    73217321            LayoutUnit offsetBreakAdjustment = 0;
    73227322            if (flowThread->addForcedRegionBreak(offsetFromLogicalTopOfFirstPage() + logicalOffset + marginOffset, child, false, &offsetBreakAdjustment))
    7323                 return logicalOffset + offsetBreakAdjustment;
     7323                return logicalOffset + marginOffset + offsetBreakAdjustment;
    73247324        }
    73257325        return nextPageLogicalTop(logicalOffset, IncludePageBoundary);
Note: See TracChangeset for help on using the changeset viewer.