[webkit-changes] [WebKit/WebKit] 37c996: InsertParagraph should insert a BR when the root e...

Ryosuke Niwa noreply at github.com
Tue Feb 14 00:11:20 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 37c9962af2e3af8339a71539efdcd40c813d6bd6
      https://github.com/WebKit/WebKit/commit/37c9962af2e3af8339a71539efdcd40c813d6bd6
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-02-14 (Tue, 14 Feb 2023)

  Changed paths:
    A LayoutTests/editing/inserting/insert-paragraph-separator-phrasing-editable-root-expected.txt
    A LayoutTests/editing/inserting/insert-paragraph-separator-phrasing-editable-root.html
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=normal&display=block&method=enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=normal&display=block&method=shift-enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=normal&display=list-item&method=enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=normal&display=list-item&method=shift-enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre&display=block&method=enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre&display=block&method=shift-enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre&display=list-item&method=enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre&display=list-item&method=shift-enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-line&display=block&method=enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-line&display=block&method=shift-enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-line&display=list-item&method=enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-line&display=list-item&method=shift-enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-wrap&display=block&method=enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-wrap&display=block&method=shift-enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-wrap&display=list-item&method=enter-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-wrap&display=list-item&method=shift-enter-expected.txt
    M Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp

  Log Message:
  -----------
  InsertParagraph should insert a BR when the root editable element is a phrasing content
https://bugs.webkit.org/show_bug.cgi?id=252219

Reviewed by Wenson Hsieh.

When the root editable element only allows phrasing content (e.g. span) then execCommand('insertParagraph') should insert a br instead of a div.

* LayoutTests/editing/inserting/insert-paragraph-separator-phrasing-editable-root-expected.txt: Added.
* LayoutTests/editing/inserting/insert-paragraph-separator-phrasing-editable-root.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=normal&display=block&method=enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=normal&display=block&method=shift-enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=normal&display=list-item&method=enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=normal&display=list-item&method=shift-enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre&display=block&method=enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre&display=block&method=shift-enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre&display=list-item&method=enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre&display=list-item&method=shift-enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-line&display=block&method=enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-line&display=block&method=shift-enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-line&display=list-item&method=enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-line&display=list-item&method=shift-enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-wrap&display=block&method=enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-wrap&display=block&method=shift-enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-wrap&display=list-item&method=enter-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/editing/other/insertparagraph-in-inline-editing-host.tentative_white-space=pre-wrap&display=list-item&method=shift-enter-expected.txt:
* Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::isPhrasingContent):
(WebCore::isEditableRootPhrasingContent):
(WebCore::InsertParagraphSeparatorCommand::doApply):

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




More information about the webkit-changes mailing list