| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index 1a18940f27ba61f5dcab695b4fbeae4ef4d7c6fb..cf770db705a7f494c429bc953307657710d38693 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -1480,8 +1480,12 @@ void FrameView::addBackgroundAttachmentFixedObject(LayoutObject* object) {
|
| scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidChange(
|
| this);
|
|
|
| - // TODO(pdr): When slimming paint v2 is enabled, invalidate the scroll paint
|
| - // property subtree for this so main thread scroll reasons are recomputed.
|
| + // Ensure main thread scrolling reasons are recomputed.
|
| + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| + setNeedsPaintPropertyUpdate();
|
| + // The object's scroll properties are not affected by its own background.
|
| + object->setAllAncestorsNeedPaintPropertyUpdate();
|
| + }
|
| }
|
|
|
| void FrameView::removeBackgroundAttachmentFixedObject(LayoutObject* object) {
|
| @@ -1492,8 +1496,12 @@ void FrameView::removeBackgroundAttachmentFixedObject(LayoutObject* object) {
|
| scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidChange(
|
| this);
|
|
|
| - // TODO(pdr): When slimming paint v2 is enabled, invalidate the scroll paint
|
| - // property subtree for this so main thread scroll reasons are recomputed.
|
| + // Ensure main thread scrolling reasons are recomputed.
|
| + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| + setNeedsPaintPropertyUpdate();
|
| + // The object's scroll properties are not affected by its own background.
|
| + object->setAllAncestorsNeedPaintPropertyUpdate();
|
| + }
|
| }
|
|
|
| void FrameView::addViewportConstrainedObject(LayoutObject* object) {
|
| @@ -1599,6 +1607,17 @@ void FrameView::invalidateBackgroundAttachmentFixedObjects() {
|
| layoutObject->setShouldDoFullPaintInvalidation();
|
| }
|
|
|
| +bool FrameView::hasBackgroundAttachmentFixedDescendants(
|
| + const LayoutObject& object) const {
|
| + for (const auto* potentialDescendant : m_backgroundAttachmentFixedObjects) {
|
| + if (potentialDescendant == &object)
|
| + continue;
|
| + if (potentialDescendant->isDescendantOf(&object))
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| bool FrameView::invalidateViewportConstrainedObjects() {
|
| bool fastPathAllowed = true;
|
| for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects) {
|
|
|