Bug 1391421 - Part 2 - Make script dialogues use the Unicode domain as title. r?baku draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 15 Sep 2017 21:05:14 +0200
changeset 666389 51acc3b646354e61b4f9ae4c988f336bcf90e843
parent 666073 27da088a0c44165d7d6b502d6c1890c09f768706
child 666390 b8438896056618b666c7a592e5f6343a93721eb2
child 666447 0ef4a646eba39aac9a021fd896ba0aba6960fd79
push id80393
push usermozilla@buttercookie.de
push dateMon, 18 Sep 2017 17:56:17 +0000
reviewersbaku
bugs1391421
milestone57.0a1
Bug 1391421 - Part 2 - Make script dialogues use the Unicode domain as title. r?baku 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);
         }