Changeset 190430 in webkit
- Timestamp:
- Oct 1, 2015 1:36:34 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r190429 r190430 1 2015-10-01 Ryosuke Niwa <rniwa@webkit.org> 2 3 Slot elements should support fallback contents 4 https://bugs.webkit.org/show_bug.cgi?id=149701 5 6 Reviewed by Antti Koivisto. 7 8 Added tests for fallback contents in slot elements. One of them could be safely submitted to CSS WG, 9 and the other one is a style recalc test. 10 11 * fast/shadow-dom/css-scoping-shadow-slot-fallback-expected.html: Added. 12 * fast/shadow-dom/css-scoping-shadow-slot-fallback.html: Added. 13 * fast/shadow-dom/shadow-layout-after-slot-fallback-changes-expected.html: Added. 14 * fast/shadow-dom/shadow-layout-after-slot-fallback-changes.html: Added. 15 1 16 2015-10-01 Keith Miller <keith_miller@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r190423 r190430 1 2015-10-01 Ryosuke Niwa <rniwa@webkit.org> 2 3 Slot elements should support fallback contents 4 https://bugs.webkit.org/show_bug.cgi?id=149701 5 6 Reviewed by Antti Koivisto. 7 8 Following discussions on Github discussions [1] [2], we're adding the default rule of `display: contents` 9 on slot elements and making slot elements render its children when there are no assigned nodes [3]. 10 11 Make these changes by attaching renderers on direct-children of slot elements when there are no assigned 12 nodes during render tree construction. Note `display: contents` will be aded in webkit.org/b/149439. 13 14 [1] https://github.com/w3c/webcomponents/issues/317 15 [2] https://github.com/w3c/webcomponents/issues/308 16 [3] https://github.com/w3c/webcomponents/issues/308#issuecomment-143655347 17 18 Tests: fast/shadow-dom/css-scoping-shadow-slot-fallback.html 19 fast/shadow-dom/shadow-layout-after-slot-fallback-changes.html 20 21 * style/StyleResolveTree.cpp: 22 (WebCore::Style::attachSlotAssignees): 23 (WebCore::Style::detachSlotAssignees): 24 (WebCore::Style::resolveSlotAssignees): 25 1 26 2015-10-01 Brent Fulgham <bfulgham@apple.com> 2 27 -
trunk/Source/WebCore/style/StyleResolveTree.cpp
r190347 r190430 481 481 attachRenderTree(downcast<Element>(*child), inheritedStyle, renderTreePosition, nullptr); 482 482 } 483 } else { 484 for (Node* child = slot.firstChild(); child; child = child->nextSibling()) { 485 if (is<Text>(*child)) 486 attachTextRenderer(downcast<Text>(*child), renderTreePosition); 487 else if (is<Element>(*child)) 488 attachRenderTree(downcast<Element>(*child), inheritedStyle, renderTreePosition, nullptr); 489 } 483 490 } 484 491 slot.clearNeedsStyleRecalc(); … … 577 584 if (auto* assignedNodes = slot.assignedNodes()) { 578 585 for (auto* child : *assignedNodes) { 586 if (is<Text>(*child)) 587 detachTextRenderer(downcast<Text>(*child)); 588 else if (is<Element>(*child)) 589 detachRenderTree(downcast<Element>(*child), detachType); 590 } 591 } else { 592 for (Node* child = slot.firstChild(); child; child = child->nextSibling()) { 579 593 if (is<Text>(*child)) 580 594 detachTextRenderer(downcast<Text>(*child)); … … 853 867 resolveTree(downcast<Element>(*child), inheritedStyle, renderTreePosition, change); 854 868 } 869 } else { 870 for (Node* child = slot.firstChild(); child; child = child->nextSibling()) { 871 if (is<Text>(*child)) 872 resolveTextNode(downcast<Text>(*child), renderTreePosition); 873 else if (is<Element>(*child)) 874 resolveTree(downcast<Element>(*child), inheritedStyle, renderTreePosition, change); 875 } 855 876 } 856 877 slot.clearNeedsStyleRecalc();
Note: See TracChangeset
for help on using the changeset viewer.