[Webkit-unassigned] [Bug 266919] New: Add early return in 'prepareWhitespaceAtPositionForSplit' if there is no richly editable position

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 27 18:52:34 PST 2023


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

            Bug ID: 266919
           Summary: Add early return in
                    'prepareWhitespaceAtPositionForSplit' if there is no
                    richly editable position
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ahmad.saleem792 at gmail.com
                CC: rniwa at webkit.org, wenson_hsieh at apple.com

Hi Team,

While looking into HTML Editing code in Blink, I noticed that they have early return for 'prepareWhitespaceAtPositionForSplit'.

Blink Commit: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/composite_edit_command.cc;l=814;drc=3adc67dbb288622b53c188b0858ec898626998ae

WebKit Source: https://searchfox.org/wubkat/rev/2cb2f84b68df8a519e252d535de43e7d19567883/Source/WebCore/editing/CompositeEditCommand.cpp#977

Following compiles:

 if (!isRichlyEditablePosition(position))
        return;

___

I don't have any benchmark or test cases run through above change but it does not seems like bad idea.

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231228/c7ad5780/attachment.htm>


More information about the webkit-unassigned mailing list