mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
This reduces the number of recompiled files as follow: - Bitmap.h: 1309 -> 101 - ImmutableBitmap.h: 1218 -> 75
36 lines
980 B
C++
36 lines
980 B
C++
/*
|
|
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/AtomicRefCounted.h>
|
|
#include <LibWeb/Export.h>
|
|
#include <LibWeb/Painting/BorderRadiiData.h>
|
|
#include <LibWeb/Painting/ScrollFrame.h>
|
|
#include <LibWeb/PixelUnits.h>
|
|
|
|
namespace Web::Painting {
|
|
|
|
struct ClipRectWithScrollFrame {
|
|
CSSPixelRect rect;
|
|
BorderRadiiData corner_radii;
|
|
RefPtr<ScrollFrame const> enclosing_scroll_frame;
|
|
Optional<size_t> enclosing_scroll_frame_id;
|
|
};
|
|
|
|
struct WEB_API ClipFrame : public AtomicRefCounted<ClipFrame> {
|
|
Vector<ClipRectWithScrollFrame> const& clip_rects() const { return m_clip_rects; }
|
|
void add_clip_rect(CSSPixelRect rect, BorderRadiiData radii, RefPtr<ScrollFrame const> enclosing_scroll_frame);
|
|
|
|
CSSPixelRect clip_rect_for_hit_testing() const;
|
|
|
|
bool includes_rect_from_clip_property { false };
|
|
|
|
private:
|
|
Vector<ClipRectWithScrollFrame> m_clip_rects;
|
|
};
|
|
|
|
}
|