| Index: third_party/WebKit/Source/core/frame/FrameView.h
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h
|
| index 55f071cafc334489d06d45c50113a5303dd18096..4a6c1f5b1c0a65b4326f0717b83978756ccd544b 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.h
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.h
|
| @@ -27,6 +27,7 @@
|
|
|
| #include "core/CoreExport.h"
|
| #include "core/dom/DocumentLifecycle.h"
|
| +#include "core/dom/IntersectionObserverCallback.h"
|
| #include "core/frame/FrameViewAutoSizeInfo.h"
|
| #include "core/frame/LayoutSubtreeRootList.h"
|
| #include "core/frame/RootFrameViewport.h"
|
| @@ -591,9 +592,10 @@ public:
|
| // scheduling visual updates.
|
| bool canThrottleRendering() const;
|
| bool isHiddenForThrottling() const { return m_hiddenForThrottling; }
|
| + void setupRenderThrottling();
|
|
|
| // For testing, run pending intersection observer notifications for this frame.
|
| - void notifyRenderThrottlingObserversForTesting();
|
| + void updateRenderThrottlingStatusForTesting();
|
|
|
| // Paint properties for SPv2 Only.
|
| void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation) { m_preTranslation = preTranslation; }
|
| @@ -668,6 +670,21 @@ protected:
|
| void invalidateTreeIfNeeded(const PaintInvalidationState&);
|
|
|
| private:
|
| + class IntersectionObserverCallback : public blink::IntersectionObserverCallback {
|
| + public:
|
| + IntersectionObserverCallback(FrameView*, ExecutionContext*);
|
| +
|
| + // IntersectionObserverCallback implementation:
|
| + void handleEvent(const HeapVector<Member<IntersectionObserverEntry>>&, IntersectionObserver&) override;
|
| + ExecutionContext* getExecutionContext() const override;
|
| +
|
| + DECLARE_TRACE();
|
| +
|
| + private:
|
| + WeakMember<FrameView> m_frameView;
|
| + WeakMember<ExecutionContext> m_context;
|
| + };
|
| +
|
| explicit FrameView(LocalFrame*);
|
|
|
| void setScrollOffset(const DoublePoint&, ScrollType) override;
|
| @@ -778,9 +795,7 @@ private:
|
|
|
| void setNeedsUpdateViewportIntersection();
|
| void updateViewportIntersectionsForSubtree(DocumentLifecycle::LifecycleState targetState);
|
| - void updateViewportIntersectionIfNeeded();
|
| - void notifyRenderThrottlingObservers();
|
| - void updateThrottlingStatus();
|
| + void updateRenderThrottlingStatus(bool hidden, bool subtreeThrottled);
|
| void notifyResizeObservers();
|
|
|
| // PaintInvalidationCapableScrollableArea
|
| @@ -819,7 +834,6 @@ private:
|
| unsigned m_nestedLayoutCount;
|
| Timer<FrameView> m_postLayoutTasksTimer;
|
| Timer<FrameView> m_updateWidgetsTimer;
|
| - std::unique_ptr<CancellableTaskFactory> m_renderThrottlingObserverNotificationFactory;
|
|
|
| bool m_firstLayout;
|
| bool m_isTransparent;
|
| @@ -901,16 +915,10 @@ private:
|
| // main frame.
|
| Member<RootFrameViewport> m_viewportScrollableArea;
|
|
|
| - // This frame's bounds in the root frame's content coordinates, clipped
|
| - // recursively through every ancestor view.
|
| - IntRect m_viewportIntersection;
|
| - bool m_viewportIntersectionValid;
|
| -
|
| // The following members control rendering pipeline throttling for this
|
| // frame. They are only updated in response to intersection observer
|
| // notifications, i.e., not in the middle of the lifecycle.
|
| bool m_hiddenForThrottling;
|
| - bool m_crossOriginForThrottling;
|
| bool m_subtreeThrottled;
|
|
|
| // Paint properties for SPv2 Only.
|
| @@ -939,6 +947,8 @@ private:
|
| bool m_suppressAdjustViewSize;
|
| bool m_allowsLayoutInvalidationAfterLayoutClean;
|
|
|
| + Member<IntersectionObserver> m_intersectionObserver;
|
| +
|
| // For testing.
|
| struct ObjectPaintInvalidation {
|
| String name;
|
|
|