mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Backed out changeset 9d9fe1cd50ec (bug 1930292) for causing Win11 visual regressions. CLOSED TREE
This commit is contained in:
parent
c3d046b004
commit
15b1a753aa
@ -69,9 +69,11 @@ var TabsInTitlebar = {
|
||||
!Object.keys(this._disallowed).length;
|
||||
if (allowed) {
|
||||
document.documentElement.setAttribute("tabsintitlebar", "true");
|
||||
document.documentElement.setAttribute("chromemargin", "0,0,0,0");
|
||||
if (AppConstants.platform == "macosx") {
|
||||
document.documentElement.setAttribute("chromemargin", "0,-1,-1,-1");
|
||||
document.documentElement.removeAttribute("drawtitle");
|
||||
} else {
|
||||
document.documentElement.setAttribute("chromemargin", "0,2,2,2");
|
||||
}
|
||||
} else {
|
||||
document.documentElement.removeAttribute("tabsintitlebar");
|
||||
|
@ -17,7 +17,11 @@
|
||||
#endif
|
||||
data-l10n-args="{"content-title":"CONTENTTITLE"}"
|
||||
data-l10n-attrs="data-content-title-default, data-content-title-private, data-title-default, data-title-private"
|
||||
chromemargin="0,0,0,0"
|
||||
#ifdef XP_WIN
|
||||
chromemargin="0,2,2,2"
|
||||
#else
|
||||
chromemargin="0,-1,-1,-1"
|
||||
#endif
|
||||
tabsintitlebar="true"
|
||||
windowtype="navigator:browser"
|
||||
macanimationtype="document"
|
||||
|
@ -1995,16 +1995,22 @@ static Result<Ok, PreXULSkeletonUIError> CreateAndStorePreXULSkeletonUIImpl(
|
||||
sCaptionHeight =
|
||||
sVerticalResizeMargin + sGetSystemMetricsForDpi(SM_CYCAPTION, sDpi);
|
||||
|
||||
// These match the offsets that we get with default prefs. We don't use the
|
||||
// skeleton ui if tabsInTitlebar is disabled, see bug 1673092.
|
||||
// These match the margins set in browser-tabsintitlebar.js with default prefs
|
||||
// on Windows. We don't use the skeleton ui if tabsInTitlebar is disabled, see
|
||||
// bug 1673092.
|
||||
const Margin nonClientMargin{0, 2, 2, 2};
|
||||
|
||||
if (sMaximized) {
|
||||
sNonClientOffset.top = sCaptionHeight - sVerticalResizeMargin;
|
||||
} else {
|
||||
// See nsWindow::NormalWindowNonClientOffset()
|
||||
sNonClientOffset.top = sCaptionHeight;
|
||||
sNonClientOffset.bottom = sVerticalResizeMargin;
|
||||
sNonClientOffset.left = sHorizontalResizeMargin;
|
||||
sNonClientOffset.right = sHorizontalResizeMargin;
|
||||
sNonClientOffset.bottom =
|
||||
std::min(sVerticalResizeMargin, nonClientMargin.bottom);
|
||||
sNonClientOffset.left =
|
||||
std::min(sHorizontalResizeMargin, nonClientMargin.left);
|
||||
sNonClientOffset.right =
|
||||
std::min(sHorizontalResizeMargin, nonClientMargin.right);
|
||||
}
|
||||
|
||||
if (sMaximized) {
|
||||
|
@ -197,9 +197,8 @@ add_task(async function test_found_resize() {
|
||||
info(`values: ${JSON.stringify(values)}`);
|
||||
info(`resizedValues: ${JSON.stringify(resizedValues)}`);
|
||||
isfuzzy(resizedValues[0], values[0], 2, "first value");
|
||||
const kSlop = 50;
|
||||
Assert.greaterOrEqual(resizedValues[1] - kSlop, values[1], "second value");
|
||||
Assert.greaterOrEqual(resizedValues[2] - kSlop, values[2], "third value");
|
||||
Assert.greater(resizedValues[1] - 50, values[1], "second value");
|
||||
Assert.greater(resizedValues[2] - 50, values[2], "third value");
|
||||
|
||||
endFn();
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
height="300"
|
||||
width="300"
|
||||
sizemode="normal"
|
||||
chromemargin="0,0,0,0"
|
||||
chromemargin="0,2,2,2"
|
||||
id="window"
|
||||
persist="height width sizemode">
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
Loading…
Reference in New Issue
Block a user