Bug 1569877 - Consider textarea as a replaced element; r=miker a=RyanVM
authorPatrick Brosset <pbrosset@mozilla.com>
Tue, 30 Jul 2019 12:56:03 +0000
changeset 541688 0ba385b3664aa07f0ab1e2ed60641a68e03fb9be
parent 541687 50ee1a7532f4ba077092feb886d8e92a505b93c0
child 541689 b8080b50a51511e043a3116f7556f418666d0193
push id11677
push userarchaeopteryx@coole-files.de
push dateThu, 01 Aug 2019 18:15:46 +0000
treeherdermozilla-beta@5db1324ed737 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmiker, RyanVM
bugs1569877
milestone69.0
Bug 1569877 - Consider textarea as a replaced element; r=miker a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D39866
devtools/server/actors/utils/inactive-property-helper.js
devtools/server/tests/mochitest/inactive-property-helper/max-min-width-height.js
--- a/devtools/server/actors/utils/inactive-property-helper.js
+++ b/devtools/server/actors/utils/inactive-property-helper.js
@@ -481,16 +481,17 @@ class InactivePropertyHelper {
         "math",
         "object",
         "picture",
         // Select is a replaced element if it has `size<=1` or no size specified, but
         // unconditionally treating it as replaced is enough for our purpose here, and
         // avoids extra complexity that will likely not be necessary in most cases.
         "select",
         "svg",
+        "textarea",
         "video",
       ])
     ) {
       return true;
     }
 
     // img tags are replaced elements only when the image has finished loading.
     if (this.nodeName === "img" && this.node.complete) {
--- a/devtools/server/tests/mochitest/inactive-property-helper/max-min-width-height.js
+++ b/devtools/server/tests/mochitest/inactive-property-helper/max-min-width-height.js
@@ -106,16 +106,23 @@ export default [
   {
     info: "width is active on an inline select element",
     property: "width",
     tagName: "select",
     rules: ["select { display: inline; width: 500px; }"],
     isActive: true,
   },
   {
+    info: "width is active on a textarea element",
+    property: "width",
+    tagName: "textarea",
+    rules: ["textarea { width: 500px; }"],
+    isActive: true,
+  },
+  {
     info: "min-width is active on a replaced inline element",
     property: "min-width",
     tagName: "img",
     rules: ["img { min-width: 500px; }"],
     isActive: true,
   },
   {
     info: "max-width is active on a replaced inline element",
@@ -225,16 +232,23 @@ export default [
   {
     info: "height is active on an inline select element",
     property: "height",
     tagName: "select",
     rules: ["select { display: inline; height: 500px; }"],
     isActive: true,
   },
   {
+    info: "height is active on a textarea element",
+    property: "height",
+    tagName: "textarea",
+    rules: ["textarea { height: 500px; }"],
+    isActive: true,
+  },
+  {
     info: "min-height is active on a replaced inline element",
     property: "min-height",
     tagName: "img",
     rules: ["img { min-height: 500px; }"],
     isActive: true,
   },
   {
     info: "max-height is active on a replaced inline element",