Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cb8d258708a5e61e22b9d3f6de9fd518041d5b91
      
https://github.com/WebKit/WebKit/commit/cb8d258708a5e61e22b9d3f6de9fd518041d5b91
  Author: Ahmad Saleem <[email protected]>
  Date:   2024-04-10 (Wed, 10 Apr 2024)

  Changed paths:
    A 
LayoutTests/editing/execCommand/canvas-counter-rooteditable-crash-expected.txt
    A LayoutTests/editing/execCommand/canvas-counter-rooteditable-crash.html
    A LayoutTests/editing/pasteboard/paste-text-009-expected.txt
    M LayoutTests/editing/pasteboard/paste-text-009.html
    R LayoutTests/platform/gtk/editing/pasteboard/paste-text-009-expected.png
    R LayoutTests/platform/gtk/editing/pasteboard/paste-text-009-expected.txt
    R LayoutTests/platform/ios/editing/pasteboard/paste-text-009-expected.png
    M LayoutTests/platform/ios/editing/pasteboard/paste-text-009-expected.txt
    R LayoutTests/platform/mac/editing/pasteboard/paste-text-009-expected.png
    R LayoutTests/platform/mac/editing/pasteboard/paste-text-009-expected.txt
    R 
LayoutTests/platform/wincairo/editing/pasteboard/paste-text-009-expected.txt
    M Source/WebCore/editing/ReplaceSelectionCommand.cpp

  Log Message:
  -----------
  Convert an assertion to if-condition in `ReplaceSelectionCommand::doApply()`

https://bugs.webkit.org/show_bug.cgi?id=127684
rdar://problem/27685262

Reviewed by Ryosuke Niwa.

Merge: 
https://chromium.googlesource.com/chromium/src.git/+/8f313902e23e2589ddd9d3d2bfed8ee61e979f17

This patch changes following assertion:

`ASSERT(insertionBlock != currentRoot)`

to if-condition in `ReplaceSelectionCommand::doApply()`, since we found a
pattern to hit this assertion in "paste-text-009.html".

This test changes current test to use 'testharness' script but instead of full
merge from Blink commit, this limits it to only test change (i.e., 009.html).
Only change is 'root' editable:

"past-text-009.html": (testharness)
    |currentRoot| is "<div>one"
    | insertionBlock | is "<div>one"

  "paste-text-009.html":
    |currentRoot| is BODY
    | insertionBlock | is "<div>Omitted".

* Source/WebCore/editing/ReplaceSelectionCommand.cpp:
(ReplaceSelectionCommand::doApply):
* LayoutTests/editing/pasteboard/paste-text-009.html: Rebaselined
* LayoutTests/editing/pasteboard/paste-text-009-expected.txt: Add Test 
Expectation
* LayoutTests/platform/gtk/editing/pasteboard/paste-text-009-expected.png: 
Removed
* LayoutTests/platform/gtk/editing/pasteboard/paste-text-009-expected.txt: Ditto
* LayoutTests/platform/ios/editing/pasteboard/paste-text-009-expected.png: Ditto
* LayoutTests/platform/ios/editing/pasteboard/paste-text-009-expected.txt: Ditto
* LayoutTests/platform/mac/editing/pasteboard/paste-text-009-expected.png: Ditto
* LayoutTests/platform/mac/editing/pasteboard/paste-text-009-expected.txt: Ditto
* LayoutTests/platform/wincairo/editing/pasteboard/paste-text-009-expected.txt: 
Ditto
* LayoutTests/platform/ios/editing/pasteboard/paste-text-009-expected.txt: Add 
Platform Specific Expectation
* LayoutTests/editing/execCommand/canvas-counter-rooteditable-crash.html: Add 
Test Case
* 
LayoutTests/editing/execCommand/canvas-counter-rooteditable-crash-expected.txt: 
Add Test Case Expectation

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to