Open Bug 1488953 Opened 7 years ago Updated 5 months ago

Make scrollport events use something other than WillPaintObserver, and remove WillPaintObservers.

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

REOPENED

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(4 files)

There's no good reason for them now that scroll events don't use them anymore. See bug 1488871.
Flags: needinfo?(emilio)
This is consistent with the scroll area events too, and allows us to remove the WillPaintObserver stuff.
Assignee: nobody → emilio
Flags: needinfo?(emilio)
Comment on attachment 9007241 [details] Bug 1488953 - Use script runner for scrollport events. Mats Palmgren (:mats) has approved the revision.
Attachment #9007241 - Flags: review+
Priority: -- → P3

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:emilio, could you have a look please?

Flags: needinfo?(emilio)

Yes, we're all aware of this.

Flags: needinfo?(emilio)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:emilio, could you have a look please?

Flags: needinfo?(emilio)

FFS

Flags: needinfo?(emilio)

I will take over for landing the patch. The patch makes browser_tabCloseSpacer.js fail on Window.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1a544c5f90b775c9c659ac102d51c7e36dca815f&selectedJob=249128288

Flags: needinfo?(hikezoe)

There are two failure causes in browser_tabCloseSpacer.js. I can reproduce the failure in the try in comment 7 on local linux box with debug build, and also I found another failure case that is actually a timeout (see this TV for example). So the causes are;

  1. we proceed the test during the last tab is still scrolled into view
    this makes the test frequently fail on debug builds on TV runs, I think this is a pre-existing issue in the test itself
  2. sometimes scrolling the last tab into view stops on race conditions so that the close button on the last tab isn't visible at all
    this makes the test intermittently fail on opt builds on TV runs, to be honest I haven't dug in detail what the condition causes the situation, but you can see this issue on the current nightly to open a number of tabs by keeping pressing Ctrl+t, so I am pretty sure this is a pre-existing issue (or it might not be an issue at all)

To avoid 1), we can wait for a scrollend event there, to avoid 2) we can disable smooth scrolling for the scrollbox, browser_overflowScroll.js does the same thing.

A try with the above two changes looks good.

browser_windowopen.js failed on MacOS opt builds on a try that I pushed the last week, and I tried to reproduce the failure locally on a macbook but can't reproduce so far. But now the test in question didn't fail on a try based on the latest m-c.

So I am going to land patches in this bug as it is. Hope these patches to stick to m-c.

Flags: needinfo?(hikezoe)
Attachment #9007241 - Attachment description: Bug 1488953 - Use a script runner for scrollport events. → Bug 1488953 - Use a script runner for scrollport events. r=mats
Pushed by hikezoe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3a5cbbb9bc48 Wait for a scrollend event to make sure the scrolling has finished before proceeding the test. r=bgrins https://hg.mozilla.org/integration/autoland/rev/519acd8e145f Disable smooth scroll on tabbar scrollbox to avoid stopping scrolling the last tab on race conditions. r=bgrins https://hg.mozilla.org/integration/autoland/rev/8646ea969443 Use a script runner for scrollport events. r=mats

Sigh. I did actually miss the failure happened in my try in comment 11. The result told us that the failure happens only on MacOS 10.10 opt builds, doesn't happen on MacOS 10.14 opt builds. That's the reason why I can't reproduce the failure locally.

Anyways, I have to dive into the difference between them. :/

Flags: needinfo?(emilio) → needinfo?(hikezoe)

I was totally missing the case where the titlebar flicker which is actually the failure in browser_windowopen.js in question happens along with the urlbar flickers that I added as an exception in bug 1488871. So we need to handle the case both flickers happen at the same time.

Hey :mconley, I am sorry for bothering about browser_windowopen.js again. I am going to request you to review a patch handling the case.

Flags: needinfo?(hikezoe)

On MacOSX, especially on MacOS 10.10, the toolbar paint flush happens along
with the urlbar flickers.

Depends on D33615

Pushed by hikezoe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a638724408b Wait for a scrollend event to make sure the scrolling has finished before proceeding the test. r=bgrins https://hg.mozilla.org/integration/autoland/rev/5555e12078d3 Disable smooth scroll on tabbar scrollbox to avoid stopping scrolling the last tab on race conditions. r=bgrins https://hg.mozilla.org/integration/autoland/rev/6759badeec0e Allows toolbar background paint flash along with the urlbar flickers on MacOSX in browser_windowopen.js. r=mconley https://hg.mozilla.org/integration/autoland/rev/6b9cfebe8076 Use a script runner for scrollport events. r=mats
Regressions: 1559690
Backout by ncsoregi@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/91c42888cf7f Backed out 4 changesets for causing Bug 1559690. a=backout
Status: RESOLVED → REOPENED
Flags: needinfo?(emilio)
Resolution: FIXED → ---
Target Milestone: mozilla69 → ---

The patches from bug 1559690 were pretty close, we need to figure those out before landing this, but I don't think I have the cycles to do that right now.

Flags: needinfo?(emilio)

I am going to land D33614 and D33615 to mitigate browser_tabCloseSpacer.js failure (bug 1549985).

Keywords: leave-open
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f6e51e948711 Wait for a scrollend event to make sure the scrolling has finished before proceeding the test. r=bgrins https://hg.mozilla.org/integration/autoland/rev/381031318227 Disable smooth scroll on tabbar scrollbox to avoid stopping scrolling the last tab on race conditions. r=bgrins
Keywords: leave-open

Given that these events are non-standard and not on track to become a standard I think we should unship them.
Chrome used to support a similar but incompatible overflowchanged event, but they removed it in ~2014 according to:
https://groups.google.com/a/chromium.org/g/blink-dev/c/1RCzsyEyNU8/m/5vNpxrhRbUIJ
(I checked a recent Chrome and it's still gone.)
That indicates to me that this functionality likely isn't needed by web developers.

Thoughts?

Flags: needinfo?(emilio)

So, yeah, agreed in general, but we have also internal consumers like the url bar that we'd have to rewrite (in fact that's what made these patches so hard to land). It'd be good to add some use counters before just removing the code though.

Flags: needinfo?(emilio)

All they seem to use it for is basically a poly-fill for text-overflow:fade though:
https://searchfox.org/mozilla-central/search?q=%5Btextoverflow&path=
so we should probably prioritize implementing that...

I filed bug 1688022...

Severity: normal → S3
Attachment #9007241 - Attachment description: Bug 1488953 - Use a script runner for scrollport events. r=mats → Bug 1488953 - Use the script runner for scrollport events. r=hiro
Attachment #9007241 - Attachment description: Bug 1488953 - Use the script runner for scrollport events. r=hiro → Bug 1488953 - Use script runner for scrollport events.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/756680c06b2b Use script runner for scrollport events. r=mats

Backed out for causing bc failures

  • Backout link

  • Push with failures

  • Failure Log

  • Failure line: TEST-UNEXPECTED-FAIL | browser/base/content/test/performance/browser_tabstrip_overflow_underflow.js | unexpected reflow at MozArrowScrollbox/overflowObserver<@chrome://global/content/elements/arrowscrollbox.js hit 1 times

  • Failure Log

  • Failure line: TEST-UNEXPECTED-FAIL | browser/base/content/test/performance/browser_tabdetach.js | unexpected reflow at MozArrowScrollbox/overflowObserver<@chrome://global/content/elements/arrowscrollbox.js hit 1 times

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: