зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1431601 - Move getViewportInfo function into viewport_helpers.js. r=botond
Depends on D8317 Differential Revision: https://phabricator.services.mozilla.com/D8318 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1850f573a5
Коммит
c43cc6396c
|
@ -51,24 +51,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
if (tests.length)
|
||||
(tests.shift())();
|
||||
|
|
|
@ -47,24 +47,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
if (tests.length)
|
||||
(tests.shift())();
|
||||
|
|
|
@ -47,24 +47,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
if (tests.length)
|
||||
(tests.shift())();
|
||||
|
|
|
@ -49,24 +49,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
if (tests.length)
|
||||
(tests.shift())();
|
||||
|
|
|
@ -48,24 +48,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
if (tests.length)
|
||||
(tests.shift())();
|
||||
|
|
|
@ -24,24 +24,6 @@
|
|||
nextTest();
|
||||
});
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
if (tests.length)
|
||||
(tests.shift())();
|
||||
|
|
|
@ -53,24 +53,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
if (tests.length)
|
||||
(tests.shift())();
|
||||
|
|
|
@ -78,24 +78,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
||||
function updateViewport(content) {
|
||||
let meta = document.querySelector("meta[name=viewport]");
|
||||
meta.content = content;
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
function scaleRatio(scale) {
|
||||
return {"set": [["layout.css.devPixelsPerPx", "" + scale]]};
|
||||
}
|
||||
|
||||
function getViewportInfo(aDisplayWidth, aDisplayHeight) {
|
||||
let defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom = {},
|
||||
width = {}, height = {}, autoSize = {};
|
||||
|
||||
let cwu = SpecialPowers.getDOMWindowUtils(window);
|
||||
cwu.getViewportInfo(aDisplayWidth, aDisplayHeight, defaultZoom, allowZoom,
|
||||
minZoom, maxZoom, width, height, autoSize);
|
||||
return {
|
||||
defaultZoom: defaultZoom.value,
|
||||
minZoom: minZoom.value,
|
||||
maxZoom: maxZoom.value,
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
autoSize: autoSize.value,
|
||||
allowZoom: allowZoom.value
|
||||
};
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче