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

Side by Side Diff: sky/engine/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 680263005: Remove layerIsContainerForFixedPositionLayers. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 645
646 updateContentsRect(); 646 updateContentsRect();
647 updateBackgroundColor(); 647 updateBackgroundColor();
648 updateDrawsContent(); 648 updateDrawsContent();
649 updateContentsOpaque(); 649 updateContentsOpaque();
650 updateAfterWidgetResize(); 650 updateAfterWidgetResize();
651 updateRenderingContext(); 651 updateRenderingContext();
652 updateShouldFlattenTransform(); 652 updateShouldFlattenTransform();
653 updateChildrenTransform(); 653 updateChildrenTransform();
654 updateScrollParent(compositor()->preferCompositingToLCDTextEnabled() ? m_own ingLayer.scrollParent() : 0); 654 updateScrollParent(compositor()->preferCompositingToLCDTextEnabled() ? m_own ingLayer.scrollParent() : 0);
655 registerScrollingLayers();
656 655
657 updateCompositingReasons(); 656 updateCompositingReasons();
658 } 657 }
659 658
660 void CompositedLayerMapping::updateMainGraphicsLayerGeometry(const IntRect& rela tiveCompositingBounds, const IntRect& localCompositingBounds, const IntPoint& gr aphicsLayerParentLocation) 659 void CompositedLayerMapping::updateMainGraphicsLayerGeometry(const IntRect& rela tiveCompositingBounds, const IntRect& localCompositingBounds, const IntPoint& gr aphicsLayerParentLocation)
661 { 660 {
662 m_graphicsLayer->setPosition(FloatPoint(relativeCompositingBounds.location() - graphicsLayerParentLocation)); 661 m_graphicsLayer->setPosition(FloatPoint(relativeCompositingBounds.location() - graphicsLayerParentLocation));
663 m_graphicsLayer->setOffsetFromRenderer(toIntSize(localCompositingBounds.loca tion())); 662 m_graphicsLayer->setOffsetFromRenderer(toIntSize(localCompositingBounds.loca tion()));
664 663
665 FloatSize oldSize = m_graphicsLayer->size(); 664 FloatSize oldSize = m_graphicsLayer->size();
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 backgroundSize = frameView->visibleContentRect().size(); 911 backgroundSize = frameView->visibleContentRect().size();
913 } 912 }
914 m_backgroundLayer->setPosition(FloatPoint()); 913 m_backgroundLayer->setPosition(FloatPoint());
915 if (backgroundSize != m_backgroundLayer->size()) { 914 if (backgroundSize != m_backgroundLayer->size()) {
916 m_backgroundLayer->setSize(backgroundSize); 915 m_backgroundLayer->setSize(backgroundSize);
917 m_backgroundLayer->setNeedsDisplay(); 916 m_backgroundLayer->setNeedsDisplay();
918 } 917 }
919 m_backgroundLayer->setOffsetFromRenderer(m_graphicsLayer->offsetFromRenderer ()); 918 m_backgroundLayer->setOffsetFromRenderer(m_graphicsLayer->offsetFromRenderer ());
920 } 919 }
921 920
922 void CompositedLayerMapping::registerScrollingLayers()
923 {
924 // FIXME(sky): Remove this whole function. I think this doesn't do anything now that we don't support position:fixed.
925
926 // Register fixed position layers and their containers with the scrolling co ordinator.
927 ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m _owningLayer);
928 if (!scrollingCoordinator)
929 return;
930
931 // Page scale is applied as a transform on the root render view layer. Becau se the scroll
932 // layer is further up in the hierarchy, we need to avoid marking the root r ender view
933 // layer as a container.
934 bool isContainer = m_owningLayer.hasTransform() && !m_owningLayer.isRootLaye r();
935 // FIXME: we should make certain that childForSuperLayers will never be the m_squashingContainmentLayer here
936 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(childForSupe rlayers(), isContainer);
937 }
938
939 void CompositedLayerMapping::updateInternalHierarchy() 921 void CompositedLayerMapping::updateInternalHierarchy()
940 { 922 {
941 // m_foregroundLayer has to be inserted in the correct order with child laye rs, 923 // m_foregroundLayer has to be inserted in the correct order with child laye rs,
942 // so it's not inserted here. 924 // so it's not inserted here.
943 if (m_ancestorClippingLayer) 925 if (m_ancestorClippingLayer)
944 m_ancestorClippingLayer->removeAllChildren(); 926 m_ancestorClippingLayer->removeAllChildren();
945 927
946 m_graphicsLayer->removeFromParent(); 928 m_graphicsLayer->removeFromParent();
947 929
948 if (m_ancestorClippingLayer) 930 if (m_ancestorClippingLayer)
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2226 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2245 name = "Scrolling Block Selection Layer"; 2227 name = "Scrolling Block Selection Layer";
2246 } else { 2228 } else {
2247 ASSERT_NOT_REACHED(); 2229 ASSERT_NOT_REACHED();
2248 } 2230 }
2249 2231
2250 return name; 2232 return name;
2251 } 2233 }
2252 2234
2253 } // namespace blink 2235 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698