Wheel and keyboard scrolling of out-of-process iframes doesn't work

RESOLVED FIXED in Firefox 68

Status

()

defect
P2
normal
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: hsivonen, Assigned: hsivonen)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Fission Milestone:M2, firefox68 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

3 months ago

Steps to reproduce

  1. Use Firefox on a system whose GPU isn't blocked under gfx.webrender.all
  2. Set gfx.webrender.picture-caching to false
  3. Set gfx.webrender.all to true
  4. Set fission.oopif.attribute to true
  5. Windows-only: Set fission.apz-matrices-with-gpu-process to true
  6. Navigate to https://hsivonen.fi/fission-scroll.html
  7. Press the tab key enough times to move focus to an iframe.
  8. Press down arrow.
  9. Move the mouse over the iframe.
  10. Turn the scroll wheel on the mouse.

Actual results

No scrolling.

Expected results

Scrolling.

Assignee

Updated

3 months ago
Blocks: 1524989

P2 because it blocks a P2

Priority: -- → P2

I started looking into this. It looks like the iframes think they're non-scrollable, because here we're setting the scrollbar style to Hidden. And that in turn seems to be coming from mDefaultScrollbarPref. Still chasing it down...

The mChromeFlags in the TabChild doesn't have the CHROME_SCROLLBARS bit. The following patch fixes the STR, but obviously we need to propagate that bit properly. Henri, do you think you can look into it from here?

diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
index ab6855d83ba8..a0c4faa6432c 100644
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -571,17 +571,17 @@ nsresult TabChild::Init(mozIDOMWindowProxy* aParent) {
     window->SetKeyboardIndicators(ShowAccelerators(), ShowFocusRings());
   } else {
     // Skip ShouldShowFocusRing check if no inner window is available
     window->SetInitialKeyboardIndicators(ShowAccelerators(), ShowFocusRings());
   }

   nsContentUtils::SetScrollbarsVisibility(
       window->GetDocShell(),
-      !!(mChromeFlags & nsIWebBrowserChrome::CHROME_SCROLLBARS));
+      true);//!!(mChromeFlags & nsIWebBrowserChrome::CHROME_SCROLLBARS));

   nsWeakPtr weakPtrThis = do_GetWeakReference(
       static_cast<nsITabChild*>(this));  // for capture by the lambda
   ContentReceivedInputBlockCallback callback(
       [weakPtrThis](const ScrollableLayerGuid& aGuid, uint64_t aInputBlockId,
                     bool aPreventDefault) {
         if (nsCOMPtr<nsITabChild> tabChild = do_QueryReferent(weakPtrThis)) {
           static_cast<TabChild*>(tabChild.get())

Just to make sure you saw comment 3.

Flags: needinfo?(hsivonen)
Assignee

Comment 5

2 months ago

I'll take a look. Thanks.

Flags: needinfo?(hsivonen)
Assignee: nobody → hsivonen

Updated

2 months ago
Status: NEW → ASSIGNED
Fission Milestone: --- → M2

Comment 8

2 months ago
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c91075dffe6
Propagate chrome flags to out-of-process iframes. r=nika

Comment 9

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee

Updated

2 months ago
Duplicate of this bug: 1540666
You need to log in before you can comment on or make changes to this bug.