Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,16 @@ - (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics
// the oldLayoutMetrics parameter (which comes from the shadow tree).
auto previousFrameSize = _layoutMetrics.frame.size;

// A relayout that only moves the view leaves everything `invalidateLayer`
// derives unchanged, since it works in the view's own coordinates. The hover
// shape is the exception: iOS evaluates it in the superview's space.
auto movedLayoutMetrics = layoutMetrics;
movedLayoutMetrics.frame.origin = _layoutMetrics.frame.origin;
BOOL const onlyMoved = movedLayoutMetrics == _layoutMetrics;
_layoutMetrics = layoutMetrics;
_needsInvalidateLayer = YES;
if (!onlyMoved || _props->cursor == Cursor::Pointer) {
_needsInvalidateLayer = YES;
}

_borderLayer.frame = self.layer.bounds;

Expand Down
Loading