diff --git a/chrome/content/bindings/autocomplete.xml b/chrome/content/bindings/autocomplete.xml new file mode 100644 --- /dev/null +++ b/chrome/content/bindings/autocomplete.xml @@ -0,0 +1,230 @@ + + + +%browserDTD; +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + this._matchCount - 1) + return val; + + if (this._selectedItem) + this._styleItem(this._selectedItem, false); + + // highlight the selected item + let item = this._items.childNodes.item(val); + if (item) { + this._selectedItem = item; + this._styleItem(this._selectedItem, true); + } + + return this._selectedIndex = val; + ]]> + + + false + + + + + + + + + + + + + + matchCount - 1) { + // Just clear out the old item + label.setAttribute("class", ""); + label.setAttribute("value", ""); + + continue; + } + + let url = controller.getValueAt(i); + let title = controller.getCommentAt(i); + let type = controller.getStyleAt(i); + let image = controller.getImageAt(i); + + let typeClass = "ac-result-type-" + type; + label.setAttribute("class", "autocomplete-item " + typeClass); + label.setAttribute("value", title || url); + } + ]]> + + + + + + lastIndex) + newIndex = 0; + else if (newIndex < 0) + newIndex = lastIndex; + + this.selectedIndex = newIndex; + ]]> + + + + + document.getAnonymousElementByAttribute(this, + "anonid", "autocomplete-items"); + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chrome/content/bindings.xml b/chrome/content/bindings/bookmarks.xml rename from chrome/content/bindings.xml rename to chrome/content/bindings/bookmarks.xml --- a/chrome/content/bindings.xml +++ b/chrome/content/bindings/bookmarks.xml @@ -9,223 +9,6 @@ xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - - this._matchCount - 1) - return val; - - if (this._selectedItem) - this._styleItem(this._selectedItem, false); - - // highlight the selected item - let item = this._items.childNodes.item(val); - if (item) { - this._selectedItem = item; - this._styleItem(this._selectedItem, true); - } - - return this._selectedIndex = val; - ]]> - - - false - - - - - - - - - - - - - - matchCount - 1) { - // Just clear out the old item - label.setAttribute("class", ""); - label.setAttribute("value", ""); - - continue; - } - - let url = controller.getValueAt(i); - let title = controller.getCommentAt(i); - let type = controller.getStyleAt(i); - let image = controller.getImageAt(i); - - let typeClass = "ac-result-type-" + type; - label.setAttribute("class", "autocomplete-item " + typeClass); - label.setAttribute("value", title || url); - } - ]]> - - - - - - lastIndex) - newIndex = 0; - else if (newIndex < 0) - newIndex = lastIndex; - - this.selectedIndex = newIndex; - ]]> - - - - - document.getAnonymousElementByAttribute(this, - "anonid", "autocomplete-items"); - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chrome/content/notification.xml b/chrome/content/bindings/notification.xml rename from chrome/content/notification.xml rename to chrome/content/bindings/notification.xml diff --git a/chrome/content/preferences/richpref.xml b/chrome/content/bindings/richpref.xml rename from chrome/content/preferences/richpref.xml rename to chrome/content/bindings/richpref.xml --- a/chrome/content/preferences/richpref.xml +++ b/chrome/content/bindings/richpref.xml @@ -94,7 +94,7 @@ - + @@ -117,7 +117,7 @@ - + @@ -154,7 +154,7 @@ - + diff --git a/chrome/content/tabs.xml b/chrome/content/bindings/tabs.xml rename from chrome/content/tabs.xml rename to chrome/content/bindings/tabs.xml diff --git a/chrome/content/browser.css b/chrome/content/browser.css --- a/chrome/content/browser.css +++ b/chrome/content/browser.css @@ -1,13 +1,13 @@ #urlbar-edit { - -moz-binding: url("chrome://browser/content/bindings.xml#autocomplete-aligned"); + -moz-binding: url("chrome://browser/content/bindings/autocomplete.xml#autocomplete-aligned"); } #tabs { - -moz-binding: url("chrome://browser/content/tabs.xml#tablist"); + -moz-binding: url("chrome://browser/content/bindings/tabs.xml#tablist"); } richlistitem[type="documenttab"] { - -moz-binding: url("chrome://browser/content/tabs.xml#documenttab"); + -moz-binding: url("chrome://browser/content/bindings/tabs.xml#documenttab"); } #prefs-container > scrollbox @@ -16,15 +16,15 @@ richlistitem[type="documenttab"] { } richpref[type="bool"] { - -moz-binding: url("chrome://browser/content/preferences/richpref.xml#richpref-bool"); + -moz-binding: url("chrome://browser/content/bindings/richpref.xml#richpref-bool"); } richpref[type="boolint"] { - -moz-binding: url("chrome://browser/content/preferences/richpref.xml#richpref-boolint"); + -moz-binding: url("chrome://browser/content/bindings/richpref.xml#richpref-boolint"); } richpref[type="button"] { - -moz-binding: url("chrome://browser/content/preferences/richpref.xml#richpref-button"); + -moz-binding: url("chrome://browser/content/bindings/richpref.xml#richpref-button"); } notificationbox { @@ -32,33 +32,33 @@ notificationbox { } notification { - -moz-binding: url("chrome://browser/content/notification.xml#notification"); + -moz-binding: url("chrome://browser/content/bindings/notification.xml#notification"); } notification button { - -moz-binding: url("chrome://browser/content/notification.xml#notification-button"); + -moz-binding: url("chrome://browser/content/bindings/notification.xml#notification-button"); } #popup_autocomplete { - -moz-binding: url("chrome://browser/content/bindings.xml#popup_autocomplete"); + -moz-binding: url("chrome://browser/content/bindings/autocomplete.xml#popup_autocomplete"); } placeitem { - -moz-binding: url("chrome://browser/content/bindings.xml#place-item"); + -moz-binding: url("chrome://browser/content/bindings/bookmarks.xml#place-item"); } placeitem[type="folder"] { - -moz-binding: url("chrome://browser/content/bindings.xml#place-folder"); + -moz-binding: url("chrome://browser/content/bindings/bookmarks.xml#place-folder"); } placelist { - -moz-binding: url("chrome://browser/content/bindings.xml#place-list"); + -moz-binding: url("chrome://browser/content/bindings/bookmarks.xml#place-list"); } placetree { - -moz-binding: url("chrome://browser/content/bindings.xml#place-tree"); + -moz-binding: url("chrome://browser/content/bindings/bookmarks.xml#place-tree"); } placelabel { - -moz-binding: url("chrome://browser/content/bindings.xml#place-label"); + -moz-binding: url("chrome://browser/content/bindings/bookmarks.xml#place-label"); } diff --git a/chrome/jar.mn b/chrome/jar.mn --- a/chrome/jar.mn +++ b/chrome/jar.mn @@ -6,16 +6,17 @@ browser.jar: content/browser.js (content/browser.js) content/browser-ui.js (content/browser-ui.js) content/commandUtil.js (content/commandUtil.js) - content/bindings.xml (content/bindings.xml) - content/tabs.xml (content/tabs.xml) - content/notification.xml (content/notification.xml) + content/bindings/autocomplete.xml (content/bindings/autocomplete.xml) + content/bindings/bookmarks.xml (content/bindings/bookmarks.xml) + content/bindings/tabs.xml (content/bindings/tabs.xml) + content/bindings/notification.xml (content/bindings/notification.xml) content/browser.css (content/browser.css) content/scrollbars.css (content/scrollbars.css) content/content.css (content/content.css) content/checkerboard.png (content/checkerboard.png) % content branding %content/branding/ % style chrome://mozapps/content/extensions/extensions.xul chrome://browser/skin/extensions.css - content/preferences/richpref.xml (content/preferences/richpref.xml) + content/bindings/richpref.xml (content/bindings/richpref.xml) * content/sanitize.xul (content/sanitize.xul) * content/sanitize.js (content/sanitize.js) content/WidgetStack.js (content/WidgetStack.js)