LibWeb: Delete unused Range::normalized()

This commit is contained in:
Aliaksandr Kalenik 2025-07-03 12:23:51 +02:00 committed by Jelle Raaijmakers
commit 481ab338b4
Notes: github-actions[bot] 2025-07-03 13:02:08 +00:00
2 changed files with 0 additions and 16 deletions

View file

@ -451,21 +451,6 @@ GC::Ref<Range> Range::inverted() const
return shape().realm().create<Range>(const_cast<Node&>(*m_end_container), m_end_offset, const_cast<Node&>(*m_start_container), m_start_offset);
}
GC::Ref<Range> Range::normalized() const
{
if (m_start_container.ptr() == m_end_container.ptr()) {
if (m_start_offset <= m_end_offset)
return clone_range();
return inverted();
}
if (m_start_container->is_before(m_end_container))
return clone_range();
return inverted();
}
// https://dom.spec.whatwg.org/#dom-range-commonancestorcontainer
GC::Ref<Node> Range::common_ancestor_container() const
{

View file

@ -58,7 +58,6 @@ public:
WebIDL::ExceptionOr<WebIDL::Short> compare_boundary_points(WebIDL::UnsignedShort how, Range const& source_range) const;
GC::Ref<Range> inverted() const;
GC::Ref<Range> normalized() const;
GC::Ref<Range> clone_range() const;
GC::Ref<Node> common_ancestor_container() const;