Browse Source

LibWeb: Make DOMRectReadOnly use double instead of float

Bastiaan van der Plaat 1 year ago
parent
commit
e4270bc01d

+ 1 - 0
Userland/Libraries/LibGfx/Rect.h

@@ -1038,6 +1038,7 @@ private:
 
 
 using IntRect = Rect<int>;
 using IntRect = Rect<int>;
 using FloatRect = Rect<float>;
 using FloatRect = Rect<float>;
+using DoubleRect = Rect<double>;
 
 
 [[nodiscard]] ALWAYS_INLINE IntRect enclosing_int_rect(FloatRect const& float_rect)
 [[nodiscard]] ALWAYS_INLINE IntRect enclosing_int_rect(FloatRect const& float_rect)
 {
 {

+ 1 - 1
Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.h

@@ -45,6 +45,6 @@ protected:
 
 
     virtual void initialize(JS::Realm&) override;
     virtual void initialize(JS::Realm&) override;
 
 
-    Gfx::FloatRect m_rect;
+    Gfx::DoubleRect m_rect;
 };
 };
 }
 }