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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/layout-update-on-slotassignment.html

Issue 2085853004: Force reattach all shadow host's children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src='../resources/testharness.js'></script>
3 <script src='../resources/testharnessreport.js'></script>
4 <script src='resources/shadow-dom.js'></script>
5 <div id='host' class='container'>
6 <template data-mode='open' data-expose-as='root'>
7 <div id='container' style='position: relative'>
8 <slot name='x'></slot>
9 </div>
10 </template>
11 <span id='target' slot='x'>X</span>
12 </div>
13
14 <script>
15 test(() => {
16 // Update layout and make layout clean.
17 document.body.offsetTop;
18 // Change slotting to make layout dirty.
19 convertTemplatesToShadowRootsWithin(host);
20 var slot = root.querySelector('slot');
21 assert_equals(slot.assignedNodes()[0].id, 'target', 'make sure the element is assigned to slot');
22 assert_equals(target.offsetParent.id, 'container', 'offsetParent should return layout tree parent.');
23 }, 'slotting change should cause layout recalculation.');
24 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698