summaryrefslogtreecommitdiff
path: root/layout/generic/nsGfxScrollFrame.h
diff options
context:
space:
mode:
Diffstat (limited to 'layout/generic/nsGfxScrollFrame.h')
-rw-r--r--layout/generic/nsGfxScrollFrame.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h
index 41957d5e55..49e22b9224 100644
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -458,6 +458,11 @@ public:
return mSuppressScrollbarRepaints;
}
+
+ void ScrollAnchorWillDestroy();
+
+ void ApplyScrollAnchorOffsetAdjustment();
+
// owning references to the nsIAnonymousContentCreator-built content
nsCOMPtr<nsIContent> mHScrollbarContent;
nsCOMPtr<nsIContent> mVScrollbarContent;
@@ -472,6 +477,7 @@ public:
nsIFrame* mScrolledFrame;
nsIFrame* mScrollCornerBox;
nsIFrame* mResizerBox;
+ nsIFrame* mAnchorNode;
nsContainerFrame* mOuter;
RefPtr<AsyncScroll> mAsyncScroll;
RefPtr<AsyncSmoothMSDScroll> mAsyncSmoothMSDScroll;
@@ -500,6 +506,11 @@ public:
// other than trying to restore mRestorePos.
nsPoint mLastPos;
+ // The last scroll position of the scroll anchor node. This is in the same
+ // coordinate space as mScrollPort, that is, relative to the parent of this
+ // scrollable frame.
+ nsPoint mLastAnchorPos;
+
nsExpirationState mActivityExpirationState;
nsCOMPtr<nsITimer> mScrollActivityTimer;
@@ -619,6 +630,9 @@ protected:
bool mOldSuppressValue;
};
+ void UpdateScrollAnchor();
+ nsIFrame* SelectScrollAnchorImpl(nsIFrame* aNode);
+
/**
* @note This method might destroy the frame, pres shell and other objects.
*/
@@ -1047,6 +1061,14 @@ public:
virtual mozilla::a11y::AccType AccessibleType() override;
#endif
+ virtual void ScrollAnchorWillDestroy() override {
+ mHelper.ScrollAnchorWillDestroy();
+ }
+
+ virtual void ApplyScrollAnchorOffsetAdjustment() override {
+ mHelper.ApplyScrollAnchorOffsetAdjustment();
+ }
+
protected:
nsHTMLScrollFrame(nsStyleContext* aContext, bool aIsRoot);
void SetSuppressScrollbarUpdate(bool aSuppress) {
@@ -1471,6 +1493,14 @@ public:
virtual nsresult GetFrameName(nsAString& aResult) const override;
#endif
+ virtual void ScrollAnchorWillDestroy() override {
+ mHelper.ScrollAnchorWillDestroy();
+ }
+
+ virtual void ApplyScrollAnchorOffsetAdjustment() override {
+ mHelper.ApplyScrollAnchorOffsetAdjustment();
+ }
+
protected:
nsXULScrollFrame(nsStyleContext* aContext, bool aIsRoot,
bool aClipAllDescendants);