Changeset 185851 in webkit


Ignore:
Timestamp:
Jun 22, 2015 4:32:30 PM (9 years ago)
Author:
Simon Fraser
Message:

-webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
https://bugs.webkit.org/show_bug.cgi?id=146218
rdar://problem/21127840

Reviewed by Zalan Bujtas.
Source/WebCore:

The clip path is computed using the RenderLayer's bounding box, so needs to be offset
by the offsetFromRenderer when set on the mask layer.

Test: compositing/masks/compositing-clip-path-origin.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

LayoutTests:

Test clip path on layers with non-zero bounds offsetFromRenderer because of box shadow,
or vertical writing mode.

  • compositing/masks/compositing-clip-path-origin-expected.html: Added.
  • compositing/masks/compositing-clip-path-origin.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r185850 r185851  
     12015-06-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        -webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
     4        https://bugs.webkit.org/show_bug.cgi?id=146218
     5        rdar://problem/21127840
     6
     7        Reviewed by Zalan Bujtas.
     8       
     9        Test clip path on layers with non-zero bounds offsetFromRenderer because of box shadow,
     10        or vertical writing mode.
     11
     12        * compositing/masks/compositing-clip-path-origin-expected.html: Added.
     13        * compositing/masks/compositing-clip-path-origin.html: Added.
     14
    1152015-06-22  David Kilzer  <ddkilzer@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r185848 r185851  
     12015-06-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        -webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
     4        https://bugs.webkit.org/show_bug.cgi?id=146218
     5        rdar://problem/21127840
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        The clip path is computed using the RenderLayer's bounding box, so needs to be offset
     10        by the offsetFromRenderer when set on the mask layer.
     11
     12        Test: compositing/masks/compositing-clip-path-origin.html
     13
     14        * rendering/RenderLayerBacking.cpp:
     15        (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
     16
    1172015-06-22  Michael Catanzaro  <mcatanzaro@igalia.com>
    218
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r185666 r185851  
    10621062            Path clipPath = m_owningLayer.computeClipPath(offset, referenceBoxForClippedInline, windRule);
    10631063
     1064            FloatSize pathOffset = m_maskLayer->offsetFromRenderer();
     1065            if (!pathOffset.isZero())
     1066                clipPath.translate(-pathOffset);
     1067           
    10641068            m_maskLayer->setShapeLayerPath(clipPath);
    10651069            m_maskLayer->setShapeLayerWindRule(windRule);
Note: See TracChangeset for help on using the changeset viewer.