LibWeb: Compare start container to parent in Text.splitText()
Some checks failed
CI / Lagom (NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Validate code with clang plugins / build-and-verify (push) Has been cancelled
Some checks failed
CI / Lagom (NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Validate code with clang plugins / build-and-verify (push) Has been cancelled
Tiny mistake in the implementation of the spec; fixes 16 FAILs in the WPT `/dom/ranges/Range-mutations-splitText.html` tests.
This commit is contained in:
parent
732e3fa82f
commit
dee81f3545
Notes:
github-actions[bot]
2024-08-27 11:14:02 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/dee81f35453 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1203
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Text>> Text::split_text(size_t offset)
|
|||
|
||||
// 4. For each live range whose start node is parent and start offset is equal to the index of node plus 1, increase its start offset by 1.
|
||||
for (auto& range : Range::live_ranges()) {
|
||||
if (range->start_container() == this && range->start_offset() == index() + 1)
|
||||
if (range->start_container() == parent.ptr() && range->start_offset() == index() + 1)
|
||||
TRY(range->set_start(*range->start_container(), range->start_offset() + 1));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue