Changeset 109321 in webkit
- Timestamp:
- Feb 29, 2012 11:58:26 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109316 r109321 1 2012-02-29 Shinya Kawanaka <shinyak@chromium.org> 2 3 Fallback elements in non-youngest shadow tree should not be rendered. 4 https://bugs.webkit.org/show_bug.cgi?id=80002 5 6 Reviewed by Hajime Morita. 7 8 Since createContentWithSelect shadw-test-driver.js is not intuitive, fallback element 9 is not added in existing tests. 10 This change makes sure the existence of fallback elements. 11 12 * fast/dom/resources/shadow-test-driver.js: 13 (createContentWithSelect): 14 * fast/dom/shadow/content-element-move.html: 15 * fast/dom/shadow/multiple-shadowroot-rendering.html: 16 1 17 2012-02-29 Kentaro Hara <haraken@chromium.org> 2 18 -
trunk/LayoutTests/fast/dom/resources/shadow-test-driver.js
r109315 r109321 62 62 } 63 63 64 function createContentWithSelect(select, fallback ) {64 function createContentWithSelect(select, fallbackText) { 65 65 var content = internals.createContentElement(document); 66 66 content.setAttribute('select', select); 67 if ( !fallback)68 content.appendChild(createSpanWithText( "FALLBACK"));67 if (fallbackText) 68 content.appendChild(createSpanWithText(fallbackText)); 69 69 70 70 return content; -
trunk/LayoutTests/fast/dom/shadow/content-element-move.html
r109315 r109321 23 23 24 24 // Create shadow tree. 25 var content = createContentWithSelect('span' );25 var content = createContentWithSelect('span', 'FALLBACK'); 26 26 var sr = internals.ensureShadowRoot(root); 27 27 sr.appendChild(createSpanWithText("BEFORE")); … … 49 49 50 50 // Create shadow tree. 51 var content1 = createContentWithSelect('.c1' );52 var content2 = createContentWithSelect('span' );51 var content1 = createContentWithSelect('.c1', 'FALLBACK'); 52 var content2 = createContentWithSelect('span', 'FALLBACK'); 53 53 var sr = internals.ensureShadowRoot(root); 54 54 sr.appendChild(createSpanWithText("BEFORE")); … … 78 78 79 79 // Create shadow tree. 80 var content1 = createContentWithSelect('.c1' );81 var content2 = createContentWithSelect('span' );80 var content1 = createContentWithSelect('.c1', 'FALLBACK'); 81 var content2 = createContentWithSelect('span', 'FALLBACK'); 82 82 var sr = internals.ensureShadowRoot(root); 83 83 sr.appendChild(createSpanWithText("BEFORE")); … … 134 134 135 135 // Create shadow tree. 136 var content = createContentWithSelect('span' );136 var content = createContentWithSelect('span', 'FALLBACK'); 137 137 var sr = internals.ensureShadowRoot(root); 138 138 sr.appendChild(createSpanWithText("BEFORE")); … … 160 160 161 161 // Create shadow tree. 162 var content = createContentWithSelect('span' );162 var content = createContentWithSelect('span', 'FALLBACK'); 163 163 var sr = internals.ensureShadowRoot(root); 164 164 sr.appendChild(createSpanWithText("BEFORE")); … … 187 187 188 188 // Create shadow tree. 189 var content = createContentWithSelect('.c1' );189 var content = createContentWithSelect('.c1', 'FALLBACK'); 190 190 var sr = internals.ensureShadowRoot(root); 191 191 sr.appendChild(createSpanWithText("BEFORE")); … … 222 222 var f = (function(root, callIfDone) { 223 223 return function() { 224 var content = createContentWithSelect('span' );224 var content = createContentWithSelect('span', 'FALLBACK'); 225 225 var sr = internals.ensureShadowRoot(root); 226 226 sr.insertBefore(content, sr.lastChild); … … 248 248 var f = (function(root, callIfDone) { 249 249 return function() { 250 var content1 = createContentWithSelect('.c2' );251 var content2 = createContentWithSelect('span' );250 var content1 = createContentWithSelect('.c2', 'FALLBACK'); 251 var content2 = createContentWithSelect('span', 'FALLBACK'); 252 252 var sr = internals.ensureShadowRoot(root); 253 253 sr.insertBefore(content1, sr.lastChild); … … 272 272 sr.appendChild(createSpanWithText("BEFORE")); 273 273 sr.appendChild(mid); 274 sr.appendChild(createContentWithSelect('.c2' ));274 sr.appendChild(createContentWithSelect('.c2', 'FALLBACK')); 275 275 sr.appendChild(createSpanWithText("AFTER")); 276 276 … … 279 279 var f = (function(root, mid, callIfDone) { 280 280 return function() { 281 var content = createContentWithSelect('span' );281 var content = createContentWithSelect('span', 'FALLBACK'); 282 282 var sr = internals.ensureShadowRoot(root); 283 283 sr.insertBefore(content, mid); … … 299 299 // Create shadow tree. 300 300 var sr = internals.ensureShadowRoot(root); 301 var content1 = createContentWithSelect('.c1' );302 var content2 = createContentWithSelect('span' );301 var content1 = createContentWithSelect('.c1', 'FALLBACK'); 302 var content2 = createContentWithSelect('span', 'FALLBACK'); 303 303 sr.appendChild(createSpanWithText("BEFORE")); 304 304 sr.appendChild(content1); … … 337 337 // Create shadow tree in 'n1' 338 338 var sr = internals.ensureShadowRoot(n1); 339 var content = createContentWithSelect('span' );339 var content = createContentWithSelect('span', 'FALLBACK'); 340 340 sr.appendChild(createSpanWithText("BEFORE")); 341 341 sr.appendChild(content); -
trunk/LayoutTests/fast/dom/shadow/multiple-shadowroot-rendering.html
r109096 r109321 125 125 var sr1 = new WebKitShadowRoot(root); 126 126 sr1.appendChild(createSpanWithText('BEFORE: SHOULD NOT BE RENDERED')); 127 sr1.appendChild(createContentWithSelect('span', 'FALLBACK '));127 sr1.appendChild(createContentWithSelect('span', 'FALLBACK 1')); 128 128 sr1.appendChild(createSpanWithText('AFTER: SHOULD NOT BE RENDERED')); 129 129 … … 133 133 var sr2 = new WebKitShadowRoot(root); 134 134 sr2.appendChild(createSpanWithText('BEFORE')); 135 sr2.appendChild(createContentWithSelect('span', 'FALLBACK '));135 sr2.appendChild(createContentWithSelect('span', 'FALLBACK 2')); 136 136 sr2.appendChild(createSpanWithText('AFTER')); 137 137 … … 149 149 var sr1 = new WebKitShadowRoot(root); 150 150 sr1.appendChild(createSpanWithText('BEFORE: SHOULD NOT BE RENDERED')); 151 sr1.appendChild(createContentWithSelect('span', 'FALLBACK '));151 sr1.appendChild(createContentWithSelect('span', 'FALLBACK 1')); 152 152 sr1.appendChild(createSpanWithText('AFTER: SHOULD NOT BE RENDERED')); 153 153 … … 155 155 var sr2 = new WebKitShadowRoot(root); 156 156 sr2.appendChild(createSpanWithText('BEFORE')); 157 sr2.appendChild(createContentWithSelect('span', 'FALLBACK '));157 sr2.appendChild(createContentWithSelect('span', 'FALLBACK 2')); 158 158 sr2.appendChild(createSpanWithText('AFTER')); 159 159 -
trunk/Source/WebCore/ChangeLog
r109319 r109321 1 2012-02-29 Shinya Kawanaka <shinyak@chromium.org> 2 3 Fallback elements in non-youngest shadow tree should not be rendered. 4 https://bugs.webkit.org/show_bug.cgi?id=80002 5 6 Reviewed by Hajime Morita. 7 8 Fallback elements in non-youngest shadow tree should not be rendered, so its phase should be 9 AttachingNotDistributed instead of AttachingFallbacked. 10 11 Tests: multiple-shadowroot-rendering.html covers this patch. 12 13 * dom/NodeRenderingContext.cpp: 14 (WebCore::NodeRenderingContext::NodeRenderingContext): 15 1 16 2012-02-29 Adam Barth <abarth@webkit.org> 2 17 -
trunk/Source/WebCore/dom/NodeRenderingContext.cpp
r109179 r109321 89 89 90 90 if (isShadowBoundary(parent)) { 91 // FIXME: We don't support <shadow> yet, so the non-youngest shadow won't be rendered. 92 // https://bugs.webkit.org/show_bugs.cgi?id=78596 93 if (!toShadowRoot(parent->shadowTreeRootNode())->isYoungest()) { 94 m_phase = AttachingNotDistributed; 95 m_parentNodeForRenderingAndStyle = parent; 96 return; 97 } 98 91 99 if (toInsertionPoint(parent)->hasSelection()) 92 100 m_phase = AttachingNotFallbacked;
Note: See TracChangeset
for help on using the changeset viewer.