Closed Bug 1638420 Opened 5 years ago Closed 4 years ago

about:debugging tab list no longer shows tab titles for Firefox Preview

Categories

(DevTools :: about:debugging, defect, P3)

defect

Tracking

(firefox79 fixed)

RESOLVED FIXED
Firefox 79
Tracking Status
firefox79 --- fixed

People

(Reporter: davidwalsh, Assigned: jdescottes)

Details

Attachments

(2 files)

Attached image AboutDebuggingTabs.png

In the tab listing of about:debugging, we should show tab titles instead of displaying the URL twice.

We normally show the title. Were you connected to a remote device via USB? Can you share which browser it was (FF preview release or nightly?)

Flags: needinfo?(dwalsh)

This might have regressed with Bug 1628117.

Agi: In about:debugging we fetch the title of a tab from the parent process, based on the corresponding <browser> element via

function getTabTitle(browser) {
  const tabBrowser = browser.getTabBrowser();
  const tab = tabBrowser.getTabForBrowser(browser);
  return tab.label;
}

(this is a shortened version of https://searchfox.org/mozilla-central/rev/3ce874dc2703831af3e5ef3a1d216ffd08057fa5/devtools/server/actors/descriptors/tab.js#201 without the irrelevant devtools bits and indirections)

It seems this doesn't work on GeckoView, since getTabBrowser() doesn't return anything.
I'm not 100% sure it's a regression from Bug 1628117 since before FF77, we used to fetch the information from the content process.
Is there any way we can fetch the title of the tab from a GeckoView <browser> instance?

Edit: I see a "_contentTitle" property on the GeckoView browser instance? Is this something we could rely on?

Flags: needinfo?(agi)
Severity: -- → S2
Type: enhancement → defect
Priority: -- → P3
Summary: Tab Listing should use title instead of url in listing → about:debugging tab list no longer shows tab titles for Firefox Preview

(clearing the ni? for David, I could check that this occurred on Firefox Preview Nightly)

Flags: needinfo?(dwalsh)

Seems like we could use the contentTitle property for regular Firefox Desktop as well.
I suppose the .getTabBrowser() -> .getTabForBrowser() indirection was really only useful for zombie tab?
We should check if this can be helpful for sessionrestore tabs on Firefox Desktop, but we should fallback to browser.contentTitle instead of null at https://searchfox.org/mozilla-central/rev/3ce874dc2703831af3e5ef3a1d216ffd08057fa5/devtools/server/actors/descriptors/tab.js#212

Assignee: nobody → dwalsh

(In reply to Julian Descottes [:jdescottes] from comment #2)

This might have regressed with Bug 1628117.

Agi: In about:debugging we fetch the title of a tab from the parent process, based on the corresponding <browser> element via

function getTabTitle(browser) {
  const tabBrowser = browser.getTabBrowser();
  const tab = tabBrowser.getTabForBrowser(browser);
  return tab.label;
}

yeah tab is a bare bone object for us, that code is unlikely to work (and hasn't worked in years)

Edit: I see a "_contentTitle" property on the GeckoView browser instance? Is this something we could rely on?

I think you should be able to use browser.contentTitle on all platforms? https://searchfox.org/mozilla-central/rev/9193635dca8cfdcb68f114306194ffc860456044/toolkit/content/widgets/browser-custom-element.js#731-735

Flags: needinfo?(agi)

Hi David,

I was hoping to get this in the current release, are you actively working on this?

Flags: needinfo?(dwalsh)

I won't have time to work on this, unfortunately, as I'm full-time Fenix for the next few weeks.

Flags: needinfo?(dwalsh)
Assignee: dwalsh → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d5b9f1712970 Read tab descriptor title from browser.contentTitle r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: