tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 7c720e00e260d6bd0e9ace6238e966716f9b278a
parent 29f0c3cd54d66cefd2a7899060b02a7c603b01eb
Author: Botond Ballo <botond@mozilla.com>
Date:   Tue, 25 Nov 2025 04:50:45 +0000

Bug 2001862 - Make WebRenderScrollData building more flexible in the kinds of ASR structures in can handle. r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D273759

Diffstat:
Mgfx/layers/wr/WebRenderCommandBuilder.cpp | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gfx/layers/wr/WebRenderCommandBuilder.cpp b/gfx/layers/wr/WebRenderCommandBuilder.cpp @@ -2138,13 +2138,16 @@ void WebRenderCommandBuilder::CreateWebRenderCommandsFromDisplayList( newLayerData->mLayerCountBeforeRecursing = mLayerScrollData.size(); newLayerData->mStopAtAsr = mAsrStack.empty() ? nullptr : mAsrStack.back(); + newLayerData->mStopAtAsr = ActiveScrolledRoot::LowestCommonAncestor( + asr, newLayerData->mStopAtAsr); newLayerData->ComputeDeferredTransformInfo(aSc, item); - // Ensure our children's |stopAtAsr| is not be an ancestor of our + // Our children's |stopAtAsr| must not be an ancestor of our // |stopAtAsr|, otherwise we could get cyclic scroll metadata // annotations. - const ActiveScrolledRoot* stopAtAsrForChildren = - ActiveScrolledRoot::PickDescendant(asr, newLayerData->mStopAtAsr); + MOZ_ASSERT( + ActiveScrolledRoot::IsAncestor(newLayerData->mStopAtAsr, asr)); + const ActiveScrolledRoot* stopAtAsrForChildren = asr; // Additionally, while unusual and probably indicative of a poorly // behaved display list, it's possible to have a deferred transform item // which we will emit as its own layer on the way out of the recursion,