Changeset 163873 in webkit


Ignore:
Timestamp:
Feb 11, 2014 8:12:08 AM (10 years ago)
Author:
stavila@adobe.com
Message:

[CSS Regions] Overflow above the first region is not properly painted for regions with padding
https://bugs.webkit.org/show_bug.cgi?id=128590

Reviewed by Andrei Bucur.

Source/WebCore:

Painting is done using the layer of the region's container, so offsetting using the content box
of the region itself is incorrect.

Test: fast/regions/region-padding-overflow-hidden.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):

  • rendering/RenderRegion.cpp:

(WebCore::RenderRegion::regionContainer):
(WebCore::RenderRegion::regionContainerLayer):

  • rendering/RenderRegion.h:

LayoutTests:

Added test for the correct painting of overflow above the first region
when the region has padding.

  • fast/regions/region-padding-overflow-hidden-expected.html: Added.
  • fast/regions/region-padding-overflow-hidden.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r163871 r163873  
     12014-02-11  Radu Stavila  <stavila@adobe.com>
     2
     3        [CSS Regions] Overflow above the first region is not properly painted for regions with padding
     4        https://bugs.webkit.org/show_bug.cgi?id=128590
     5
     6        Reviewed by Andrei Bucur.
     7
     8        Added test for the correct painting of overflow above the first region
     9        when the region has padding.
     10
     11        * fast/regions/region-padding-overflow-hidden-expected.html: Added.
     12        * fast/regions/region-padding-overflow-hidden.html: Added.
     13
    1142014-02-11  Piotr Grad  <p.grad@samsung.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r163872 r163873  
     12014-02-11  Radu Stavila  <stavila@adobe.com>
     2
     3        [CSS Regions] Overflow above the first region is not properly painted for regions with padding
     4        https://bugs.webkit.org/show_bug.cgi?id=128590
     5
     6        Reviewed by Andrei Bucur.
     7
     8        Painting is done using the layer of the region's container, so offsetting using the content box
     9        of the region itself is incorrect.
     10
     11        Test: fast/regions/region-padding-overflow-hidden.html
     12
     13        * rendering/RenderLayer.cpp:
     14        (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
     15        * rendering/RenderRegion.cpp:
     16        (WebCore::RenderRegion::regionContainer):
     17        (WebCore::RenderRegion::regionContainerLayer):
     18        * rendering/RenderRegion.h:
     19
    1202014-02-11  Benjamin Poulain  <benjamin@webkit.org>
    221
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r163764 r163873  
    52485248
    52495249    LayoutPoint portionLocation = flowThreadPortionRect.location();
    5250     LayoutRect regionContentBox = region->contentBoxRect();
     5250    LayoutRect regionContentBox = region->regionContainer()->contentBoxRect();
    52515251    LayoutSize moveOffset = portionLocation - regionContentBox.location();
    52525252
  • trunk/Source/WebCore/rendering/RenderRegion.cpp

    r163368 r163873  
    151151}
    152152
     153RenderBlockFlow* RenderRegion::regionContainer() const
     154{
     155    ASSERT(parent() && parent()->isRenderNamedFlowFragmentContainer());
     156    return toRenderBlockFlow(parent());
     157}
     158
    153159RenderLayer* RenderRegion::regionContainerLayer() const
    154160{
    155     ASSERT(parent() && parent()->isRenderNamedFlowFragmentContainer());
    156     return toRenderBlockFlow(parent())->layer();
     161    return regionContainer()->layer();
    157162}
    158163
  • trunk/Source/WebCore/rendering/RenderRegion.h

    r162158 r163873  
    5858    LayoutPoint flowThreadPortionLocation() const;
    5959   
     60    RenderBlockFlow* regionContainer() const;
    6061    RenderLayer* regionContainerLayer() const;
    6162
Note: See TracChangeset for help on using the changeset viewer.