mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
moebius#138: Optimize operations on root of deeply-nested frame tree
https://github.com/MoonchildProductions/moebius/pull/138
This commit is contained in:
parent
02f3024a9c
commit
85692a1198
23 changed files with 651 additions and 40 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue