[Webkit-unassigned] [Bug 197894] Inserting a newline in contenteditable causes two characters to be added instead of one

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 30 10:26:18 PDT 2019


Wenson Hsieh <wenson_hsieh at apple.com> changed:

           What    |Removed                     |Added
                 CC|                            |wenson_hsieh at apple.com

--- Comment #31 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 370575
  --> https://bugs.webkit.org/attachment.cgi?id=370575

View in context: https://bugs.webkit.org/attachment.cgi?id=370575&action=review

> Source/WebCore/ChangeLog:7
> +        Reviewed by NOBODY (OOPS!).

You should add a ChangeLog entry here describing the bug and the fix.

> Source/WebCore/editing/Editing.cpp:1127
> +        RefPtr<Range> r = it.range();

- You can use auto here instead of RefPtr<Range>.
- We also generally avoid single character variable names like `r`, in favor of `range`.

> LayoutTests/accessibility/set-selected-text-range-after-newline.html:21
> +                          text.replaceTextInRange("\n", 5, 0);

Nit - indentation looks off here. We don't align to the start of the brace/parenthesis like this in WebKit.

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/20190530/7c9c28f7/attachment.html>

More information about the webkit-unassigned mailing list