mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibWeb: Make CSSPixels and Length use 64-bit (double) floating point
This fixes a plethora of rounding problems on many websites. In the future, we may want to replace this with fixed-point arithmetic (bug #18566) for performance (and consistency with other engines), but in the meantime this makes the web look a bit better. :^) There's a lot more things that could be converted to doubles, which would reduce the amount of casting necessary in this patch. We can do that incrementally, however.
This commit is contained in:
parent
30262d7023
commit
655d9d1462
Notes:
sideshowbarker
2024-07-17 05:58:46 +09:00
Author: https://github.com/awesomekling
Commit: 655d9d1462
Pull-request: https://github.com/SerenityOS/serenity/pull/19012
80 changed files with 298 additions and 299 deletions
|
@ -12,7 +12,7 @@
|
|||
namespace Web::CSS {
|
||||
|
||||
// https://www.w3.org/TR/CSS2/visufx.html#value-def-shape
|
||||
Gfx::FloatRect EdgeRect::resolved(Layout::Node const& layout_node, Gfx::FloatRect border_box) const
|
||||
Gfx::FloatRect EdgeRect::resolved(Layout::Node const& layout_node, Gfx::Rect<double> border_box) const
|
||||
{
|
||||
// In CSS 2.1, the only valid <shape> value is: rect(<top>, <right>, <bottom>, <left>) where
|
||||
// <top> and <bottom> specify offsets from the top border edge of the box, and <right>, and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue