Closed Bug 1397556 Opened 8 years ago Closed 7 years ago

Fast-path for setting the title for more local pages

Categories

(Firefox :: Tabbed Browser, enhancement, P5)

enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: zbraniecki, Unassigned)

References

Details

As part of bug 1362774 we're enabling a fast-path for about:blank and about:newtab title. Florian suggested that we could do the same for about:privatebrowsing and about:home as well.
Depends on: 1362774
Um, please be careful because about:blank can be web-controlled, in which case a fixed title would be incorrect because the web page could set a title.
What do you mean by "about:blank can be web-controlled"?
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #2) > What do you mean by "about:blank can be web-controlled"? let w = window.open("", "_blank"); w.document.title = "Hello Firefox";
(In reply to :Gijs from comment #3) > (In reply to Zibi Braniecki [:gandalf][:zibi] from comment #2) > > What do you mean by "about:blank can be web-controlled"? > > let w = window.open("", "_blank"); > w.document.title = "Hello Firefox"; This stuff is why we have checkEmptyPageOrigin in browser.js, btw. - more details in that code.
Oh, yes, thank you. This case will work. We only set the "fast-path" title before we load the page (in addTab for example), but then we load it, and from there, we handle every DOMTitleChange with value. So the opposite may not work: ``` let w = window.open("about:home"); // or any other about: with title w.document.title = ""; ``` because if we see title being empty, we skip it. But this also doesn't work today, so no regression at least.
Priority: -- → P5
I think this got fixed independently - bug 1427186 fixed about:privatebrowsing, and about:home, about:newtab and about:blank should all be dealt with in https://searchfox.org/mozilla-central/rev/2e5e28f518524f8af5b158ddb605022b6a2d68cf/browser/base/content/tabbrowser.js#1265 .
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.