Changeset 168314 in webkit
- Timestamp:
- May 5, 2014 2:08:25 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 14 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168313 r168314 1 2014-05-05 Ion Rosca <rosca@adobe.com> 2 3 [CSS Blending] Webkit-blend-mode fails for accelerated parent with overflow:hidden 4 https://bugs.webkit.org/show_bug.cgi?id=126160 5 6 Reviewed by Dean Jackson. 7 8 * css3/compositing/blend-mode-accelerated-parent-overflow-hidden-expected.html: Added. 9 * css3/compositing/blend-mode-accelerated-parent-overflow-hidden.html: Added. 10 * css3/compositing/blend-mode-clip-accelerated-blending-canvas-expected.txt: Added. 11 * css3/compositing/blend-mode-clip-accelerated-blending-canvas.html: Added. 12 * css3/compositing/blend-mode-clip-accelerated-blending-child-expected.html: Added. 13 * css3/compositing/blend-mode-clip-accelerated-blending-child.html: Added. 14 * css3/compositing/blend-mode-clip-accelerated-blending-double-expected.html: Added. 15 * css3/compositing/blend-mode-clip-accelerated-blending-double.html: Added. 16 * css3/compositing/blend-mode-clip-accelerated-blending-with-siblings-expected.html: Added. 17 * css3/compositing/blend-mode-clip-accelerated-blending-with-siblings.html: Added. 18 * css3/compositing/blend-mode-clip-accelerated-transformed-blending-expected.html: Added. 19 * css3/compositing/blend-mode-clip-accelerated-transformed-blending.html: Added. 20 * css3/compositing/blend-mode-clip-rect-accelerated-blending.html: Added. 21 * css3/compositing/blend-mode-clip-rect-accelerated-blending-expected.html: Added. 22 * css3/compositing/blend-mode-isolation-accelerated-overflow-hidden-expected.txt: 23 1 24 2014-05-05 Dirk Schulze <krit@webkit.org> 2 25 -
trunk/Source/WebCore/ChangeLog
r168313 r168314 1 2014-05-05 Ion Rosca <rosca@adobe.com> 2 3 [CSS Blending] Webkit-blend-mode fails for accelerated parent with overflow:hidden 4 https://bugs.webkit.org/show_bug.cgi?id=126160 5 6 When the isolating layer has overflow:hidden, it will create a descendant clipping layer 7 (m_childContainmentLayer), which will restrict the bleding layer to reading the backdrop 8 from the isolating layer. 9 The solution in this patch is to forbid the isolating layer to create a descendant clipping 10 layer and make all the children to get their own ancestor clipping layers instead. 11 12 Reviewed by Dean Jackson. 13 14 Tests: css3/compositing/blend-mode-accelerated-parent-overflow-hidden.html 15 css3/compositing/blend-mode-clip-accelerated-blending-canvas.html 16 css3/compositing/blend-mode-clip-accelerated-blending-child.html 17 css3/compositing/blend-mode-clip-accelerated-blending-double.html 18 css3/compositing/blend-mode-clip-accelerated-blending-with-siblings.html 19 css3/compositing/blend-mode-clip-accelerated-transformed-blending.html 20 css3/compositing/blend-mode-clip-rect-accelerated-blending.html 21 22 * rendering/RenderLayerBacking.cpp: 23 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 24 when the compositing ancestor isolates blending we take it into account for computing 25 the clipping rect for this layer, because it was not allowed to create the descendant 26 clipping layer. 27 * rendering/RenderLayerCompositor.cpp: 28 (WebCore::RenderLayerCompositor::clippedByAncestor): 29 when the compositing ancestor isolates blending we decide if a layer is clipped by ancestor 30 by computing the clipping rect taking into account all the ancestors up to and including 31 the compositing ancestor. 32 (WebCore::RenderLayerCompositor::clipsCompositingDescendants): 33 if a layer isolates blending, it is not allowed to create a descendant clipping layer. 34 1 35 2014-05-05 Dirk Schulze <krit@webkit.org> 2 36 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r168219 r168314 776 776 // layer. Note that we call it with temporaryClipRects = true because normally when computing clip rects 777 777 // for a compositing layer, rootLayer is the layer itself. 778 RenderLayer::ClipRectsContext clipRectsContext(compAncestor, 0, TemporaryClipRects, IgnoreOverlayScrollbarSize, IgnoreOverflowClip); 778 ShouldRespectOverflowClip shouldRespectOverflowClip = compAncestor->isolatesCompositedBlending() ? RespectOverflowClip : IgnoreOverflowClip; 779 RenderLayer::ClipRectsContext clipRectsContext(compAncestor, 0, TemporaryClipRects, IgnoreOverlayScrollbarSize, shouldRespectOverflowClip); 779 780 LayoutRect parentClipRect = m_owningLayer.backgroundClipRect(clipRectsContext).rect(); // FIXME: Incorrect for CSS regions. 780 781 ASSERT(parentClipRect != LayoutRect::infiniteRect()); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r168253 r168314 2312 2312 // If the compositingAncestor clips, that will be taken care of by clipsCompositingDescendants(), 2313 2313 // so we only care about clipping between its first child that is our ancestor (the computeClipRoot), 2314 // and layer. 2315 RenderLayer* computeClipRoot = nullptr; 2316 RenderLayer* parent = &layer; 2317 while (parent) { 2318 RenderLayer* next = parent->parent(); 2319 if (next == compositingAncestor) { 2320 computeClipRoot = parent; 2321 break; 2322 } 2323 parent = next; 2324 } 2325 2326 if (!computeClipRoot || computeClipRoot == &layer) 2327 return false; 2314 // and layer. The exception is when the compositingAncestor isolates composited blending children, 2315 // in this case it is not allowed to clipsCompositingDescendants() and each of its children 2316 // will be clippedByAncestor()s, including the compositingAncestor. 2317 RenderLayer* computeClipRoot = compositingAncestor; 2318 if (!compositingAncestor->isolatesCompositedBlending()) { 2319 computeClipRoot = nullptr; 2320 RenderLayer* parent = &layer; 2321 while (parent) { 2322 RenderLayer* next = parent->parent(); 2323 if (next == compositingAncestor) { 2324 computeClipRoot = parent; 2325 break; 2326 } 2327 parent = next; 2328 } 2329 2330 if (!computeClipRoot || computeClipRoot == &layer) 2331 return false; 2332 } 2328 2333 2329 2334 return layer.backgroundClipRect(RenderLayer::ClipRectsContext(computeClipRoot, 0, TemporaryClipRects)).rect() != LayoutRect::infiniteRect(); // FIXME: Incorrect for CSS regions. … … 2335 2340 bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer& layer) const 2336 2341 { 2337 return layer.hasCompositingDescendant() && layer.renderer().hasClipOrOverflowClip() ;2342 return layer.hasCompositingDescendant() && layer.renderer().hasClipOrOverflowClip() && !layer.isolatesCompositedBlending(); 2338 2343 } 2339 2344
Note: See TracChangeset
for help on using the changeset viewer.