зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1363088
- Remove text-shadow handling from HasAuthorSpecifiedRules. r=heycam
After bug 1401825, we no longer need the code for text-shadow anymore, so we can just remove it. MozReview-Commit-ID: B2zpzetwW91 --HG-- extra : rebase_source : 655ef8f1fc646b3905c55199b5f509c8e4093ddb
This commit is contained in:
Родитель
4c169d4680
Коммит
15b9626feb
|
@ -119,7 +119,6 @@ enum nsLayoutPhase {
|
|||
#define NS_AUTHOR_SPECIFIED_BACKGROUND (1 << 0)
|
||||
#define NS_AUTHOR_SPECIFIED_BORDER (1 << 1)
|
||||
#define NS_AUTHOR_SPECIFIED_PADDING (1 << 2)
|
||||
#define NS_AUTHOR_SPECIFIED_TEXT_SHADOW (1 << 3)
|
||||
|
||||
class nsRootPresContext;
|
||||
|
||||
|
|
|
@ -10507,14 +10507,9 @@ nsRuleNode::HasAuthorSpecifiedRules(GeckoStyleContext* aStyleContext,
|
|||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_PADDING)
|
||||
inheritBits |= NS_STYLE_INHERIT_BIT(Padding);
|
||||
|
||||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_TEXT_SHADOW)
|
||||
inheritBits |= NS_STYLE_INHERIT_BIT(Text);
|
||||
|
||||
// properties in the SIDS, whether or not we care about them
|
||||
size_t nprops = 0,
|
||||
backgroundOffset, borderOffset, paddingOffset, textShadowOffset;
|
||||
|
||||
// We put the reset properties the start of the nsCSSValue array....
|
||||
backgroundOffset, borderOffset, paddingOffset;
|
||||
|
||||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_BACKGROUND) {
|
||||
backgroundOffset = nprops;
|
||||
|
@ -10531,14 +10526,6 @@ nsRuleNode::HasAuthorSpecifiedRules(GeckoStyleContext* aStyleContext,
|
|||
nprops += nsCSSProps::PropertyCountInStruct(eStyleStruct_Padding);
|
||||
}
|
||||
|
||||
// ...and the inherited properties at the end of the array.
|
||||
size_t inheritedOffset = nprops;
|
||||
|
||||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_TEXT_SHADOW) {
|
||||
textShadowOffset = nprops;
|
||||
nprops += nsCSSProps::PropertyCountInStruct(eStyleStruct_Text);
|
||||
}
|
||||
|
||||
void* dataStorage = alloca(nprops * sizeof(nsCSSValue));
|
||||
AutoCSSValueArray dataArray(dataStorage, nprops);
|
||||
|
||||
|
@ -10558,10 +10545,6 @@ nsRuleNode::HasAuthorSpecifiedRules(GeckoStyleContext* aStyleContext,
|
|||
ruleData.mValueOffsets[eStyleStruct_Padding] = paddingOffset;
|
||||
}
|
||||
|
||||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_TEXT_SHADOW) {
|
||||
ruleData.mValueOffsets[eStyleStruct_Text] = textShadowOffset;
|
||||
}
|
||||
|
||||
static const nsCSSPropertyID backgroundValues[] = {
|
||||
eCSSProperty_background_color,
|
||||
eCSSProperty_background_image,
|
||||
|
@ -10593,22 +10576,16 @@ nsRuleNode::HasAuthorSpecifiedRules(GeckoStyleContext* aStyleContext,
|
|||
eCSSProperty_padding_left,
|
||||
};
|
||||
|
||||
static const nsCSSPropertyID textShadowValues[] = {
|
||||
eCSSProperty_text_shadow
|
||||
};
|
||||
|
||||
// Number of properties we care about
|
||||
size_t nValues = 0;
|
||||
|
||||
nsCSSValue* values[MOZ_ARRAY_LENGTH(backgroundValues) +
|
||||
MOZ_ARRAY_LENGTH(borderValues) +
|
||||
MOZ_ARRAY_LENGTH(paddingValues) +
|
||||
MOZ_ARRAY_LENGTH(textShadowValues)];
|
||||
MOZ_ARRAY_LENGTH(paddingValues)];
|
||||
|
||||
nsCSSPropertyID properties[MOZ_ARRAY_LENGTH(backgroundValues) +
|
||||
MOZ_ARRAY_LENGTH(borderValues) +
|
||||
MOZ_ARRAY_LENGTH(paddingValues) +
|
||||
MOZ_ARRAY_LENGTH(textShadowValues)];
|
||||
MOZ_ARRAY_LENGTH(paddingValues)];
|
||||
|
||||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_BACKGROUND) {
|
||||
for (uint32_t i = 0, i_end = ArrayLength(backgroundValues);
|
||||
|
@ -10634,14 +10611,6 @@ nsRuleNode::HasAuthorSpecifiedRules(GeckoStyleContext* aStyleContext,
|
|||
}
|
||||
}
|
||||
|
||||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_TEXT_SHADOW) {
|
||||
for (uint32_t i = 0, i_end = ArrayLength(textShadowValues);
|
||||
i < i_end; ++i) {
|
||||
properties[nValues] = textShadowValues[i];
|
||||
values[nValues++] = ruleData.ValueFor(textShadowValues[i]);
|
||||
}
|
||||
}
|
||||
|
||||
GeckoStyleContext* styleContextRef = styleContext;
|
||||
|
||||
// We need to be careful not to count styles covered up by user-important or
|
||||
|
@ -10672,8 +10641,7 @@ nsRuleNode::HasAuthorSpecifiedRules(GeckoStyleContext* aStyleContext,
|
|||
if (unit != eCSSUnit_Null &&
|
||||
unit != eCSSUnit_Dummy &&
|
||||
unit != eCSSUnit_DummyInherit) {
|
||||
if (unit == eCSSUnit_Inherit ||
|
||||
(i >= inheritedOffset && unit == eCSSUnit_Unset)) {
|
||||
if (unit == eCSSUnit_Inherit) {
|
||||
haveExplicitUAInherit = true;
|
||||
values[i]->SetDummyInheritValue();
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче