LibWeb: Make SVGGradientPaintStyle be atomically ref-counted

This was the only remaining data type used in display lists that wasn't
atomically ref-counted.

Now that it is, we no longer crash when scrolling on https://vercel.com/
This commit is contained in:
Andreas Kling 2025-05-26 17:07:49 +02:00 committed by Andreas Kling
commit ce33376b56
Notes: github-actions[bot] 2025-05-26 17:47:00 +00:00

View file

@ -6,8 +6,7 @@
#pragma once #pragma once
#include <AK/RefCounted.h> #include <AK/AtomicRefCounted.h>
#include <AK/Variant.h>
#include <LibGfx/PaintStyle.h> #include <LibGfx/PaintStyle.h>
namespace Web::Painting { namespace Web::Painting {
@ -18,7 +17,7 @@ struct ColorStop {
Optional<float> transition_hint = {}; Optional<float> transition_hint = {};
}; };
class SVGGradientPaintStyle : public RefCounted<SVGGradientPaintStyle> { class SVGGradientPaintStyle : public AtomicRefCounted<SVGGradientPaintStyle> {
public: public:
enum class SpreadMethod { enum class SpreadMethod {
Pad, Pad,