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

Side by Side Diff: Source/devtools/front_end/DOMAgent.js

Issue 26586002: [devtools] Return empty array from DOMNode.children() rather than null. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 | no next file » | 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 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return this.value; 131 return this.value;
132 } 132 }
133 } 133 }
134 134
135 WebInspector.DOMNode.prototype = { 135 WebInspector.DOMNode.prototype = {
136 /** 136 /**
137 * @return {Array.<WebInspector.DOMNode>} 137 * @return {Array.<WebInspector.DOMNode>}
138 */ 138 */
139 children: function() 139 children: function()
140 { 140 {
141 return this._children ? this._children.slice() : null; 141 return this._children ? this._children.slice() : [];
pfeldman 2013/10/09 05:41:06 This is intentionally null. We should instead do:
142 }, 142 },
143 143
144 /** 144 /**
145 * @return {boolean} 145 * @return {boolean}
146 */ 146 */
147 hasAttributes: function() 147 hasAttributes: function()
148 { 148 {
149 return this._attributes.length > 0; 149 return this._attributes.length > 0;
150 }, 150 },
151 151
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 setInspectModeEnabled: function(enabled, inspectShadowDOM, config, callback) 1735 setInspectModeEnabled: function(enabled, inspectShadowDOM, config, callback)
1736 { 1736 {
1737 DOMAgent.setInspectModeEnabled(enabled, inspectShadowDOM, config, callba ck); 1737 DOMAgent.setInspectModeEnabled(enabled, inspectShadowDOM, config, callba ck);
1738 } 1738 }
1739 } 1739 }
1740 1740
1741 /** 1741 /**
1742 * @type {?WebInspector.DOMAgent} 1742 * @type {?WebInspector.DOMAgent}
1743 */ 1743 */
1744 WebInspector.domAgent = null; 1744 WebInspector.domAgent = null;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698