Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fefaaed9dfdeba70532cb1fe804847743dce4398
      
https://github.com/WebKit/WebKit/commit/fefaaed9dfdeba70532cb1fe804847743dce4398
  Author: SaitomTech <[email protected]>
  Date:   2026-08-14 (Fri, 14 Aug 2026)

  Changed paths:
    A 
LayoutTests/editing/mac/input/ime-commit-preserves-empty-positioned-block-expected.txt
    A 
LayoutTests/editing/mac/input/ime-commit-preserves-empty-positioned-block.html
    A 
LayoutTests/editing/mac/input/ime-recomposition-preserves-positioned-block-expected.txt
    A 
LayoutTests/editing/mac/input/ime-recomposition-preserves-positioned-block.html
    M Source/WebCore/editing/TypingCommand.cpp

  Log Message:
  -----------
  Confirming an IME composition can remove its containing positioned element
https://bugs.webkit.org/show_bug.cgi?id=321674

Reviewed by Ryosuke Niwa.

When confirming a composition, WebKit deletes the pending composition
text before inserting the finalized text. WebKit also deletes selected
text when starting a recomposition.

These deletions used the normal selection deletion behavior, which may
expand the selection to include a containing special element. Since
positioned elements are treated as special elements, this could remove
the element containing the composition and reinsert its text into a
styled span.

Disable special-element expansion when deleting composition text,
including pending composition text and text selected for recomposition.
Normal user-initiated selection deletion behavior remains unchanged.

Tests: editing/mac/input/ime-commit-preserves-empty-positioned-block.html
       editing/mac/input/ime-recomposition-preserves-positioned-block.html

* 
LayoutTests/editing/mac/input/ime-commit-preserves-empty-positioned-block-expected.txt:
 Added.
* 
LayoutTests/editing/mac/input/ime-commit-preserves-empty-positioned-block.html: 
Added.
* 
LayoutTests/editing/mac/input/ime-recomposition-preserves-positioned-block-expected.txt:
 Added.
* 
LayoutTests/editing/mac/input/ime-recomposition-preserves-positioned-block.html:
 Added.
* Source/WebCore/editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteSelection):
Do not expand composition text deletion to containing special elements.

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



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

Reply via email to