зеркало из https://github.com/mozilla/gecko-dev.git
Bug 835169: Remove unused mapping into style of table cols attribute. r=bzbarsky
This commit is contained in:
Родитель
0a893d4711
Коммит
872b0c534b
|
@ -919,8 +919,7 @@ HTMLTableElement::ParseAttribute(int32_t aNamespaceID,
|
|||
aAttribute == nsGkAtoms::cellpadding) {
|
||||
return aResult.ParseNonNegativeIntValue(aValue);
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::cols ||
|
||||
aAttribute == nsGkAtoms::border) {
|
||||
if (aAttribute == nsGkAtoms::border) {
|
||||
return aResult.ParseIntWithBounds(aValue, 0);
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::height) {
|
||||
|
@ -1005,15 +1004,6 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
|||
if (value && value->Type() == nsAttrValue::eEnum)
|
||||
tableLayout->SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
|
||||
}
|
||||
// cols
|
||||
value = aAttributes->GetAttr(nsGkAtoms::cols);
|
||||
if (value) {
|
||||
nsCSSValue* cols = aData->ValueForCols();
|
||||
if (value->Type() == nsAttrValue::eInteger)
|
||||
cols->SetIntValue(value->GetIntegerValue(), eCSSUnit_Integer);
|
||||
else // COLS had no value, so it refers to all columns
|
||||
cols->SetIntValue(NS_STYLE_TABLE_COLS_ALL, eCSSUnit_Enumerated);
|
||||
}
|
||||
}
|
||||
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Margin)) {
|
||||
// align; Check for enumerated type (it may be another type if
|
||||
|
@ -1135,7 +1125,6 @@ HTMLTableElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
|||
{ &nsGkAtoms::layout },
|
||||
{ &nsGkAtoms::cellpadding },
|
||||
{ &nsGkAtoms::cellspacing },
|
||||
{ &nsGkAtoms::cols },
|
||||
{ &nsGkAtoms::border },
|
||||
{ &nsGkAtoms::width },
|
||||
{ &nsGkAtoms::height },
|
||||
|
|
|
@ -768,9 +768,6 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
|
|||
#define NS_STYLE_TABLE_RULES_COLS 3
|
||||
#define NS_STYLE_TABLE_RULES_ALL 4
|
||||
|
||||
#define NS_STYLE_TABLE_COLS_NONE (-1)
|
||||
#define NS_STYLE_TABLE_COLS_ALL int32_t(1 << 30)
|
||||
|
||||
#define NS_STYLE_TABLE_LAYOUT_AUTO 0
|
||||
#define NS_STYLE_TABLE_LAYOUT_FIXED 1
|
||||
|
||||
|
|
|
@ -3479,7 +3479,6 @@ CSS_PROP_SHORTHAND(
|
|||
#ifdef CSS_PROP_STUB_NOT_CSS
|
||||
CSS_PROP_STUB_NOT_CSS
|
||||
CSS_PROP_STUB_NOT_CSS
|
||||
CSS_PROP_STUB_NOT_CSS
|
||||
#else
|
||||
CSS_PROP_FONT(
|
||||
-x-lang,
|
||||
|
@ -3491,16 +3490,6 @@ CSS_PROP_FONT(
|
|||
nullptr,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_TABLE(
|
||||
-x-cols,
|
||||
_x_cols,
|
||||
Cols,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE,
|
||||
"",
|
||||
0,
|
||||
nullptr,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_TABLE(
|
||||
-x-span,
|
||||
_x_span,
|
||||
|
|
|
@ -6612,12 +6612,6 @@ nsRuleNode::ComputeTableData(void* aStartStruct,
|
|||
SETDSC_ENUMERATED, parentTable->mLayoutStrategy,
|
||||
NS_STYLE_TABLE_LAYOUT_AUTO, 0, 0, 0, 0);
|
||||
|
||||
// cols: enum, int (not a real CSS prop)
|
||||
const nsCSSValue* colsValue = aRuleData->ValueForCols();
|
||||
if (eCSSUnit_Enumerated == colsValue->GetUnit() ||
|
||||
eCSSUnit_Integer == colsValue->GetUnit())
|
||||
table->mCols = colsValue->GetIntValue();
|
||||
|
||||
// span: pixels (not a real CSS prop)
|
||||
const nsCSSValue* spanValue = aRuleData->ValueForSpan();
|
||||
if (eCSSUnit_Enumerated == spanValue->GetUnit() ||
|
||||
|
|
|
@ -1211,7 +1211,6 @@ nsStyleTable::nsStyleTable()
|
|||
MOZ_COUNT_CTOR(nsStyleTable);
|
||||
// values not inherited
|
||||
mLayoutStrategy = NS_STYLE_TABLE_LAYOUT_AUTO;
|
||||
mCols = NS_STYLE_TABLE_COLS_NONE;
|
||||
mFrame = NS_STYLE_TABLE_FRAME_NONE;
|
||||
mRules = NS_STYLE_TABLE_RULES_NONE;
|
||||
mSpan = 1;
|
||||
|
@ -1234,7 +1233,7 @@ nsChangeHint nsStyleTable::CalcDifference(const nsStyleTable& aOther) const
|
|||
if (mRules != aOther.mRules || mSpan != aOther.mSpan ||
|
||||
mLayoutStrategy != aOther.mLayoutStrategy)
|
||||
return NS_STYLE_HINT_FRAMECHANGE;
|
||||
if (mFrame != aOther.mFrame || mCols != aOther.mCols)
|
||||
if (mFrame != aOther.mFrame)
|
||||
return NS_STYLE_HINT_REFLOW;
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
|
|
|
@ -1737,7 +1737,6 @@ struct nsStyleTable {
|
|||
uint8_t mLayoutStrategy;// [reset] see nsStyleConsts.h NS_STYLE_TABLE_LAYOUT_*
|
||||
uint8_t mFrame; // [reset] see nsStyleConsts.h NS_STYLE_TABLE_FRAME_*
|
||||
uint8_t mRules; // [reset] see nsStyleConsts.h NS_STYLE_TABLE_RULES_*
|
||||
int32_t mCols; // [reset] an integer if set, or see nsStyleConsts.h NS_STYLE_TABLE_COLS_*
|
||||
int32_t mSpan; // [reset] the number of columns spanned by a colgroup or col
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче