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

Side by Side Diff: LayoutTests/resources/dump-as-markup.js

Issue 253843002: Deprecate Attr.nodeValue / Attr.textContent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline more tests Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/jquery/attributes-expected.txt ('k') | Source/core/dom/Attr.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * There are three basic use cases of dumpAsMarkup 2 * There are three basic use cases of dumpAsMarkup
3 * 3 *
4 * 1. Dump the entire DOM when the page is loaded 4 * 1. Dump the entire DOM when the page is loaded
5 * When this script is included but no method of Markup is called, 5 * When this script is included but no method of Markup is called,
6 * it dumps the DOM of each frame loaded. 6 * it dumps the DOM of each frame loaded.
7 * 7 *
8 * 2. Dump the content of a specific element when the page is loaded 8 * 2. Dump the content of a specific element when the page is loaded
9 * When Markup.setNodeToDump is called with some element or the id of some el ement, 9 * When Markup.setNodeToDump is called with some element or the id of some el ement,
10 * it dumps the content of the specified element as supposed to the entire DO M tree. 10 * it dumps the content of the specified element as supposed to the entire DO M tree.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 for (var j = 0; j < node.attributes.length; j += 1) { 193 for (var j = 0; j < node.attributes.length; j += 1) {
194 var name = Markup._namespace(node.attributes[j]) 194 var name = Markup._namespace(node.attributes[j])
195 name += node.attributes[j].localName || node.attributes[j].nodeN ame; 195 name += node.attributes[j].localName || node.attributes[j].nodeN ame;
196 attrNames.push(name); 196 attrNames.push(name);
197 attrPos[name] = j; 197 attrPos[name] = j;
198 } 198 }
199 if (attrNames.length > 0) { 199 if (attrNames.length > 0) {
200 attrNames.sort(); 200 attrNames.sort();
201 for (var j = 0; j < attrNames.length; j += 1) { 201 for (var j = 0; j < attrNames.length; j += 1) {
202 str += Markup._indent(depth + 1) + attrNames[j]; 202 str += Markup._indent(depth + 1) + attrNames[j];
203 str += '="' + node.attributes[attrPos[attrNames[j]]].nodeValue + '"'; 203 str += '="' + node.attributes[attrPos[attrNames[j]]].value + '"' ;
204 } 204 }
205 } 205 }
206 } 206 }
207 207
208 if (!Markup._useHTML5libOutputFormat && window.internals) { 208 if (!Markup._useHTML5libOutputFormat && window.internals) {
209 var pseudoId = window.internals.shadowPseudoId(node); 209 var pseudoId = window.internals.shadowPseudoId(node);
210 if (pseudoId) 210 if (pseudoId)
211 str += Markup._indent(depth + 1) + 'shadow:pseudoId="' + pseudoI d + '"'; 211 str += Markup._indent(depth + 1) + 'shadow:pseudoId="' + pseudoI d + '"';
212 } 212 }
213 213
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 return Markup._SELECTION_CARET; 357 return Markup._SELECTION_CARET;
358 else 358 else
359 return Markup._SELECTION_ANCHOR; 359 return Markup._SELECTION_ANCHOR;
360 } else if (index == sel.focusOffset && node == sel.focusNode) 360 } else if (index == sel.focusOffset && node == sel.focusNode)
361 return Markup._SELECTION_FOCUS; 361 return Markup._SELECTION_FOCUS;
362 362
363 return ''; 363 return '';
364 } 364 }
365 365
366 window.addEventListener('load', Markup.notifyDone, false); 366 window.addEventListener('load', Markup.notifyDone, false);
OLDNEW
« no previous file with comments | « LayoutTests/jquery/attributes-expected.txt ('k') | Source/core/dom/Attr.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698