LibWeb: Pass RefPtr to const to ClippableAndScrollable setters

We were already storing the ClipFrame and ScrollFrame in RefPtr to const
but we were passing them as RefPtr to non-const to the setters.
This commit is contained in:
Andrew Kaster 2025-04-15 15:52:40 -06:00 committed by Andrew Kaster
commit 4b7f4aef10
Notes: github-actions[bot] 2025-04-16 16:43:58 +00:00

View file

@ -15,8 +15,8 @@ class ClippableAndScrollable {
public:
virtual ~ClippableAndScrollable() = default;
void set_enclosing_scroll_frame(RefPtr<ScrollFrame> scroll_frame) { m_enclosing_scroll_frame = scroll_frame; }
void set_enclosing_clip_frame(RefPtr<ClipFrame> clip_frame) { m_enclosing_clip_frame = clip_frame; }
void set_enclosing_scroll_frame(RefPtr<ScrollFrame const> scroll_frame) { m_enclosing_scroll_frame = scroll_frame; }
void set_enclosing_clip_frame(RefPtr<ClipFrame const> clip_frame) { m_enclosing_clip_frame = clip_frame; }
[[nodiscard]] RefPtr<ScrollFrame const> enclosing_scroll_frame() const { return m_enclosing_scroll_frame; }
[[nodiscard]] Optional<int> scroll_frame_id() const;