Bug 1367568 part 2: Rewrite nsChangeHint_ReflowHintsForBSizeChange in terms of nsChangeHint_AllReflowHints. r?bz draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 25 May 2017 17:53:23 -0400
changeset 584692 9405fe40273f8d458e5cc4c359effbf7b2f3ccfd
parent 584691 461eac301d4d48d90ac79dabc469ffd4de002eaa
child 584693 0af22013e9ee79a8034b04b0f8564c3f00d5969b
push id60842
push userdholbert@mozilla.com
push dateThu, 25 May 2017 21:53:59 +0000
reviewersbz
bugs1367568
milestone55.0a1
Bug 1367568 part 2: Rewrite nsChangeHint_ReflowHintsForBSizeChange in terms of nsChangeHint_AllReflowHints. r?bz This patch doesn't affect behavior at all. It's simply adjusting the way we express a bitmask, without modifying the actual value of that bitmask. The intent of this change is to make this bitmask's definition as similar as possible to the definition for its ISize (inline-axis) analog, so that it's easy to compare the two. MozReview-Commit-ID: FUJnBQm8hmJ
layout/base/nsChangeHint.h
--- a/layout/base/nsChangeHint.h
+++ b/layout/base/nsChangeHint.h
@@ -409,23 +409,21 @@ static_assert(!(nsChangeHint_Hints_Alway
 // elements with percentage BSizes in descendants which also have percentage
 // BSizes. nsChangeHint_UpdateComputedBSize clears intrinsic sizes for frames
 // that have such replaced elements. (We could instead send
 // nsChangeHint_ClearDescendantIntrinsics, but that's broader than we need.)
 //
 // NOTE: You might think that BSize changes could exclude
 // nsChangeHint_ClearAncestorIntrinsics (which is inline-axis specific), but we
 // do need to send it, to clear cached results from CSS Flex measuring reflows.
-//
-// XXXdholbert The next patch rewrites this hint to be similar to the ISize one.
 #define nsChangeHint_ReflowHintsForBSizeChange            \
-  nsChangeHint(nsChangeHint_NeedReflow |                  \
-               nsChangeHint_UpdateComputedBSize |         \
-               nsChangeHint_ReflowChangesSizeOrPosition | \
-               nsChangeHint_ClearAncestorIntrinsics)
+  nsChangeHint((nsChangeHint_AllReflowHints |             \
+                nsChangeHint_UpdateComputedBSize) &       \
+               ~(nsChangeHint_ClearDescendantIntrinsics | \
+                 nsChangeHint_NeedDirtyReflow))
 
 #define NS_STYLE_HINT_REFLOW \
   nsChangeHint(NS_STYLE_HINT_VISUAL | nsChangeHint_AllReflowHints)
 
 #define nsChangeHint_Hints_CanIgnoreIfNotVisible   \
   nsChangeHint(NS_STYLE_HINT_VISUAL |              \
                nsChangeHint_NeutralChange |        \
                nsChangeHint_UpdateOpacityLayer |   \