Bug 1438814 - Use pre-increment operator for height changes. r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 24 Aug 2018 12:42:33 +0900
changeset 488355 8cf98bdb463d7953ac604c4788f0788c6d272e45
parent 488354 e1127dfee76a03cfb7f674234b08adde0009ecda
child 488356 f433ed4ff1de863250d6ebf82b5bc5afcea9b6c7
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1438814
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 1438814 - Use pre-increment operator for height changes. r=birtles With post increment operator, the first callback doesn't change height at all. Differential Revision: https://phabricator.services.mozilla.com/D4182
testing/web-platform/tests/css/css-values/reference/vh_not_refreshing_on_chrome-ref.html
testing/web-platform/tests/css/css-values/vh_not_refreshing_on_chrome.html
--- a/testing/web-platform/tests/css/css-values/reference/vh_not_refreshing_on_chrome-ref.html
+++ b/testing/web-platform/tests/css/css-values/reference/vh_not_refreshing_on_chrome-ref.html
@@ -31,20 +31,20 @@
 
 		var height = 200;
 
 		function resizeReference() {
 
 			var frameTest = document.getElementById('frameTest');
 
 			// let's resize the iframe vertically only, showing that the vh sizes is not updated.
-			if (height <= 300) {
+			if (height < 300) {
 
 				//frameTest.style.width = height++ + "px";
-				frameTest.style.height = height++ + "px";
+				frameTest.style.height = ++height + "px";
 
 				setTimeout(resizeReference, 10);
 
 			} else {
 
 				// uncomment the next line to see how a width resize triggers a layout recalculation
 				//frameTest.style.width = (parseInt(window.getComputedStyle(document.getElementById('frameTest'))['width'], 10) + 1) + "px";
 
--- a/testing/web-platform/tests/css/css-values/vh_not_refreshing_on_chrome.html
+++ b/testing/web-platform/tests/css/css-values/vh_not_refreshing_on_chrome.html
@@ -34,20 +34,20 @@
 
 		var height = 200;
 
 		function resizeReference() {
 
 			var frameTest = document.getElementById('frameTest');
 
 			// let's resize the iframe vertically only, showing that the vh sizes is not updated.
-			if (height <= 300) {
+			if (height < 300) {
 
 				//frameTest.style.width = height++ + "px";
-				frameTest.style.height = height++ + "px";
+				frameTest.style.height = ++height + "px";
 
 				setTimeout(resizeReference, 10);
 
 			} else {
 
 				// uncomment the next line to see how a width resize triggers a layout recalculation
 				//frameTest.style.width = (parseInt(window.getComputedStyle(document.getElementById('frameTest'))['width'], 10) + 1) + "px";