[webkit-changes] [WebKit/WebKit] cea37a: REGRESSION(282648 at main): RELEASE_ASSERT fires when...

Said Abou-Hallawa noreply at github.com
Wed Sep 18 10:41:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cea37a7afdfcfb7858d60124a05e0c3b5186358d
      https://github.com/WebKit/WebKit/commit/cea37a7afdfcfb7858d60124a05e0c3b5186358d
  Author: Said Abou-Hallawa <said at apple.com>
  Date:   2024-09-18 (Wed, 18 Sep 2024)

  Changed paths:
    A LayoutTests/fast/dom/HTMLElement/attr-dir-auto-slot-shadow-innerHTML-expected.txt
    A LayoutTests/fast/dom/HTMLElement/attr-dir-auto-slot-shadow-innerHTML.html
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/html/HTMLSlotElement.cpp

  Log Message:
  -----------
  REGRESSION(282648 at main): RELEASE_ASSERT fires when inserting a slot element with dir=auto into the shadowRoot of a detached element
https://bugs.webkit.org/show_bug.cgi?id=279834
rdar://135587710

Reviewed by Ryosuke Niwa.

HTMLSlotElement needs to update the assignedNodes of its shadow root before it
computes its auto text directionality.

Make Element::insertedIntoAncestor() call updateEffectiveTextDirection() only
if the Element is not HTMLSlotElement.

HTMLSlotElement::insertedIntoAncestor() will return NeedsPostInsertionCallback
always. The callback HTMLSlotElement::didFinishInsertingNode() gets called
after updating the assignedNodes of the shadow root.

* LayoutTests/fast/dom/HTMLElement/attr-dir-auto-slot-shadow-innerHTML-expected.txt: Added.
* LayoutTests/fast/dom/HTMLElement/attr-dir-auto-slot-shadow-innerHTML.html: Added.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::insertedIntoAncestor):
(WebCore::Element::updateTextAttributes):
* Source/WebCore/dom/Element.h:
* Source/WebCore/html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::insertedIntoAncestor):
(WebCore::HTMLSlotElement::didFinishInsertingNode): Deleted.
* Source/WebCore/html/HTMLSlotElement.h:

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



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