Remove scrollbox binding
Categories
(Toolkit :: UI Widgets, task, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: Paolo, Assigned: timdream)
References
Details
Attachments
(2 files, 2 obsolete files)
The "scrollbox" binding just contains a box, while the "scrollbox" element provides access to some native functions through the ScrollBoxObject object. We could remove the binding by updating the consumers to use just a simple box, although we may have to update some styling accordingly.
Updated•7 years ago
|
Comment 1•6 years ago
|
||
Moving to Core:XUL per https://bugzilla.mozilla.org/show_bug.cgi?id=1455336
Assignee | ||
Comment 2•6 years ago
|
||
The element cannot be removed because some of the implementations have moved to XULScrollElement in bug 1454358. We have to keep the tag name for this. What's the right approach here instead? Should we have all the consumer construct the <box> element on their own? Should we convert the remaining tiny binding to custom element?
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to Tim Guan-tin Chien [:timdream] (please needinfo) from comment #2) > The element cannot be removed because some of the implementations have moved > to XULScrollElement in bug 1454358. We have to keep the tag name for this. If I remember correctly, callers that rely on XULScrollElement can use DOM functions instead, sometimes reusing existing JavaScript variants of the XULScrollElement methods. > What's the right approach here instead? Should we have all the consumer > construct the <box> element on their own? Should we convert the remaining > tiny binding to custom element? This bug is about getting rid of XULScrollElement, but it doesn't exclude converting the binding in a different bug.
Assignee | ||
Comment 4•6 years ago
|
||
I am a bit confused. Removing the XULScrollElement class that was just implemented in C++? Anyway, given that we are not going to remove the tag name, and we will not be able to remove the one and only <box> element in anon content, I am going to try to convert the remaining binding into custom element, with <content> into Shadow DOM. It would be the first instance of Shadow DOM usage in chrome, we will be able to see what breaks.
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
This does what's intended, moving scrollbox to a custom element implementation The debug browser will fail to launch with Assertion failure: !content->IsActiveChildrenElement(), at /builds/worker/workspace/build/src/layout/base/RestyleManager.cpp:3033 and the non-debug browser will not render the tabs at all. With the inspector I can see non-XBL instance of <scrollbox> can be constructed correctly. We'll need to figure out how XBL anonymous content and Shadow DOM slots could work together. Depends on D14925
Assignee | ||
Comment 7•6 years ago
|
||
The other approach I am exploring right now is to remove the anonymous content altogether. https://treeherder.mozilla.org/#/jobs?repo=try&revision=f4510107ce3633d22237da1170f6819a266f2eac&selectedJob=217805141 Looks like it's ... manageable? Correcting _scrollbox.boxObject.height and add padding into it should make the failures go away. I am running mozscreenshots right now to see if there are uncaught changes. https://screenshots.mattn.ca/compare/?oldProject=try&oldRev=1b90cc2ca758a0c05323b4da4bf175fae6041ea8&newProject=try&newRev=5cee57b9320767b9c8ed5f57deb4256119a79d63
Comment 8•6 years ago
|
||
(In reply to Tim Guan-tin Chien [:timdream] (please needinfo) from comment #6) > Created attachment 9032307 [details] > Bug 1454357 - (Broken) Convert scrollbox to custom element > > This does what's intended, moving scrollbox to a custom element > implementation > > The debug browser will fail to launch with > > Assertion failure: !content->IsActiveChildrenElement(), at > /builds/worker/workspace/build/src/layout/base/RestyleManager.cpp:3033 > > and the non-debug browser will not render the tabs at all. > > With the inspector I can see non-XBL instance of <scrollbox> can be > constructed correctly. We'll need to figure out how > XBL anonymous content and Shadow DOM slots could work together. Even if we end up being able to remove the anonymous node in this case (as per Comment 7), I'd like to get a bug on file about this issue since it's going to prevent us from using SD in cases where it's not possible to remove the anonymous content (stuff like <wizard> as an example).
Assignee | ||
Comment 9•6 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #8) > Even if we end up being able to remove the anonymous node in this case (as > per Comment 7), I'd like to get a bug on file about this issue since it's > going to prevent us from using SD in cases where it's not possible to remove > the anonymous content (stuff like <wizard> as an example). Yeah. I am fairly sure I can come up with a test case for this.
Assignee | ||
Comment 10•6 years ago
|
||
(In reply to Tim Guan-tin Chien [:timdream] (please needinfo) from comment #9) > Yeah. I am fairly sure I can come up with a test case for this. Please see test case and bug at bug 1515518.
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 11•6 years ago
|
||
The patch in comment 7 breaks bug 490178, i.e. <richlistbox dir="reverse">. For some reasons without the <box> as anonymous content, the direction of the list doesn't really update sometimes. For that, I am more leaning toward removing the feature altogether since it is not used. I am still looking at other test failures.
Assignee | ||
Comment 12•6 years ago
|
||
It also breaks the assumed frame tree expected by XULScrollElement::ScrollByIndex() I think. I am trying to figure out a fix.
Assignee | ||
Comment 13•6 years ago
|
||
This undo the change implemented in bug 490178 (f8f1a9113a1c) because there is no user of this feature. For some reason when scrollbox has its inner box removed, XUL doesn't really respect the direction set, and the rendering of the items (now the direct children of scrollbox) will be incorrect.
Assignee | ||
Comment 14•6 years ago
|
||
With all the previous efforts, the scrollbox binding now does nothing but to create an inner box element holding the scrolling content. It turned out that inner box be easily removed. The padding set by the document sheets can be moved to the srollbox element directly. The only gatcha is XULScrollElement::ScrollByIndex() -- it can now reach the child item frames directly from the scrolled frame. Depends on D15169
Comment hidden (obsolete) |
Assignee | ||
Comment 16•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=834f290075fa306554ec70b5af85b699d9e999a8
Reporter | ||
Comment 17•6 years ago
|
||
Note that I'm removing the last consumer of XULScrollElement::ScrollByIndex in bug 1454360.
Reporter | ||
Comment 19•6 years ago
|
||
Since you're touching the scrollbox styling anyways, you may also consider converting scrollbox uses to simple boxes and remove styling dependencies on the "scrollbox" tag. I'm removing XULScrollElement in bug 1516258, although "richlistbox" was already the only remaining consumer after bug 1454360.
Assignee | ||
Comment 21•6 years ago
|
||
Rebased.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=69acae3335f7555dea62348289f587f6c8f70bfe
Let's uncomplicate things by breaking up the dependency —- I believe this and bug 1516258 can land independently (and easily rebased on top of).
Comment 22•6 years ago
|
||
Pushed by tchien@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e99aed6c14d Remove the scrollbox binding r=NeilDeakin
Comment 23•6 years ago
|
||
bugherder |
Assignee | ||
Updated•6 years ago
|
Updated•5 years ago
|
Comment 24•5 years ago
|
||
«toolkit.tabbox.switchByScrolling",true» not completely working correctly. Moving between tabs with the mouse wheel works only in the visibility zone, when there are a lot of open bookmarks and goes beyond the navigation panel, the function stops working. It is necessary that the mouse wheel works on all tabs and it doesn’t matter how much is open in the navigation bar.
Please fix it.
Comment 26•5 years ago
|
||
(In reply to veron from comment #24)
«toolkit.tabbox.switchByScrolling",true» not completely working correctly. Moving between tabs with the mouse wheel works only in the visibility zone, when there are a lot of open bookmarks and goes beyond the navigation panel, the function stops working. It is necessary that the mouse wheel works on all tabs and it doesn’t matter how much is open in the navigation bar.
Please fix it.
This is tracked in Bug 1601184.
Description
•