Remove scrollToIndex
Categories
(Toolkit :: XUL Widgets, task, P5)
Tracking
()
People
(Reporter: Paolo, Assigned: jcadler)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug)
Attachments
(1 file, 1 obsolete file)
With bug 1472748 and bug 1472555 landed, there is only one test file left using the scrollToIndex method. The test can be changed, allowing the removal of the scrollToElement method as well.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
Is there a replacement recommendation for scrollToIndex? This is used a few times in c-c.
Comment 2•3 years ago
|
||
Filed bug 1476753 for TB.
| Reporter | ||
Comment 3•3 years ago
|
||
(In reply to Philipp Kewisch [:Fallen] [:📆] from comment #1) > Is there a replacement recommendation for scrollToIndex? This is used a few > times in c-c. Yes, with "richlistbox" you can use the usual DOM and CSS methods like scrollTop and getBoundingClientRect.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Is this referring only to the scrollToIndex method in richlistbox.js or also nsListControlFrame::ScrollToIndex? I see a number of callers to the latter so I'm assuming only the former?
| Reporter | ||
Comment 5•2 years ago
|
||
Yes, just the richlistbox.js method. Also, scrollToElement was already removed elsewhere in the meantime, so the fix only involves inlining the method call inside the scroll test:
https://searchfox.org/mozilla-central/search?q=scrollToIndex&case=true
Comment 6•1 year ago
|
||
Hello,
I would like to work on this. Could you please what exactly has to be done as it is not clear.
Thank you
Comment 7•1 year ago
|
||
(In reply to Shrey Gupta from comment #6)
Hello,
I would like to work on this. Could you please what exactly has to be done as it is not clear.
Thank you
Hi, here is an outline of what needs to be done:
- Remove this function https://searchfox.org/mozilla-central/rev/cfd1cc461f1efe0d66c2fdc17c024a203d5a2fd8/toolkit/content/widgets/richlistbox.js#598.
- Run
./mach build fasterand then./mach mochitest toolkit/content/tests/chrome/test_mousescroll.xhtml. This should fail. - There are two places in the test that use the helper function. Here https://searchfox.org/mozilla-central/rev/cfd1cc461f1efe0d66c2fdc17c024a203d5a2fd8/toolkit/content/tests/chrome/test_mousescroll.xhtml#106 and here https://searchfox.org/mozilla-central/source/toolkit/content/tests/chrome/test_mousescroll.xhtml#130. Both of those calls should be replaced with what that function was doing, which should translate into something like
listbox.ensureElementIsVisible(listbox.getItemAtIndex(aStart), true)in that test. After changing the test you can re-run./mach mochitest toolkit/content/tests/chrome/test_mousescroll.xhtmland confirm it's working.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Pushed by bgrinstead@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c572e0307a58 Remove scrollToIndex Function on richlistbox r=bgrins
Comment 11•1 year ago
|
||
Comment on attachment 9128931 [details]
Bug 1476639 - Remove scrollToIndex Function on richlistbox
Revision D64198 was moved to bug 1609821. Setting attachment 9128931 [details] to obsolete.
Updated•1 year ago
|
Comment 12•1 year ago
|
||
Comment on attachment 9128931 [details]
Bug 1476639 - Remove scrollToIndex Function on richlistbox
Revision D64198 was moved to bug 1609821. Setting attachment 9128931 [details] to obsolete.
Updated•1 year ago
|
Comment 13•1 year ago
|
||
You're going to remove scrollToElement in another bug? If so, please let the Thunderbird folks know.
Comment 14•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•