Changeset 123211 in webkit


Ignore:
Timestamp:
Jul 20, 2012 6:59:48 AM (12 years ago)
Author:
mihnea@adobe.com
Message:

[CSSRegions]Assert failure when layout positioned objects in regions
https://bugs.webkit.org/show_bug.cgi?id=90792

Reviewed by Andreas Kling.

Before clamping the containing block (for an out-of-flow positioned element
inside a named flow) to the region, we have to test whether the region is not
null, which can happen when the named flow does not have attached regions.

Source/WebCore:

Tests: fast/regions/positioned-vrl-in-named-flow.html

fast/regions/positioned-vrl-in-parent-named-flow.html
fast/regions/positioned-with-vrl-parent-in-named-flow.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):

LayoutTests:

  • fast/regions/positioned-vrl-in-named-flow-expected.txt: Added.
  • fast/regions/positioned-vrl-in-named-flow.html: Added.
  • fast/regions/positioned-vrl-in-parent-named-flow-expected.txt: Added.
  • fast/regions/positioned-vrl-in-parent-named-flow.html: Added.
  • fast/regions/positioned-with-vrl-parent-in-named-flow-expected.txt: Added.
  • fast/regions/positioned-with-vrl-parent-in-named-flow.html: Added.
Location:
trunk
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r123210 r123211  
     12012-07-20  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions]Assert failure when layout positioned objects in regions
     4        https://bugs.webkit.org/show_bug.cgi?id=90792
     5
     6        Reviewed by Andreas Kling.
     7
     8        Before clamping the containing block (for an out-of-flow positioned element
     9        inside a named flow) to the region, we have to test whether the region is not
     10        null, which can happen when the named flow does not have attached regions.
     11
     12        * fast/regions/positioned-vrl-in-named-flow-expected.txt: Added.
     13        * fast/regions/positioned-vrl-in-named-flow.html: Added.
     14        * fast/regions/positioned-vrl-in-parent-named-flow-expected.txt: Added.
     15        * fast/regions/positioned-vrl-in-parent-named-flow.html: Added.
     16        * fast/regions/positioned-with-vrl-parent-in-named-flow-expected.txt: Added.
     17        * fast/regions/positioned-with-vrl-parent-in-named-flow.html: Added.
     18
    1192012-07-20  Stephen Chenney  <schenney@chromium.org>
    220
  • trunk/Source/WebCore/ChangeLog

    r123210 r123211  
     12012-07-20  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions]Assert failure when layout positioned objects in regions
     4        https://bugs.webkit.org/show_bug.cgi?id=90792
     5
     6        Reviewed by Andreas Kling.
     7
     8        Before clamping the containing block (for an out-of-flow positioned element
     9        inside a named flow) to the region, we have to test whether the region is not
     10        null, which can happen when the named flow does not have attached regions.
     11
     12        Tests: fast/regions/positioned-vrl-in-named-flow.html
     13               fast/regions/positioned-vrl-in-parent-named-flow.html
     14               fast/regions/positioned-with-vrl-parent-in-named-flow.html
     15
     16        * rendering/RenderBox.cpp:
     17        (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
     18        (WebCore::RenderBox::computePositionedLogicalWidth):
     19        (WebCore::RenderBox::computePositionedLogicalHeight):
     20
    1212012-07-20  Stephen Chenney  <schenney@chromium.org>
    222
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r123067 r123211  
    23662366                    LayoutUnit cbPageOffset = offsetFromLogicalTopOfFirstPage - logicalTop();
    23672367                    RenderRegion* cbRegion = cb->regionAtBlockOffset(cbPageOffset);
    2368                     cbRegion = cb->clampToStartAndEndRegions(cbRegion);
    2369                     boxInfo = cb->renderBoxRegionInfo(cbRegion, cbPageOffset);
     2368                    if (cbRegion) {
     2369                        cbRegion = cb->clampToStartAndEndRegions(cbRegion);
     2370                        boxInfo = cb->renderBoxRegionInfo(cbRegion, cbPageOffset);
     2371                    }
    23702372                }
    23712373            } else if (region && enclosingRenderFlowThread()->isHorizontalWritingMode() == containingBlock->isHorizontalWritingMode()) {
     
    26292631        LayoutUnit cbPageOffset = offsetFromLogicalTopOfFirstPage - logicalTop();
    26302632        RenderRegion* cbRegion = cb->regionAtBlockOffset(cbPageOffset);
    2631         cbRegion = cb->clampToStartAndEndRegions(cbRegion);
    2632         RenderBoxRegionInfo* boxInfo = cb->renderBoxRegionInfo(cbRegion, cbPageOffset);
    2633         if (boxInfo) {
    2634             logicalLeftPos += boxInfo->logicalLeft();
    2635             setLogicalLeft(logicalLeftPos);
     2633        if (cbRegion) {
     2634            cbRegion = cb->clampToStartAndEndRegions(cbRegion);
     2635            RenderBoxRegionInfo* boxInfo = cb->renderBoxRegionInfo(cbRegion, cbPageOffset);
     2636            if (boxInfo) {
     2637                logicalLeftPos += boxInfo->logicalLeft();
     2638                setLogicalLeft(logicalLeftPos);
     2639            }
    26362640        }
    26372641    }
     
    29512955        LayoutUnit cbPageOffset = cb->offsetFromLogicalTopOfFirstPage() - logicalLeft();
    29522956        RenderRegion* cbRegion = cb->regionAtBlockOffset(cbPageOffset);
    2953         cbRegion = cb->clampToStartAndEndRegions(cbRegion);
    2954         RenderBoxRegionInfo* boxInfo = cb->renderBoxRegionInfo(cbRegion, cbPageOffset);
    2955         if (boxInfo) {
    2956             logicalTopPos += boxInfo->logicalLeft();
    2957             setLogicalTop(logicalTopPos);
     2957        if (cbRegion) {
     2958            cbRegion = cb->clampToStartAndEndRegions(cbRegion);
     2959            RenderBoxRegionInfo* boxInfo = cb->renderBoxRegionInfo(cbRegion, cbPageOffset);
     2960            if (boxInfo) {
     2961                logicalTopPos += boxInfo->logicalLeft();
     2962                setLogicalTop(logicalTopPos);
     2963            }
    29582964        }
    29592965    }
Note: See TracChangeset for help on using the changeset viewer.