Closed Bug 1456938 Opened 6 years ago Closed 5 years ago

Nested sticky position inhibits scrolling, asserts in ActiveScrolledRoot::PickDescendant() in a debug build

Categories

(Core :: Web Painting, defect, P3)

61 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: hi, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180423100754

Steps to reproduce:

1. Go to testcase -> http://output.jsbin.com/nibenel/1
2. Attempt to scroll any of the columns vertically.

Though the testcase has quite a particular layout, utilizing negative margins, visibility hidden, and hidden scrollbars, the bug doesn't come about from these factors and seems to solely be related to using nested sticky positioned elements.


Actual results:

Scrolling mostly doesn't work when mouse is above the content of the columns, the blue blocks. Scrolling only works when mouse is at the top of the page, the white area. 


Expected results:

Scrolling anywhere within the scrolling columns should behave normally. Check Chromes behavior in the test case.
WFM with WR enabled, but can repro with WR disabled, so likely a Graphics issue.
Status: UNCONFIRMED → NEW
Component: Layout → Graphics
Ever confirmed: true
Ahh nice catch. Though enabling WebRender seems to *fix scrolling interactions from the pointer side, it creates SCR positioning paint glitches mid scroll.
Component: Graphics → Panning and Zooming
Works fine for me on Linux with WR disabled.
Curiously, I can reproduce it in a clean profile.
Mozregression turned up this regression range:

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8ff550409e1d1f8b54f6f7f115545dbef857be0b&tochange=24d9eb148461bb4789848b9880867c63c783a2ca

Unfortunately, the range is too old to bisect further (the taskcluster builds for individual pushes no longer exist).
Loading this page in a debug build, I get an assertion in Layout code:

Assertion failure: IsAncestor(aOne, aTwo) || IsAncestor(aTwo, aOne), at /home/botond/dev/mozilla/central/objdir-desktop-clang/dist/include/nsDisplayList.h:292

Relevant part of stack trace:

#7  0x00007efca8ce8c1a in mozilla::ActiveScrolledRoot::PickDescendant(mozilla::ActiveScrolledRoot const*, mozilla::ActiveScrolledRoot const*) (aOne=0x7efc9d6da040, aTwo=0x7efca0f59080)
    at /home/botond/dev/mozilla/central/objdir-desktop-clang/dist/include/nsDisplayList.h:292
#8  0x00007efcac300d24 in mozilla::ContainerState::ProcessDisplayItems(nsDisplayList*) (this=0x7fffe73302b0, aList=0x7efc9c603338)
    at /home/botond/dev/mozilla/central/layout/painting/FrameLayerBuilder.cpp:4608
#9  0x00007efcac306965 in mozilla::FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder*, mozilla::layers::LayerManager*, nsIFrame*, nsDisplayItem*, nsDisplayList*, mozilla::ContainerLayerParameters const&, mozilla::gfx::Matrix4x4Typed<mozilla::gfx::UnknownUnits, mozilla::gfx::UnknownUnits> const*, unsigned int) (this=0x7efca4f13c80, aBuilder=0x7efc9d6c4000, aManager=0x7efcbe5a8e60, aContainerFrame=0x7efca0fc3960, aContainerItem=0x7efc9c6032a0, aChildren=0x7efc9c603338, aParameters=..., aTransform=0x0, aFlags=1)
    at /home/botond/dev/mozilla/central/layout/painting/FrameLayerBuilder.cpp:5981
#10 0x00007efcac346d42 in nsDisplayOwnLayer::BuildLayer(nsDisplayListBuilder*, mozilla::layers::LayerManager*, mozilla::ContainerLayerParameters const&) (this=0x7efc9c6032a0, aBuilder=0x7efc9d6c4000, aManager=0x7efcbe5a8e60, aContainerParameters=...) at /home/botond/dev/mozilla/central/layout/painting/nsDisplayList.cpp:6989
#11 0x00007efcac3483a0 in nsDisplayFixedPosition::BuildLayer(nsDisplayListBuilder*, mozilla::layers::LayerManager*, mozilla::ContainerLayerParameters const&) (this=0x7efc9c6032a0, aBuilder=0x7efc9d6c4000, aManager=0x7efcbe5a8e60, aContainerParameters=...) at /home/botond/dev/mozilla/central/layout/painting/nsDisplayList.cpp:7316
#12 0x00007efcac300e91 in mozilla::ContainerState::ProcessDisplayItems(nsDisplayList*) (this=0x7fffe7331930, aList=0x7efc9d6c6808)
    at /home/botond/dev/mozilla/central/layout/painting/FrameLayerBuilder.cpp:4636
#13 0x00007efcac306965 in mozilla::FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder*, mozilla::layers::LayerManager*, nsIFrame*, nsDisplayItem*, nsDisplayList*, mozilla::ContainerLayerParameters const&, mozilla::gfx::Matrix4x4Typed<mozilla::gfx::UnknownUnits, mozilla::gfx::UnknownUnits> const*, unsigned int) (this=0x7efca4f13c80, aBuilder=0x7efc9d6c4000, aManager=0x7efcbe5a8e60, aContainerFrame=0x7efc9d31c020, aContainerItem=0x0, aChildren=0x7efc9d6c6808, aParameters=..., aTransform=0x0, aFlags=0)
    at /home/botond/dev/mozilla/central/layout/painting/FrameLayerBuilder.cpp:5981
#14 0x00007efcac335236 in nsDisplayList::BuildLayers(nsDisplayListBuilder*, mozilla::layers::LayerManager*, unsigned int, bool) (this=0x7efc9d6c6808, aBuilder=0x7efc9d6c4000, aLayerManager=0x7efcbe5a8e60, aFlags=13, aIsWidgetTransaction=true) at /home/botond/dev/mozilla/central/layout/painting/nsDisplayList.cpp:2529
#15 0x00007efcac3360e6 in nsDisplayList::PaintRoot(nsDisplayListBuilder*, gfxContext*, unsigned int) (this=0x7efc9d6c6808, aBuilder=0x7efc9d6c4000, aCtx=0x0, aFlags=13)
    at /home/botond/dev/mozilla/central/layout/painting/nsDisplayList.cpp:2740
#16 0x00007efcabf32f6a in nsLayoutUtils::PaintFrame(gfxContext*, nsIFrame*, nsRegion const&, unsigned int, nsDisplayListBuilderMode, nsLayoutUtils::PaintFrameFlags) (aRenderingContext=0x0, aFrame=0x7efc9d31c020, aDirtyRegion=..., aBackstop=0, aBuilderMode=nsDisplayListBuilderMode::PAINTING, aFlags=(nsLayoutUtils::PaintFrameFlags::PAINT_WIDGET_LAYERS | nsLayoutUtils::PaintFrameFlags::PAINT_EXISTING_TRANSACTION | nsLayoutUtils::PaintFrameFlags::PAINT_NO_COMPOSITE)) at /home/botond/dev/mozilla/central/layout/base/nsLayoutUtils.cpp:3953
#17 0x00007efcabea86f4 in mozilla::PresShell::Paint(nsView*, nsRegion const&, unsigned int) (this=0x7efc9d399000, aViewToPaint=0x7efc9d313c00, aDirtyRegion=..., aFlags=1)
    at /home/botond/dev/mozilla/central/layout/base/PresShell.cpp:6328
#18 0x00007efcabb280fd in nsViewManager::ProcessPendingUpdatesPaint(nsIWidget*) (this=0x7efc9d340ac0, aWidget=0x7efca106f800) at /home/botond/dev/mozilla/central/view/nsViewManager.cpp:480
#19 0x00007efcabb27d02 in nsViewManager::ProcessPendingUpdatesForView(nsView*, bool) (this=0x7efc9d340ac0, aView=0x7efc9d313c00, aFlushDirtyRegion=true)
    at /home/botond/dev/mozilla/central/view/nsViewManager.cpp:412
#20 0x00007efcabb28d4e in nsViewManager::ProcessPendingUpdates() (this=0x7efc9d340ac0) at /home/botond/dev/mozilla/central/view/nsViewManager.cpp:1102
#21 0x00007efcabe6cc09 in nsRefreshDriver::Tick(long, mozilla::TimeStamp) (this=0x7efc9d373000, aNowEpoch=1525718262164317, aNowTime=...)
    at /home/botond/dev/mozilla/central/layout/base/nsRefreshDriver.cpp:2067

I think it's likely (though not certain) that the bad behaviour is related to the assertion. In any case, fixing the assertion failure is a good first step.
Component: Panning and Zooming → Layout: Web Painting
Might be the same root cause as bug 1449770
See Also: → 1449770
Oh, indeed, that's the same assertion!
Summary: Nested sticky position inhibits scrolling → Nested sticky position inhibits scrolling, asserts in ActiveScrolledRoot::PickDescendant() in a debug build
Blocks: APZLayout
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME

Likely fixed by the rollout of containerless scrolling on Android (bug 1137890).

You need to log in before you can comment on or make changes to this bug.