Backed out 2 changesets (bug 1731353) for causing mochitest failures on test_ui_modalprompt.html and multiple bc failures. CLOSED TREE

Backed out changeset 50a6a70d01fd (bug 1731353)
Backed out changeset 123d9498cd15 (bug 1731353)
This commit is contained in:
Marian-Vasile Laza 2022-08-15 10:10:54 +03:00
parent f018493dd7
commit 64e5059d3d
10 changed files with 37 additions and 106 deletions

View File

@ -1,30 +0,0 @@
# coding=utf8
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import absolute_import
import fluent.syntax.ast as FTL
from fluent.migrate.helpers import transforms_from
from fluent.migrate.helpers import COPY
def migrate(ctx):
"""Bug 1731353 - Migrate commonDialog strings from DTD to FTL, part {index}"""
ctx.add_transforms(
"toolkit/toolkit/global/commonDialog.ftl",
"toolkit/toolkit/global/commonDialog.ftl",
transforms_from(
"""
common-dialog-copy-cmd =
.label = { COPY(path1, "copyCmd.label") }
.accesskey = { COPY(path1, "copyCmd.accesskey") }
common-dialog-select-all-cmd =
.label = { COPY(path1, "selectAllCmd.label") }
.accesskey = { COPY(path1, "selectAllCmd.accesskey") }
""",
path1="toolkit/chrome/global/commonDialog.dtd",
),
)

View File

@ -1,43 +0,0 @@
# coding=utf8
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import absolute_import
import fluent.syntax.ast as FTL
from fluent.migrate.helpers import transforms_from
from fluent.migrate.helpers import COPY
def migrate(ctx):
"""Bug 1731353 - Migrate tabprompts strings from DTD to FTL, part {index}"""
ctx.add_transforms(
"toolkit/toolkit/global/tabprompts.ftl",
"toolkit/toolkit/global/tabprompts.ftl",
transforms_from(
"""
tabmodalprompt-username =
.value = { COPY(path1, "editfield0.label") }
tabmodalprompt-password =
.value = { COPY(path1, "editfield1.label") }
""",
path1="toolkit/chrome/global/commonDialog.dtd",
),
)
ctx.add_transforms(
"toolkit/toolkit/global/tabprompts.ftl",
"toolkit/toolkit/global/tabprompts.ftl",
transforms_from(
"""
tabmodalprompt-ok-button =
.label = { COPY(path1, "okButton.label") }
tabmodalprompt-cancel-button =
.label = { COPY(path1, "cancelButton.label") }
""",
path1="toolkit/chrome/global/dialogOverlay.dtd",
),
)

View File

@ -8,7 +8,7 @@
<?xml-stylesheet href="chrome://global/content/commonDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/commonDialog.css" type="text/css"?>
<!DOCTYPE window>
<!DOCTYPE window SYSTEM "chrome://global/locale/commonDialog.dtd">
<window id="commonDialogWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@ -45,11 +45,13 @@
<menupopup id="contentAreaContextMenu"
onpopupshowing="goUpdateCommand('cmd_copy')">
<menuitem id="context-copy"
data-l10n-id="common-dialog-copy-cmd"
label="&copyCmd.label;"
accesskey="&copyCmd.accesskey;"
command="cmd_copy"
disabled="true"/>
<menuitem id="context-selectall"
data-l10n-id="common-dialog-select-all-cmd"
label="&selectAllCmd.label;"
accesskey="&selectAllCmd.accesskey;"
command="cmd_selectAll"/>
</menupopup>
</popupset>

View File

@ -5,7 +5,7 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<!DOCTYPE window>
<!DOCTYPE window SYSTEM "chrome://global/locale/commonDialog.dtd">
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<dialog>

View File

@ -16,13 +16,10 @@ var TabModalPrompt = class {
let newPrompt = (this.element = win.document.createElement(
"tabmodalprompt"
));
win.MozXULElement.parseXULToFragment.insertFTLIfNeeded(
"toolkit/global/tabprompts.ftl"
);
newPrompt.setAttribute("role", "dialog");
let randomIdSuffix = Math.random()
.toString(32)
.substring(2);
.substr(2);
newPrompt.setAttribute("aria-describedby", `infoBody-${randomIdSuffix}`);
newPrompt.appendChild(
win.MozXULElement.parseXULToFragment(
@ -35,12 +32,12 @@ var TabModalPrompt = class {
</div>
<div class="tabmodalprompt-loginContainer" hidden="hidden">
<xul:label class="tabmodalprompt-loginLabel" data-l10n-id="tabmodalprompt-username" control="loginTextbox-${randomIdSuffix}"/>
<xul:label class="tabmodalprompt-loginLabel" value="&editfield0.label;" control="loginTextbox-${randomIdSuffix}"/>
<input class="tabmodalprompt-loginTextbox" id="loginTextbox-${randomIdSuffix}"/>
</div>
<div class="tabmodalprompt-password1Container" hidden="hidden">
<xul:label class="tabmodalprompt-password1Label" data-l10n-id="tabmodalprompt-password" control="password1Textbox-${randomIdSuffix}"/>
<xul:label class="tabmodalprompt-password1Label" value="&editfield1.label;" control="password1Textbox-${randomIdSuffix}"/>
<input class="tabmodalprompt-password1Textbox" type="password" id="password1Textbox-${randomIdSuffix}"/>
</div>
@ -54,11 +51,15 @@ var TabModalPrompt = class {
<div class="tabmodalprompt-buttonContainer">
<xul:button class="tabmodalprompt-button3" hidden="true"/>
<div class="tabmodalprompt-buttonSpacer"/>
<xul:button class="tabmodalprompt-button0" data-l10n-id="tabmodalprompt-ok-button"/>
<xul:button class="tabmodalprompt-button0" label="&okButton.label;"/>
<xul:button class="tabmodalprompt-button2" hidden="true"/>
<xul:button class="tabmodalprompt-button1" data-l10n-id="tabmodalprompt-cancel-button"/>
<xul:button class="tabmodalprompt-button1" label="&cancelButton.label;"/>
</div>
</div>`
</div>`,
[
"chrome://global/locale/commonDialog.dtd",
"chrome://global/locale/dialogOverlay.dtd",
]
)
);

View File

@ -0,0 +1,10 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY editfield0.label "User Name:">
<!ENTITY editfield1.label "Password:">
<!ENTITY copyCmd.label "Copy">
<!ENTITY copyCmd.accesskey "C">
<!ENTITY selectAllCmd.label "Select All">
<!ENTITY selectAllCmd.accesskey "A">

View File

@ -0,0 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!-- WARNING!!! This file is obsoleted by the dialog.xml widget -->
<!-- OK Cancel Buttons -->
<!ENTITY okButton.label "OK">
<!ENTITY cancelButton.label "Cancel">

View File

@ -11,10 +11,3 @@ common-dialog-username =
.value = Username
common-dialog-password =
.value = Password
common-dialog-copy-cmd =
.label = Copy
.accesskey = C
common-dialog-select-all-cmd =
.label = Select All
.accesskey = A

View File

@ -1,13 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
tabmodalprompt-username =
.value = User Name:
tabmodalprompt-password =
.value = Password:
tabmodalprompt-ok-button =
.label = OK
tabmodalprompt-cancel-button =
.label = Cancel

View File

@ -14,9 +14,11 @@
locale/@AB_CD@/global/autocomplete.properties (%chrome/global/autocomplete.properties)
locale/@AB_CD@/global/appPicker.dtd (%chrome/global/appPicker.dtd)
locale/@AB_CD@/global/browser.properties (%chrome/global/browser.properties)
locale/@AB_CD@/global/commonDialog.dtd (%chrome/global/commonDialog.dtd)
locale/@AB_CD@/global/commonDialogs.properties (%chrome/global/commonDialogs.properties)
locale/@AB_CD@/global/contentAreaCommands.properties (%chrome/global/contentAreaCommands.properties)
locale/@AB_CD@/global/datetimebox.dtd (%chrome/global/datetimebox.dtd)
locale/@AB_CD@/global/dialogOverlay.dtd (%chrome/global/dialogOverlay.dtd)
#ifndef MOZ_FENNEC
locale/@AB_CD@/global/editMenuOverlay.dtd (%chrome/global/editMenuOverlay.dtd)
#endif