layout: Reverse vertical orientation of gradients using corner directions. (#37802)

Found and manually tested by comparing rendering between Firefox and
Servo.

Testing: Existing WPT coverage is sufficient.
Fixes: #37782

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-07-11 16:02:13 -04:00 committed by GitHub
parent c5aeac3cea
commit 7eedeca715
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 20 deletions

View file

@ -138,8 +138,8 @@ pub(super) fn build_linear(
Left => -gradient_box.height,
};
let y = match vertical {
Top => gradient_box.width,
Bottom => -gradient_box.width,
Top => -gradient_box.width,
Bottom => gradient_box.width,
};
// `{ x, y }` is now a vector of arbitrary length