зеркало из https://github.com/mozilla/gecko-dev.git
Bug 672411 - Minor refactoring of default values for viewport height/width [r=lucasr]
This commit is contained in:
Родитель
7da0076650
Коммит
96e6e1fd47
|
@ -2798,14 +2798,10 @@ Tab.prototype = {
|
|||
let validW = viewportW > 0;
|
||||
let validH = viewportH > 0;
|
||||
|
||||
if (validW && !validH) {
|
||||
if (!validW)
|
||||
viewportW = validH ? (viewportH * (screenW / screenH)) : Browser.defaultBrowserWidth;
|
||||
if (!validH)
|
||||
viewportH = viewportW * (screenH / screenW);
|
||||
} else if (!validW && validH) {
|
||||
viewportW = viewportH * (screenW / screenH);
|
||||
} else if (!validW && !validH) {
|
||||
viewportW = Browser.defaultBrowserWidth;
|
||||
viewportH = Browser.defaultBrowserWidth * (screenH / screenW);
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the viewport height is not shorter than the window when
|
||||
|
|
Загрузка…
Ссылка в новой задаче