| Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| index 85faa47843757739f06908f6240e1c56126d6cf3..6b72cac58ab5b98f4c1bf032ca6011f1161e6467 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| @@ -4,6 +4,9 @@
|
|
|
| #include "platform/graphics/compositing/PaintArtifactCompositor.h"
|
|
|
| +#include <algorithm>
|
| +#include <memory>
|
| +#include <utility>
|
| #include "cc/layers/content_layer_client.h"
|
| #include "cc/layers/layer.h"
|
| #include "cc/layers/picture_layer.h"
|
| @@ -40,9 +43,6 @@
|
| #include "wtf/Allocator.h"
|
| #include "wtf/Noncopyable.h"
|
| #include "wtf/PtrUtil.h"
|
| -#include <algorithm>
|
| -#include <memory>
|
| -#include <utility>
|
|
|
| namespace blink {
|
|
|
| @@ -671,7 +671,8 @@ void PaintArtifactCompositor::update(
|
| const PaintArtifact& paintArtifact,
|
| RasterInvalidationTrackingMap<const PaintChunk>* rasterChunkInvalidations,
|
| bool storeDebugInfo,
|
| - GeometryMapper& geometryMapper) {
|
| + GeometryMapper& geometryMapper,
|
| + ScrollClientMap& scrollClients) {
|
| #ifndef NDEBUG
|
| storeDebugInfo = true;
|
| #endif
|
| @@ -723,8 +724,16 @@ void PaintArtifactCompositor::update(
|
| layer->SetTransformTreeIndex(transformId);
|
| layer->SetClipTreeIndex(clipId);
|
| layer->SetEffectTreeIndex(effectId);
|
| - layer->SetScrollTreeIndex(propertyTreeManager.ensureCompositorScrollNode(
|
| - transform->findEnclosingScrollNode()));
|
| + propertyTreeManager.updateLayerScrollMapping(layer.get(), transform);
|
| +
|
| + if (transform->isScrollTranslation()) {
|
| + auto scrollClientIt = scrollClients.find(transform->scrollNode());
|
| + if (scrollClientIt != scrollClients.end()) {
|
| + layer->set_did_scroll_callback(
|
| + base::Bind(&blink::WebLayerScrollClient::didScroll,
|
| + base::Unretained(scrollClientIt->value)));
|
| + }
|
| + }
|
|
|
| layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden);
|
|
|
|
|