Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Issue 1569473002: Reland of Support slot element's fallback content feature (Closed)

Created:
4 years, 11 months ago by msramek
Modified:
4 years, 11 months ago
Reviewers:
tkent, sof, kochi, hayato
CC:
chromium-reviews, blink-reviews-html_chromium.org, webcomponents-bugzilla_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis, oilpan-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland of Support slot element's fallback content feature (patchset #1 id:1 of https://codereview.chromium.org/1562743002/ ) Reason for revert: Relanding, as the error caused by the reverted CL will be fixed by the followup https://codereview.chromium.org/1562013002/. Original issue's description: > Revert of Support slot element's fallback content feature (patchset #4 id:60001 of https://codereview.chromium.org/1530643003/ ) > > Reason for revert: > Broken compilation: > > FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\WebKit\Source\core\dom\shadow\webcore_dom.SlotAssignment.obj.rsp /c ..\..\third_party\WebKit\Source\core\dom\shadow\SlotAssignment.cpp /Foobj\third_party\WebKit\Source\core\dom\shadow\webcore_dom.SlotAssignment.obj /Fdobj\third_party\WebKit\Source\core\webcore_dom.cc.pdb > e:\b\build\slave\webkit_win_oilpan\build\src\third_party\webkit\source\wtf\vector.h(638) : error C2338: Cannot put raw pointers to garbage-collected classes into an off-heap Vector. Use HeapVector<Member<T>> instead. > e:\b\build\slave\webkit_win_oilpan\build\src\third_party\webkit\source\wtf\vector.h(632) : while compiling class template member function 'WTF::Vector<blink::HTMLSlotElement *,0,WTF::PartitionAllocator>::Vector(void)' > e:\b\build\slave\webkit_win_oilpan\build\src\third_party\webkit\source\core\dom\shadow\slotassignment.cpp(34) : see reference to function template instantiation 'WTF::Vector<blink::HTMLSlotElement *,0,WTF::PartitionAllocator>::Vector(void)' being compiled > e:\b\build\slave\webkit_win_oilpan\build\src\third_party\webkit\source\core\dom\shadow\slotassignment.cpp(34) : see reference to class template instantiation 'WTF::Vector<blink::HTMLSlotElement *,0,WTF::PartitionAllocator>' being compiled > ninja: build stopped: subcommand failed. > > Original issue's description: > > Support slot element's fallback content feature > > > > The spec discussion is: > > - https://github.com/w3c/webcomponents/issues/317 > > > > The relevant algorithm sections in the Shadow DOM spec are: > > - Distributed nodes algorithm: http://w3c.github.io/webcomponents/spec/shadow/#distributed-nodes-algorithm > > - Composition algorithm: http://w3c.github.io/webcomponents/spec/shadow/#composition-algorithm > > > > Now, if a slot does not have any assigned node, its child nodes are used as fallback contents. > > This fallback ability will *chain* recursively. That means we can use *another* slot as a slot's fallback contents. > > That gives us a great flexibility to compose a composed tree. > > > > e.g. > > > > Suppose we have the following tree of trees, which is borrowed from `v1-slots-fallback2.thml` test: > > > > <div id='host'> > > <template data-mode='open'> > > <slot name='slot1'> > > <div id='fallback1'></div> > > <slot name='slot2'> > > <div id='fallback2'></div> > > </slot> > > </slot> > > <slot name='slot3'> > > <slot name='slot4'> > > <div id='fallback3'></div> > > </slot> > > </slot> > > </template> > > <div id='child1' slot='slot2'></div> > > </div> > > > > This can be composed into the following composed tree: > > > > <div id='host'> > > <div id='fallback1'></div> > > <div id='child1'></div> > > <div id='fallback3'></div> > > </div> > > > > The following feature is not yet supported: > > > > - A slot API, HTMLSlotElement::getDistributedNodes does not work in a document tree nor v0 shadow tree > > > > I'll support this as separate patches. This requires non-trivial changes to the distribution code. > > > > Committed: https://crrev.com/b7c3414768afff35204a6c6b869c47d90d3953e0 > > Cr-Commit-Position: refs/heads/master@{#367789} > > TBR=kochi@chromium.org,tkent@chromium.org,hayato@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/8fbe7b738f91be9334ee3974eff818d819269cac > Cr-Commit-Position: refs/heads/master@{#367804} TBR=kochi@chromium.org,tkent@chromium.org,hayato@chromium.org,sigbjornf@opera.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Committed: https://crrev.com/e8632b4aeb59c8f208f6882eb99888f2d6fa6e91 Cr-Commit-Position: refs/heads/master@{#367806}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+505 lines, -118 lines) Patch
M third_party/WebKit/LayoutTests/fast/dom/shadow/resources/shadow-dom.js View 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-api-in-v0.html View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-1.html View 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-1-expected.html View 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-2.html View 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-2-expected.html View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-3.html View 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-3-expected.html View 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-api-1.html View 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-api-2.html View 1 chunk +55 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-fallback-api-3.html View 1 chunk +85 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-in-v0.html View 1 chunk +19 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-in-v0-expected.html View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ContainerNode.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.h View 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 2 chunks +41 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.h View 2 chunks +5 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.cpp View 6 chunks +91 lines, -102 lines 0 comments Download
M third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp View 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLSlotElement.h View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLSlotElement.cpp View 2 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
msramek
Created Reland of Support slot element's fallback content feature
4 years, 11 months ago (2016-01-06 10:04:43 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1569473002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1569473002/1
4 years, 11 months ago (2016-01-06 10:05:13 UTC) #2
sof
lgtm
4 years, 11 months ago (2016-01-06 10:06:00 UTC) #3
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 11 months ago (2016-01-06 10:06:13 UTC) #4
commit-bot: I haz the power
4 years, 11 months ago (2016-01-06 10:07:08 UTC) #6
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/e8632b4aeb59c8f208f6882eb99888f2d6fa6e91
Cr-Commit-Position: refs/heads/master@{#367806}

Powered by Google App Engine
This is Rietveld 408576698