commit 9063b3c208f7f5cc99cf105a6df4d9911fb7d4f7
parent 472901d51347a44527c2ed4166b55f3b728fb52d
Author: Timothy Nikkel <tnikkel@gmail.com>
Date: Wed, 26 Nov 2025 13:04:54 +0000
Bug 1988032. Disable RDL if are there active CSS anchor pos. r=layout-reviewers,emilio
Anchored content can get assigned an ASR that is "far away" from it with no relation in the frame tree. So if something about the ASR changes we need to invalidate the anchored content but that is not straight forward, and not worth it until/unless we find it causing an issue.
Differential Revision: https://phabricator.services.mozilla.com/D273601
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp
@@ -4435,6 +4435,14 @@ void nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
!PresContext()->Document()->GetActiveViewTransition()) {
scrollsWithAnchor =
AnchorPositioningUtils::GetAnchorThatFrameScrollsWith(child);
+
+ if (scrollsWithAnchor && aBuilder->IsRetainingDisplayList()) {
+ if (aBuilder->IsPartialUpdate()) {
+ aBuilder->SetPartialBuildFailed(true);
+ } else {
+ aBuilder->SetDisablePartialUpdates(true);
+ }
+ }
}
const ActiveScrolledRoot* asr =