Closed Bug 2094177 Opened 10 days ago Closed 4 days ago

Assertion failure: !aAncestor (We should have exited this loop earlier), at checkouts/gecko/layout/painting/nsDisplayList.cpp:1737

Categories

(Core :: Web Painting, defect)

defect

Tracking

()

VERIFIED FIXED
163 Branch
Tracking Status
firefox162 --- wontfix
firefox163 --- verified

People

(Reporter: tsmith, Assigned: tnikkel)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase, Whiteboard: [bugmon:bisected,confirmed], [wptsync upstream])

Attachments

(1 file, 1 external file)

Attached file testcase.html —

Found while fuzzing m-c 20261116-113746045836 (--enable-debug --enable-fuzzing)

To reproduce via Grizzly Replay:

$ pip install fuzzfetch grizzly-framework --upgrade
$ python -m fuzzfetch -d --fuzzing -n firefox
$ python -m grizzly.replay.bugzilla ./firefox/firefox <bugid>

Assertion failure: !aAncestor (We should have exited this loop earlier), at checkouts/gecko/layout/painting/nsDisplayList.cpp:1737

#0 0x79ea4f13e49a in MOZ_CrashSequence /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3
#1 0x79ea4f13e49a in mozilla::nsDisplayListBuilder::CreateClipChainIntersection(mozilla::DisplayItemClipChain const*, mozilla::DisplayItemClipChain const*, mozilla::DisplayItemClipChain const*) /builds/worker/workspace/obj-build/layout/painting/./../../../../checkouts/gecko/layout/painting/nsDisplayList.cpp:1737:7
#2 0x79ea4f172ce3 in GetCurrentCombinedClipChain /builds/worker/workspace/obj-build/layout/painting/./../../../../checkouts/gecko/layout/painting/DisplayListClipState.cpp:23:41
#3 0x79ea4f172ce3 in mozilla::nsDisplayItem::nsDisplayItem(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::ActiveScrolledRoot const*) /builds/worker/workspace/obj-build/layout/painting/./../../../../checkouts/gecko/layout/painting/nsDisplayList.cpp:2703:38
#4 0x79ea4ee83405 in nsDisplayCompositorHitTestInfo /builds/worker/checkouts/gecko/layout/painting/nsDisplayList.h:4678:9
#5 0x79ea4ee83405 in mozilla::nsDisplayCompositorHitTestInfo* mozilla::MakeDisplayItemWithIndex<mozilla::nsDisplayCompositorHitTestInfo, nsIFrame>(mozilla::nsDisplayListBuilder*, nsIFrame*, unsigned short) /builds/worker/checkouts/gecko/layout/painting/nsDisplayList.h:2041:28
#6 0x79ea4f17000d in AppendNewToTopWithIndex<mozilla::nsDisplayCompositorHitTestInfo, nsIFrame> /builds/worker/workspace/obj-build/layout/painting/./../../../../checkouts/gecko/layout/painting/nsDisplayList.h:3148:27
#7 0x79ea4f17000d in AppendNewToTop<mozilla::nsDisplayCompositorHitTestInfo, nsIFrame> /builds/worker/workspace/obj-build/layout/painting/./../../../../checkouts/gecko/layout/painting/nsDisplayList.h:3141:5
#8 0x79ea4f17000d in mozilla::nsDisplayListBuilder::BuildCompositorHitTestInfoIfNeeded(nsIFrame*, mozilla::nsDisplayList*) /builds/worker/workspace/obj-build/layout/painting/./../../../../checkouts/gecko/layout/painting/nsDisplayList.cpp:2130:12
#9 0x79ea4ef5966e in nsIFrame::DisplayBackgroundUnconditional(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:2792:15
#10 0x79ea4eedc00d in nsIFrame::DisplayBorderBackgroundOutline(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:2810:21
#11 0x79ea4ee80a76 in mozilla::ScrollContainerFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/ScrollContainerFrame.cpp:3921:3
#12 0x79ea4eedd690 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4778:12
#13 0x79ea4eec58ff in DisplayLine(mozilla::nsDisplayListBuilder*, GenericLineListIterator<nsLineLink, false>&, bool, mozilla::nsDisplayListSet const&, nsBlockFrame*, mozilla::css::TextOverflow*, unsigned int, int, int&, bool&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsBlockFrame.cpp:8731:13
#14 0x79ea4eec3c7f in nsBlockFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsBlockFrame.cpp:8996:11
#15 0x79ea4eedd7f3 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4763:14
#16 0x79ea4ee81e66 in mozilla::ScrollContainerFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/ScrollContainerFrame.cpp:4247:7
#17 0x79ea4eedd7f3 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4763:14
#18 0x79ea4f012e90 in nsFieldSetFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/forms/./../../../../checkouts/gecko/layout/forms/nsFieldSetFrame.cpp:250:5
#19 0x79ea4ef5b7be in nsIFrame::BuildDisplayListForStackingContext(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayList*, bool*) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:3733:5
#20 0x79ea4eedd3c1 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4727:12
#21 0x79ea4eec58ff in DisplayLine(mozilla::nsDisplayListBuilder*, GenericLineListIterator<nsLineLink, false>&, bool, mozilla::nsDisplayListSet const&, nsBlockFrame*, mozilla::css::TextOverflow*, unsigned int, int, int&, bool&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsBlockFrame.cpp:8731:13
#22 0x79ea4eec3c7f in nsBlockFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsBlockFrame.cpp:8996:11
#23 0x79ea4eedd7f3 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4763:14
#24 0x79ea4ee81e66 in mozilla::ScrollContainerFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/ScrollContainerFrame.cpp:4247:7
#25 0x79ea4eedd7f3 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4763:14
#26 0x79ea4eec58ff in DisplayLine(mozilla::nsDisplayListBuilder*, GenericLineListIterator<nsLineLink, false>&, bool, mozilla::nsDisplayListSet const&, nsBlockFrame*, mozilla::css::TextOverflow*, unsigned int, int, int&, bool&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsBlockFrame.cpp:8731:13
#27 0x79ea4eec3c7f in nsBlockFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsBlockFrame.cpp:8996:11
#28 0x79ea4eedd7f3 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4763:14
#29 0x79ea4eec8ec8 in nsCanvasFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsCanvasFrame.cpp:392:5
#30 0x79ea4eedd7f3 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4763:14
#31 0x79ea4ee81e66 in mozilla::ScrollContainerFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/ScrollContainerFrame.cpp:4247:7
#32 0x79ea4eedd7f3 in nsIFrame::BuildDisplayListForChild(mozilla::nsDisplayListBuilder*, nsIFrame*, mozilla::nsDisplayListSet const&, mozilla::EnumSet<nsIFrame::DisplayChildFlag, unsigned int>) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:4763:14
#33 0x79ea4ee9b153 in mozilla::ViewportFrame::BuildDisplayList(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayListSet const&) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/ViewportFrame.cpp:80:3
#34 0x79ea4ef5b7be in nsIFrame::BuildDisplayListForStackingContext(mozilla::nsDisplayListBuilder*, mozilla::nsDisplayList*, bool*) /builds/worker/workspace/obj-build/layout/generic/./../../../../checkouts/gecko/layout/generic/nsIFrame.cpp:3733:5
#35 0x79ea4ee01f8b in nsLayoutUtils::PaintFrame(gfxContext*, nsIFrame*, nsRegion const&, unsigned int, mozilla::nsDisplayListBuilderMode, nsLayoutUtils::PaintFrameFlags) /builds/worker/workspace/obj-build/layout/base/./../../../../checkouts/gecko/layout/base/nsLayoutUtils.cpp:3311:15
#36 0x79ea4ed82f80 in mozilla::PresShell::PaintInternal(nsIFrame*, mozilla::WindowRenderer*, mozilla::PaintInternalFlags) /builds/worker/workspace/obj-build/layout/base/./../../../../checkouts/gecko/layout/base/PresShell.cpp:6847:5
#37 0x79ea4ed9a4b4 in mozilla::PresShell::PaintSynchronously() /builds/worker/workspace/obj-build/layout/base/./../../../../checkouts/gecko/layout/base/PresShell.cpp:12780:3
#38 0x79ea4ed3c934 in nsRefreshDriver::PaintIfNeeded() /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:2675:9
#39 0x79ea4ed3c1a7 in operator() /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:2590:60
#40 0x79ea4ed3c1a7 in void nsRefreshDriver::RunRenderingPhaseLegacy<nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsRefreshDriver::IsExtraTick)::$_14>(mozilla::RenderingPhase, nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsRefreshDriver::IsExtraTick)::$_14&&) /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:1289:3
#41 0x79ea4ed35920 in nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsRefreshDriver::IsExtraTick) /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:2588:3
#42 0x79ea4ed40cf1 in TickDriver /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:365:13
#43 0x79ea4ed40cf1 in mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver>>&) /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:343:7
#44 0x79ea4ed40bf0 in mozilla::RefreshDriverTimer::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:359:5
#45 0x79ea4ed40a9d in mozilla::VsyncRefreshDriverTimer::RunRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:954:5
#46 0x79ea4ed400ba in mozilla::VsyncRefreshDriverTimer::TickRefreshDriver(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:864:5
#47 0x79ea4ed3f416 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsyncTimerOnMainThread() /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:587:14
#48 0x79ea4dfce71b in mozilla::dom::VsyncMainChild::RecvNotify(mozilla::VsyncEvent const&, float const&) /builds/worker/checkouts/gecko/dom/ipc/VsyncMainChild.cpp:64:15
#49 0x79ea4e282ce9 in mozilla::dom::PVsyncChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/dom/ipc/./../../ipc/ipdl/PVsyncChild.cpp:241:94
#50 0x79ea4942798c in mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/glue/./../ipdl/PBackgroundChild.cpp:4975:32
#51 0x79ea493bfdee in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/obj-build/ipc/glue/./../../../../checkouts/gecko/ipc/glue/MessageChannel.cpp:1797:25
#52 0x79ea493bd374 in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, std::unique_ptr<IPC::Message, std::default_delete<IPC::Message>>) /builds/worker/workspace/obj-build/ipc/glue/./../../../../checkouts/gecko/ipc/glue/MessageChannel.cpp:1723:9
#53 0x79ea493bdd77 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/obj-build/ipc/glue/./../../../../checkouts/gecko/ipc/glue/MessageChannel.cpp:1512:3
#54 0x79ea493bed59 in mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/obj-build/ipc/glue/./../../../../checkouts/gecko/ipc/glue/MessageChannel.cpp:1614:14
#55 0x79ea49291e87 in mozilla::RunnableTask::Run() /builds/worker/workspace/obj-build/xpcom/threads/./../../../../checkouts/gecko/xpcom/threads/TaskController.cpp:756:16
#56 0x79ea49286bd5 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/workspace/obj-build/xpcom/threads/./../../../../checkouts/gecko/xpcom/threads/TaskController.cpp:1401:20
#57 0x79ea492856d7 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/workspace/obj-build/xpcom/threads/./../../../../checkouts/gecko/xpcom/threads/TaskController.cpp:1221:15
#58 0x79ea49285b45 in mozilla::TaskController::ProcessPendingMTTask(bool) /builds/worker/workspace/obj-build/xpcom/threads/./../../../../checkouts/gecko/xpcom/threads/TaskController.cpp:692:36
#59 0x79ea49291529 in operator() /builds/worker/workspace/obj-build/xpcom/threads/./../../../../checkouts/gecko/xpcom/threads/TaskController.cpp:383:37
#60 0x79ea49291529 in mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_1>::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.h:535:5
#61 0x79ea492a6dc3 in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/obj-build/xpcom/threads/./../../../../checkouts/gecko/xpcom/threads/nsThread.cpp:1319:16
#62 0x79ea492ac73f in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/obj-build/xpcom/threads/./../../../../checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:471:32
#63 0x79ea493c5c82 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/obj-build/ipc/glue/./../../../../checkouts/gecko/ipc/glue/MessagePump.cpp:105:5
#64 0x79ea49322ed1 in RunHandler /builds/worker/workspace/obj-build/ipc/chromium/./../../../../checkouts/gecko/ipc/chromium/src/base/message_loop.cc:371:3
#65 0x79ea49322ed1 in MessageLoop::Run() /builds/worker/workspace/obj-build/ipc/chromium/./../../../../checkouts/gecko/ipc/chromium/src/base/message_loop.cc:353:3
#66 0x79ea4e8e55a8 in nsBaseAppShell::Run() /builds/worker/workspace/obj-build/widget/./../../../checkouts/gecko/widget/nsBaseAppShell.cpp:151:27
#67 0x79ea4e9cc8d4 in nsAppShell::Run() /builds/worker/workspace/obj-build/widget/gtk/./../../../../checkouts/gecko/widget/gtk/nsAppShell.cpp:581:33
#68 0x79ea4fac431b in XRE_RunAppShell() /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:636:20
#69 0x79ea493c6b74 in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/obj-build/ipc/glue/./../../../../checkouts/gecko/ipc/glue/MessagePump.cpp:233:19
#70 0x79ea49322ed1 in RunHandler /builds/worker/workspace/obj-build/ipc/chromium/./../../../../checkouts/gecko/ipc/chromium/src/base/message_loop.cc:371:3
#71 0x79ea49322ed1 in MessageLoop::Run() /builds/worker/workspace/obj-build/ipc/chromium/./../../../../checkouts/gecko/ipc/chromium/src/base/message_loop.cc:353:3
#72 0x79ea4fac37b4 in XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:574:34
#73 0x5a08ac6b407c in main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:469:22
Flags: in-testsuite?

Verified bug as reproducible on mozilla-central 20261117224520-8dc8a7e06422.
Unable to bisect testcase (failed to find build near 113746045836).

Whiteboard: [bugmon:bisected,confirmed]
See Also: → 2089757
Flags: needinfo?(tnikkel)
Assignee: nobody → tnikkel

Emilio, I'd like your thoughts on an approach here before putting it up for review.

The crash happens because abspos descendants of the rendered legend get the fieldset's inner frame as their containing block, but the legend isn't inside the inner frame, it's a sibling of it. So the containing block isn't an ancestor of the placeholder, which display list building assumes.

The patch I'm trying makes the fieldset itself the containing block for abspos descendants of the rendered legend, and leaves the inner frame as the containing block for everything else. This is what Mats suggested in bug 1535996 comment 4, and it fixes the testcases in that bug too.

As far as I can tell the spec doesn't determine which box should be the containing block here. This is what Chrome does, and with the patch we match Chrome. Safari is completely different: it has no anonymous content box, so the fieldset itself scrolls and is the containing block for all abspos descendants.

Try looks good. Does this seem like a reasonable direction?

Flags: needinfo?(emilio)

That looks sensible to me (as weird as fieldset / legend is)

Flags: needinfo?(emilio)
See Also: → 1535996
Flags: needinfo?(tnikkel)

When a positioned fieldset is the abspos containing block we use its inner
frame instead, so that abspos content scrolls with the fieldset's content.

https://searchfox.org/firefox-main/rev/77bdc2893ade1d2e9029d11fc4fe261fc310fe54/layout/base/nsCSSFrameConstructor.cpp#5359-5361

But the rendered legend is not inside the inner frame, it is a sibling of it,
so abspos descendants of the legend get a containing block that is not an
ancestor of their placeholder. Display list building relies on that
relationship. nsFieldSetFrame builds the inner frame before the legend to
cope with it,

https://searchfox.org/firefox-main/rev/77bdc2893ade1d2e9029d11fc4fe261fc310fe54/layout/forms/nsFieldSetFrame.cpp#237-244

but when both the inner frame and the legend (or something in it) scroll,
the abspos's saved clip chain is on a different ASR branch from where it is
built, and we hit the !aAncestor assertion in CreateClipChainIntersection.

Blink makes the fieldset itself the containing block for abspos descendants
of the rendered legend, and the anonymous content box the containing block
for everything else. WebKit has no anonymous content box and uses the
fieldset for both. So do what Blink does. These abspos elements now resolve
against the fieldset's padding box and don't scroll with the fieldset's
content, matching Chrome. This is the change suggested in bug 1535996
comment 4, and it fixes the testcases there.

Pushed by tnikkel@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/64325180000c https://hg.mozilla.org/integration/autoland/rev/17886332d6ac Make the fieldset the containing block for abspos descendants of its rendered legend. r=layout-reviewers,emilio

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/65588 for changes under testing/web-platform/tests

Whiteboard: [bugmon:bisected,confirmed] → [bugmon:bisected,confirmed], [wptsync upstream]
Status: NEW → RESOLVED
Closed: 4 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch

Upstream PR merged by moz-wptsync-bot

Verified bug as fixed on rev mozilla-central 20261123125058-c28bf988c1c6.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Status: RESOLVED → VERIFIED
Keywords: bugmon
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: