зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1608638 - Apply a floor and ceiling to Urlbar position values in performance/head.js. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D59942 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
47140565fc
Коммит
99cf823836
|
@ -788,7 +788,6 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks {
|
|||
toolbarpaletteitem[place=toolbar][id^=wrapper-customizableui-special-spring],
|
||||
toolbarspring {
|
||||
-moz-box-flex: 1;
|
||||
min-width: 1px;
|
||||
max-width: 112px;
|
||||
}
|
||||
|
||||
|
|
|
@ -775,12 +775,14 @@ async function runUrlbarTest(
|
|||
// So we just whitelist the whole urlbar. We don't check the bottom of
|
||||
// the rect because the result view height varies depending on the
|
||||
// results.
|
||||
// We use floor/ceil because the Urlbar dimensions aren't always
|
||||
// integers.
|
||||
return rects.filter(
|
||||
r =>
|
||||
!(
|
||||
r.x1 >= urlbarRect.left - SHADOW_SIZE &&
|
||||
r.x2 <= urlbarRect.right + SHADOW_SIZE &&
|
||||
r.y1 >= urlbarRect.top - SHADOW_SIZE
|
||||
r.x1 >= Math.floor(urlbarRect.left) - SHADOW_SIZE &&
|
||||
r.x2 <= Math.ceil(urlbarRect.right) + SHADOW_SIZE &&
|
||||
r.y1 >= Math.floor(urlbarRect.top) - SHADOW_SIZE
|
||||
)
|
||||
);
|
||||
},
|
||||
|
@ -800,16 +802,16 @@ async function runUrlbarTest(
|
|||
r =>
|
||||
!// We put text into the urlbar so expect its textbox to change.
|
||||
(
|
||||
(r.x1 >= textBoxRect.left &&
|
||||
r.x2 <= textBoxRect.right &&
|
||||
r.y1 >= textBoxRect.top &&
|
||||
r.y2 <= textBoxRect.bottom) ||
|
||||
(r.x1 >= Math.floor(textBoxRect.left) &&
|
||||
r.x2 <= Math.ceil(textBoxRect.right) &&
|
||||
r.y1 >= Math.floor(textBoxRect.top) &&
|
||||
r.y2 <= Math.ceil(textBoxRect.bottom)) ||
|
||||
// The dropmarker is displayed as active during some of the test.
|
||||
// dropmarkerRect.left isn't always an integer, hence the - 1 and + 1
|
||||
(r.x1 >= dropmarkerRect.left - 1 &&
|
||||
r.x2 <= dropmarkerRect.right + 1 &&
|
||||
r.y1 >= dropmarkerRect.top &&
|
||||
r.y2 <= dropmarkerRect.bottom)
|
||||
// dropmarkerRect.left isn't always an integer.
|
||||
(r.x1 >= Math.floor(dropmarkerRect.left) &&
|
||||
r.x2 <= Math.ceil(dropmarkerRect.right) &&
|
||||
r.y1 >= Math.floor(dropmarkerRect.top) &&
|
||||
r.y2 <= Math.ceil(dropmarkerRect.bottom))
|
||||
)
|
||||
),
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче