Changeset 195453 in webkit


Ignore:
Timestamp:
Jan 22, 2016 9:35:50 AM (8 years ago)
Author:
hyatt@apple.com
Message:

Elements with overflow and border-radius don't show in multicolumn properly.
https://bugs.webkit.org/show_bug.cgi?id=152920

Reviewed by Simon Fraser.

Source/WebCore:

Added new test in fast/multicol.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::convertToLayerCoords):
(WebCore::RenderLayer::offsetFromAncestor):
(WebCore::RenderLayer::clipToRect):

  • rendering/RenderLayer.h:

Make sure the crawl up the containing block chain to apply clips properly offsets
to account for columns. convertToLayerCoords could already handle this, so
offsetFromAncestor now takes the same extra argument (whether or not to adjust for
columns) that convertToLayerCoords does.

LayoutTests:

  • fast/multicol/border-radius-overflow-columns-expected.html: Added.
  • fast/multicol/border-radius-overflow-columns.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195447 r195453  
     12016-01-21  Dave Hyatt  <hyatt@apple.com>
     2
     3        Elements with overflow and border-radius don't show in multicolumn properly.
     4        https://bugs.webkit.org/show_bug.cgi?id=152920
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/multicol/border-radius-overflow-columns-expected.html: Added.
     9        * fast/multicol/border-radius-overflow-columns.html: Added.
     10
    1112016-01-22  ChangSeok Oh  <changseok.oh@collabora.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r195452 r195453  
     12016-01-21  Dave Hyatt  <hyatt@apple.com>
     2
     3        Elements with overflow and border-radius don't show in multicolumn properly.
     4        https://bugs.webkit.org/show_bug.cgi?id=152920
     5
     6        Reviewed by Simon Fraser.
     7
     8        Added new test in fast/multicol.
     9
     10        * rendering/RenderLayer.cpp:
     11        (WebCore::RenderLayer::convertToLayerCoords):
     12        (WebCore::RenderLayer::offsetFromAncestor):
     13        (WebCore::RenderLayer::clipToRect):
     14        * rendering/RenderLayer.h:
     15
     16        Make sure the crawl up the containing block chain to apply clips properly offsets
     17        to account for columns. convertToLayerCoords could already handle this, so
     18        offsetFromAncestor now takes the same extra argument (whether or not to adjust for
     19        columns) that convertToLayerCoords does.
     20
    1212016-01-22  Darin Adler  <darin@apple.com>
    222
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r194819 r195453  
    21302130}
    21312131
    2132 LayoutSize RenderLayer::offsetFromAncestor(const RenderLayer* ancestorLayer) const
    2133 {
    2134     return toLayoutSize(convertToLayerCoords(ancestorLayer, LayoutPoint()));
     2132LayoutSize RenderLayer::offsetFromAncestor(const RenderLayer* ancestorLayer, ColumnOffsetAdjustment adjustForColumns) const
     2133{
     2134    return toLayoutSize(convertToLayerCoords(ancestorLayer, LayoutPoint(), adjustForColumns));
    21352135}
    21362136
     
    38183818        for (RenderLayer* layer = rule == IncludeSelfForBorderRadius ? this : parent(); layer; layer = layer->parent()) {
    38193819            if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && inContainingBlockChain(this, layer)) {
    3820                 LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer)), layer->size());
     3820                LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer, AdjustForColumns)), layer->size());
    38213821                adjustedClipRect.move(paintingInfo.subpixelAccumulation);
    38223822                context.clipRoundedRect(layer->renderer().style().getRoundedInnerBorderFor(adjustedClipRect).pixelSnappedRoundedRectForPainting(deviceScaleFactor));
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r194515 r195453  
    437437    void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntPoint& location, ColumnOffsetAdjustment adjustForColumns = DontAdjustForColumns) const;
    438438    LayoutPoint convertToLayerCoords(const RenderLayer* ancestorLayer, const LayoutPoint&, ColumnOffsetAdjustment adjustForColumns = DontAdjustForColumns) const;
    439     LayoutSize offsetFromAncestor(const RenderLayer*) const;
     439    LayoutSize offsetFromAncestor(const RenderLayer*, ColumnOffsetAdjustment = DontAdjustForColumns) const;
    440440
    441441    int zIndex() const { return renderer().style().zIndex(); }
Note: See TracChangeset for help on using the changeset viewer.