stop setting first-tab, last-tab and afterselected attributes

RESOLVED FIXED in Firefox 60

Status

()

defect
RESOLVED FIXED
11 years ago
2 years ago

People

(Reporter: dao, Assigned: adrian17)

Tracking

(Blocks 2 bugs)

Trunk
mozilla60
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(2 attachments)

Posted patch patchSplinter Review
In bug 471921, I made us use :first-of-type for [first-tab], :last-of-type for [last-tab] and [selected] + tab for [afterselected].
Attachment #364761 - Flags: review?(gavin.sharp)
I would prefer the old code in toolkit.jar/content/global/bindings/tabbox.xml for the "selected" attribute to make it possible to see which tabs have been visited (selected="false").
Convenient to see which tabs have been visited (e.g. forum threads) as posted in Bug 471921.

Currently in Minefield (638):
  if (val)
    this.setAttribute("selected", "true");
  else
    this.removeAttribute("selected");

Code used in Firefox 3.0.x (637):
   this.setAttribute("selected", val);
(In reply to comment #1)
I don't think it makes sense to add that hack back, especially as it didn't work reliably. We could add an attribute specifically for that use case, though. For that, please file a new bug.
Done: filed Bug 487242
Attachment #364761 - Flags: review?(gavin.sharp)
Comment on attachment 364761 [details] [diff] [review]
patch

I think the tabbrowser comment changes have bitrotted (references to first-tab/last-tab need to be removed).

http://mxr.mozilla.org/comm-central/source/mozilla/extensions/irc/xul/content/static.js#3308 and http://mxr.mozilla.org/comm-central/source/mozilla/extensions/venkman/resources/content/venkman-views.js#3016 are kind of useless with this change.

http://mxr-test.konigsberg.mozilla.org/addons/search?string=first-tab shows a lot of hits for these attributes. A lot of them are copied tabbox.css files, presumably from themes, but there's custom CSS and one JS user as well. Are we sure the cleanup benefit here outweighs the cost to addon compat? I'm not convinced.
Duplicate of this bug: 822672
Blocks: 614154
Duplicate of this bug: 1408679
Blocks: 1387013
Comment on attachment 8944049 [details]
Bug 480813 - remove first-tab, last-tab, before/afterselected tab attributes.

https://reviewboard.mozilla.org/r/214382/#review220206

Looks good, thanks!
Attachment #8944049 - Flags: review?(dao+bmo) → review+
Assignee: dao+bmo → adrian.wielgosik
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5e5937f8f941
remove first-tab, last-tab, before/afterselected tab attributes. r=dao
https://hg.mozilla.org/mozilla-central/rev/5e5937f8f941
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.