Changeset 277402 in webkit
- Timestamp:
- May 12, 2021, 4:01:10 PM (5 years ago)
- Location:
- branches/safari-611.3.2.1-branch
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt (added)
-
LayoutTests/fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/SlotAssignment.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-611.3.2.1-branch/LayoutTests/ChangeLog
r277193 r277402 1 2021-05-12 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r277373. rdar://problem/77916543 4 5 Source/WebCore: 6 REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree 7 in Element::insertedIntoAncestor 8 https://bugs.webkit.org/show_bug.cgi?id=225684 9 10 Reviewed by Darin Adler. 11 12 The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM 13 for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where 14 SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element. 15 16 Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when 17 the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet. 18 19 Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html 20 21 * dom/SlotAssignment.cpp: 22 (WebCore::SlotAssignment::assignedNodesForSlot): 23 24 LayoutTests: 25 REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor 26 https://bugs.webkit.org/show_bug.cgi?id=225684 27 28 Reviewed by Darin Adler. 29 30 Added a regression test. 31 32 * fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added. 33 * fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added. 34 35 36 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277373 268f45cc-cd09-0410-ab3c-d52691b4dbfc 37 38 2021-05-12 Ryosuke Niwa <rniwa@webkit.org> 39 40 REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor 41 https://bugs.webkit.org/show_bug.cgi?id=225684 42 43 Reviewed by Darin Adler. 44 45 Added a regression test. 46 47 * fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added. 48 * fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added. 49 1 50 2021-05-07 Russell Epstein <repstein@apple.com> 2 51 -
branches/safari-611.3.2.1-branch/Source/WebCore/ChangeLog
r277193 r277402 1 2021-05-12 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r277373. rdar://problem/77916543 4 5 Source/WebCore: 6 REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree 7 in Element::insertedIntoAncestor 8 https://bugs.webkit.org/show_bug.cgi?id=225684 9 10 Reviewed by Darin Adler. 11 12 The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM 13 for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where 14 SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element. 15 16 Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when 17 the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet. 18 19 Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html 20 21 * dom/SlotAssignment.cpp: 22 (WebCore::SlotAssignment::assignedNodesForSlot): 23 24 LayoutTests: 25 REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor 26 https://bugs.webkit.org/show_bug.cgi?id=225684 27 28 Reviewed by Darin Adler. 29 30 Added a regression test. 31 32 * fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added. 33 * fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added. 34 35 36 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277373 268f45cc-cd09-0410-ab3c-d52691b4dbfc 37 38 2021-05-12 Ryosuke Niwa <rniwa@webkit.org> 39 40 REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree 41 in Element::insertedIntoAncestor 42 https://bugs.webkit.org/show_bug.cgi?id=225684 43 44 Reviewed by Darin Adler. 45 46 The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM 47 for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where 48 SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element. 49 50 Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when 51 the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet. 52 53 Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html 54 55 * dom/SlotAssignment.cpp: 56 (WebCore::SlotAssignment::assignedNodesForSlot): 57 1 58 2021-05-07 Russell Epstein <repstein@apple.com> 2 59 -
branches/safari-611.3.2.1-branch/Source/WebCore/dom/SlotAssignment.cpp
r276404 r277402 333 333 const AtomString& slotName = slotNameFromAttributeValue(slotElement.attributeWithoutSynchronization(nameAttr)); 334 334 auto* slot = m_slots.get(slotName); 335 336 bool hasNotCalledInsertedIntoAncestorOnSlot = shadowRoot.isConnected() && !slotElement.isConnected(); 337 if (hasNotCalledInsertedIntoAncestorOnSlot) 338 return nullptr; 335 339 RELEASE_ASSERT(slot); 336 340
Note:
See TracChangeset
for help on using the changeset viewer.