Bug 965237 - Make overflow-clip-box:content-box be the default for <input type=text/password/number> and <textarea>. r=roc a=sledru
authorMats Palmgren <matspal@gmail.com>
Sat, 22 Feb 2014 01:18:24 +0000
changeset 183034 20f7051ed50084256371426f2a388ecadc2f655d
parent 183033 5637570fb3872ee6d973de44f6f989232b2a60c2
child 183035 92ea8e6bdb6e21002f3fdaba23a6d2f84ab1729b
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, sledru
bugs965237
milestone29.0a2
Bug 965237 - Make overflow-clip-box:content-box be the default for <input type=text/password/number> and <textarea>. r=roc a=sledru
layout/reftests/forms/placeholder/reftest.list
layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html
layout/style/forms.css
layout/style/ua.css
--- a/layout/reftests/forms/placeholder/reftest.list
+++ b/layout/reftests/forms/placeholder/reftest.list
@@ -11,17 +11,17 @@
 == placeholder-1-text.html placeholder-visible-ref.html
 == placeholder-1-password.html placeholder-visible-ref.html
 == placeholder-1-textarea.html placeholder-visible-textarea-ref.html
 == placeholder-2.html placeholder-visible-ref.html
 == placeholder-2-textarea.html placeholder-visible-textarea-ref.html
 == placeholder-3.html placeholder-overridden-ref.html
 == placeholder-4.html placeholder-overridden-ref.html
 == placeholder-5.html placeholder-visible-ref.html
-== placeholder-6.html placeholder-overflow-ref.html
+fuzzy-if(winWidget,160,6) == placeholder-6.html placeholder-overflow-ref.html
 skip-if(B2G) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html
 # needs-focus == placeholder-7.html placeholder-focus-ref.html
 # needs-focus == placeholder-8.html placeholder-focus-ref.html
 # needs-focus == placeholder-9.html placeholder-focus-ref.html
 needs-focus == placeholder-10.html placeholder-visible-ref.html
 == placeholder-11.html placeholder-visible-ref.html
 == placeholder-12.html placeholder-visible-ref.html
 == placeholder-13.html placeholder-visible-ref.html
--- a/layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html
+++ b/layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html
@@ -23,21 +23,29 @@
             #cover {
                 position: absolute;
                 left: 400px;
                 top: 50px;
                 width: 100px;
                 height: 300px;
                 background: black;
             }
+            #cover2 { /* corresponds to the bottom padding inside the textarea */
+                position: absolute;
+                left: 0px;
+                bottom: 0px;
+                width: 100%;
+                height: 50px;
+                background: white;
+            }
         </style>
     </head>
     <body>
         <script>
         var ss = [];
         for (var i = 0; i < 1000; ++i) {
           ss.push(i);
         }
-        document.write("<div id='t'>" + ss.join(" ") + "</div>");
+        document.write("<div id='t'><div id=cover2></div>" + ss.join(" ") + "</div>");
         </script>
         <div id="cover"></div>
     </body>
 </html>
--- a/layout/style/forms.css
+++ b/layout/style/forms.css
@@ -110,16 +110,17 @@ textarea {
   cursor: text;
   resize: both;
   -moz-binding: url("chrome://global/content/platformHTMLBindings.xml#textAreas");
   -moz-appearance: textfield-multiline;
   text-indent: 0;
   -moz-user-select: text;
   text-shadow: none;
   word-wrap: break-word;
+  overflow-clip-box: content-box;
 }
 
 textarea > scrollbar {
   cursor: default;
 }
 
 textarea > .anonymous-div,
 input > .anonymous-div,
@@ -131,16 +132,17 @@ textarea::-moz-placeholder {
   padding: inherit !important;
   margin: 0px;
   text-decoration: inherit;
   -moz-text-decoration-color: inherit;
   -moz-text-decoration-style: inherit;
   display: inline-block;
   ime-mode: inherit;
   resize: inherit;
+  overflow-clip-box: inherit;
 }
 
 textarea > .anonymous-div.wrap,
 input > .anonymous-div.wrap {
   white-space: pre-wrap;
 }
 textarea > .anonymous-div.inherit-overflow,
 input > .anonymous-div.inherit-overflow {
@@ -372,16 +374,21 @@ textarea:disabled {
   cursor: default;
 }
 
 option:disabled,
 optgroup:disabled {
   background-color: transparent;
 }
 
+input[type="text"],
+input[type="password"] {
+  overflow-clip-box: content-box;
+}
+
 /* hidden inputs */
 input[type="hidden"] {
   -moz-appearance: none;
   display: none !important;
   padding: 0;
   border: 0;
   cursor: auto;
   -moz-user-focus: ignore;
@@ -883,16 +890,17 @@ input[type=range]::-moz-range-thumb {
   -moz-user-select: none ! important;
 }
 
 input[type="number"] {
   -moz-appearance: number-input;
   /* Has to revert some properties applied by the generic input rule. */
   -moz-binding: none;
   width: 149px; /* to match type=text */
+  overflow-clip-box: content-box;
 }
 
 input[type=number]::-moz-number-wrapper {
   /* Prevent styling that would change the type of frame we construct. */
   display: flex;
   float: none !important;
   position: static !important;
   height: 100%;
--- a/layout/style/ua.css
+++ b/layout/style/ua.css
@@ -98,36 +98,39 @@
 
 /* Miscellaneous */
 
 *|*::-moz-anonymous-block, *|*::-moz-cell-content {
   display: block !important;
   position: static !important;
   unicode-bidi: inherit;
   text-overflow: inherit;
+  overflow-clip-box: inherit;
 }
 
 *|*::-moz-anonymous-block, *|*::-moz-anonymous-positioned-block {
   /* we currently inherit from the inline that is split */
   outline: inherit;
   outline-offset: inherit;
   clip-path: inherit;
   filter: inherit;
   mask: inherit;
   opacity: inherit;
   text-decoration: inherit;
   -moz-box-ordinal-group: inherit !important;
+  overflow-clip-box: inherit;
 }
 
 *|*::-moz-xul-anonymous-block {
   display: block ! important;
   position: static ! important;
   float: none ! important;
   -moz-box-ordinal-group: inherit !important;
   text-overflow: inherit;
+  overflow-clip-box: inherit;
 }
 
 *|*::-moz-scrolled-content, *|*::-moz-scrolled-canvas,
 *|*::-moz-scrolled-page-sequence {
   /* e.g., text inputs, select boxes */
   padding: inherit;
   /* The display doesn't affect the kind of frame constructed here.  This just
      affects auto-width sizing of the block we create. */
@@ -146,16 +149,17 @@
   align-items: inherit;
   flex-direction: inherit;
   flex-wrap: inherit;
   justify-content: inherit;
   /* Do not change these. nsCSSFrameConstructor depends on them to create a good
      frame tree. */
   position: static !important;
   float: none !important;
+  overflow-clip-box: inherit;
 }
 
 *|*::-moz-viewport, *|*::-moz-viewport-scroll, *|*::-moz-canvas, *|*::-moz-scrolled-canvas {
   display: block !important;
   background-color: inherit;
 }
 
 *|*::-moz-viewport-scroll {