2022-08-09 01:06:47 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibWeb/DOM/AbstractRange.h>
|
|
|
|
#include <LibWeb/DOM/Document.h>
|
2022-08-28 13:42:07 +02:00
|
|
|
#include <LibWeb/HTML/Window.h>
|
2022-08-09 01:06:47 +02:00
|
|
|
|
|
|
|
namespace Web::DOM {
|
|
|
|
|
|
|
|
AbstractRange::AbstractRange(Node& start_container, u32 start_offset, Node& end_container, u32 end_offset)
|
2022-09-03 18:43:24 +02:00
|
|
|
: Bindings::PlatformObject(start_container.document().window().cached_web_prototype("AbstractRange"))
|
2022-08-09 01:06:47 +02:00
|
|
|
, m_start_container(start_container)
|
|
|
|
, m_start_offset(start_offset)
|
|
|
|
, m_end_container(end_container)
|
|
|
|
, m_end_offset(end_offset)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
AbstractRange::~AbstractRange() = default;
|
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
void AbstractRange::visit_edges(Cell::Visitor& visitor)
|
|
|
|
{
|
|
|
|
Base::visit_edges(visitor);
|
|
|
|
visitor.visit(m_start_container.ptr());
|
|
|
|
visitor.visit(m_end_container.ptr());
|
|
|
|
}
|
|
|
|
|
2022-08-09 01:06:47 +02:00
|
|
|
}
|