mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Only clear command states and values if range actually changed
This commit is contained in:
parent
5202ae26e0
commit
486bce8dad
Notes:
github-actions[bot]
2025-01-24 22:54:50 +00:00
Author: https://github.com/gmta
Commit: 486bce8dad
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3352
2 changed files with 14 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
|
||||
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -41,6 +42,14 @@ public:
|
|||
return start_container() == end_container() && start_offset() == end_offset();
|
||||
}
|
||||
|
||||
bool operator==(AbstractRange const& other) const
|
||||
{
|
||||
return start_container() == other.start_container()
|
||||
&& start_offset() == other.start_offset()
|
||||
&& end_container() == other.end_container()
|
||||
&& end_offset() == other.end_offset();
|
||||
}
|
||||
|
||||
protected:
|
||||
AbstractRange(GC::Ref<Node> start_container, WebIDL::UnsignedLong start_offset, GC::Ref<Node> end_container, WebIDL::UnsignedLong end_offset);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue