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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 260113004: Don't squash layers that have a clip or overflow clip. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adjusted test expectations. Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/virtual/softwarecompositing/layer-creation/overflow-scroll-overlap-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 if (squashingWouldExceedSparsityTolerance(layer, squashingState)) 703 if (squashingWouldExceedSparsityTolerance(layer, squashingState))
704 return false; 704 return false;
705 705
706 // FIXME: this is not efficient, since it walks up the tree . We should stor e these values on the AncestorDependentPropertiesCache. 706 // FIXME: this is not efficient, since it walks up the tree . We should stor e these values on the AncestorDependentPropertiesCache.
707 ASSERT(squashingState.hasMostRecentMapping); 707 ASSERT(squashingState.hasMostRecentMapping);
708 const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owning Layer(); 708 const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owning Layer();
709 709
710 if (layer->renderer()->clippingContainer() != squashingLayer.renderer()->cli ppingContainer()) 710 if (layer->renderer()->clippingContainer() != squashingLayer.renderer()->cli ppingContainer())
711 return false; 711 return false;
712 712
713 // FIXME: this seems to be overly aggressive. clipsCompositingDescendants() should suffice. However, it does not fix all testcases,
714 // in particular crbug.com/366101.
715 if (layer->renderer()->hasClipOrOverflowClip())
716 return false;
717
713 if (layer->scrollsWithRespectTo(&squashingLayer)) 718 if (layer->scrollsWithRespectTo(&squashingLayer))
714 return false; 719 return false;
715 720
716 const RenderLayer::AncestorDependentProperties& ancestorDependentProperties = layer->ancestorDependentProperties(); 721 const RenderLayer::AncestorDependentProperties& ancestorDependentProperties = layer->ancestorDependentProperties();
717 const RenderLayer::AncestorDependentProperties& squashingLayerAncestorDepend entProperties = squashingLayer.ancestorDependentProperties(); 722 const RenderLayer::AncestorDependentProperties& squashingLayerAncestorDepend entProperties = squashingLayer.ancestorDependentProperties();
718 723
719 if (ancestorDependentProperties.opacityAncestor != squashingLayerAncestorDep endentProperties.opacityAncestor) 724 if (ancestorDependentProperties.opacityAncestor != squashingLayerAncestorDep endentProperties.opacityAncestor)
720 return false; 725 return false;
721 726
722 if (ancestorDependentProperties.transformAncestor != squashingLayerAncestorD ependentProperties.transformAncestor) 727 if (ancestorDependentProperties.transformAncestor != squashingLayerAncestorD ependentProperties.transformAncestor)
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 } else if (graphicsLayer == m_scrollLayer.get()) { 1717 } else if (graphicsLayer == m_scrollLayer.get()) {
1713 name = "LocalFrame Scrolling Layer"; 1718 name = "LocalFrame Scrolling Layer";
1714 } else { 1719 } else {
1715 ASSERT_NOT_REACHED(); 1720 ASSERT_NOT_REACHED();
1716 } 1721 }
1717 1722
1718 return name; 1723 return name;
1719 } 1724 }
1720 1725
1721 } // namespace WebCore 1726 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/virtual/softwarecompositing/layer-creation/overflow-scroll-overlap-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698