tor-browser

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

commit 0aa4fc38d85850757efb61a0c6c9a2e0b2c36dce
parent 07d46777f0a774e822e281b98adf0df5d575a00b
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Thu, 18 Dec 2025 10:34:25 +0000

Bug 2006804 - Properly skip over invalid fallbacks. r=jwatt

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

Diffstat:
Mlayout/generic/AbsoluteContainingBlock.cpp | 16++++++++--------
Dtesting/web-platform/meta/css/css-anchor-position/position-try-fallbacks-limit.html.ini | 3---
2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/layout/generic/AbsoluteContainingBlock.cpp b/layout/generic/AbsoluteContainingBlock.cpp @@ -1166,15 +1166,15 @@ void AbsoluteContainingBlock::ReflowAbsoluteFrame( nextFallbackStyle = aPresContext->StyleSet()->ResolvePositionTry( *aKidFrame->GetContent()->AsElement(), *aKidFrame->Style(), *nextFallback); - if (!nextFallbackStyle) { - // No @position-try rule for this name was found, per spec we should - // skip it. - aIndex++; - if (aIndex >= fallbacks.Length()) { - return false; - } + if (nextFallbackStyle) { + break; + } + // No @position-try rule for this name was found, per spec we should + // skip it. + aIndex++; + if (aIndex >= fallbacks.Length()) { + return false; } - break; } currentFallbackIndex = Some(aIndex); currentFallback = nextFallback; diff --git a/testing/web-platform/meta/css/css-anchor-position/position-try-fallbacks-limit.html.ini b/testing/web-platform/meta/css/css-anchor-position/position-try-fallbacks-limit.html.ini @@ -1,3 +0,0 @@ -[position-try-fallbacks-limit.html] - [Try fallbacks which are not found are not part of the limit] - expected: FAIL