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; |