From 421936227c5ea73f1e479fec4714c0b46665649c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 14 Jun 2019 23:29:34 +0000 Subject: [PATCH] Bug 1558442 - Use a weaker change hint for auto -> non-auto offset changes. r=dbaron See the review comments in bug 1558442 to see why these should be correct. Quoting: > I think it would be good to avoid passing ClearDescendantIntrinsics and > NeedDirtyReflow here, since those are the most expensive ones, and I think > they're pretty clearly not needed. I think ClearAncestorIntrinsics is also > clearly not needed, since I'm reasonably confident that absolutely positioned > kids don't contribute to their parent's intrinsic size. I think the same thing applies to "slow" offset changes (when autoness changes), since relative movement doesn't affect intrinsic sizes either. Differential Revision: https://phabricator.services.mozilla.com/D34497 --HG-- extra : moz-landing-system : lando --- layout/style/nsStyleStruct.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 08747a218f94..c6694701907f 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -1512,7 +1512,7 @@ nsChangeHint nsStylePosition::CalcDifference( hint |= nsChangeHint_RecomputePosition | nsChangeHint_UpdateParentOverflow; } else { - hint |= nsChangeHint_AllReflowHints; + hint |= nsChangeHint_NeedReflow | nsChangeHint_ReflowChangesSizeOrPosition; } } return hint;