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 b61aab66d9 to
avoid crashing on attempt to allocate 0 size bitmap.
This commit is contained in:
Aliaksandr Kalenik 2024-05-26 15:16:08 +01:00 committed by Andreas Kling
commit 9be65e35b5
Notes: sideshowbarker 2024-07-16 23:03:06 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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)