Layout 2013: Don't make gradient display items for zero-sized gradients (#30321)

Before WebRender would ignore these, but newer version of WebRender have
issues with them. This change simply prevents legacy layout from
creating display items for these types of gradients. This is already the
behavior of non-legacy layout.
This commit is contained in:
Martin Robinson 2023-09-09 19:43:09 +02:00 committed by GitHub
parent 711dbbd4af
commit 56976efaa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 7 deletions

View file

@ -831,9 +831,10 @@ impl Fragment {
index,
);
if placement.tile_size.is_empty() {
return;
}
let placement = match placement {
Some(placement) => placement,
None => return,
};
state.clipping_and_scrolling_scope(|state| {
if !placement.clip_radii.is_zero() {
@ -953,6 +954,11 @@ impl Fragment {
index,
);
let placement = match placement {
Some(placement) => placement,
None => return,
};
state.clipping_and_scrolling_scope(|state| {
if !placement.clip_radii.is_zero() {
let clip_id =