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

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

Issue 2431473003: Intersection Observer support for OOPIF (Closed)
Patch Set: Rebase only Created 3 years, 12 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 47517031fb0df30b62b0d5d9b144923ef2b6f379..1947fd18d51c9905d2514f8d72558635b6cbb91c 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -31,6 +31,7 @@
#include "core/frame/FrameViewAutoSizeInfo.h"
#include "core/frame/LayoutSubtreeRootList.h"
#include "core/frame/RootFrameViewport.h"
+#include "core/layout/MapCoordinatesFlags.h"
#include "core/layout/ScrollAnchor.h"
#include "core/paint/FirstMeaningfulPaintDetector.h"
#include "core/paint/ObjectPaintProperties.h"
@@ -803,6 +804,24 @@ class CORE_EXPORT FrameView final
bool hasVisibleSlowRepaintViewportConstrainedObjects() const;
+ // Called on a view for a LocalFrame with a RemoteFrame parent. This makes
+ // viewport intersection available that accounts for remote ancestor frames
+ // and their respective scroll positions, clips, etc.
+ void setViewportIntersectionFromParent(const IntRect&);
+ IntRect remoteViewportIntersection();
+
+ // This method uses localToAncestorQuad to map a rect into an ancestor's
+ // coordinate space, while guaranteeing that the top-level scroll offset
+ // is accounted for. This is needed because LayoutView::mapLocalToAncestor()
+ // implicitly includes the ancestor frame's scroll offset when there is
+ // a remote frame in the ancestor chain, but does not include it when
+ // there are only local frames in the frame tree.
+ void mapQuadToAncestorFrameIncludingScrollOffset(
dcheng 2017/01/05 07:10:19 Can we inline this directly, since it's only used
szager1 2017/01/05 20:25:22 This is a generally useful method, I expect it to
+ LayoutRect&,
+ const LayoutObject* descendant,
+ const LayoutView* ancestor,
+ MapCoordinatesFlags mode);
+
protected:
// Scroll the content via the compositor.
bool scrollContentsFastPath(const IntSize& scrollDelta);
@@ -1156,6 +1175,8 @@ class CORE_EXPORT FrameView final
Member<ElementVisibilityObserver> m_visibilityObserver;
+ IntRect m_remoteViewportIntersection;
+
// For testing.
struct ObjectPaintInvalidation {
String name;

Powered by Google App Engine
This is Rietveld 408576698