Closed Bug 1540665 Opened 5 years ago Closed 5 years ago

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

Categories

(Core :: Panning and Zooming, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Fission Milestone M2
Tracking Status
firefox68 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.

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)

I'll take a look. Thanks.

Flags: needinfo?(hsivonen)
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Fission Milestone: --- → M2
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c91075dffe6
Propagate chrome flags to out-of-process iframes. r=nika
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: