diff options
Diffstat (limited to '')
-rw-r--r-- | gfx/layers/FrameMetrics.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index 6b7a41bf25..5d13d36703 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -243,11 +243,9 @@ struct FrameMetrics { } /* - * Returns true if the layout scroll offset or visual scroll offset changed - * and returns the visual scroll offset change delta. + * Returns true if the layout scroll offset or visual scroll offset changed. */ - std::pair<bool, CSSPoint> ApplyAbsoluteScrollUpdateFrom( - const ScrollPositionUpdate& aUpdate); + bool ApplyScrollUpdateFrom(const ScrollPositionUpdate& aUpdate); /** * Applies the relative scroll offset update contained in aOther to the @@ -893,6 +891,12 @@ struct ScrollMetadata { mScrollUpdates.AppendElements(std::move(aUpdates)); } + void PrependUpdates(const nsTArray<ScrollPositionUpdate>& aUpdates) { + MOZ_ASSERT(!aUpdates.IsEmpty()); + + mScrollUpdates.InsertElementsAt(0, aUpdates); + } + private: FrameMetrics mMetrics; |