mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 01:57:30 +09:00
Issue #1992 - Part 1: Un-prefix -moz-{min|max}-content keywords.
This commit is contained in:
parent
91b51a6509
commit
fa8bc1e81c
7 changed files with 15 additions and 18 deletions
|
|
@ -1032,7 +1032,7 @@ OutputPanel.prototype._resize = function () {
|
||||||
break;
|
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 style = this._frame.contentWindow.getComputedStyle(this.document.body);
|
||||||
let frameWidth = parseInt(style.width, 10);
|
let frameWidth = parseInt(style.width, 10);
|
||||||
let width = Math.min(maxWidth, frameWidth);
|
let width = Math.min(maxWidth, frameWidth);
|
||||||
|
|
|
||||||
|
|
@ -4676,7 +4676,7 @@ GetDefiniteSizeTakenByBoxSizing(StyleBoxSizing aBoxSizing,
|
||||||
return sizeTakenByBoxSizing;
|
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 min-width and max-width, since the others
|
||||||
// (-moz-fit-content for width, and -moz-available) have no effect on
|
// (-moz-fit-content for width, and -moz-available) have no effect on
|
||||||
// intrinsic widths.
|
// intrinsic widths.
|
||||||
|
|
@ -4704,10 +4704,10 @@ GetIntrinsicCoord(const nsStyleCoord& aStyle,
|
||||||
if (aProperty == PROP_WIDTH)
|
if (aProperty == PROP_WIDTH)
|
||||||
return false; // handle like 'width: auto'
|
return false; // handle like 'width: auto'
|
||||||
if (aProperty == PROP_MAX_WIDTH)
|
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;
|
val = NS_STYLE_WIDTH_MAX_CONTENT;
|
||||||
else
|
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;
|
val = NS_STYLE_WIDTH_MIN_CONTENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4991,7 +4991,7 @@ nsLayoutUtils::IntrinsicForAxis(PhysicalAxis aAxis,
|
||||||
styleISize.GetIntValue() == NS_STYLE_WIDTH_MIN_CONTENT)) {
|
styleISize.GetIntValue() == NS_STYLE_WIDTH_MIN_CONTENT)) {
|
||||||
// -moz-fit-content and -moz-available enumerated widths compute intrinsic
|
// -moz-fit-content and -moz-available enumerated widths compute intrinsic
|
||||||
// widths just like auto.
|
// 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.
|
// specified widths, but ignore box-sizing.
|
||||||
boxSizing = StyleBoxSizing::Content;
|
boxSizing = StyleBoxSizing::Content;
|
||||||
if (aMarginBoxMinSizeClamp != NS_MAXSIZE &&
|
if (aMarginBoxMinSizeClamp != NS_MAXSIZE &&
|
||||||
|
|
|
||||||
|
|
@ -98,13 +98,11 @@ CSS_KEY(-moz-mac-menutextdisable, _moz_mac_menutextdisable)
|
||||||
CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect)
|
CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect)
|
||||||
CSS_KEY(-moz-mac-disabledtoolbartext, _moz_mac_disabledtoolbartext)
|
CSS_KEY(-moz-mac-disabledtoolbartext, _moz_mac_disabledtoolbartext)
|
||||||
CSS_KEY(-moz-mac-secondaryhighlight, _moz_mac_secondaryhighlight)
|
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-menuhover, _moz_menuhover)
|
||||||
CSS_KEY(-moz-menuhovertext, _moz_menuhovertext)
|
CSS_KEY(-moz-menuhovertext, _moz_menuhovertext)
|
||||||
CSS_KEY(-moz-menubartext, _moz_menubartext)
|
CSS_KEY(-moz-menubartext, _moz_menubartext)
|
||||||
CSS_KEY(-moz-menubarhovertext, _moz_menubarhovertext)
|
CSS_KEY(-moz-menubarhovertext, _moz_menubarhovertext)
|
||||||
CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
|
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-nativehyperlinktext, _moz_nativehyperlinktext)
|
||||||
CSS_KEY(-moz-none, _moz_none)
|
CSS_KEY(-moz-none, _moz_none)
|
||||||
CSS_KEY(-moz-oddtreerow, _moz_oddtreerow)
|
CSS_KEY(-moz-oddtreerow, _moz_oddtreerow)
|
||||||
|
|
|
||||||
|
|
@ -2258,8 +2258,8 @@ const KTableEntry nsCSSProps::kWhitespaceKTable[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const KTableEntry nsCSSProps::kWidthKTable[] = {
|
const KTableEntry nsCSSProps::kWidthKTable[] = {
|
||||||
{ eCSSKeyword__moz_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
|
{ eCSSKeyword_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
|
||||||
{ eCSSKeyword__moz_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
|
{ eCSSKeyword_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
|
||||||
{ eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT },
|
{ eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT },
|
||||||
{ eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE },
|
{ eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE },
|
||||||
{ eCSSKeyword_UNKNOWN, -1 }
|
{ eCSSKeyword_UNKNOWN, -1 }
|
||||||
|
|
@ -2267,8 +2267,8 @@ const KTableEntry nsCSSProps::kWidthKTable[] = {
|
||||||
|
|
||||||
// This must be the same as kWidthKTable, but just with 'content' added:
|
// This must be the same as kWidthKTable, but just with 'content' added:
|
||||||
const KTableEntry nsCSSProps::kFlexBasisKTable[] = {
|
const KTableEntry nsCSSProps::kFlexBasisKTable[] = {
|
||||||
{ eCSSKeyword__moz_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
|
{ eCSSKeyword_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
|
||||||
{ eCSSKeyword__moz_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
|
{ eCSSKeyword_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
|
||||||
{ eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT },
|
{ eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT },
|
||||||
{ eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE },
|
{ eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE },
|
||||||
{ eCSSKeyword_content, NS_STYLE_FLEX_BASIS_CONTENT },
|
{ eCSSKeyword_content, NS_STYLE_FLEX_BASIS_CONTENT },
|
||||||
|
|
|
||||||
|
|
@ -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
|
// be specified on both the {,min-,max-}width properties and the
|
||||||
// {,min-,max-}height properties, regardless of the writing mode. This is
|
// {,min-,max-}height properties, regardless of the writing mode. This is
|
||||||
// because the writing mode is not determined until here, at computed value
|
// because the writing mode is not determined until here, at computed value
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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
|
/* 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
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
@ -181,7 +180,7 @@ GetISizeInfo(nsRenderingContext *aRenderingContext,
|
||||||
maxISize.SetNoneValue();
|
maxISize.SetNoneValue();
|
||||||
} else if (maxISize.GetIntValue() == NS_STYLE_WIDTH_FIT_CONTENT) {
|
} else if (maxISize.GetIntValue() == NS_STYLE_WIDTH_FIT_CONTENT) {
|
||||||
// for 'max-inline-size', '-moz-fit-content' is like
|
// for 'max-inline-size', '-moz-fit-content' is like
|
||||||
// '-moz-max-content'
|
// 'max-content'
|
||||||
maxISize.SetIntValue(NS_STYLE_WIDTH_MAX_CONTENT,
|
maxISize.SetIntValue(NS_STYLE_WIDTH_MAX_CONTENT,
|
||||||
eStyleUnit_Enumerated);
|
eStyleUnit_Enumerated);
|
||||||
}
|
}
|
||||||
|
|
@ -208,7 +207,7 @@ GetISizeInfo(nsRenderingContext *aRenderingContext,
|
||||||
minISize.SetCoordValue(0);
|
minISize.SetCoordValue(0);
|
||||||
} else if (minISize.GetIntValue() == NS_STYLE_WIDTH_FIT_CONTENT) {
|
} else if (minISize.GetIntValue() == NS_STYLE_WIDTH_FIT_CONTENT) {
|
||||||
// for 'min-inline-size', '-moz-fit-content' is like
|
// for 'min-inline-size', '-moz-fit-content' is like
|
||||||
// '-moz-min-content'
|
// 'min-content'
|
||||||
minISize.SetIntValue(NS_STYLE_WIDTH_MIN_CONTENT,
|
minISize.SetIntValue(NS_STYLE_WIDTH_MIN_CONTENT,
|
||||||
eStyleUnit_Enumerated);
|
eStyleUnit_Enumerated);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3813,7 +3813,7 @@ nsTableFrame::IsAutoLayout()
|
||||||
if (StyleTable()->mLayoutStrategy == NS_STYLE_TABLE_LAYOUT_AUTO)
|
if (StyleTable()->mLayoutStrategy == NS_STYLE_TABLE_LAYOUT_AUTO)
|
||||||
return true;
|
return true;
|
||||||
// a fixed-layout inline-table must have a inline size
|
// 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
|
// auto-layout (at least as long as
|
||||||
// FixedTableLayoutStrategy::GetPrefISize returns nscoord_MAX)
|
// FixedTableLayoutStrategy::GetPrefISize returns nscoord_MAX)
|
||||||
const nsStyleCoord &iSize = StylePosition()->ISize(GetWritingMode());
|
const nsStyleCoord &iSize = StylePosition()->ISize(GetWritingMode());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue