mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Bug 1359834 Part 2: Define a new nsChangeHint_ReflowHintsForFloatAreaChange hint and use it for float changes. r=dholbert
MozReview-Commit-ID: 692GBiRUTab --HG-- extra : rebase_source : 4b3413bb0468037ab5eb25101b7c2a54cdc63d9e
This commit is contained in:
parent
5e7b4d5092
commit
dce3ff515e
@ -427,6 +427,17 @@ static_assert(!(nsChangeHint_Hints_AlwaysHandledForDescendants &
|
||||
~(nsChangeHint_ClearDescendantIntrinsics | \
|
||||
nsChangeHint_NeedDirtyReflow))
|
||||
|
||||
// * For changes to the float area of an already-floated element, we need all
|
||||
// reflow hints, but not the ones that apply to descendants.
|
||||
// Our descendants aren't impacted when our float area only changes
|
||||
// placement but not size/shape. (e.g. if we change which side we float to).
|
||||
// But our ancestors/siblings are potentially impacted, so we need to send
|
||||
// the non-descendant reflow hints.
|
||||
#define nsChangeHint_ReflowHintsForFloatAreaChange \
|
||||
nsChangeHint(nsChangeHint_AllReflowHints & \
|
||||
~(nsChangeHint_ClearDescendantIntrinsics | \
|
||||
nsChangeHint_NeedDirtyReflow))
|
||||
|
||||
#define NS_STYLE_HINT_REFLOW \
|
||||
nsChangeHint(NS_STYLE_HINT_VISUAL | nsChangeHint_AllReflowHints)
|
||||
|
||||
|
@ -3527,10 +3527,8 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const
|
||||
*/
|
||||
|
||||
if (mFloat != aNewData.mFloat) {
|
||||
// Changing which side we float on doesn't affect descendants directly
|
||||
hint |= nsChangeHint_AllReflowHints &
|
||||
~(nsChangeHint_ClearDescendantIntrinsics |
|
||||
nsChangeHint_NeedDirtyReflow);
|
||||
// Changing which side we're floating on (float:none was handled above).
|
||||
hint |= nsChangeHint_ReflowHintsForFloatAreaChange;
|
||||
}
|
||||
|
||||
if (mVerticalAlign != aNewData.mVerticalAlign) {
|
||||
|
Loading…
Reference in New Issue
Block a user