зеркало из https://github.com/mozilla/pjs.git
Bug 763689: Add "auto" keyword for min-height and min-width, which for now just computes to 0. r=bz
This commit is contained in:
Родитель
2e63f4a2c9
Коммит
a0355de69e
|
@ -1980,7 +1980,7 @@ CSS_PROP_POSITION(
|
|||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
VARIANT_HLP | VARIANT_CALC,
|
||||
VARIANT_AHLP | VARIANT_CALC,
|
||||
nsnull,
|
||||
offsetof(nsStylePosition, mMinHeight),
|
||||
eStyleAnimType_Coord)
|
||||
|
@ -1992,7 +1992,7 @@ CSS_PROP_POSITION(
|
|||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
VARIANT_HKLP | VARIANT_CALC,
|
||||
VARIANT_AHKLP | VARIANT_CALC,
|
||||
kWidthKTable,
|
||||
offsetof(nsStylePosition, mMinWidth),
|
||||
eStyleAnimType_Coord)
|
||||
|
|
|
@ -6383,7 +6383,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
|||
SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC,
|
||||
aContext, mPresContext, canStoreInRuleTree);
|
||||
SetCoord(*aRuleData->ValueForMinWidth(), pos->mMinWidth, parentPos->mMinWidth,
|
||||
SETCOORD_LPEH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC,
|
||||
SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC,
|
||||
aContext, mPresContext, canStoreInRuleTree);
|
||||
SetCoord(*aRuleData->ValueForMaxWidth(), pos->mMaxWidth, parentPos->mMaxWidth,
|
||||
SETCOORD_LPOEH | SETCOORD_INITIAL_NONE | SETCOORD_STORE_CALC,
|
||||
|
@ -6393,12 +6393,21 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
|||
SETCOORD_LPAH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC,
|
||||
aContext, mPresContext, canStoreInRuleTree);
|
||||
SetCoord(*aRuleData->ValueForMinHeight(), pos->mMinHeight, parentPos->mMinHeight,
|
||||
SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC,
|
||||
SETCOORD_LPAH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC,
|
||||
aContext, mPresContext, canStoreInRuleTree);
|
||||
SetCoord(*aRuleData->ValueForMaxHeight(), pos->mMaxHeight, parentPos->mMaxHeight,
|
||||
SETCOORD_LPOH | SETCOORD_INITIAL_NONE | SETCOORD_STORE_CALC,
|
||||
aContext, mPresContext, canStoreInRuleTree);
|
||||
|
||||
|
||||
// Handle 'auto' values for min-width / min-height
|
||||
if (pos->mMinWidth.GetUnit() == eStyleUnit_Auto) {
|
||||
pos->mMinWidth.SetCoordValue(0);
|
||||
}
|
||||
if (pos->mMinHeight.GetUnit() == eStyleUnit_Auto) {
|
||||
pos->mMinHeight.SetCoordValue(0);
|
||||
}
|
||||
|
||||
// box-sizing: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForBoxSizing(),
|
||||
pos->mBoxSizing, canStoreInRuleTree,
|
||||
|
|
|
@ -2352,7 +2352,7 @@ var gCSSProperties = {
|
|||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
prerequisites: { "display": "block" },
|
||||
initial_values: [ "0", "-moz-calc(0em)", "-moz-calc(-2px)", "-moz-calc(-1%)" ],
|
||||
initial_values: [ "auto", "0", "-moz-calc(0em)", "-moz-calc(-2px)", "-moz-calc(-1%)" ],
|
||||
other_values: [ "30px", "50%",
|
||||
"-moz-calc(2px)",
|
||||
"-moz-calc(50%)",
|
||||
|
@ -2360,14 +2360,14 @@ var gCSSProperties = {
|
|||
"-moz-calc(25px*3)",
|
||||
"-moz-calc(3*25px + 50%)",
|
||||
],
|
||||
invalid_values: [ "auto", "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
|
||||
invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
|
||||
},
|
||||
"min-width": {
|
||||
domProp: "minWidth",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
prerequisites: { "display": "block" },
|
||||
initial_values: [ "0", "-moz-calc(0em)", "-moz-calc(-2px)", "-moz-calc(-1%)" ],
|
||||
initial_values: [ "auto", "0", "-moz-calc(0em)", "-moz-calc(-2px)", "-moz-calc(-1%)" ],
|
||||
other_values: [ "30px", "50%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
|
||||
"-moz-calc(2px)",
|
||||
"-moz-calc(50%)",
|
||||
|
@ -2375,7 +2375,7 @@ var gCSSProperties = {
|
|||
"-moz-calc(25px*3)",
|
||||
"-moz-calc(3*25px + 50%)",
|
||||
],
|
||||
invalid_values: [ "auto", "none" ]
|
||||
invalid_values: [ "none" ]
|
||||
},
|
||||
"opacity": {
|
||||
domProp: "opacity",
|
||||
|
|
Загрузка…
Ссылка в новой задаче