Bug 906116 - part3.2: Replace NS_STYLE_HINT_FRAMECHANGE with nsChangeHint_ReconstructFrame.
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
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -1430,18 +1430,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleList();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleList, this);
}
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
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
@@ -1993,17 +1993,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleText();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleText, this);
}
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;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference never returns the reflow hints that are sometimes
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
@@ -2213,17 +2214,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleVisibility();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleVisibility, this);
}
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() {
// CalcDifference never returns the reflow hints that are sometimes
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
@@ -2496,17 +2498,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
this->~nsStyleDisplay();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleDisplay, this);
}
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 |
nsChangeHint_UpdateContainingBlock |
nsChangeHint_NeutralChange);
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference can return all of the reflow hints that are
@@ -2767,17 +2770,20 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleTable();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleTable, this);
}
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
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
@@ -2800,17 +2806,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleTableBorder();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleTableBorder, this);
}
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
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
@@ -2896,17 +2903,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
return aContext->PresShell()->
AllocateByObjectID(mozilla::eArenaObjectID_nsStyleContent, sz);
}
void Destroy(nsPresContext* aContext);
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
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
@@ -3011,17 +3019,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleUIReset();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleUIReset, this);
}
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
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
@@ -3079,17 +3088,22 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleUserInterface();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleUserInterface, this);
}
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;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference never returns the reflow hints that are sometimes
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
@@ -3130,17 +3144,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleXUL();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleXUL, this);
}
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
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
@@ -3168,17 +3183,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
void Destroy(nsPresContext* aContext) {
this->~nsStyleColumn();
aContext->PresShell()->
FreeByObjectID(mozilla::eArenaObjectID_nsStyleColumn, this);
}
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() {
// CalcDifference never returns the reflow hints that are sometimes
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;