[webkit-changes] [WebKit/WebKit] fd1d12: Cherry-pick 283457 at main (1d56845bb42e). https://bu...

Vitaly Dyachkov noreply at github.com
Wed Sep 25 01:43:08 PDT 2024


  Branch: refs/heads/webkitglib/2.44
  Home:   https://github.com/WebKit/WebKit
  Commit: fd1d120d0bfb0addfef2aebff8ca18378018bff0
      https://github.com/WebKit/WebKit/commit/fd1d120d0bfb0addfef2aebff8ca18378018bff0
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2024-09-25 (Wed, 25 Sep 2024)

  Changed paths:
    A LayoutTests/editing/deleting/delete-picture-expected.txt
    A LayoutTests/editing/deleting/delete-picture.html
    A LayoutTests/editing/deleting/delete-text-before-picture-expected.txt
    A LayoutTests/editing/deleting/delete-text-before-picture.html
    M Source/WebCore/editing/DeleteSelectionCommand.cpp

  Log Message:
  -----------
  Cherry-pick 283457 at main (1d56845bb42e). https://bugs.webkit.org/show_bug.cgi?id=279467

    Deleting content immediately before a `<picture>` unexpectedly removes `<source>`s
    https://bugs.webkit.org/show_bug.cgi?id=279467
    rdar://128100106

    Reviewed by Wenson Hsieh and Abrar Rahman Protyasha.

    `<picture>` elements may contain one or more `<source>` elements (which are not
    rendered) and an `<img>` element. When making selections around a `<picture>`
    element, the selection is anchored before or after the `<img>` child.

    Consequently, when the selection is visually before a `<picture>` element, and
    deletion is performed, all `<source>` elements before the selection are also
    removed. This is incorrect, as the `<picture>` element and all its children should
    be left intact.

    Fix by avoiding removal of nodes that have a parent node which cannot have
    children for editing. Only the direct parent is checked, since traversal is
    performed in document order.

    A longer term solution would be to (again) experiment with making
    `canContainRangeEndPoint` return `false` for `HTMLPictureElement`. That change would
    solve this issue by ensuring the selection could never be inside a `<picture>`.
    However, that change is much higher risk, and also causes other selection related
    issues, which need to be investigated independently.

    * LayoutTests/editing/deleting/delete-picture-expected.txt: Added.
    * LayoutTests/editing/deleting/delete-picture.html: Added.

    Test already working behavior to delete a `<picture> element.

    * LayoutTests/editing/deleting/delete-text-before-picture-expected.txt: Added.
    * LayoutTests/editing/deleting/delete-text-before-picture.html: Added.

    Test the issue fixed by this patch.

    * Source/WebCore/editing/DeleteSelectionCommand.cpp:
    (WebCore::DeleteSelectionCommand::handleGeneralDelete):

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

Canonical link: https://commits.webkit.org/274313.442@webkitglib/2.44


  Commit: 9965d9d72f4b64d8ddeb7e1297b1fbffd05e3c81
      https://github.com/WebKit/WebKit/commit/9965d9d72f4b64d8ddeb7e1297b1fbffd05e3c81
  Author: Vitaly Dyachkov <vitaly at igalia.com>
  Date:   2024-09-25 (Wed, 25 Sep 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/cssjit/SelectorCompiler.cpp

  Log Message:
  -----------
  Cherry-pick 283428 at main (b9e946421ea6). https://bugs.webkit.org/show_bug.cgi?id=278654

    [Debug] ASSERTION FAILED on `fast/rendering/render-list-marker-select.html`
    https://bugs.webkit.org/show_bug.cgi?id=278654

    Reviewed by Matthieu Dubet.

    Do not compile `:is()` selector if it contains a pseudo-element subselector.

    * LayoutTests/TestExpectations:
    * Source/WebCore/cssjit/SelectorCompiler.cpp:
    (WebCore::SelectorCompiler::addPseudoClassType)

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

Canonical link: https://commits.webkit.org/274313.443@webkitglib/2.44


Compare: https://github.com/WebKit/WebKit/compare/d040d6ffc6d1...9965d9d72f4b

To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list