Changeset 144178 in webkit


Ignore:
Timestamp:
Feb 27, 2013 6:50:21 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[CSS Regions] Region overset property is not properly computed when there is a region break
https://bugs.webkit.org/show_bug.cgi?id=92497

Patch by Mihai Maerean <Mihai Maerean> on 2013-02-27
Reviewed by David Hyatt.

Source/WebCore:

For "paginated" content in regions that has -webkit-region-break-after:always, the bottom margin was being passed
along for the next region in the chain, which shouldn't happen.

The fix is, at layout, to clear the bottom margin for the nodes (inside paginated contexts) that have
-webkit-region-break-after:always.

Tests: fast/multicol/break-after-always-bottom-margin.html

fast/regions/overset-break-nested.html
fast/regions/overset-break-with-sibling.html
fast/regions/overset-break.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::applyAfterBreak):

LayoutTests:

  • fast/multicol/break-after-always-bottom-margin-expected.txt: Added.
  • fast/multicol/break-after-always-bottom-margin.html: Added.
  • fast/regions/overset-break-expected.txt: Added.
  • fast/regions/overset-break-nested-expected.txt: Added.
  • fast/regions/overset-break-nested.html: Added.
  • fast/regions/overset-break-with-sibling-expected.txt: Added.
  • fast/regions/overset-break-with-sibling.html: Added.
  • fast/regions/overset-break.html: Added.
Location:
trunk
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r144177 r144178  
     12013-02-27  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSS Regions] Region overset property is not properly computed when there is a region break
     4        https://bugs.webkit.org/show_bug.cgi?id=92497
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/multicol/break-after-always-bottom-margin-expected.txt: Added.
     9        * fast/multicol/break-after-always-bottom-margin.html: Added.
     10        * fast/regions/overset-break-expected.txt: Added.
     11        * fast/regions/overset-break-nested-expected.txt: Added.
     12        * fast/regions/overset-break-nested.html: Added.
     13        * fast/regions/overset-break-with-sibling-expected.txt: Added.
     14        * fast/regions/overset-break-with-sibling.html: Added.
     15        * fast/regions/overset-break.html: Added.
     16
    1172013-02-27  Vsevolod Vlasov  <vsevik@chromium.org>
    218
  • trunk/Source/WebCore/ChangeLog

    r144176 r144178  
     12013-02-27  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSS Regions] Region overset property is not properly computed when there is a region break
     4        https://bugs.webkit.org/show_bug.cgi?id=92497
     5
     6        Reviewed by David Hyatt.
     7
     8        For "paginated" content in regions that has -webkit-region-break-after:always, the bottom margin was being passed
     9        along for the next region in the chain, which shouldn't happen.
     10
     11        The fix is, at layout, to clear the bottom margin for the nodes (inside paginated contexts) that have
     12        -webkit-region-break-after:always.
     13
     14        Tests: fast/multicol/break-after-always-bottom-margin.html
     15               fast/regions/overset-break-nested.html
     16               fast/regions/overset-break-with-sibling.html
     17               fast/regions/overset-break.html
     18
     19        * rendering/RenderBlock.cpp:
     20        (WebCore::RenderBlock::applyAfterBreak):
     21
    1222013-02-27  Stephen Chenney  <schenney@chromium.org>
    223
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r144096 r144178  
    72497249                            || (checkRegionBreaks && child->style()->regionBreakAfter() == PBALWAYS);
    72507250    if (checkAfterAlways && inNormalFlow(child) && hasNextPage(logicalOffset, IncludePageBoundary)) {
    7251         marginInfo.setMarginAfterQuirk(true); // Cause margins to be discarded for any following content.
     7251        LayoutUnit marginOffset = marginInfo.canCollapseWithMarginBefore() ? LayoutUnit() : marginInfo.margin();
     7252
     7253        // So our margin doesn't participate in the next collapsing steps.
     7254        marginInfo.clearMargin();
     7255
    72527256        if (checkColumnBreaks)
    72537257            view()->layoutState()->addForcedColumnBreak(child, logicalOffset);
    72547258        if (checkRegionBreaks) {
    7255             LayoutUnit marginOffset = marginInfo.canCollapseWithMarginBefore() ? LayoutUnit() : marginInfo.margin();
    72567259            LayoutUnit offsetBreakAdjustment = 0;
    72577260            if (enclosingRenderFlowThread()->addForcedRegionBreak(offsetFromLogicalTopOfFirstPage() + logicalOffset + marginOffset, child, false, &offsetBreakAdjustment))
Note: See TracChangeset for help on using the changeset viewer.