Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Update implementation of Range::partially_contains_node()
This accurately reflects the spec it's implementing. This algorithm is used in 5 spots in the spec but the old buggy behavior was never triggered: * In both ::extract() and ::clone_the_contents(), invocations to this method are guarded by a check to see if the start node is the inclusive ancestor of the end node, or vice versa - effectively resulting in the inequality checks to be accidentally correct. * In ::surround_contents(), we forego the usage of this algorithm as stated in the spec, but instead use a correct and more optimized version that simply compares the start and end nodes. A lot of words to say: no functional changes :^)
- Loading branch information