Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 1490063002: Implement Paint Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 { 770 {
771 const bool hasCompositorAnimation = m_compositingReasonFinder.requiresCompos itingForAnimation(*layer->layoutObject()->style()); 771 const bool hasCompositorAnimation = m_compositingReasonFinder.requiresCompos itingForAnimation(*layer->layoutObject()->style());
772 return m_hasAcceleratedCompositing && (hasCompositorAnimation || !layer->sub treeIsInvisible()) && layer->isSelfPaintingLayer() && !layer->layoutObject()->is LayoutFlowThread(); 772 return m_hasAcceleratedCompositing && (hasCompositorAnimation || !layer->sub treeIsInvisible()) && layer->isSelfPaintingLayer() && !layer->layoutObject()->is LayoutFlowThread();
773 } 773 }
774 774
775 // Return true if the given layer is a stacking context and has compositing chil d 775 // Return true if the given layer is a stacking context and has compositing chil d
776 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer 776 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer
777 // into the hierarchy between this layer and its children in the z-order hierarc hy. 777 // into the hierarchy between this layer and its children in the z-order hierarc hy.
778 bool PaintLayerCompositor::clipsCompositingDescendants(const PaintLayer* layer) const 778 bool PaintLayerCompositor::clipsCompositingDescendants(const PaintLayer* layer) const
779 { 779 {
780 return layer->hasCompositingDescendant() && layer->layoutObject()->hasClipOr OverflowClip(); 780 return layer->hasCompositingDescendant() && layer->layoutObject()->hasClipRe latedProperty();
781 } 781 }
782 782
783 // If an element has composited negative z-index children, those children paint in front of the 783 // If an element has composited negative z-index children, those children paint in front of the
784 // layer background, so we need an extra 'contents' layer for the foreground of the layer 784 // layer background, so we need an extra 'contents' layer for the foreground of the layer
785 // object. 785 // object.
786 bool PaintLayerCompositor::needsContentsCompositingLayer(const PaintLayer* layer ) const 786 bool PaintLayerCompositor::needsContentsCompositingLayer(const PaintLayer* layer ) const
787 { 787 {
788 if (!layer->hasCompositingDescendant()) 788 if (!layer->hasCompositingDescendant())
789 return false; 789 return false;
790 return layer->stackingNode()->hasNegativeZOrderList(); 790 return layer->stackingNode()->hasNegativeZOrderList();
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 } else if (graphicsLayer == m_scrollLayer.get()) { 1209 } else if (graphicsLayer == m_scrollLayer.get()) {
1210 name = "Frame Scrolling Layer"; 1210 name = "Frame Scrolling Layer";
1211 } else { 1211 } else {
1212 ASSERT_NOT_REACHED(); 1212 ASSERT_NOT_REACHED();
1213 } 1213 }
1214 1214
1215 return name; 1215 return name;
1216 } 1216 }
1217 1217
1218 } // namespace blink 1218 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698