Changeset 192763 in webkit
- Timestamp:
- Nov 24, 2015, 4:40:57 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r192752 r192763 1 2015-11-24 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r190983): Non-element, non-text nodes should not be distributed to slots 4 https://bugs.webkit.org/show_bug.cgi?id=151566 5 rdar://problem/23430177 6 7 Reviewed by Zalan Bujtas. 8 9 * fast/html/details-comment-crash-expected.html: Added. 10 * fast/html/details-comment-crash.html: Added. 11 1 12 2015-11-23 Brady Eidson <beidson@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r192758 r192763 1 2015-11-24 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r190983): Non-element, non-text nodes should not be distributed to slots 4 https://bugs.webkit.org/show_bug.cgi?id=151566 5 rdar://problem/23430177 6 7 Reviewed by Zalan Bujtas. 8 9 We don't invalidate slot assignments except for text or element children. Fix by not 10 not assigning other nodes to slots as it is not useful. 11 12 Test: fast/html/details-comment-crash.html 13 14 * dom/SlotAssignment.cpp: 15 (WebCore::slotNameFromSlotAttribute): 16 (WebCore::SlotAssignment::findAssignedSlot): 17 (WebCore::SlotAssignment::assignSlots): 18 1 19 2015-11-23 David Kilzer <ddkilzer@apple.com> 2 20 -
trunk/Source/WebCore/dom/SlotAssignment.cpp
r190840 r192763 44 44 static const AtomicString& slotNameFromSlotAttribute(const Node& child) 45 45 { 46 if ( !is<Element>(child))46 if (is<Text>(child)) 47 47 return SlotAssignment::defaultSlotName(); 48 48 49 return slotNameFromAttributeValue(downcast<Element>(child).fastGetAttribute(slotAttr)); 49 50 } … … 61 62 HTMLSlotElement* SlotAssignment::findAssignedSlot(const Node& node, ShadowRoot& shadowRoot) 62 63 { 64 if (!is<Text>(node) && !is<Element>(node)) 65 return nullptr; 66 63 67 if (!m_slotAssignmentsIsValid) 64 68 assignSlots(shadowRoot); … … 221 225 auto& host = *shadowRoot.host(); 222 226 for (auto* child = host.firstChild(); child; child = child->nextSibling()) { 227 if (!is<Text>(*child) && !is<Element>(*child)) 228 continue; 223 229 auto slotName = m_slotNameFunction(*child); 224 230 if (!slotName)
Note:
See TracChangeset
for help on using the changeset viewer.