Bug 1391421 - Part 2 - Make script dialogues use the Unicode domain as title. r?billm draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 15 Sep 2017 21:05:14 +0200
changeset 665963 71361a0a2979581828a8b0e6d7d3b1c8c7cc7204
parent 665962 5dbd59440929fb1358ef79bfed3835447cc188b9
child 665964 132853c164f622926113482f1db8bd9da524fd81
push id80237
push usermozilla@buttercookie.de
push dateSat, 16 Sep 2017 21:17:08 +0000
reviewersbillm
bugs1391421
milestone57.0a1
Bug 1391421 - Part 2 - Make script dialogues use the Unicode domain as title. r?billm At least on Android, the domain still appears in the dialogue box's title, so we want to pretty-print IDN domains there. MozReview-Commit-ID: 3MCeR4IUsuF
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -7544,17 +7544,17 @@ nsGlobalWindow::MakeScriptDialogTitle(ns
         fixedURI->GetHost(host);
 
         if (!host.IsEmpty()) {
           // if this URI has a host we'll show it. For other
           // schemes (e.g. file:) we fall back to the localized
           // generic string
 
           nsAutoCString prepath;
-          fixedURI->GetPrePath(prepath);
+          fixedURI->GetDisplayPrePath(prepath);
 
           NS_ConvertUTF8toUTF16 ucsPrePath(prepath);
           const char16_t *formatStrings[] = { ucsPrePath.get() };
           nsContentUtils::FormatLocalizedString(nsContentUtils::eCOMMON_DIALOG_PROPERTIES,
                                                 "ScriptDlgHeading",
                                                 formatStrings,
                                                 aOutTitle);
         }