Closed Bug 1430374 Opened 2 years ago Closed 2 years ago

Remove support for treecol/treecell[type=progressmeter]

Categories

(Toolkit :: XUL Widgets, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: ntim, Assigned: ntim)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Looks like SM and TB still use it however: https://dxr.mozilla.org/comm-central/search?q=type%3D%22progressmeter%22&redirect=false

It will be probably be non-trivial to port that to comm-central, since it's deeply implemented in C++ code:

https://dxr.mozilla.org/mozilla-central/source/layout/xul/tree/nsTreeBodyFrame.cpp#3933-4034
https://dxr.mozilla.org/mozilla-central/source/layout/xul/tree/nsTreeBodyFrame.cpp#3418-3434
https://dxr.mozilla.org/mozilla-central/search?q=mozTreeProgressmeter&redirect=false
https://dxr.mozilla.org/mozilla-central/search?q=%3A-moz-tree-progressmeter&redirect=false

Richard, Stefan, could you please look into removing the usages in comm-central? There are only 2, one in SM, one in TB (for the tasks).
Flags: needinfo?(stefanh)
Flags: needinfo?(richard.marti)
For TB it's only the calendar that uses the ::-moz-tree-progressmeter. So n-i Philipp and MakeMyDay for looking into it as C++ is nothing I can do.
Flags: needinfo?(richard.marti)
Flags: needinfo?(philipp)
Flags: needinfo?(makemyday)
A feasible quick path may be to use a normal (non-progressmeter) cell, then emulate a progressbar using a linear-gradient (you would need to use JS to apply the styles).

Something like 
::-moz-tree-cell(something) {
  background: linear-gradient(Highlight, Highlight var(--progress), -moz-Field var(--progress));
}

Not sure how feasible that is though.
Another approach would simply be moving away from xul trees for those 2 usages, and using a richlistbox/listbox.
Trees aren't implemented in XBL so I don't think we can remove any significant XBL for this...
No longer blocks: war-on-xbl
For the task view, I think it would even be reasonable to get rid of the progressmeter at all by removing the type attribute and this way simply display the percentage value instead. Philipp, any objections?
Flags: needinfo?(makemyday)
(In reply to [:MakeMyDay] from comment #6)
> For the task view, I think it would even be reasonable to get rid of the
> progressmeter at all by removing the type attribute and this way simply
> display the percentage value instead. Philipp, any objections?

Sound good, let's do it.
Flags: needinfo?(philipp)
Depends on: 1430389
SM uses "<treecol type="progressmeter ..." in the download manager. I'm a little bit unsure of what would be the best strategy here (comment #3 and comment #4). ni? IanN and frg for suggestions.
Flags: needinfo?(stefanh)
Flags: needinfo?(iann_bugzilla)
Flags: needinfo?(frgrahl)
Probably just remove it. The download manager needs a lot of things fixed. I just add it to the list in Bug 888915. SeaMonkey is broken anyway because of the many removals on short or no notice so just one thing more to fix.
Flags: needinfo?(frgrahl)
Depends on: 888915
Assignee: nobody → ntim.bugs
Comment on attachment 8942881 [details]
Bug 1430374 - Remove support for progressmeter tree cells.

https://reviewboard.mozilla.org/r/213146/#review218978
Attachment #8942881 - Flags: review?(dao+bmo) → review+
Comment on attachment 8942881 [details]
Bug 1430374 - Remove support for progressmeter tree cells.

https://reviewboard.mozilla.org/r/213146/#review219504

r=me assuming the TB and Seamonkey folks are on board.
Attachment #8942881 - Flags: review?(bzbarsky) → review+
Yes, we've gotten rid of the progressmeter in bug 1430389. Thanks for checking in!
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f2f92fe82b0e
Remove support for progressmeter tree cells. r=bz,dao
https://hg.mozilla.org/mozilla-central/rev/f2f92fe82b0e
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/ae43fcf7b9ee
comm-central: remove GetProgressMode() methods. rs=bustage-fix
(In reply to Stefan [:stefanh] from comment #8)
> SM uses "<treecol type="progressmeter ..." in the download manager. I'm a
> little bit unsure of what would be the best strategy here (comment #3 and
> comment #4). ni? IanN and frg for suggestions.

Just make a note in bug 888915, thanks.
Flags: needinfo?(iann_bugzilla)
Blocks: 1446341
Depends on: 1508142
No longer depends on: 1508142
You need to log in before you can comment on or make changes to this bug.