Преглед изворни кода

Revert "LibGfx+LibWeb: Do not ignore corner radius if it is defined..."

This reverts commit 6b7b9ca1c4b32e76e0afef6bca0cb300e615b576.

The whole corner radius is invisible if it has 0 radius in any axis, so
the reverted commit was a mistake that led to error checking during
painting command execution b61aab66d99923c1b887836f4c1741fffba20831 to
avoid crashing on attempt to allocate 0 size bitmap.
Aliaksandr Kalenik пре 1 година
родитељ
комит
9be65e35b5

+ 1 - 1
Userland/Libraries/LibGfx/AntiAliasingPainter.h

@@ -63,7 +63,7 @@ public:
 
         inline operator bool() const
         {
-            return horizontal_radius > 0 || vertical_radius > 0;
+            return horizontal_radius > 0 && vertical_radius > 0;
         }
 
         Gfx::IntRect as_rect() const

+ 1 - 1
Userland/Libraries/LibWeb/Painting/BorderRadiiData.h

@@ -21,7 +21,7 @@ struct BorderRadiusData {
 
     inline operator bool() const
     {
-        return horizontal_radius > 0 || vertical_radius > 0;
+        return horizontal_radius > 0 && vertical_radius > 0;
     }
 
     inline void shrink(CSSPixels horizontal, CSSPixels vertical)