Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slot elements should support fallback contents
https://bugs.webkit.org/show_bug.cgi?id=149701 Reviewed by Antti Koivisto. Source/WebCore: Following discussions on Github discussions  , we're adding the default rule of `display: contents` on slot elements and making slot elements render its children when there are no assigned nodes . Make these changes by attaching renderers on direct-children of slot elements when there are no assigned nodes during render tree construction. Note `display: contents` will be aded in webkit.org/b/149439.  WICG/webcomponents#317  WICG/webcomponents#308  WICG/webcomponents#308 (comment) Tests: fast/shadow-dom/css-scoping-shadow-slot-fallback.html fast/shadow-dom/shadow-layout-after-slot-fallback-changes.html * style/StyleResolveTree.cpp: (WebCore::Style::attachSlotAssignees): (WebCore::Style::detachSlotAssignees): (WebCore::Style::resolveSlotAssignees): LayoutTests: Added tests for fallback contents in slot elements. One of them could be safely submitted to CSS WG, and the other one is a style recalc test. * fast/shadow-dom/css-scoping-shadow-slot-fallback-expected.html: Added. * fast/shadow-dom/css-scoping-shadow-slot-fallback.html: Added. * fast/shadow-dom/shadow-layout-after-slot-fallback-changes-expected.html: Added. * fast/shadow-dom/shadow-layout-after-slot-fallback-changes.html: Added. Canonical link: https://commits.webkit.org/167842@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing with 192 additions and 0 deletions.
- +15 −0 LayoutTests/ChangeLog
- +7 −0 LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-fallback-expected.html
- +46 −0 LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-fallback.html
- +7 −0 LayoutTests/fast/shadow-dom/shadow-layout-after-slot-fallback-changes-expected.html
- +71 −0 LayoutTests/fast/shadow-dom/shadow-layout-after-slot-fallback-changes.html
- +25 −0 Source/WebCore/ChangeLog
- +21 −0 Source/WebCore/style/StyleResolveTree.cpp