# Intersect content mask with hitbox bounds only during hit test \(\#10554\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 200e36311c3ccf222d7fc1d1508c7315a0089710

Requested commit: 200e36311c3ccf222d7fc1d1508c7315a0089710

Commit: 200e36311c3ccf222d7fc1d1508c7315a0089710

Tree: 4f5ff186cf8508ebbfb79aa0217166a92b205bee

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Intersect content mask with hitbox bounds only during hit test (#10554)

This fixes a bug that caused the editor to be rendered incorrectly when
its bounds extended outside the content mask. This is because the editor
uses the returned `Hitbox` bounds to determine the origin of its
elements.

With this commit, we will now store a new `content_mask` field within
the `Hitbox` struct which is captured when the hitbox is inserted. Then,
the content mask is applied on the fly when performing a hit test to
determine whether the hitbox is actually hovered.

Release Notes:

- N/A
```

## Parents

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

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