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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2631853002: Give OOPIF FrameViews their own scroll animation timelines and hosts (Closed)
Patch Set: Fixes from bokan comments Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
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 983b32826d2e339f7db46b4df500c98be43a6ec5..6f32433a8c2a471b44878bdefab016589eff421d 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -40,6 +40,8 @@
#include "core/paint/ScrollbarManager.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/Widget.h"
+#include "platform/animation/CompositorAnimationHost.h"
+#include "platform/animation/CompositorAnimationTimeline.h"
#include "platform/geometry/IntRect.h"
#include "platform/geometry/LayoutRect.h"
#include "platform/graphics/Color.h"
@@ -819,6 +821,14 @@ class CORE_EXPORT FrameView final
void applyTransformForTopFrameSpace(TransformState&);
+ // TODO(kenrb): These are temporary methods pending resolution of
+ // https://crbug.com/680606. Animation timelines and hosts for scrolling
+ // are normally owned by ScrollingCoordinator, but there is only one
+ // of those objects per page. To get around this, we temporarily stash a
+ // unique timeline and host on each OOPIF FrameView.
+ void setAnimationTimeline(std::unique_ptr<CompositorAnimationTimeline>);
+ void setAnimationHost(std::unique_ptr<CompositorAnimationHost>);
+
protected:
// Scroll the content via the compositor.
bool scrollContentsFastPath(const IntSize& scrollDelta);
@@ -1190,6 +1200,10 @@ class CORE_EXPORT FrameView final
// The size of the vector depends on the number of
// main thread scrolling reasons.
Vector<int> m_mainThreadScrollingReasonsCounter;
+
+ // TODO(kenrb): Remove these when https://crbug.com/680606 is resolved.
+ std::unique_ptr<CompositorAnimationTimeline> m_animationTimeline;
+ std::unique_ptr<CompositorAnimationHost> m_animationHost;
};
inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) {

Powered by Google App Engine
This is Rietveld 408576698