diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /gfx/layers/wr/WebRenderScrollData.cpp | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/wr/WebRenderScrollData.cpp')
-rw-r--r-- | gfx/layers/wr/WebRenderScrollData.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gfx/layers/wr/WebRenderScrollData.cpp b/gfx/layers/wr/WebRenderScrollData.cpp index 538df8bdef..905b7e1de0 100644 --- a/gfx/layers/wr/WebRenderScrollData.cpp +++ b/gfx/layers/wr/WebRenderScrollData.cpp @@ -370,6 +370,22 @@ void WebRenderScrollData::ApplyUpdates(ScrollUpdatesMap&& aUpdates, mPaintSequenceNumber = aPaintSequenceNumber; } +void WebRenderScrollData::PrependUpdates( + const WebRenderScrollData& aPreviousData) { + for (auto previousMetadata : aPreviousData.mScrollMetadatas) { + const nsTArray<ScrollPositionUpdate>& previousUpdates = + previousMetadata.GetScrollUpdates(); + if (previousUpdates.IsEmpty()) { + continue; + } + + if (Maybe<size_t> index = + HasMetadataFor(previousMetadata.GetMetrics().GetScrollId())) { + mScrollMetadatas[*index].PrependUpdates(previousUpdates); + } + } +} + void WebRenderScrollData::DumpSubtree(std::ostream& aOut, size_t aIndex, const std::string& aIndent) const { aOut << aIndent; |