[go: up one dir, main page]

Page MenuHomePhabricator

Bug 1874826 - Add more tests for paint/layout containment change and floats. r=#layout
ClosedPublic

Authored by fredw on Jan 18 2024, 3:56 PM.
Referenced Files
Unknown Object (File)
Mon, Jan 5, 5:56 PM
Unknown Object (File)
Mon, Jan 5, 5:56 PM
Unknown Object (File)
May 20 2025, 11:05 AM
Unknown Object (File)
Apr 23 2025, 7:25 PM
Unknown Object (File)
Apr 15 2025, 5:06 AM
Unknown Object (File)
Mar 17 2025, 6:19 AM
Unknown Object (File)
Jan 2 2025, 9:50 PM
Subscribers

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.

These tests currently passes and they break if we don't force reconstruct below, so I guess we might need to mark lines dirty at the end:

diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp
index fe1230878ee65..dce6e107b1294 100644
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1570,7 +1570,7 @@ static void TryToHandleBlockFormattingContextChange(nsChangeHint& aHint,
       // FIXME(bug 1874826): If we could fix this up rather than reconstructing,
       // we could move all this logic to nsBlockFrame::DidSetComputedStyle, and
       // remove UpdateBFC.
-      aHint |= nsChangeHint_ReconstructFrame;
+      // aHint |= nsChangeHint_ReconstructFrame;
       return;
     }
     blockFrame->AddOrRemoveStateBits(NS_BLOCK_DYNAMIC_BFC,

These tests currently passes and they break if we don't force reconstruct below, so I guess we might need to mark lines dirty at the end:

diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp
index fe1230878ee65..dce6e107b1294 100644
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1570,7 +1570,7 @@ static void TryToHandleBlockFormattingContextChange(nsChangeHint& aHint,
       // FIXME(bug 1874826): If we could fix this up rather than reconstructing,
       // we could move all this logic to nsBlockFrame::DidSetComputedStyle, and
       // remove UpdateBFC.
-      aHint |= nsChangeHint_ReconstructFrame;
+      // aHint |= nsChangeHint_ReconstructFrame;
       return;
     }
     blockFrame->AddOrRemoveStateBits(NS_BLOCK_DYNAMIC_BFC,

Cool, thanks for finding that out. That's reasonable tho.

This revision is now accepted and ready to land.Jan 18 2024, 4:39 PM

These tests currently passes and they break if we don't force reconstruct below, so I guess we might need to mark lines dirty at the end:

diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp
index fe1230878ee65..dce6e107b1294 100644
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1570,7 +1570,7 @@ static void TryToHandleBlockFormattingContextChange(nsChangeHint& aHint,
       // FIXME(bug 1874826): If we could fix this up rather than reconstructing,
       // we could move all this logic to nsBlockFrame::DidSetComputedStyle, and
       // remove UpdateBFC.
-      aHint |= nsChangeHint_ReconstructFrame;
+      // aHint |= nsChangeHint_ReconstructFrame;
       return;
     }
     blockFrame->AddOrRemoveStateBits(NS_BLOCK_DYNAMIC_BFC,

Cool, thanks for finding that out. That's reasonable tho.

Interestingly, https://phabricator.services.mozilla.com/D198931?id=810650 (moving to DidSetComputedStyle without marking lines dirty) only breaks 004 tests. And marking lines dirty as in https://phabricator.services.mozilla.com/D198931?id=810681 avoids the breakage.

I'm still not really clear which of my changes allowed to finally exhibit the issue, but anyway I guess this is good enough.... Will land the tests and wait the end of soft code freeze for the code change.