mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
locationless windows need hostname in titlebar (match 1.0x -- bug 304388) r=mconnor/jruderman, sr=bzbarsky
This commit is contained in:
parent
7388cb4015
commit
e516ae4137
@ -562,21 +562,36 @@
|
||||
<![CDATA[
|
||||
var newTitle = "";
|
||||
var docTitle;
|
||||
var docElement = this.ownerDocument.documentElement;
|
||||
var sep = docElement.getAttribute("titlemenuseparator");
|
||||
|
||||
if (this.docShell.contentViewer)
|
||||
docTitle = this.contentTitle;
|
||||
|
||||
if (!docTitle)
|
||||
docTitle = this.ownerDocument.documentElement.getAttribute("titledefault");
|
||||
docTitle = docElement.getAttribute("titledefault");
|
||||
|
||||
var modifier = this.ownerDocument.documentElement.getAttribute("titlemodifier");
|
||||
var modifier = docElement.getAttribute("titlemodifier");
|
||||
if (docTitle) {
|
||||
newTitle += this.ownerDocument.documentElement.getAttribute("titlepreface");
|
||||
newTitle += docElement.getAttribute("titlepreface");
|
||||
newTitle += docTitle;
|
||||
var sep = this.ownerDocument.documentElement.getAttribute("titlemenuseparator");
|
||||
if (modifier)
|
||||
newTitle += sep;
|
||||
}
|
||||
newTitle += modifier;
|
||||
|
||||
// If location bar is hidden and the URL type supports a host,
|
||||
// add the scheme and host to the title to prevent spoofing.
|
||||
// XXX https://bugzilla.mozilla.org/show_bug.cgi?id=22183#c239
|
||||
try {
|
||||
if (docElement.getAttribute("chromehidden").indexOf("location") != -1) {
|
||||
var host = this.mURIFixup.createExposableURI(
|
||||
this.mCurrentBrowser.currentURI).prePath;
|
||||
if (host)
|
||||
newTitle = host + sep + newTitle;
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
this.ownerDocument.title = newTitle;
|
||||
]]>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user