Bug 464450 - Get rid of the padded class and clean up related styling. r=mak draft
authorDão Gottwald <dao@mozilla.com>
Tue, 07 Nov 2017 14:15:19 +0100
changeset 694144 6242214b0c8efd8fde15714d53dd7fd63c082835
parent 693376 179dae92e4d794e7f45ad080ff01908c80691f31
child 739267 d3d974cfc9510b527ba4fd6bbc1bf53b3f5a91c7
push id88056
push userdgottwald@mozilla.com
push dateTue, 07 Nov 2017 13:15:59 +0000
reviewersmak
bugs464450
milestone58.0a1
Bug 464450 - Get rid of the padded class and clean up related styling. r=mak MozReview-Commit-ID: KYKqH9vLQ3x
browser/components/places/content/editBookmarkOverlay.xul
browser/themes/linux/browser.css
browser/themes/shared/urlbar-searchbar.inc.css
browser/themes/windows/browser.css
editor/reftests/xul/autocomplete-1.xul
editor/reftests/xul/autocomplete.css
editor/reftests/xul/input.css
editor/reftests/xul/reftest.list
toolkit/themes/linux/global/autocomplete.css
toolkit/themes/osx/global/autocomplete.css
toolkit/themes/windows/global/autocomplete.css
--- a/browser/components/places/content/editBookmarkOverlay.xul
+++ b/browser/components/places/content/editBookmarkOverlay.xul
@@ -116,17 +116,16 @@
              collapsed="true">
           <label value="&editBookmarkOverlay.tags.label;"
                  class="editBMPanel_rowLabel"
                  accesskey="&editBookmarkOverlay.tags.accesskey;"
                  control="editBMPanel_tagsField"/>
           <hbox flex="1" align="center">
             <textbox id="editBMPanel_tagsField"
                      type="autocomplete"
-                     class="padded"
                      flex="1"
                      autocompletesearch="places-tag-autocomplete" 
                      completedefaultindex="true"
                      tabscrolling="true"
                      showcommentcolumn="true"
                      placeholder="&editBookmarkOverlay.tagsEmptyDesc.label;"
                      onchange="gEditItemOverlay.onTagsFieldChange();"/>
             <button id="editBMPanel_tagsSelectorExpander"
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -161,20 +161,16 @@ menuitem.bookmark-item {
   border-color: ThreeDShadow;
 }
 
 #urlbar[focused="true"],
 .searchbar-textbox[focused="true"] {
   border-color: Highlight;
 }
 
-.urlbar-textbox-container {
-  -moz-box-align: stretch;
-}
-
 /* ::::: URL Bar Zoom Reset Button ::::: */
 @keyframes urlbar-zoom-reset-pulse {
   0% {
     transform: scale(0);
   }
   75% {
     transform: scale(1.5);
   }
--- a/browser/themes/shared/urlbar-searchbar.inc.css
+++ b/browser/themes/shared/urlbar-searchbar.inc.css
@@ -24,16 +24,17 @@
   -moz-appearance: none;
   background-clip: content-box;
   border: 1px solid hsla(240,5%,5%,.25);
   border-radius: var(--toolbarbutton-border-radius);
   box-shadow: 0 1px 4px rgba(0,0,0,.05);
   padding: 0;
   margin: 3px 5px;
   min-height: 30px;
+  cursor: default;
   overflow: -moz-hidden-unscrollable;
 }
 
 #urlbar:hover,
 .searchbar-textbox:hover {
   border-color: hsla(240,5%,5%,.35);
   box-shadow: 0 1px 6px rgba(0,0,0,.1);
 }
@@ -67,21 +68,16 @@
   /* Remove excess space between the address bar and the menu button in popups. */
   margin-inline-end: 0;
 }
 
 #urlbar-container {
   -moz-box-align: center;
 }
 
-.urlbar-input-box,
-.searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box {
-  margin: 0;
-}
-
 #urlbar-search-splitter {
   /* The splitter width should equal the location and search bars' combined
      neighboring margin and border width. */
   min-width: 12px;
   margin: 0 -6px;
   position: relative;
   border: none;
   background: transparent;
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -524,20 +524,16 @@ menuitem.bookmark-item {
 }
 
 html|*.urlbar-input:-moz-lwtheme::placeholder,
 .searchbar-textbox:-moz-lwtheme > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input::placeholder {
   opacity: 1.0;
   color: #777;
 }
 
-.urlbar-textbox-container {
-  -moz-box-align: stretch;
-}
-
 /* ::::: URL Bar Zoom Reset Button ::::: */
 @keyframes urlbar-zoom-reset-pulse {
   0% {
     transform: scale(0);
   }
   75% {
     transform: scale(1.5);
   }
--- a/editor/reftests/xul/autocomplete-1.xul
+++ b/editor/reftests/xul/autocomplete-1.xul
@@ -1,10 +1,11 @@
 <?xml version="1.0"?>
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="autocomplete.css" type="text/css"?>
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         title="Textbox tests">
 
   <script type="text/javascript" src="platform.js"/>
 
   <!-- leading space in the value to ensure no pixels of t get clipped
new file mode 100644
--- /dev/null
+++ b/editor/reftests/xul/autocomplete.css
@@ -0,0 +1,3 @@
+.textbox-input {
+  border-style: none;
+}
--- a/editor/reftests/xul/input.css
+++ b/editor/reftests/xul/input.css
@@ -1,50 +1,35 @@
 @namespace url('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul');
 @namespace html url('http://www.w3.org/1999/xhtml');
 
+:root > html|input,
+:root > html|textarea {
+  margin: 2px 4px;
+  padding: 2px 2px 3px;
+  padding-inline-start: 5px;
+}
+
 #mac html|input, #mac html|textarea {
   margin: 4px;
   padding: 0 1px;
 }
 
-#win html|input, #win html|textarea {
-  margin: 2px 4px;
-  padding: 2px 3px 3px;
-  padding-inline-start: 5px;
-}
-
-@media (-moz-windows-default-theme) {
-  #win html|input {
-    padding: 1px 2px 2px;
-    padding-inline-start: 4px;
-  }
-}
-
-#linux html|input, #linux html|textarea {
-  margin: 2px 4px;
-  padding: 2px 5px 3px;
-}
-
 textbox[multiline="true"], html|textarea {
   border: none !important;
   -moz-appearance: none !important;
   background-color: white !important;
   border-top-right-radius: 0;
   border-bottom-left-radius: 0;
 }
 
 html|input, html|textarea {
   font: inherit;
 }
 
-html|input.ac {
-  padding: 0 4px !important;
-}
-
 html|input.empty {
   color: graytext;
 }
 
 @media (-moz-windows-default-theme) and (-moz-os-version: windows-win7) {
   :root:not(.winxp) html|input.empty {
     font-style: italic;
   }
--- a/editor/reftests/xul/reftest.list
+++ b/editor/reftests/xul/reftest.list
@@ -1,29 +1,29 @@
-fails-if(Android) skip-if(browserIsRemote&&winWidget) == empty-1.xul empty-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(winWidget) == empty-1.xul empty-ref.xul # Windows: bug 1239170
 != empty-2.xul empty-ref.xul
 # There is no way to simulate an autocomplete textbox in windows XP/Vista/7/8/10 default theme using CSS.
 # Therefore, the equlity tests below should be marked as failing.
 fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == autocomplete-1.xul autocomplete-ref.xul # bug 783658
 fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == emptyautocomplete-1.xul emptyautocomplete-ref.xul # bug 783658
 != emptymultiline-1.xul emptymultiline-ref.xul
 fails-if(Android) == emptymultiline-2.xul emptymultiline-ref.xul # bug 783658
-fails-if(Android) skip-if(browserIsRemote&&winWidget) == emptytextbox-1.xul emptytextbox-ref.xul # Windows: bug 1239170
-fails-if(Android) skip-if(browserIsRemote&&winWidget) == emptytextbox-2.xul emptytextbox-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(winWidget) == emptytextbox-1.xul emptytextbox-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(winWidget) == emptytextbox-2.xul emptytextbox-ref.xul # Windows: bug 1239170
 != emptytextbox-3.xul emptytextbox-ref.xul
 != emptytextbox-4.xul emptytextbox-ref.xul
-fails-if(Android) skip-if(browserIsRemote&&winWidget) == emptytextbox-5.xul emptytextbox-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(winWidget) == emptytextbox-5.xul emptytextbox-ref.xul # Windows: bug 1239170
 # There is no way to simulate a number textbox in windows XP/Vista/7 default theme using CSS.
 # Therefore, the equlity tests below should be marked as failing.
 != number-1.xul number-ref.xul
 != number-2.xul number-ref.xul
 fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == number-3.xul number-ref.xul # bug 783658
 != number-4.xul number-ref.xul
 fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == number-5.xul number-ref.xul # bug 783658
 fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == numberwithvalue-1.xul numberwithvalue-ref.xul # bug 783658
-fails-if(Android) skip-if(browserIsRemote&&winWidget) == passwd-1.xul passwd-ref.xul # Windows: bug 1239170
-fails-if(Android) skip-if(browserIsRemote&&winWidget) == passwd-2.xul passwd-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(winWidget) == passwd-1.xul passwd-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(winWidget) == passwd-2.xul passwd-ref.xul # Windows: bug 1239170
 != passwd-3.xul passwd-ref.xul
 fails-if(Android) == plain-1.xul plain-ref.xul # bug 783658
-fails-if(Android) skip-if(browserIsRemote&&winWidget) == textbox-1.xul textbox-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(winWidget) == textbox-1.xul textbox-ref.xul # Windows: bug 1239170
 != textbox-disabled.xul textbox-ref.xul
 # Read-only textboxes look like normal textboxes in windows Vista/7 default theme
-fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(6\.[012]|10\.0)/.test(http.oscpu)) skip-if(browserIsRemote&&winWidget) != textbox-readonly.xul textbox-ref.xul # Windows: bug 1239170
+fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(6\.[012]|10\.0)/.test(http.oscpu)) skip-if(winWidget) != textbox-readonly.xul textbox-ref.xul # Windows: bug 1239170
--- a/toolkit/themes/linux/global/autocomplete.css
+++ b/toolkit/themes/linux/global/autocomplete.css
@@ -6,38 +6,20 @@
   == Styles used by the autocomplete widget.
   ======================================================================= */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
 /* ::::: autocomplete ::::: */
 
-/* .padded is used by autocomplete widgets that don't have an icon. Gross. -dwh */
-textbox:not(.padded) {
-  cursor: default;
-  padding: 0;
-}
-
 textbox[nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
-.autocomplete-textbox-container {
-  -moz-box-align: center;
-}
-
-textbox:not(.padded) .textbox-input-box {
-  margin: 0 3px;
-}
-
-.textbox-input-box {
-  -moz-box-align: center;
-}
-
 /* ::::: autocomplete popups ::::: */
 
 panel[type="autocomplete"],
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   border: 1px solid ThreeDShadow;
   padding: 0;
   color: -moz-FieldText;
--- a/toolkit/themes/osx/global/autocomplete.css
+++ b/toolkit/themes/osx/global/autocomplete.css
@@ -1,33 +1,19 @@
 /* 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/. */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
-/* .padded is used by autocomplete widgets that don't have an icon. Gross. -dwh */
-textbox:not(.padded) {
-  cursor: default;
-  padding: 0;
-}
-
 textbox[nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
-textbox:not(.padded) .textbox-input-box {
-  margin: 0 3px;
-}
-
-.textbox-input-box {
-  -moz-box-align: center;
-}
-
 /* ::::: autocomplete popups ::::: */
 
 panel[type="autocomplete"],
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   padding: 0px !important;
   color: -moz-FieldText;
   background-color: -moz-Field;
--- a/toolkit/themes/windows/global/autocomplete.css
+++ b/toolkit/themes/windows/global/autocomplete.css
@@ -6,38 +6,20 @@
   == Styles used by the autocomplete widget.
   ======================================================================= */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
 /* ::::: autocomplete ::::: */
 
-/* .padded is used by autocomplete widgets that don't have an icon. Gross. -dwh */
-textbox:not(.padded) {
-  cursor: default;
-  padding: 0;
-}
-
 textbox[nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
-.autocomplete-textbox-container {
-  -moz-box-align: center;
-}
-
-textbox:not(.padded) .textbox-input-box {
-  margin: 0 3px;
-}
-
-.textbox-input-box {
-  -moz-box-align: center;
-}
-
 /* ::::: autocomplete popups ::::: */
 
 panel[type="autocomplete"],
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   -moz-appearance: none;
   border-width: 1px;
   -moz-border-top-colors: ThreeDShadow;