Closed Bug 494152 Opened 15 years ago Closed 15 years ago

eliminate onnewtab and the NewTab event

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
trivial

Tracking

()

VERIFIED FIXED
Firefox 3.7a1

People

(Reporter: dao, Assigned: dao)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
Double-clicking the tab strip dispatches a NewTab event, which isn't really useful anymore. We can just call BrowserOpenTab directly. If there's a reason to avoid that extra dependency on browser.js, cmd_newNavigatorTab could also be used (it's already used for the new-tab button).
Attachment #378833 - Flags: review?(gavin.sharp)
Also:

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#87

which seems like it depends on:

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#131 .

It seems like the whole thing was introduced for the sidebar, the content tabbrowser doesn't have an onnewtab handler (only the NewTab event listener)...
onnewtab is technically independent of the NewTab event, but yeah, it makes sense to eliminate that here as well.

There's no tabbrowser in the sidebar, though.
Summary: eliminate the NewTab event → eliminate onnewtab and the NewTab event
Attached patch patchSplinter Review
onnewtab added
Attachment #378833 - Attachment is obsolete: true
Attachment #384274 - Flags: review?(gavin.sharp)
Attachment #378833 - Flags: review?(gavin.sharp)
Comment on attachment 384274 [details] [diff] [review]
patch

r=mano
Attachment #384274 - Flags: review?(gavin.sharp) → review+
http://hg.mozilla.org/mozilla-central/rev/9321f1c3ec62
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
(In reply to comment #3)

> There's no tabbrowser in the sidebar, though.

Just a reminder, I believe Alex Limi is currently mocking up Tab Sidebar designs:
http://limi.net/articles/reinventing-tabs-for-the-browser
Everything works fine. Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20091221 Minefield/3.7a1pre ID:20091221034526
Status: RESOLVED → VERIFIED
This broke the following extensions:
New Tab Homepage <https://addons.mozilla.org/de/firefox/addon/777>
New Tab King <https://addons.mozilla.org/de/firefox/addon/10828>

Potentially broken:
Fast Dial <https://addons.mozilla.org/de/firefox/addon/5721>
Not broken:
Auto Dial <https://addons.mozilla.org/de/firefox/addon/8615>
 (hacks into browser source code)
New Tab Jumpstart <https://addons.mozilla.org/de/firefox/addon/8914>
 (uses "TabOpen" event, but that is triggered for link-clicks etc. too.)

Extensions need a hookup point to know when a new tab has been opened, e.g. to implement Speed Dial pages like Google Chrome and Opera have. See bug 561749.
The NewTab event didn't do what you think it did. It was dispatched for double clicks on the tab strip only.
It's what the extension authors thought, apparently. Please notify the above extension authors and point them to bug 561749.
I notified extension authors.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: