commit e4cfc7d3e0b15330d8ee87620d8bb3597e7d8ac5
parent 29fc55bd500c0c18f94dee84775c583fab74b8d6
Author: Cristina Horotan <chorotan@mozilla.com>
Date: Sun, 23 Nov 2025 07:20:26 +0200
Revert "Bug 2001802. Ensure that DisablePartialUpdates gets cleared if we do a full rebuild. r=layout-reviewers,emilio" for causing Wr failures nsFrameList::ContinueRemoveFrame related
This reverts commit 29fc55bd500c0c18f94dee84775c583fab74b8d6.
Diffstat:
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
@@ -3084,12 +3084,6 @@ void nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
DL_LOGI("Partial updates are disabled");
metrics->mPartialUpdateResult = PartialUpdateResult::Failed;
metrics->mPartialUpdateFailReason = PartialUpdateFailReason::Disabled;
-
- // Now that we've decided to do a full rebuild make sure to clear the
- // disable partial updates bool so that we can maybe attempt a partial
- // update on the paint after this one (if it doesn't get disabled again
- // during this paint).
- builder->SetDisablePartialUpdates(false);
}
// Rebuild the full display list if the partial display list build failed.
diff --git a/layout/painting/RetainedDisplayListBuilder.cpp b/layout/painting/RetainedDisplayListBuilder.cpp
@@ -1265,15 +1265,6 @@ bool RetainedDisplayListBuilder::ComputeRebuildRegion(
bool RetainedDisplayListBuilder::ShouldBuildPartial(
nsTArray<nsIFrame*>& aModifiedFrames) {
- // We don't support retaining with overlay scrollbars, since they require
- // us to look at the display list and pick the highest z-index, which
- // we can't do during partial building.
- if (mBuilder.DisablePartialUpdates()) {
- mBuilder.SetDisablePartialUpdates(false);
- Metrics()->mPartialUpdateFailReason = PartialUpdateFailReason::Disabled;
- return false;
- }
-
if (mList.IsEmpty()) {
// Partial builds without a previous display list do not make sense.
Metrics()->mPartialUpdateFailReason = PartialUpdateFailReason::EmptyList;
@@ -1287,6 +1278,15 @@ bool RetainedDisplayListBuilder::ShouldBuildPartial(
return false;
}
+ // We don't support retaining with overlay scrollbars, since they require
+ // us to look at the display list and pick the highest z-index, which
+ // we can't do during partial building.
+ if (mBuilder.DisablePartialUpdates()) {
+ mBuilder.SetDisablePartialUpdates(false);
+ Metrics()->mPartialUpdateFailReason = PartialUpdateFailReason::Disabled;
+ return false;
+ }
+
for (nsIFrame* f : aModifiedFrames) {
MOZ_ASSERT(f);