tor-browser

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

commit d15c07018528aa94d9f2957198c097fcc7a5c32c
parent 3fc322f731ab810388d3e195a80fc47017644c14
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Fri,  5 Dec 2025 17:35:34 +0000

Bug 2004339 - Invalidate fallback when position-try properties change. r=layout-anchor-positioning-reviewers,layout-reviewers,dshin

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

Diffstat:
Mlayout/generic/nsIFrame.cpp | 17++++++++++++++---
Dtesting/web-platform/meta/css/css-anchor-position/base-style-invalidation.html.ini | 3---
2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp @@ -835,14 +835,25 @@ void nsIFrame::HandlePrimaryFrameStyleChange(ComputedStyle* aOldStyle) { // removed, or mutated. // // Case 1 will cause a reframe, so does not need to be handled here. - // Case 2 is what is handled here. - // TODO: cases 3 and 4, see bug 1987960 and bug 1962598. + // Cases 2 and 3 are handled here. + // TODO: case 4, see bug 1987960. if (aOldStyle && HasAnyStateBits(NS_FRAME_OUT_OF_FLOW) && HasProperty(LastSuccessfulPositionFallback())) { const auto* pos = StylePosition(); const auto* oldPos = aOldStyle->StylePosition(); if (pos->mPositionTryFallbacks != oldPos->mPositionTryFallbacks || - pos->mPositionTryOrder != oldPos->mPositionTryOrder) { + pos->mPositionTryOrder != oldPos->mPositionTryOrder || + pos->mOffset != oldPos->mOffset || + pos->mAlignSelf != oldPos->mAlignSelf || + pos->mJustifySelf != oldPos->mJustifySelf || + pos->mPositionAnchor != oldPos->mPositionAnchor || + pos->mPositionArea != oldPos->mPositionArea || + pos->mMinWidth != oldPos->mMinWidth || + pos->mMinHeight != oldPos->mMinHeight || + pos->mMaxWidth != oldPos->mMaxWidth || + pos->mMaxHeight != oldPos->mMaxHeight || + pos->mWidth != oldPos->mWidth || pos->mHeight != oldPos->mHeight || + StyleMargin()->mMargin != aOldStyle->StyleMargin()->mMargin) { RemoveProperty(LastSuccessfulPositionFallback()); } } diff --git a/testing/web-platform/meta/css/css-anchor-position/base-style-invalidation.html.ini b/testing/web-platform/meta/css/css-anchor-position/base-style-invalidation.html.ini @@ -1,3 +0,0 @@ -[base-style-invalidation.html] - [The chosen position fallbacks changes when the base style differs] - expected: FAIL