LibWeb: Add a visit_edges() override to AbstractBrowsingContext
AbstractBrowsingContext has a subclass RemoteBrowsingContext without a visit_edges() override (and it doesn't really need one). But currently, we rely on subclasses visiting AbstractBrowsingContext's opener BC. This adds a visit_edges() to AbstractBrowsingContext to explicitly visit the opener BC itself.
This commit is contained in:
parent
b54786ee95
commit
5913efbb45
Notes:
sideshowbarker
2024-07-17 04:03:27 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/5913efbb45 Pull-request: https://github.com/SerenityOS/serenity/pull/22094 Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 22 additions and 1 deletions
|
@ -11,6 +11,7 @@ source_set("HTML") {
|
|||
"//Userland/Libraries/LibWeb:all_generated",
|
||||
]
|
||||
sources = [
|
||||
"AbstractBrowsingContext.cpp",
|
||||
"AnimatedBitmapDecodedImageData.cpp",
|
||||
"AttributeNames.cpp",
|
||||
"AudioTrack.cpp",
|
||||
|
|
|
@ -226,6 +226,7 @@ set(SOURCES
|
|||
Geometry/DOMRect.cpp
|
||||
Geometry/DOMRectList.cpp
|
||||
Geometry/DOMRectReadOnly.cpp
|
||||
HTML/AbstractBrowsingContext.cpp
|
||||
HTML/AnimatedBitmapDecodedImageData.cpp
|
||||
HTML/AttributeNames.cpp
|
||||
HTML/AudioTrack.cpp
|
||||
|
|
18
Userland/Libraries/LibWeb/HTML/AbstractBrowsingContext.cpp
Normal file
18
Userland/Libraries/LibWeb/HTML/AbstractBrowsingContext.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/HTML/AbstractBrowsingContext.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
void AbstractBrowsingContext::visit_edges(JS::Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_opener_browsing_context);
|
||||
}
|
||||
|
||||
}
|
|
@ -34,6 +34,8 @@ public:
|
|||
virtual void set_window_handle(String handle) = 0;
|
||||
|
||||
protected:
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
String m_name;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#is-popup
|
||||
|
|
|
@ -289,7 +289,6 @@ void BrowsingContext::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_container);
|
||||
visitor.visit(m_cursor_position);
|
||||
visitor.visit(m_window_proxy);
|
||||
visitor.visit(m_opener_browsing_context);
|
||||
visitor.visit(m_group);
|
||||
visitor.visit(m_parent);
|
||||
visitor.visit(m_first_child);
|
||||
|
|
Loading…
Add table
Reference in a new issue