Bug 1473832 - Load "autocomplete.css" and "autocomplete-item.css" as document stylesheets. r=bgrins
MozReview-Commit-ID: G9OUUmxPivU
--- a/browser/extensions/formautofill/content/formautofill.xml
+++ b/browser/extensions/formautofill/content/formautofill.xml
@@ -5,21 +5,16 @@
<bindings id="formautofillBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="autocomplete-profile-listitem-base" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
- <resources>
- <stylesheet src="chrome://formautofill-shared/skin/autocomplete-item.css"/>
- <stylesheet src="chrome://formautofill/skin/autocomplete-item.css"/>
- </resources>
-
<implementation implements="nsIDOMXULSelectControlItemElement">
<constructor>
</constructor>
<!-- For form autofill, we want to unify the selection no matter by
keyboard navigation or mouseover in order not to confuse user which
profile preview is being shown. This field is set to true to indicate
that selectedIndex of popup should be changed while mouseover item -->
<field name="selectedByMouseOver">true</field>
--- a/toolkit/content/autocomplete.css
+++ b/toolkit/content/autocomplete.css
@@ -7,17 +7,17 @@
/* Apply crisp rendering for favicons at exactly 2dppx resolution */
@media (resolution: 2dppx) {
.ac-site-icon {
image-rendering: -moz-crisp-edges;
}
}
-richlistitem {
+.autocomplete-richlistbox > richlistitem {
-moz-box-orient: horizontal;
overflow: hidden;
}
.ac-title-text,
.ac-tags-text,
.ac-url-text,
.ac-action-text {
--- a/toolkit/content/widgets.css
+++ b/toolkit/content/widgets.css
@@ -1,10 +1,14 @@
/* 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/. */
/* ===== widgets.css =====================================================
== Styles ported from XBL <resources>, loaded by "global.css".
======================================================================= */
+@import url("chrome://global/content/autocomplete.css");
+@import url("chrome://global/skin/autocomplete.css");
+@import url("chrome://formautofill-shared/skin/autocomplete-item.css");
+@import url("chrome://formautofill/skin/autocomplete-item.css");
@import url("chrome://global/skin/menu.css");
@import url("chrome://global/skin/menulist.css");
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -6,21 +6,16 @@
<bindings id="autocompleteBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="autocomplete"
extends="chrome://global/content/bindings/textbox.xml#textbox">
- <resources>
- <stylesheet src="chrome://global/content/autocomplete.css"/>
- <stylesheet src="chrome://global/skin/autocomplete.css"/>
- </resources>
-
<content sizetopopup="pref">
<children includes="image|deck|stack|box"/>
<xul:hbox anonid="textbox-input-box" class="textbox-input-box" flex="1" xbl:inherits="tooltiptext=inputtooltiptext">
<children/>
<html:input anonid="input" class="autocomplete-textbox textbox-input"
allowevents="true"
xbl:inherits="tooltiptext=inputtooltiptext,value,type=inputtype,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey,mozactionhint"/>
@@ -643,21 +638,16 @@
if (!this.ignoreBlurWhileSearching)
this.detachController();
}
]]></handler>
</handlers>
</binding>
<binding id="autocomplete-rich-result-popup" extends="chrome://global/content/bindings/popup.xml#popup">
- <resources>
- <stylesheet src="chrome://global/content/autocomplete.css"/>
- <stylesheet src="chrome://global/skin/autocomplete.css"/>
- </resources>
-
<content ignorekeys="true" level="top" consumeoutsideclicks="never">
<xul:richlistbox anonid="richlistbox" class="autocomplete-richlistbox" flex="1"/>
<xul:hbox>
<children/>
</xul:hbox>
</content>
<implementation implements="nsIAutoCompletePopup">