Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d04e83740124d7f9a5b1d6636c1ebf188d812bec
      
https://github.com/WebKit/WebKit/commit/d04e83740124d7f9a5b1d6636c1ebf188d812bec
  Author: Antti Koivisto <[email protected]>
  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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to