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

Side by Side Diff: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp

Issue 1300213004: Restore the "don't flatten scrolling content layer" logic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge conflict Created 5 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/TestExpectations ('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, 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 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 ApplyToGraphicsLayersMode mode = ApplyToLayersAffectedByPreserve3D; 1464 ApplyToGraphicsLayersMode mode = ApplyToLayersAffectedByPreserve3D;
1465 ApplyToGraphicsLayers(this, functor, mode); 1465 ApplyToGraphicsLayers(this, functor, mode);
1466 1466
1467 // Note, if we apply perspective, we have to set should flatten differently 1467 // Note, if we apply perspective, we have to set should flatten differently
1468 // so that the transform propagates to child layers correctly. 1468 // so that the transform propagates to child layers correctly.
1469 if (hasChildTransformLayer()) { 1469 if (hasChildTransformLayer()) {
1470 ApplyToGraphicsLayers(this, [](GraphicsLayer* layer) { 1470 ApplyToGraphicsLayers(this, [](GraphicsLayer* layer) {
1471 layer->setShouldFlattenTransform(false); 1471 layer->setShouldFlattenTransform(false);
1472 }, ApplyToChildContainingLayers); 1472 }, ApplyToChildContainingLayers);
1473 } 1473 }
1474
1475 // Regardless, mark the scrolling contents layer and scrolling block
1476 // selection layer (if they exist) as not flattening. Having them flatten
1477 // causes unclipped render surfaces which cause bugs.
1478 // http://crbug.com/521768
1479 if (hasScrollingLayer()) {
1480 m_scrollingContentsLayer->setShouldFlattenTransform(false);
1481 if (m_scrollingBlockSelectionLayer)
1482 m_scrollingBlockSelectionLayer->setShouldFlattenTransform(false);
1483 }
1474 } 1484 }
1475 1485
1476 bool CompositedDeprecatedPaintLayerMapping::updateForegroundLayer(bool needsFore groundLayer) 1486 bool CompositedDeprecatedPaintLayerMapping::updateForegroundLayer(bool needsFore groundLayer)
1477 { 1487 {
1478 bool layerChanged = false; 1488 bool layerChanged = false;
1479 if (needsForegroundLayer) { 1489 if (needsForegroundLayer) {
1480 if (!m_foregroundLayer) { 1490 if (!m_foregroundLayer) {
1481 m_foregroundLayer = createGraphicsLayer(CompositingReasonLayerForFor eground); 1491 m_foregroundLayer = createGraphicsLayer(CompositingReasonLayerForFor eground);
1482 m_foregroundLayer->setPaintingPhase(GraphicsLayerPaintForeground); 1492 m_foregroundLayer->setPaintingPhase(GraphicsLayerPaintForeground);
1483 layerChanged = true; 1493 layerChanged = true;
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2385 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2376 name = "Scrolling Block Selection Layer"; 2386 name = "Scrolling Block Selection Layer";
2377 } else { 2387 } else {
2378 ASSERT_NOT_REACHED(); 2388 ASSERT_NOT_REACHED();
2379 } 2389 }
2380 2390
2381 return name; 2391 return name;
2382 } 2392 }
2383 2393
2384 } // namespace blink 2394 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698