Open Bug 1597318 Opened 5 months ago Updated 1 month ago

Find and get rid of XBL sync binding hacks in front-end code

Categories

(Firefox :: General, task, P3)

task

Tracking

()

People

(Reporter: mconley, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxperf:p3])

When XBL was a thing, it used Layout semantics to determine when to attach a binding.

This resulted in "interesting" behaviour, where one would either have to wait for layout to run before calling into binding code, or force layout to run synchronously.

Oftentimes, we went with the latter, using something like el.clientTop; or some such.

emilio just got rid of some of those in bug 1596800, but I think there are more.

Searching for clientTop; in searchfox yields a number of examples: https://searchfox.org/mozilla-central/search?q=clientTop%3B&path=

I'll link to some non-test ones here (excluding the one that emilio is removing in bug 1596800):

There might be more, but these are the ones I found within a few minutes of searching.

Priority: -- → P3
Whiteboard: [fxperf]

A search for binding in *.js also shows a bunch of workarounds and now-obsolete comments that aren't just the clientTop assignment.
https://searchfox.org/mozilla-central/search?q=binding&case=true&regexp=false&path=*.js

This is potentially very interesting, but I suspect we've already caught the cases that happen during user interactions we care about. The CommonDialog.jsm one seems interesting though. And there's also https://searchfox.org/mozilla-central/rev/0678172d5b5c681061b904c776b668489e3355b0/browser/components/customizableui/CustomizeMode.jsm#419

(In reply to Florian Quèze [:florian] from comment #2)

This is potentially very interesting, but I suspect we've already caught the cases that happen during user interactions we care about. The CommonDialog.jsm one seems interesting though. And there's also https://searchfox.org/mozilla-central/rev/0678172d5b5c681061b904c776b668489e3355b0/browser/components/customizableui/CustomizeMode.jsm#419

Based on this, tentatively marking fxperf:p3 for now.

Whiteboard: [fxperf] → [fxperf:p3]
You need to log in before you can comment on or make changes to this bug.