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
This commit is contained in:
Hiroyuki Ikezoe 2018-08-24 12:42:33 +09:00
Родитель 9338919da1
Коммит 35b5dfd828
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -36,10 +36,10 @@
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);

Просмотреть файл

@ -39,10 +39,10 @@
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);