[webkit-changes] [WebKit/WebKit] d04e83: Invalidate rebuild root renderer on child node rem...

Antti Koivisto noreply at github.com
Tue Nov 28 05:42:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d04e83740124d7f9a5b1d6636c1ebf188d812bec
      https://github.com/WebKit/WebKit/commit/d04e83740124d7f9a5b1d6636c1ebf188d812bec
  Author: Antti Koivisto <antti at apple.com>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Element.h
    M Source/WebCore/dom/Node.cpp
    M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
    M Source/WebCore/style/StyleTreeResolver.cpp
    M Source/WebCore/style/StyleTreeResolver.h

  Log Message:
  -----------
  Invalidate rebuild root renderer on child node removal
https://bugs.webkit.org/show_bug.cgi?id=265384
rdar://118834858

Reviewed by Alan Baradlay.

If a child of a rebuild root is removed we need to invalidate it for rebuild so it doesn't
get left is an inconsitent state.

Tested by

fast/ruby/rubyDOM-remove-rt2.html
fast/ruby/rubyDOM-remove-text2.html

with style based ruby enabled.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::invalidateRenderer):

Add a mechanism to invalidate just the renderer without requiring re-resolving style.

* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::invalidateStyle):
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::findRenderingAncestor):
(WebCore::invalidateRebuildRootIfNeeded):
(WebCore::RenderTreeUpdater::tearDownRenderers):
(WebCore::RenderTreeUpdater::tearDownRenderersAfterSlotChange):
(WebCore::RenderTreeUpdater::tearDownRenderer):

Invalidate if we are removing a child of a rebuild root.

* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):

Add resolution type for renderer rebuild that just grabs the existing style.

(WebCore::Style::TreeResolver::determineResolutionType):
(WebCore::Style::TreeResolver::resetDescendantStyleRelations):
* Source/WebCore/style/StyleTreeResolver.h:

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




More information about the webkit-changes mailing list