зеркало из https://github.com/mozilla/gecko-dev.git
Fixed a problem where changes to inline-style were not causing the correct clearing of the style system's cached rules. b=97874 r=pierre sr=hyatt
This commit is contained in:
Родитель
3d14ac721e
Коммит
70790d62ab
|
@ -10146,6 +10146,15 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
// first see if we need to manage the style system:
|
||||
// inlineStyle changes require us to clear out style data associated with the style attribute
|
||||
if (inlineStyle &&
|
||||
(reconstruct || reframe || restyle)) {
|
||||
nsCOMPtr<nsIStyleSet> set;
|
||||
shell->GetStyleSet(getter_AddRefs(set));
|
||||
set->ClearStyleData(aPresContext, rule, styleContext);
|
||||
}
|
||||
|
||||
// apply changes
|
||||
if (primaryFrame && aHint == NS_STYLE_HINT_ATTRCHANGE)
|
||||
result = primaryFrame->AttributeChanged(aPresContext, aContent, aNameSpaceID, aAttribute, aModType, aHint);
|
||||
|
@ -10156,12 +10165,6 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
|
|||
result = RecreateFramesForContent(aPresContext, aContent, inlineStyle, rule, styleContext);
|
||||
}
|
||||
else if (restyle) {
|
||||
if (inlineStyle) {
|
||||
nsCOMPtr<nsIStyleSet> set;
|
||||
shell->GetStyleSet(getter_AddRefs(set));
|
||||
set->ClearStyleData(aPresContext, rule, styleContext);
|
||||
}
|
||||
|
||||
// If there is no frame then there is no point in re-styling it,
|
||||
// is there?
|
||||
if (primaryFrame) {
|
||||
|
|
|
@ -10146,6 +10146,15 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
// first see if we need to manage the style system:
|
||||
// inlineStyle changes require us to clear out style data associated with the style attribute
|
||||
if (inlineStyle &&
|
||||
(reconstruct || reframe || restyle)) {
|
||||
nsCOMPtr<nsIStyleSet> set;
|
||||
shell->GetStyleSet(getter_AddRefs(set));
|
||||
set->ClearStyleData(aPresContext, rule, styleContext);
|
||||
}
|
||||
|
||||
// apply changes
|
||||
if (primaryFrame && aHint == NS_STYLE_HINT_ATTRCHANGE)
|
||||
result = primaryFrame->AttributeChanged(aPresContext, aContent, aNameSpaceID, aAttribute, aModType, aHint);
|
||||
|
@ -10156,12 +10165,6 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
|
|||
result = RecreateFramesForContent(aPresContext, aContent, inlineStyle, rule, styleContext);
|
||||
}
|
||||
else if (restyle) {
|
||||
if (inlineStyle) {
|
||||
nsCOMPtr<nsIStyleSet> set;
|
||||
shell->GetStyleSet(getter_AddRefs(set));
|
||||
set->ClearStyleData(aPresContext, rule, styleContext);
|
||||
}
|
||||
|
||||
// If there is no frame then there is no point in re-styling it,
|
||||
// is there?
|
||||
if (primaryFrame) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче