Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2022-09-23 11:04:25 +08:00
commit f84bc6d605
9 changed files with 46 additions and 47 deletions

View file

@ -1032,7 +1032,7 @@ OutputPanel.prototype._resize = function () {
break;
}
this.document.body.style.width = "-moz-max-content";
this.document.body.style.width = "max-content";
let style = this._frame.contentWindow.getComputedStyle(this.document.body);
let frameWidth = parseInt(style.width, 10);
let width = Math.min(maxWidth, frameWidth);

View file

@ -2209,13 +2209,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -2232,13 +2232,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -3304,9 +3304,7 @@ exports.CSS_PROPERTIES = {
"-moz-mac-source-list-selection",
"-moz-mac-vibrancy-dark",
"-moz-mac-vibrancy-light",
"-moz-max-content",
"-moz-middle-with-baseline",
"-moz-min-content",
"-moz-none",
"-moz-popup",
"-moz-pre-space",
@ -3362,6 +3360,7 @@ exports.CSS_PROPERTIES = {
"bottom",
"bottom-outside",
"break-all",
"break-spaces",
"break-word",
"butt",
"button",
@ -3493,6 +3492,7 @@ exports.CSS_PROPERTIES = {
"margin-box",
"match-source",
"mathematical",
"max-content",
"medium",
"menuarrow",
"menubar",
@ -3510,6 +3510,7 @@ exports.CSS_PROPERTIES = {
"meterbar",
"meterchunk",
"middle",
"min-content",
"miter",
"mixed",
"multiply",
@ -6000,13 +6001,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -6023,13 +6024,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -6816,12 +6817,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -6903,12 +6904,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -7651,11 +7652,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@ -7673,11 +7674,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@ -7695,11 +7696,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@ -7735,12 +7736,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -7757,12 +7758,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -7779,12 +7780,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@ -9543,12 +9544,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},

View file

@ -285,7 +285,8 @@ bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType,
// behavior, where they use their helper apps to open WAV audio
// instead. We should allow this old behavior behind a pref for
// those who want it.
if (!Preferences::GetBool("media.wave.play-stand-alone", true)) {
if (!Preferences::GetBool("media.wave.play-stand-alone", true) &&
IsWaveSupportedType(nsDependentCString(aMIMEType))) {
return false;
}

View file

@ -4676,7 +4676,7 @@ GetDefiniteSizeTakenByBoxSizing(StyleBoxSizing aBoxSizing,
return sizeTakenByBoxSizing;
}
// Handles only -moz-max-content and -moz-min-content, and
// Handles only max-content and min-content, and
// -moz-fit-content for min-width and max-width, since the others
// (-moz-fit-content for width, and -moz-available) have no effect on
// intrinsic widths.
@ -4704,10 +4704,10 @@ GetIntrinsicCoord(const nsStyleCoord& aStyle,
if (aProperty == PROP_WIDTH)
return false; // handle like 'width: auto'
if (aProperty == PROP_MAX_WIDTH)
// constrain large 'width' values down to -moz-max-content
// constrain large 'width' values down to max-content
val = NS_STYLE_WIDTH_MAX_CONTENT;
else
// constrain small 'width' or 'max-width' values up to -moz-min-content
// constrain small 'width' or 'max-width' values up to min-content
val = NS_STYLE_WIDTH_MIN_CONTENT;
}
@ -4991,7 +4991,7 @@ nsLayoutUtils::IntrinsicForAxis(PhysicalAxis aAxis,
styleISize.GetIntValue() == NS_STYLE_WIDTH_MIN_CONTENT)) {
// -moz-fit-content and -moz-available enumerated widths compute intrinsic
// widths just like auto.
// For -moz-max-content and -moz-min-content, we handle them like
// For max-content and min-content, we handle them like
// specified widths, but ignore box-sizing.
boxSizing = StyleBoxSizing::Content;
if (aMarginBoxMinSizeClamp != NS_MAXSIZE &&

View file

@ -98,13 +98,11 @@ CSS_KEY(-moz-mac-menutextdisable, _moz_mac_menutextdisable)
CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect)
CSS_KEY(-moz-mac-disabledtoolbartext, _moz_mac_disabledtoolbartext)
CSS_KEY(-moz-mac-secondaryhighlight, _moz_mac_secondaryhighlight)
CSS_KEY(-moz-max-content, _moz_max_content)
CSS_KEY(-moz-menuhover, _moz_menuhover)
CSS_KEY(-moz-menuhovertext, _moz_menuhovertext)
CSS_KEY(-moz-menubartext, _moz_menubartext)
CSS_KEY(-moz-menubarhovertext, _moz_menubarhovertext)
CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
CSS_KEY(-moz-min-content, _moz_min_content)
CSS_KEY(-moz-nativehyperlinktext, _moz_nativehyperlinktext)
CSS_KEY(-moz-none, _moz_none)
CSS_KEY(-moz-oddtreerow, _moz_oddtreerow)

View file

@ -2258,8 +2258,8 @@ const KTableEntry nsCSSProps::kWhitespaceKTable[] = {
};
const KTableEntry nsCSSProps::kWidthKTable[] = {
{ eCSSKeyword__moz_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
{ eCSSKeyword__moz_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
{ eCSSKeyword_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
{ eCSSKeyword_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
{ eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT },
{ eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE },
{ eCSSKeyword_UNKNOWN, -1 }
@ -2267,11 +2267,11 @@ const KTableEntry nsCSSProps::kWidthKTable[] = {
// This must be the same as kWidthKTable, but just with 'content' added:
const KTableEntry nsCSSProps::kFlexBasisKTable[] = {
{ eCSSKeyword__moz_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
{ eCSSKeyword__moz_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
{ eCSSKeyword_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
{ eCSSKeyword_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
{ eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT },
{ eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE },
{ eCSSKeyword_content, NS_STYLE_FLEX_BASIS_CONTENT },
{ eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE },
{ eCSSKeyword_content, NS_STYLE_FLEX_BASIS_CONTENT },
{ eCSSKeyword_UNKNOWN, -1 }
};
static_assert(ArrayLength(nsCSSProps::kFlexBasisKTable) ==

View file

@ -8594,7 +8594,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
}
}
// We allow the enumerated box size property values -moz-min-content, etc. to
// We allow the enumerated box size property values min-content, etc. to
// be specified on both the {,min-,max-}width properties and the
// {,min-,max-}height properties, regardless of the writing mode. This is
// because the writing mode is not determined until here, at computed value

View file

@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// vim:cindent:ts=4:et:sw=4:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@ -181,7 +180,7 @@ GetISizeInfo(nsRenderingContext *aRenderingContext,
maxISize.SetNoneValue();
} else if (maxISize.GetIntValue() == NS_STYLE_WIDTH_FIT_CONTENT) {
// for 'max-inline-size', '-moz-fit-content' is like
// '-moz-max-content'
// 'max-content'
maxISize.SetIntValue(NS_STYLE_WIDTH_MAX_CONTENT,
eStyleUnit_Enumerated);
}
@ -208,7 +207,7 @@ GetISizeInfo(nsRenderingContext *aRenderingContext,
minISize.SetCoordValue(0);
} else if (minISize.GetIntValue() == NS_STYLE_WIDTH_FIT_CONTENT) {
// for 'min-inline-size', '-moz-fit-content' is like
// '-moz-min-content'
// 'min-content'
minISize.SetIntValue(NS_STYLE_WIDTH_MIN_CONTENT,
eStyleUnit_Enumerated);
}

View file

@ -3813,7 +3813,7 @@ nsTableFrame::IsAutoLayout()
if (StyleTable()->mLayoutStrategy == NS_STYLE_TABLE_LAYOUT_AUTO)
return true;
// a fixed-layout inline-table must have a inline size
// and tables with inline size set to '-moz-max-content' must be
// and tables with inline size set to 'max-content' must be
// auto-layout (at least as long as
// FixedTableLayoutStrategy::GetPrefISize returns nscoord_MAX)
const nsStyleCoord &iSize = StylePosition()->ISize(GetWritingMode());