mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 17:16:04 +00:00
LibWeb: Add virtual to check if a Navigable is a top level traversable
This avoids some AK::is casting when we need to check this property in upcoming algorithms.
This commit is contained in:
parent
0c85a7cebc
commit
0ed67fc0ce
Notes:
sideshowbarker
2024-07-17 01:46:43 +09:00
Author: https://github.com/ADKaster
Commit: 0ed67fc0ce
Pull-request: https://github.com/SerenityOS/serenity/pull/20822
2 changed files with 3 additions and 1 deletions
|
@ -66,6 +66,8 @@ public:
|
||||||
JS::GCPtr<TraversableNavigable> traversable_navigable() const;
|
JS::GCPtr<TraversableNavigable> traversable_navigable() const;
|
||||||
JS::GCPtr<TraversableNavigable> top_level_traversable();
|
JS::GCPtr<TraversableNavigable> top_level_traversable();
|
||||||
|
|
||||||
|
virtual bool is_top_level_traversable() const { return false; }
|
||||||
|
|
||||||
enum class WindowType {
|
enum class WindowType {
|
||||||
ExistingOrNone,
|
ExistingOrNone,
|
||||||
NewAndUnrestricted,
|
NewAndUnrestricted,
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
|
|
||||||
virtual ~TraversableNavigable() override;
|
virtual ~TraversableNavigable() override;
|
||||||
|
|
||||||
bool is_top_level_traversable() const;
|
virtual bool is_top_level_traversable() const override;
|
||||||
|
|
||||||
int current_session_history_step() const { return m_current_session_history_step; }
|
int current_session_history_step() const { return m_current_session_history_step; }
|
||||||
Vector<JS::NonnullGCPtr<SessionHistoryEntry>>& session_history_entries() { return m_session_history_entries; }
|
Vector<JS::NonnullGCPtr<SessionHistoryEntry>>& session_history_entries() { return m_session_history_entries; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue