mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb/IDB: Use enum flags in IDBKeyRange
This commit is contained in:
parent
a5023ec053
commit
a2ecafb968
Notes:
github-actions[bot]
2025-05-13 10:50:35 +00:00
Author: https://github.com/stelar7
Commit: a2ecafb968
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4716
3 changed files with 23 additions and 13 deletions
|
@ -21,9 +21,19 @@ class IDBKeyRange : public Bindings::PlatformObject {
|
|||
WEB_PLATFORM_OBJECT(IDBKeyRange, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(IDBKeyRange);
|
||||
|
||||
enum class LowerOpen {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
enum class UpperOpen {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
public:
|
||||
virtual ~IDBKeyRange() override;
|
||||
[[nodiscard]] static GC::Ref<IDBKeyRange> create(JS::Realm&, GC::Ptr<Key> lower_bound, GC::Ptr<Key> upper_bound, bool lower_open, bool upper_open);
|
||||
[[nodiscard]] static GC::Ref<IDBKeyRange> create(JS::Realm&, GC::Ptr<Key> lower_bound, GC::Ptr<Key> upper_bound, LowerOpen lower_open, UpperOpen upper_open);
|
||||
|
||||
[[nodiscard]] JS::Value lower() const;
|
||||
[[nodiscard]] JS::Value upper() const;
|
||||
|
@ -42,7 +52,7 @@ public:
|
|||
GC::Ptr<Key> upper_key() const { return m_upper_bound; }
|
||||
|
||||
protected:
|
||||
explicit IDBKeyRange(JS::Realm&, GC::Ptr<Key> lower_bound, GC::Ptr<Key> upper_bound, bool lower_open, bool upper_open);
|
||||
explicit IDBKeyRange(JS::Realm&, GC::Ptr<Key> lower_bound, GC::Ptr<Key> upper_bound, LowerOpen lower_open, UpperOpen upper_open);
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Visitor& visitor) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue