| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index 46f51bb1e039bc6de704030e6d337f9ff203abff..89853b76a500a085f4731da7d0e5171cf42c4955 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -1376,6 +1376,7 @@ enum ApplyToGraphicsLayersModeFlags {
|
| ApplyToMaskLayers = (1 << 4),
|
| ApplyToContentLayers = (1 << 5),
|
| ApplyToChildContainingLayers = (1 << 6), // layers between m_graphicsLayer and children
|
| + ApplyToScrollingContentsLayer = (1 << 7),
|
| ApplyToAllGraphicsLayers = (ApplyToSquashingLayer | ApplyToScrollbarLayers | ApplyToBackgroundLayer | ApplyToMaskLayers | ApplyToLayersAffectedByPreserve3D | ApplyToContentLayers)
|
| };
|
| typedef unsigned ApplyToGraphicsLayersMode;
|
| @@ -1395,7 +1396,7 @@ static void ApplyToGraphicsLayers(const CompositedLayerMapping* mapping, const F
|
| f(mapping->scrollingLayer());
|
| if (((mode & ApplyToLayersAffectedByPreserve3D) || (mode & ApplyToChildContainingLayers)) && mapping->scrollingBlockSelectionLayer())
|
| f(mapping->scrollingBlockSelectionLayer());
|
| - if (((mode & ApplyToLayersAffectedByPreserve3D) || (mode & ApplyToContentLayers) || (mode & ApplyToChildContainingLayers)) && mapping->scrollingContentsLayer())
|
| + if (((mode & ApplyToLayersAffectedByPreserve3D) || (mode & ApplyToContentLayers) || (mode & ApplyToChildContainingLayers) || (mode & ApplyToScrollingContentsLayer)) && mapping->scrollingContentsLayer())
|
| f(mapping->scrollingContentsLayer());
|
| if (((mode & ApplyToLayersAffectedByPreserve3D) || (mode & ApplyToContentLayers)) && mapping->foregroundLayer())
|
| f(mapping->foregroundLayer());
|
| @@ -2026,8 +2027,6 @@ struct SetContentsNeedsDisplayInRectFunctor {
|
| void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r, PaintInvalidationReason invalidationReason)
|
| {
|
| ASSERT(!RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled());
|
| - // FIXME: need to split out paint invalidations for the background.
|
| - // FIXME: need to distinguish invalidations for different layers (e.g. the main layer and scrolling layer). crbug.com/416535.
|
| SetContentsNeedsDisplayInRectFunctor functor = {
|
| enclosingIntRect(LayoutRect(r.location() + m_owningLayer.subpixelAccumulation(), r.size())),
|
| invalidationReason
|
| @@ -2037,13 +2036,18 @@ void CompositedLayerMapping::setContentsNeedDisplayInRect(const LayoutRect& r, P
|
|
|
| void CompositedLayerMapping::invalidateDisplayItemClient(const DisplayItemClientWrapper& displayItemClient, PaintInvalidationReason paintInvalidationReason, const LayoutRect& previousPaintInvalidationRect, const LayoutRect& newPaintInvalidationRect)
|
| {
|
| - // FIXME: need to split out paint invalidations for the background.
|
| - // FIXME: need to distinguish invalidations for different layers (e.g. the main layer and scrolling layer). crbug.com/416535.
|
| ApplyToGraphicsLayers(this, [&displayItemClient, paintInvalidationReason, previousPaintInvalidationRect, newPaintInvalidationRect](GraphicsLayer* layer) {
|
| layer->invalidateDisplayItemClient(displayItemClient, paintInvalidationReason, enclosingIntRect(previousPaintInvalidationRect), enclosingIntRect(newPaintInvalidationRect));
|
| }, ApplyToContentLayers);
|
| }
|
|
|
| +void CompositedLayerMapping::invalidateDisplayItemClientOnScrollingContentsLayer(const DisplayItemClientWrapper& displayItemClient, PaintInvalidationReason paintInvalidationReason, const LayoutRect& previousPaintInvalidationRect, const LayoutRect& newPaintInvalidationRect)
|
| +{
|
| + ApplyToGraphicsLayers(this, [&displayItemClient, paintInvalidationReason, previousPaintInvalidationRect, newPaintInvalidationRect](GraphicsLayer* layer) {
|
| + layer->invalidateDisplayItemClient(displayItemClient, paintInvalidationReason, enclosingIntRect(previousPaintInvalidationRect), enclosingIntRect(newPaintInvalidationRect));
|
| + }, ApplyToScrollingContentsLayer);
|
| +}
|
| +
|
| const GraphicsLayerPaintInfo* CompositedLayerMapping::containingSquashedLayer(const LayoutObject* layoutObject, const Vector<GraphicsLayerPaintInfo>& layers, unsigned maxSquashedLayerIndex)
|
| {
|
| for (size_t i = 0; i < layers.size() && i < maxSquashedLayerIndex; ++i) {
|
|
|