diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-24 21:39:13 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-24 21:39:13 +0200 |
commit | eae8d21428acdb3fb842df091ded0eb276bcaaaa (patch) | |
tree | 8fcdb943e19ec1ca33bec3b39636311dcddd38f0 /layout/style/nsStyleStruct.cpp | |
parent | d0e748cadabba2b7cbf7407c4bca665315bf00fe (diff) | |
download | UXP-eae8d21428acdb3fb842df091ded0eb276bcaaaa.tar UXP-eae8d21428acdb3fb842df091ded0eb276bcaaaa.tar.gz UXP-eae8d21428acdb3fb842df091ded0eb276bcaaaa.tar.lz UXP-eae8d21428acdb3fb842df091ded0eb276bcaaaa.tar.xz UXP-eae8d21428acdb3fb842df091ded0eb276bcaaaa.zip |
moebius#138: Optimize operations on root of deeply-nested frame tree
https://github.com/MoonchildProductions/moebius/pull/138
Diffstat (limited to 'layout/style/nsStyleStruct.cpp')
-rw-r--r-- | layout/style/nsStyleStruct.cpp | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index eab11b80c..553239e0e 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -1629,28 +1629,11 @@ nsStylePosition::CalcDifference(const nsStylePosition& aNewData, if (aOldStyleVisibility) { bool isVertical = WritingMode(aOldStyleVisibility).IsVertical(); if (isVertical ? widthChanged : heightChanged) { - // Block-size changes can affect descendant intrinsic sizes due to - // replaced elements with percentage bsizes in descendants which - // also have percentage bsizes. This is handled via - // nsChangeHint_UpdateComputedBSize which clears intrinsic sizes - // for frames that have such replaced elements. - // - // We need to use nsChangeHint_ClearAncestorIntrinsics for - // block-size changes so we clear results of cached CSS Flex - // measuring reflows. - hint |= nsChangeHint_NeedReflow | - nsChangeHint_UpdateComputedBSize | - nsChangeHint_ReflowChangesSizeOrPosition | - nsChangeHint_ClearAncestorIntrinsics; + hint |= nsChangeHint_ReflowHintsForBSizeChange; } if (isVertical ? heightChanged : widthChanged) { - // None of our inline-size differences can affect descendant - // intrinsic sizes and none of them need to force children to - // reflow. - hint |= nsChangeHint_AllReflowHints & - ~(nsChangeHint_ClearDescendantIntrinsics | - nsChangeHint_NeedDirtyReflow); + hint |= nsChangeHint_ReflowHintsForISizeChange; } } else { if (widthChanged || heightChanged) { @@ -3263,8 +3246,6 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const || mDisplay != aNewData.mDisplay || mContain != aNewData.mContain || (mFloat == StyleFloat::None) != (aNewData.mFloat == StyleFloat::None) - || mOverflowX != aNewData.mOverflowX - || mOverflowY != aNewData.mOverflowY || mScrollBehavior != aNewData.mScrollBehavior || mScrollSnapTypeX != aNewData.mScrollSnapTypeX || mScrollSnapTypeY != aNewData.mScrollSnapTypeY @@ -3276,6 +3257,11 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const hint |= nsChangeHint_ReconstructFrame; } + if (mOverflowX != aNewData.mOverflowX + || mOverflowY != aNewData.mOverflowY) { + hint |= nsChangeHint_CSSOverflowChange; + } + /* Note: When mScrollBehavior, mScrollSnapTypeX, mScrollSnapTypeY, * mScrollSnapPointsX, mScrollSnapPointsY, or mScrollSnapDestination are * changed, nsChangeHint_NeutralChange is not sufficient to enter |