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

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

Issue 2431473003: Intersection Observer support for OOPIF (Closed)
Patch Set: dcheng comments addressed 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 47517031fb0df30b62b0d5d9b144923ef2b6f379..871ed5d78b12b71f51a9ab69364886604059d237 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"
@@ -87,6 +88,7 @@ class PaintInvalidationState;
class Page;
class ScrollingCoordinator;
class TracedValue;
+class TransformState;
struct AnnotatedRegionValue;
struct CompositedSelection;
@@ -803,6 +805,28 @@ 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(
+ LayoutRect&,
+ const LayoutObject* descendant,
+ const LayoutView* ancestor,
+ MapCoordinatesFlags mode);
+
+ bool mapToVisualRectInTopFrameSpace(LayoutRect&);
+
+ void applyTransformForTopFrameSpace(TransformState&);
+
protected:
// Scroll the content via the compositor.
bool scrollContentsFastPath(const IntSize& scrollDelta);
@@ -1156,6 +1180,8 @@ class CORE_EXPORT FrameView final
Member<ElementVisibilityObserver> m_visibilityObserver;
+ IntRect m_remoteViewportIntersection;
+
// For testing.
struct ObjectPaintInvalidation {
String name;
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/site-per-process ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698