mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb: Delete unused Range::normalized()
This commit is contained in:
parent
bc8870d019
commit
481ab338b4
Notes:
github-actions[bot]
2025-07-03 13:02:08 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 481ab338b4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5282
Reviewed-by: https://github.com/gmta ✅
2 changed files with 0 additions and 16 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue