# Don't use stale layout when view cache is invalidated in GPUI \(\#7914\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5df1318e75d4ac4e7c159d04568bfe40dbbe206e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5df1318e75d4ac4e7c159d04568bfe40dbbe206e

Requested commit: 5df1318e75d4ac4e7c159d04568bfe40dbbe206e

Commit: 5df1318e75d4ac4e7c159d04568bfe40dbbe206e

Tree: 084f9d5a5e582abd2eefb3792cd2180157b6b91e

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Don't use stale layout when view cache is invalidated in GPUI (#7914)

When a view is invalidated, we want to participate in Taffy layout with
an accurate style rather than the dummy style we use when a view is
cached. Previously, we only detected invalidation during paint. This
adds logic to layout as well to avoid using the dummy style when dirty.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
```

## Parents

- [577b244b03a2fb98e340d490dec0010609bcce32](https://git.cafe/gitcafe/zed/commit/577b244b03a2fb98e340d490dec0010609bcce32?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5df1318e75d4ac4e7c159d04568bfe40dbbe206e?format=markdown)
