Bug 906116 - part3.2: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame. r=dbaron

Use ReconstructFrame | (any ther bits needed) to replace
NS_STYLE_HINT_FRAMECHANGE in nsStyle*::MaxDifference.

For those nsStyle* that do not have nsChangeHint_NeutralChange in their
CalcDifference, we should be able to elimate nsChangeHint_NeutralChange from
their MaxDifference as well.

MozReview-Commit-ID: B3VJWt6gKoL

--HG--
extra : rebase_source : d0deff5bb579438c33b7b3288fc76d8b0420e1af
This commit is contained in:
Jeremy Chen 2016-07-06 13:06:14 +08:00
Родитель 35861acb00
Коммит 0d17d1e151
1 изменённых файлов: 28 добавлений и 12 удалений

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

@ -1435,8 +1435,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleList
nsChangeHint CalcDifference(const nsStyleList& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE |
nsChangeHint_NeutralChange;
return nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference never returns the reflow hints that are sometimes
@ -1998,7 +1998,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText
nsChangeHint CalcDifference(const nsStyleText& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE |
return nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW |
nsChangeHint_UpdateSubtreeOverflow |
nsChangeHint_NeutralChange;
}
@ -2218,7 +2219,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleVisibility
nsChangeHint CalcDifference(const nsStyleVisibility& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE |
return nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW |
nsChangeHint_NeutralChange;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
@ -2501,7 +2503,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay
nsChangeHint CalcDifference(const nsStyleDisplay& aNewData) const;
static nsChangeHint MaxDifference() {
// All the parts of FRAMECHANGE are present in CalcDifference.
return nsChangeHint(NS_STYLE_HINT_FRAMECHANGE |
return nsChangeHint(nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW |
nsChangeHint_UpdateTransformLayer |
nsChangeHint_UpdateOverflow |
nsChangeHint_UpdatePostTransformOverflow |
@ -2772,7 +2775,10 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleTable
nsChangeHint CalcDifference(const nsStyleTable& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE;
return nsChangeHint_ReconstructFrame |
nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference never returns the reflow hints that are sometimes
@ -2805,7 +2811,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleTableBorder
nsChangeHint CalcDifference(const nsStyleTableBorder& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE;
return nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference never returns the reflow hints that are sometimes
@ -2901,7 +2908,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleContent
nsChangeHint CalcDifference(const nsStyleContent& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE;
return nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference never returns the reflow hints that are sometimes
@ -3016,7 +3024,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUIReset
nsChangeHint CalcDifference(const nsStyleUIReset& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE;
return nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference never returns the reflow hints that are sometimes
@ -3084,7 +3093,12 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUserInterface
nsChangeHint CalcDifference(const nsStyleUserInterface& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE |
return nsChangeHint_ReconstructFrame |
nsChangeHint_NeedReflow |
nsChangeHint_NeedDirtyReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics |
NS_STYLE_HINT_VISUAL |
nsChangeHint_UpdateCursor |
nsChangeHint_NeutralChange;
}
@ -3135,7 +3149,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleXUL
nsChangeHint CalcDifference(const nsStyleXUL& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE;
return nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference never returns the reflow hints that are sometimes
@ -3173,7 +3188,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleColumn
nsChangeHint CalcDifference(const nsStyleColumn& aNewData) const;
static nsChangeHint MaxDifference() {
return NS_STYLE_HINT_FRAMECHANGE |
return nsChangeHint_ReconstructFrame |
NS_STYLE_HINT_REFLOW |
nsChangeHint_NeutralChange;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {