зеркало из https://github.com/mozilla/gecko-dev.git
Bug 158230. Clear out all the relevant style data when inline style
causes reframes. r=dbaron, sr=hyatt, a=asa
This commit is contained in:
Родитель
b16d9bed18
Коммит
b05829e57c
|
@ -12208,16 +12208,12 @@ nsCSSFrameConstructor::RecreateFramesForContent(nsIPresContext* aPresContext,
|
||||||
// Now that the old frame is gone (and has stopped depending on obsolete style
|
// Now that the old frame is gone (and has stopped depending on obsolete style
|
||||||
// data), we need to blow away our style information if this reframe happened as
|
// data), we need to blow away our style information if this reframe happened as
|
||||||
// a result of an inline style attribute changing.
|
// a result of an inline style attribute changing.
|
||||||
// XXXldb Why does this look different from the code in
|
|
||||||
// |AttributeChanged|?
|
|
||||||
if (aInlineStyle) {
|
if (aInlineStyle) {
|
||||||
if (aStyleContext)
|
|
||||||
aStyleContext->ClearCachedDataForRule(aInlineStyleRule);
|
|
||||||
else {
|
|
||||||
nsCOMPtr<nsIStyleSet> set;
|
nsCOMPtr<nsIStyleSet> set;
|
||||||
shell->GetStyleSet(getter_AddRefs(set));
|
shell->GetStyleSet(getter_AddRefs(set));
|
||||||
set->ClearCachedDataInRuleTree(aInlineStyleRule);
|
// XXXldb If |aStyleContext| is null, wouldn't it be faster to pass
|
||||||
}
|
// in something to tell it that this change is for inline style?
|
||||||
|
set->ClearStyleData(aPresContext, aInlineStyleRule, aStyleContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
|
|
@ -12208,16 +12208,12 @@ nsCSSFrameConstructor::RecreateFramesForContent(nsIPresContext* aPresContext,
|
||||||
// Now that the old frame is gone (and has stopped depending on obsolete style
|
// Now that the old frame is gone (and has stopped depending on obsolete style
|
||||||
// data), we need to blow away our style information if this reframe happened as
|
// data), we need to blow away our style information if this reframe happened as
|
||||||
// a result of an inline style attribute changing.
|
// a result of an inline style attribute changing.
|
||||||
// XXXldb Why does this look different from the code in
|
|
||||||
// |AttributeChanged|?
|
|
||||||
if (aInlineStyle) {
|
if (aInlineStyle) {
|
||||||
if (aStyleContext)
|
|
||||||
aStyleContext->ClearCachedDataForRule(aInlineStyleRule);
|
|
||||||
else {
|
|
||||||
nsCOMPtr<nsIStyleSet> set;
|
nsCOMPtr<nsIStyleSet> set;
|
||||||
shell->GetStyleSet(getter_AddRefs(set));
|
shell->GetStyleSet(getter_AddRefs(set));
|
||||||
set->ClearCachedDataInRuleTree(aInlineStyleRule);
|
// XXXldb If |aStyleContext| is null, wouldn't it be faster to pass
|
||||||
}
|
// in something to tell it that this change is for inline style?
|
||||||
|
set->ClearStyleData(aPresContext, aInlineStyleRule, aStyleContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче