Closed Bug 1682629 Opened 5 years ago Closed 1 year ago

Enable APZ in scrollable popups without remote content

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: botond, Assigned: hiro)

References

(Blocks 4 open bugs)

Details

Attachments

(8 files)

In bug 1493208, we enabled APZ in popups with remote content.

We'd also like to enable APZ in popups without remote content, but only if they are scrollable (see discussion in bug 1562101 comment 5).

Blocks: 1844565

We'll need this to fix an S2 bug, bug 1874746.

Priority: -- → P2
Blocks: 1934722

The uploaded patches mostly work as expected at least on Linux, but the browser mochitest (D230881) fails on Mac for some reasons. I am going to debug it on Mac. Though on Mac we don't support touch screen at all, so that it's not a big deal I think.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #8)

The uploaded patches mostly work as expected at least on Linux, but the browser mochitest (D230881) fails on Mac for some reasons. I am going to debug it on Mac. Though on Mac we don't support touch screen at all, so that it's not a big deal I think.

On Mac we don't create the compositor session for popup windows having no remote content, thus we don't even try to create the APZCTreeManager there.

I am going to skip running the browser test on Mac.

Assignee: nobody → hikezoe.birchill
Attachment #9441189 - Attachment description: WIP: Bug 1682629 - Set apz.popups.enabled to false for browser_partial_prerender_animation_in_popup.js. r?botond → Bug 1682629 - Set apz.popups.enabled to false for browser_partial_prerender_animation_in_popup.js. r?botond
Status: NEW → ASSIGNED
Attachment #9441190 - Attachment description: WIP: Bug 1682629 - Drop |aWindow| argument for flushApzRepaints. r?botond → Bug 1682629 - Drop |aWindow| argument for flushApzRepaints. r?botond
Attachment #9441191 - Attachment description: WIP: Bug 1682629 - Make flushApzRepaints work for popup window. r?botond → Bug 1682629 - Make flushApzRepaints work for popup window. r?botond
Attachment #9441192 - Attachment description: WIP: Bug 1682629 - Make sendNativeTouchPoint work for popup window. r?botond → Bug 1682629 - Make sendNativeTouchPoint work for popup window. r?botond
Attachment #9441193 - Attachment description: WIP: Bug 1682629 - Enable apz for Panel/Menu popups. r?botond → Bug 1682629 - Enable apz for Panel/Menu popups. r?botond
Attachment #9441194 - Attachment description: WIP: Bug 1682629 - Add a browser mochitest to test touch events in browser popup window. r?botond → Bug 1682629 - Add a browser mochitest to test touch events in browser popup window. r?botond

(In reply to Hiroyuki Ikezoe (:hiro) from comment #9)

(In reply to Hiroyuki Ikezoe (:hiro) from comment #8)

The uploaded patches mostly work as expected at least on Linux, but the browser mochitest (D230881) fails on Mac for some reasons. I am going to debug it on Mac. Though on Mac we don't support touch screen at all, so that it's not a big deal I think.

On Mac we don't create the compositor session for popup windows having no remote content, thus we don't even try to create the APZCTreeManager there.

Note that to make the test work on Mac we also need to implement SynthesizeNativeTouchPoint for popup windows on Mac.

Attaching file is the patch, FWIW.

One more note about Mac, on Mac the popup window's WindowType is not Popup, it's Child.

There's a mochitest, test_bug1728171.html [1] excersizing native pen
events in popup context menus, so we need to make sendNativePenInput
works there before enabling APZ in the popup windows.

[1] https://searchfox.org/mozilla-central/rev/7fb746f0be47ce0135af7bca9fffdb5cd1c4b1d5/dom/events/test/test_bug1728171.html

Added D231185 in the patch series, it's just for our internal tests, it should impact on real uses.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #11)

One more note about Mac, on Mac the popup window's WindowType is not Popup, it's Child.

Hm? That doesn't sound right. Well, there's both a Popup widget and an nsChildView inside (which is a Child). I guess that's what you mean?

I don't remember exactly what I checked is probably this mPopupContentView.

Yeah, that is a Child indeed.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #12)

https://treeherder.mozilla.org/jobs?repo=try&revision=3afd05c95e67d26529a5c0c746582f5265c49b55 is a try run including all patches here on Phab.

I tested this Try build on a Linux touchscreen laptop, with the screen resolution set sufficiently low to make the application menu scrollable, and I can confirm that the application menu can be scrolled using touch input.

Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1a5ae2af03b7 Set apz.popups.enabled to false for browser_partial_prerender_animation_in_popup.js. r=botond https://hg.mozilla.org/integration/autoland/rev/00b4021a2824 Drop |aWindow| argument for flushApzRepaints. r=botond https://hg.mozilla.org/integration/autoland/rev/7b9f315333ec Make flushApzRepaints work for popup window. r=botond https://hg.mozilla.org/integration/autoland/rev/4855f60214d8 Make sendNativeTouchPoint work for popup window. r=botond https://hg.mozilla.org/integration/autoland/rev/73b0c2063498 Make sendNativePenInput work for popup window. r=botond https://hg.mozilla.org/integration/autoland/rev/3b859e813e2f Enable apz for Panel/Menu popups. r=botond,emilio https://hg.mozilla.org/integration/autoland/rev/9446114872ee Add a browser mochitest to test touch events in browser popup window. r=botond
Regressions: 1937758
Regressions: 1938265
Regressions: 1938409
Regressions: 1938520
Blocks: 1938839
Blocks: 1938840
Regressions: 1937761
Regressions: 1948522
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: