[webkit-changes] [WebKit/WebKit] 09159f: Make ReplaceSelectionCommand not to attempt to mod...

Ahmad Saleem noreply at github.com
Fri Jun 30 12:17:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 09159fc78c97383b8a3a6531a99ae68f53c0d94f
      https://github.com/WebKit/WebKit/commit/09159fc78c97383b8a3a6531a99ae68f53c0d94f
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    A LayoutTests/editing/execCommand/insert-list-into-list-crash-expected.txt
    A LayoutTests/editing/execCommand/insert-list-into-list-crash.html
    M Source/WebCore/editing/ReplaceSelectionCommand.cpp

  Log Message:
  -----------
  Make ReplaceSelectionCommand not to attempt to modify uneditable list element

https://bugs.webkit.org/show_bug.cgi?id=258736

Reviewed by Ryosuke Niwa.

This aligns WebKit with Gecko / Firefox and Blink / Chromium.

Merge: https://chromium.googlesource.com/chromium/src.git/+/835ae14aec4cdc54e151eaf583fa51a12460e276

This patch makes 'ReplaceSelectionCommand' not to attempt to modify uneditable
list element, when replaced range inside list element, e.g. UL and OL element,
and replacing fragment contains list item within list element.

* Source/WebCore/editing/ReplaceSelectionCommand.cpp:
(ReplaceSelectionCommand::doApply): Add condition for 'editable' style
* LayoutTests/editing/execCommand/insert-list-into-list-crash.html: Add Test Case
* LayoutTests/editing/execCommand/insert-list-into-list-crash-expected.txt: Add Test Case Expectation

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




More information about the webkit-changes mailing list