Bug 1467572 - Part 14: Set the minimum viewport dimension to 50px. r=rcaliman
☠☠ backed out by dc2c0b075c0e ☠ ☠
authorGabriel Luong <gabriel.luong@gmail.com>
Wed, 15 Aug 2018 17:27:49 -0400
changeset 431828 4e6b95a6c50619759eced56ee409a8bb1b63a212
parent 431827 36d459a2402089a49e901a8d5b393cb997c33af9
child 431829 41d85a6f8a2a04ed8f0206da7b3e3a2c997b3f04
push id34451
push userebalazs@mozilla.com
push dateThu, 16 Aug 2018 09:25:15 +0000
treeherdermozilla-central@161817e6d127 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrcaliman
bugs1467572
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1467572 - Part 14: Set the minimum viewport dimension to 50px. r=rcaliman
devtools/client/responsive.html/components/ViewportDimension.js
devtools/client/responsive.html/constants.js
--- a/devtools/client/responsive.html/components/ViewportDimension.js
+++ b/devtools/client/responsive.html/components/ViewportDimension.js
@@ -52,17 +52,17 @@ class ViewportDimension extends Componen
     });
   }
 
   /**
    * Return true if the given value is a number and greater than MIN_VIEWPORT_DIMENSION
    * and false otherwise.
    */
   isInputValid(value) {
-    return /^\d{3,4}$/.test(value) && parseInt(value, 10) >= MIN_VIEWPORT_DIMENSION;
+    return /^\d{2,4}$/.test(value) && parseInt(value, 10) >= MIN_VIEWPORT_DIMENSION;
   }
 
   onInputBlur() {
     const { width, height } = this.props.viewport;
 
     if (this.state.width != width || this.state.height != height) {
       this.onInputSubmit();
     }
--- a/devtools/client/responsive.html/constants.js
+++ b/devtools/client/responsive.html/constants.js
@@ -1,8 +1,8 @@
 /* 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/. */
 
 "use strict";
 
 // The minimum viewport width and height
-exports.MIN_VIEWPORT_DIMENSION = 280;
+exports.MIN_VIEWPORT_DIMENSION = 50;