Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99962e54b060098839e394bb1153ed7bfcb63925
      
https://github.com/WebKit/WebKit/commit/99962e54b060098839e394bb1153ed7bfcb63925
  Author: Ahmad Saleem <[email protected]>
  Date:   2022-12-10 (Sat, 10 Dec 2022)

  Changed paths:
    A LayoutTests/editing/deleting/delete-svg-001-expected.txt
    A LayoutTests/editing/deleting/delete-svg-001.html
    M Source/WebCore/editing/CompositeEditCommand.cpp
    M Source/WebCore/editing/CompositeEditCommand.h

  Log Message:
  -----------
  Make CompositeEditCommand::prepareWhitespaceAtPositionForSplit() works at 
deleting SVG element

Make CompositeEditCommand::prepareWhitespaceAtPositionForSplit() works at 
deleting SVG element
https://bugs.webkit.org/show_bug.cgi?id=62500

Reviewed by Ryosuke Niwa.

Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=158002

CompositeEditCommand::prepareWhitespaceAtPositionForSplit() replaces 
collapsible whitespaces with non-breaking space around split position.
This patch changes it to work when split position is end of text node, e.g. 
VisualPosition.downstream().deprecatedNode() != VisualPostion.deprecateNode().

* Source/WebCore/editing/CompositeEditCommand.h: Add 
"replaceCollapsibleWhitespaceWithNonBreakingSpaceIfNeeded" header
* Source/WebCore/editing/CompositeEditCommand.cpp:
(CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
(1) Add variable with "previousVisiblePos" and "visiblePos" return values
(2) Add "replaceCollapsibleWhitespaceWithNonBreakingSpaceIfNeeded" function and 
logic to work with "SVG" deletion
* LayoutTests/editing/deleting/delete-svg-001.html: Add Test Case
* LayoutTests/editing/deleting/delete-svg-001-expected.txt: Add Test Case 
Expectation

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


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

Reply via email to