Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 638eb211482df718b006d050483e3df63ef3da53
      
https://github.com/WebKit/WebKit/commit/638eb211482df718b006d050483e3df63ef3da53
  Author: Antti Koivisto <[email protected]>
  Date:   2026-01-14 (Wed, 14 Jan 2026)

  Changed paths:
    A LayoutTests/fast/ruby/ruby-block-in-inline-crash-expected.txt
    A LayoutTests/fast/ruby/ruby-block-in-inline-crash.html
    M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp

  Log Message:
  -----------
  Mutation with ruby containing block-in-inline hits nullptr
https://bugs.webkit.org/show_bug.cgi?id=305462
rdar://167840436

Reviewed by Alan Baradlay.

One path of Ruby::findOrCreateParentForStyleBasedRubyChild fails to update 
beforeChild for the new parent and it
ends up outside the parent subtree. This breaks assumptions elsewhere and 
causes a nullptr crash.

Test: fast/ruby/ruby-block-in-inline-crash.html
* LayoutTests/fast/ruby/ruby-block-in-inline-crash-expected.txt: Added.
* LayoutTests/fast/ruby/ruby-block-in-inline-crash.html: Added.
* Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild):

Fix by clearing beforeChild when needed.

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



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

Reply via email to