Bug 1467572 - Part 14: Set the minimum viewport dimension to 50px. r=rcaliman
authorGabriel Luong <gabriel.luong@gmail.com>
Wed, 15 Aug 2018 17:27:49 -0400
changeset 431861 8f34ca109aacc66918bb4e17a44cab8fd1acbbdf
parent 431860 2eb675aaabacaed8fcb14a6defb40f59212e3dc6
child 431862 e1e8061780fdf074a510b94240ab303f89950a4d
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;