/* * Copyright (c) 2023, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Web::Painting { class ViewportPaintable final : public PaintableWithLines { JS_CELL(ViewportPaintable, PaintableWithLines); public: static JS::NonnullGCPtr create(Layout::Viewport const&); virtual ~ViewportPaintable() override; void paint_all_phases(PaintContext&); void build_stacking_context_tree_if_needed(); HashMap> scroll_state; void assign_scroll_frames(); void refresh_scroll_state(); HashMap> clip_state; void assign_clip_frames(); void refresh_clip_state(); void resolve_paint_only_properties(); private: void build_stacking_context_tree(); explicit ViewportPaintable(Layout::Viewport const&); }; }