Closed Bug 1563178 Opened 5 months ago Closed 5 months ago

document splitting: odd overflow behaviour in search / URL bar


(Core :: Graphics: WebRender, defect, P2)




Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- disabled
firefox70 --- verified


(Reporter: bugzilla, Assigned: kats)


(Blocks 1 open bug, Regression)


(Keywords: correctness, nightly-community, regression)


(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

  1. enable webrender and gfx.webrender.split-render-roots
  2. keep typing in URL or search bar until it overflows

Actual results:

as you keep typing the text starts to move towards the end of the text field (see attached video)

Expected results:

Text field should behave normally

OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Ever confirmed: true

Confirmed this happens on Windows nightly as well with document splitting turned on.

Flags: needinfo?(dothayer)
OS: Linux → All
Priority: -- → P2
Hardware: Desktop → All

mozregression --good 2019-05-01 --bad 2019-07-02 --pref gfx.webrender.all:true gfx.webrender.split-render-roots:true -a about:preferences#search

9:33.90 INFO: Last good revision: 6c6b0bbf5885493a0b85cedf1985d6eb3bdbfe6f
9:33.90 INFO: First bad revision: 5a18f5c929ab13bde25f7fff8ae72f87e8fa379c
9:33.90 INFO: Pushlog:

5a18f5c929ab13bde25f7fff8ae72f87e8fa379c Doug Thayer — Bug 1549976 - Implement popover render root r=kats,Gijs

Assignee: nobody → kats

I've been poking around at this all day. I made some progress, in that I discovered this patch seems to fix things, although I have no idea why:

diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp
index acd2c0dd32cd..cd1729f51778 100644
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -6999,16 +6999,17 @@ bool nsDisplayRenderRoot::UpdateScrollData(
   // establishing a render root boundary (i.e. if mRenderRoot ==
   // aBuilder.GetRenderRoot()). But we don't have aBuilder here so we can't do
   // that. Returning true unconditionally is suboptimal but still correct.
   if (aLayerData) {
     if (mBoundary) {
       // Scroll data entries that are referents should never have direct
       // descendants. Instead they will refer to a different subtree
       MOZ_ASSERT(aLayerData->GetDescendantCount() == 0);
+if (mRenderRoot != wr::RenderRoot::Popover)
   return true;
 bool nsDisplayRenderRoot::CreateWebRenderCommands(
     mozilla::wr::DisplayListBuilder& aBuilder,

It's weird because all this does is skip setting the referent render root on one of the scroll data entries, that links the default document's scrolldata to the popover scroll data tree. But the popover scroll data tree is empty anyway (with these STR anyway) so this should have no effect. And yet it does, somehow.

I tried doing an equivalent change on the compositor side, by adding a && mLayer->GetReferentRenderRoot()->GetChildType() != wr::RenderRoot::Popover clause to this if condition but that did not fix the problem. So it's even doubly puzzling.

I'll keep digging.

Ah, the problem is here - the render root management during the recursive tree walk is not correct. It was copy/pasted from the layers id management, but the layers id gets reset on unwinding the stack here while the render root isn't reset anywhere.

Flags: needinfo?(dothayer)

The APZ tree walk is recursive but the render root was not being updated when
walking up out of a subtree with a different render root. This changes the
code to use a stack and push/pop the render root for subtrees as we enter
and exit the subtrees as part of the tree walk.

Pushed by
Properly manage the renderRoot variable during the APZ tree walk. r=botond
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Flags: qe-verify+

Reproduced the issue with Firefox 69.0a1 (20190703162038) on Windows 10x64. The issue is verified fixed with Firefox 70.0b9 (20190923154733) on Windows 10x64, Ubuntu 18.04 and macOS 10.14.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.