Bug 1411707 - Switch findbar and findbar-textbox from XBL bindings into a Custom Element;r=paolo

MozReview-Commit-ID: F95i9H9FvYv

Differential Revision: https://phabricator.services.mozilla.com/D5596

--HG--
rename : toolkit/content/widgets/findbar.xml => toolkit/content/widgets/findbar.js
extra : moz-landing-system : lando
This commit is contained in:
Brian Grinstead 2018-09-14 18:30:31 +00:00
Родитель 6a1c6379e6
Коммит a2db8cd913
8 изменённых файлов: 1227 добавлений и 1421 удалений

Просмотреть файл

@ -28,7 +28,7 @@ add_task(async function test_support_toolbar_properties_on_findbar() {
await extension.startup();
await gBrowser.getFindBar();
let findbar_button = document.getAnonymousElementByAttribute(gFindBar, "anonid", "highlight");
let findbar_button = gFindBar.getElement("highlight");
info("Checking findbar background is set as toolbar color");
Assert.equal(window.getComputedStyle(gFindBar).backgroundColor,
@ -73,14 +73,11 @@ add_task(async function test_support_toolbar_field_properties_on_findbar() {
await extension.startup();
await gBrowser.getFindBar();
let findbar_textbox =
document.getAnonymousElementByAttribute(gFindBar, "anonid", "findbar-textbox");
let findbar_textbox = gFindBar.getElement("findbar-textbox");
let findbar_prev_button =
document.getAnonymousElementByAttribute(gFindBar, "anonid", "find-previous");
let findbar_prev_button = gFindBar.getElement("find-previous");
let findbar_next_button =
document.getAnonymousElementByAttribute(gFindBar, "anonid", "find-next");
let findbar_next_button = gFindBar.getElement("find-next");
info("Checking findbar textbox background is set as toolbar field background color");
Assert.equal(window.getComputedStyle(findbar_textbox).backgroundColor,

Просмотреть файл

@ -156,7 +156,6 @@ function getInterfaceProxy(obj) {
window.MozXULElement = MozXULElement;
for (let script of [
"chrome://global/content/elements/stringbundle.js",
"chrome://global/content/elements/general.js",
"chrome://global/content/elements/textbox.js",
"chrome://global/content/elements/tabbox.js",
@ -164,14 +163,15 @@ for (let script of [
Services.scriptloader.loadSubScript(script, window);
}
customElements.setElementCreationCallback("printpreview-toolbar", type => {
Services.scriptloader.loadSubScript(
"chrome://global/content/printPreviewToolbar.js", window);
});
customElements.setElementCreationCallback("editor", type => {
Services.scriptloader.loadSubScript(
"chrome://global/content/elements/editor.js", window);
for (let [tag, script] of [
["findbar", "chrome://global/content/elements/findbar.js"],
["stringbundle", "chrome://global/content/elements/stringbundle.js"],
["printpreview-toolbar", "chrome://global/content/printPreviewToolbar.js"],
["editor", "chrome://global/content/elements/editor.js"],
]) {
customElements.setElementCreationCallback(tag, () => {
Services.scriptloader.loadSubScript(script, window);
});
}
}

Просмотреть файл

@ -75,7 +75,6 @@ toolkit.jar:
content/global/bindings/datetimebox.xml (widgets/datetimebox.xml)
content/global/bindings/datetimebox.css (widgets/datetimebox.css)
* content/global/bindings/dialog.xml (widgets/dialog.xml)
* content/global/bindings/findbar.xml (widgets/findbar.xml)
content/global/bindings/general.xml (widgets/general.xml)
content/global/bindings/groupbox.xml (widgets/groupbox.xml)
content/global/bindings/menu.xml (widgets/menu.xml)
@ -99,6 +98,7 @@ toolkit.jar:
content/global/bindings/tree.xml (widgets/tree.xml)
content/global/bindings/videocontrols.xml (widgets/videocontrols.xml)
* content/global/bindings/wizard.xml (widgets/wizard.xml)
content/global/elements/findbar.js (widgets/findbar.js)
content/global/elements/editor.js (widgets/editor.js)
content/global/elements/general.js (widgets/general.js)
content/global/elements/stringbundle.js (widgets/stringbundle.js)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -822,14 +822,9 @@ richlistitem {
/*********** findbar ************/
findbar {
-moz-binding: url('chrome://global/content/bindings/findbar.xml#findbar');
overflow-x: hidden;
}
.findbar-textbox {
-moz-binding: url("chrome://global/content/bindings/findbar.xml#findbar-textbox");
}
/*********** tabmodalprompt ************/
tabmodalprompt {
-moz-binding: url("chrome://global/content/tabprompts.xml#tabmodalprompt");

Просмотреть файл

@ -1,19 +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/. -->
<!-- LOCALIZATION NOTE : FILE This file contains the entities needed to -->
<!-- LOCALIZATION NOTE : FILE use the Find Bar. -->
<!ENTITY next.tooltip "Find the next occurrence of the phrase">
<!ENTITY previous.tooltip "Find the previous occurrence of the phrase">
<!ENTITY findCloseButton.tooltip "Close find bar">
<!ENTITY highlightAll.label "Highlight All">
<!ENTITY highlightAll.accesskey "l">
<!ENTITY highlightAll.tooltiptext "Highlight all occurrences of the phrase">
<!ENTITY caseSensitive.label "Match Case">
<!ENTITY caseSensitive.accesskey "c">
<!ENTITY caseSensitive.tooltiptext "Search with case sensitivity">
<!ENTITY entireWord.label "Whole Words">
<!ENTITY entireWord.accesskey "w">
<!ENTITY entireWord.tooltiptext "Search whole words only">

Просмотреть файл

@ -46,7 +46,6 @@
locale/@AB_CD@/global/fallbackMenubar.properties (%chrome/global/fallbackMenubar.properties)
locale/@AB_CD@/global/filepicker.properties (%chrome/global/filepicker.properties)
#ifndef MOZ_FENNEC
locale/@AB_CD@/global/findbar.dtd (%chrome/global/findbar.dtd)
locale/@AB_CD@/global/findbar.properties (%chrome/global/findbar.properties)
#endif
locale/@AB_CD@/global/globalKeys.dtd (%chrome/global/globalKeys.dtd)