1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

LibWeb: Remove rounding division for CSSPixels

Reverts 98926b487c
that regressed: block-and-inline/small-percentage-margin.html
(thrashing layout while window resizing)

Fixes https://github.com/SerenityOS/serenity/issues/22610
This commit is contained in:
Aliaksandr Kalenik 2024-01-06 06:08:23 +01:00 committed by Andreas Kling
parent 7db8b206a8
commit e7eaf3b566
32 changed files with 257 additions and 245 deletions

View file

@ -36,15 +36,6 @@ TEST_CASE(division1)
b = CSSPixels(0.25);
EXPECT(!a.might_be_saturated());
EXPECT((a / b).might_be_saturated());
// Results should be rounded:
a = CSSPixels::smallest_positive_value() * 3;
b = 2;
EXPECT((a / b) == CSSPixels::smallest_positive_value() * 2);
a = CSSPixels::smallest_positive_value() * -5;
b = 3;
EXPECT((a / b) == CSSPixels::smallest_positive_value() * -2);
}
TEST_CASE(multiplication1)