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

ASSIGNED
Assigned to

Status

()

Toolkit
XUL Widgets
ASSIGNED
9 years ago
3 months ago

People

(Reporter: dao, Assigned: dao)

Tracking

(Blocks: 2 bugs)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Created attachment 364761 [details] [diff] [review]
patch

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)

Comment 1

9 years ago
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);
(Assignee)

Comment 2

9 years ago
(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.

Comment 3

9 years ago
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.

Updated

5 years ago
Duplicate of this bug: 822672

Updated

5 years ago
Blocks: 614154
(Assignee)

Updated

3 months ago
Duplicate of this bug: 1408679
(Assignee)

Updated

3 months ago
Blocks: 1387013
You need to log in before you can comment on or make changes to this bug.