Title: [282640] releases/WebKitGTK/webkit-2.32
- Revision
- 282640
- Author
- [email protected]
- Date
- 2021-09-17 01:28:59 -0700 (Fri, 17 Sep 2021)
Log Message
Merge r279721 - Shadow host stops rendering after removing a slot, updating style, then its assigned node
https://bugs.webkit.org/show_bug.cgi?id=227652
Reviewed by Alan Bujtas.
Source/WebCore:
Test: fast/shadow-dom/remove-slot-and-host-child.html
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::didChangeSlot):
When we tear down the render tree we also need to request its rebuild unconditionally.
LayoutTests:
* fast/shadow-dom/remove-slot-and-host-child-expected.html: Added.
* fast/shadow-dom/remove-slot-and-host-child.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog (282639 => 282640)
--- releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog 2021-09-17 07:46:20 UTC (rev 282639)
+++ releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog 2021-09-17 08:28:59 UTC (rev 282640)
@@ -1,3 +1,13 @@
+2021-07-08 Antti Koivisto <[email protected]>
+
+ Shadow host stops rendering after removing a slot, updating style, then its assigned node
+ https://bugs.webkit.org/show_bug.cgi?id=227652
+
+ Reviewed by Alan Bujtas.
+
+ * fast/shadow-dom/remove-slot-and-host-child-expected.html: Added.
+ * fast/shadow-dom/remove-slot-and-host-child.html: Added.
+
2021-06-17 Sergio Villar Senin <[email protected]>
Nullptr crash in StyledMarkupAccumulator::traverseNodesForSerialization
Added: releases/WebKitGTK/webkit-2.32/LayoutTests/fast/shadow-dom/remove-slot-and-host-child-expected.html (0 => 282640)
--- releases/WebKitGTK/webkit-2.32/LayoutTests/fast/shadow-dom/remove-slot-and-host-child-expected.html (rev 0)
+++ releases/WebKitGTK/webkit-2.32/LayoutTests/fast/shadow-dom/remove-slot-and-host-child-expected.html 2021-09-17 08:28:59 UTC (rev 282640)
@@ -0,0 +1 @@
+<div style="width: 100px; height: 100px; background: green;">
Added: releases/WebKitGTK/webkit-2.32/LayoutTests/fast/shadow-dom/remove-slot-and-host-child.html (0 => 282640)
--- releases/WebKitGTK/webkit-2.32/LayoutTests/fast/shadow-dom/remove-slot-and-host-child.html (rev 0)
+++ releases/WebKitGTK/webkit-2.32/LayoutTests/fast/shadow-dom/remove-slot-and-host-child.html 2021-09-17 08:28:59 UTC (rev 282640)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<body>
+<style> div { width: 100px; height: 100px; } </style>
+<div id="container" style="background: red;">
+<div id="host" style="background: blue;"><div id="child">Some content (DOM)</div></div>
+</div>
+<script>
+
+const slotted = document.querySelector('#slotted');
+
+const shadowRoot = host.attachShadow({mode: 'closed'});
+shadowRoot.innerHTML = '<div style="width: 100px; height: 100px; background: green;"><slot></slot></div>';
+shadowRoot.querySelector('slot').remove();
+
+document.body.getBoundingClientRect();
+
+child.remove();
+
+document.body.getBoundingClientRect();
+
+</script>
+</body>
+</html>
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (282639 => 282640)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog 2021-09-17 07:46:20 UTC (rev 282639)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog 2021-09-17 08:28:59 UTC (rev 282640)
@@ -1,3 +1,17 @@
+2021-07-08 Antti Koivisto <[email protected]>
+
+ Shadow host stops rendering after removing a slot, updating style, then its assigned node
+ https://bugs.webkit.org/show_bug.cgi?id=227652
+
+ Reviewed by Alan Bujtas.
+
+ Test: fast/shadow-dom/remove-slot-and-host-child.html
+
+ * dom/SlotAssignment.cpp:
+ (WebCore::SlotAssignment::didChangeSlot):
+
+ When we tear down the render tree we also need to request its rebuild unconditionally.
+
2021-07-22 Frédéric Wang <[email protected]>
nullptr crash in ApplyStyleCommand::applyRelativeFontStyleChange
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/dom/SlotAssignment.cpp (282639 => 282640)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/dom/SlotAssignment.cpp 2021-09-17 07:46:20 UTC (rev 282639)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/dom/SlotAssignment.cpp 2021-09-17 08:28:59 UTC (rev 282640)
@@ -308,6 +308,7 @@
return;
RenderTreeUpdater::tearDownRenderers(*shadowRoot.host());
+ shadowRoot.host()->invalidateStyleAndRenderersForSubtree();
slot->assignedNodes.clear();
m_slotAssignmentsIsValid = false;
@@ -316,8 +317,6 @@
if (!slotElement)
return;
- shadowRoot.host()->invalidateStyleAndRenderersForSubtree();
-
if (shadowRoot.shouldFireSlotchangeEvent())
slotElement->enqueueSlotChangeEvent();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes