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

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

Issue 2173963002: Ensure that we consistently check contains: paint for fixed position containment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove trailing whitespace Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 // Register fixed position layers and their containers with the scrolling co ordinator. 1103 // Register fixed position layers and their containers with the scrolling co ordinator.
1104 ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m _owningLayer); 1104 ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m _owningLayer);
1105 if (!scrollingCoordinator) 1105 if (!scrollingCoordinator)
1106 return; 1106 return;
1107 1107
1108 scrollingCoordinator->updateLayerPositionConstraint(&m_owningLayer); 1108 scrollingCoordinator->updateLayerPositionConstraint(&m_owningLayer);
1109 1109
1110 // Page scale is applied as a transform on the root layout view layer. Becau se the scroll 1110 // Page scale is applied as a transform on the root layout view layer. Becau se the scroll
1111 // layer is further up in the hierarchy, we need to avoid marking the root l ayout view 1111 // layer is further up in the hierarchy, we need to avoid marking the root l ayout view
1112 // layer as a container. 1112 // layer as a container.
1113 bool isContainer = m_owningLayer.hasTransformRelatedProperty() && !m_owningL ayer.isRootLayer(); 1113 bool isContainer = m_owningLayer.layoutObject()->style()->canContainFixedPos itionObjects() && !m_owningLayer.isRootLayer();
1114 // FIXME: we should make certain that childForSuperLayers will never be the m_squashingContainmentLayer here 1114 // FIXME: we should make certain that childForSuperLayers will never be the m_squashingContainmentLayer here
1115 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(childForSupe rlayers(), isContainer); 1115 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(childForSupe rlayers(), isContainer);
1116 } 1116 }
1117 1117
1118 void CompositedLayerMapping::updateInternalHierarchy() 1118 void CompositedLayerMapping::updateInternalHierarchy()
1119 { 1119 {
1120 // m_foregroundLayer has to be inserted in the correct order with child laye rs, 1120 // m_foregroundLayer has to be inserted in the correct order with child laye rs,
1121 // so it's not inserted here. 1121 // so it's not inserted here.
1122 if (m_ancestorClippingLayer) 1122 if (m_ancestorClippingLayer)
1123 m_ancestorClippingLayer->removeAllChildren(); 1123 m_ancestorClippingLayer->removeAllChildren();
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2675 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2676 name = "Scrolling Contents Layer"; 2676 name = "Scrolling Contents Layer";
2677 } else { 2677 } else {
2678 ASSERT_NOT_REACHED(); 2678 ASSERT_NOT_REACHED();
2679 } 2679 }
2680 2680
2681 return name; 2681 return name;
2682 } 2682 }
2683 2683
2684 } // namespace blink 2684 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698