Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 57714dd1461f8f99bbf6525cf183eaa3a471faa9
      
https://github.com/WebKit/WebKit/commit/57714dd1461f8f99bbf6525cf183eaa3a471faa9
  Author: Ryosuke Niwa <[email protected]>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    M 
LayoutTests/editing/execCommand/insert-list-nested-with-orphaned-expected.txt
    M 
LayoutTests/editing/execCommand/insert-list-nested-with-orphaned-live-range-expected.txt
    M Source/WebCore/editing/InsertListCommand.cpp

  Log Message:
  -----------
  [Live Range Selection] 
editing/execCommand/insert-list-nested-with-orphaned.html ends with wrong 
selection
https://bugs.webkit.org/show_bug.cgi?id=248981

Reviewed by Darin Adler.

Fixed the bug that these two tests were leaving caret selection instead of 
selecting across the lists as they should.
New behavior matches that of Firefox & Chrome as well as user's expectation.

* LayoutTests/editing/execCommand/insert-list-nested-with-orphaned-expected.txt:
* 
LayoutTests/editing/execCommand/insert-list-nested-with-orphaned-live-range-expected.txt:
* Source/WebCore/editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApply): Added the code to recover from orphaned 
selection start.
(WebCore::InsertListCommand::doApplyForSingleParagraph): Fixed the bug that 
this code was always setting
the ending selection to be in the first position in the new list. Select the 
entire list instead.

Canonical link: https://commits.webkit.org/257613@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to