Bug 827579: Remove post-resolve callback concept from style system. r=bzbarsky

This commit is contained in:
L. David Baron 2013-01-08 20:37:29 -08:00
Родитель 328a3e5be7
Коммит 9814666177
3 изменённых файлов: 1 добавлений и 13 удалений

Просмотреть файл

@ -32,7 +32,6 @@ nsRuleData::nsRuleData(uint32_t aSIDs, nsCSSValue* aValueStorage,
mCanStoreInRuleTree(true),
mPresContext(aContext),
mStyleContext(aStyleContext),
mPostResolveCallback(nullptr),
mValueStorage(aValueStorage)
{
#ifndef MOZ_VALGRIND

Просмотреть файл

@ -28,7 +28,6 @@ struct nsRuleData
uint16_t mLevel; // an nsStyleSet::sheetType
nsPresContext* const mPresContext;
nsStyleContext* const mStyleContext;
const nsPostResolveFunc mPostResolveCallback;
// We store nsCSSValues needed to compute the data for one or more
// style structs (specified by the bitfield mSIDs). These are stored

Просмотреть файл

@ -2008,7 +2008,7 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID,
detail = eRulePartialMixed; // Treat as though some data is specified to avoid
// the optimizations and force data computation.
if (detail == eRuleNone && startStruct && !ruleData.mPostResolveCallback) {
if (detail == eRuleNone && startStruct) {
// We specified absolutely no rule information, but a parent rule in the tree
// specified all the rule information. We set a bit along the branch from our
// node in the tree to the node that specified the data that tells nodes on that
@ -2017,7 +2017,6 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID,
PropagateDependentBit(aSID, ruleNode, startStruct);
return startStruct;
}
// FIXME Do we need to check for mPostResolveCallback?
if ((!startStruct && !isReset &&
(detail == eRuleNone || detail == eRulePartialInherited)) ||
detail == eRuleFullInherited) {
@ -2072,10 +2071,6 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID,
#undef STYLE_STRUCT
#undef STYLE_STRUCT_TEST
// If we have a post-resolve callback, handle that now.
if (ruleData.mPostResolveCallback && (MOZ_LIKELY(res != nullptr)))
(*ruleData.mPostResolveCallback)(const_cast<void*>(res), &ruleData);
// Now return the result.
return res;
}
@ -3450,11 +3445,6 @@ nsRuleNode::SetGenericFont(nsPresContext* aPresContext,
aGenericFontID, &ruleData, &parentFont, aFont,
false, dummy);
// XXX Not sure if we need to do this here
// If we have a post-resolve callback, handle that now.
if (ruleData.mPostResolveCallback)
(ruleData.mPostResolveCallback)(aFont, &ruleData);
parentFont = *aFont;
}
}