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

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

Issue 1407383005: Fix flattening for scrollable areas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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, 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 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 ApplyToGraphicsLayers(this, functor, mode); 1500 ApplyToGraphicsLayers(this, functor, mode);
1501 1501
1502 // Note, if we apply perspective, we have to set should flatten differently 1502 // Note, if we apply perspective, we have to set should flatten differently
1503 // so that the transform propagates to child layers correctly. 1503 // so that the transform propagates to child layers correctly.
1504 if (hasChildTransformLayer()) { 1504 if (hasChildTransformLayer()) {
1505 ApplyToGraphicsLayers(this, [](GraphicsLayer* layer) { 1505 ApplyToGraphicsLayers(this, [](GraphicsLayer* layer) {
1506 layer->setShouldFlattenTransform(false); 1506 layer->setShouldFlattenTransform(false);
1507 }, ApplyToChildContainingLayers); 1507 }, ApplyToChildContainingLayers);
1508 } 1508 }
1509 1509
1510 // Regardless, mark the scrolling contents layer and scrolling block 1510 // Regardless, mark the graphics layer, scrolling layer and scrolling block
1511 // selection layer (if they exist) as not flattening. Having them flatten 1511 // selection layer (if they exist) as not flattening. Having them flatten
1512 // causes unclipped render surfaces which cause bugs. 1512 // causes unclipped render surfaces which cause bugs.
1513 // http://crbug.com/521768 1513 // http://crbug.com/521768
1514 if (hasScrollingLayer()) { 1514 if (hasScrollingLayer()) {
1515 m_scrollingContentsLayer->setShouldFlattenTransform(false); 1515 m_graphicsLayer->setShouldFlattenTransform(false);
1516 m_scrollingLayer->setShouldFlattenTransform(false);
1516 if (m_scrollingBlockSelectionLayer) 1517 if (m_scrollingBlockSelectionLayer)
1517 m_scrollingBlockSelectionLayer->setShouldFlattenTransform(false); 1518 m_scrollingBlockSelectionLayer->setShouldFlattenTransform(false);
1518 } 1519 }
1519 } 1520 }
1520 1521
1521 bool CompositedLayerMapping::updateForegroundLayer(bool needsForegroundLayer) 1522 bool CompositedLayerMapping::updateForegroundLayer(bool needsForegroundLayer)
1522 { 1523 {
1523 bool layerChanged = false; 1524 bool layerChanged = false;
1524 if (needsForegroundLayer) { 1525 if (needsForegroundLayer) {
1525 if (!m_foregroundLayer) { 1526 if (!m_foregroundLayer) {
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2566 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2566 name = "Scrolling Block Selection Layer"; 2567 name = "Scrolling Block Selection Layer";
2567 } else { 2568 } else {
2568 ASSERT_NOT_REACHED(); 2569 ASSERT_NOT_REACHED();
2569 } 2570 }
2570 2571
2571 return name; 2572 return name;
2572 } 2573 }
2573 2574
2574 } // namespace blink 2575 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698