Changeset 125284 in webkit
- Timestamp:
- Aug 10, 2012 8:42:23 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r125280 r125284 1 2012-08-10 Pavel Feldman <pfeldman@chromium.org> 2 3 Web Inspector: render arrays as dir in case they were logged into console prior to the front-end opening. 4 https://bugs.webkit.org/show_bug.cgi?id=93713 5 6 Reviewed by Vsevolod Vlasov. 7 8 * inspector/console/console-dirxml-expected.txt: 9 * inspector/console/console-external-array-expected.txt: 10 * inspector/console/console-format-collections-expected.txt: 11 * inspector/console/console-format-expected.txt: 12 * inspector/console/console-format.html: 13 * inspector/console/console-tests-expected.txt: 14 * platform/chromium/inspector/console/console-format-collections-expected.txt: 15 1 16 2012-08-10 Jon Lee <jonlee@apple.com> 2 17 -
trunk/LayoutTests/inspector/console/console-dirxml-expected.txt
r110693 r125284 8 8 #document-fragment console-dirxml.html:13 9 9 <p></p> console-dirxml.html:14 10 [<p></p>] console-dirxml.html:1510 Array[1] console-dirxml.html:15 11 11 -
trunk/LayoutTests/inspector/console/console-external-array-expected.txt
r111388 r125284 17 17 Tests that console logging detects external arrays as arrays. 18 18 19 [0, 0, 0, 0, 0, 0, 0, 0, 0,0] console-external-array.html:920 [0, 0, 0, 0, 0, 0, 0, 0, 0,0] console-external-array.html:1021 [0, 0, 0, 0, 0, 0, 0, 0, 0,0] console-external-array.html:1122 [0, 0, 0, 0, 0, 0, 0, 0, 0,0] console-external-array.html:1223 [0, 0, 0, 0, 0, 0, 0, 0, 0,0] console-external-array.html:1324 [0, 0, 0, 0, 0, 0, 0, 0, 0,0] console-external-array.html:1425 [0, 0, 0, 0, 0, 0, 0, 0, 0,0] console-external-array.html:1526 [0, 0, 0, 0, 0, 0, 0, 0, 0,0] console-external-array.html:1619 Int8Array[10] console-external-array.html:9 20 Int16Array[10] console-external-array.html:10 21 Int32Array[10] console-external-array.html:11 22 Uint8Array[10] console-external-array.html:12 23 Uint16Array[10] console-external-array.html:13 24 Uint32Array[10] console-external-array.html:14 25 Float32Array[10] console-external-array.html:15 26 Float64Array[10] console-external-array.html:16 27 27 Int8Array[10] console-external-array.html:18 28 28 Int16Array[10] console-external-array.html:19 -
trunk/LayoutTests/inspector/console/console-format-collections-expected.txt
r125174 r125284 19 19 Tests that console nicely formats HTML Collections and NodeLists. 20 20 21 [<select id="sel" name="sel">…</select>] console-format-collections.html:15 22 [<script src="../../http/tests/inspector/inspector-test.js"></script>, <script src="../../http/tests/inspector/console-test.js"></script>, <script>…</script>] console-format-collections.html:19 23 [<option value="1">one</option>, <option value="2">two</option>] console-format-collections.html:23 24 [<html>…</html>, <head>…</head>, <script src="../../http/tests/inspector/inspector-test.js"></script>, <script src="../../http/tests/inspector/console-test.js"></script>, <script>…</script>, <body onload="onload()">…</body>, <p> 25 Tests that console nicely formats HTML Collections and NodeLists. 26 </p>, <div style="display:none">…</div>, <form id="f">…</form>, <select id="sel" name="sel">…</select>, <option value="1">one</option>, <option value="2">two</option>, <input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">] console-format-collections.html:27 27 [<select id="sel" name="sel">…</select>, <input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">] console-format-collections.html:31 28 [<input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">] console-format-collections.html:35 29 [1, Array[2]] console-format-collections.html:41 21 NodeList[1] console-format-collections.html:15 22 HTMLCollection[3] console-format-collections.html:19 23 HTMLOptionsCollection[2] console-format-collections.html:23 24 HTMLAllCollection[14] console-format-collections.html:27 25 HTMLCollection[3] console-format-collections.html:31 26 NodeList[2] console-format-collections.html:35 27 Array[2] console-format-collections.html:41 30 28 NonArrayWithLength console-format-collections.html:44 31 [1, "2"] console-format-collections.html:5129 Arguments[2] console-format-collections.html:51 32 30 [<select>] console-format-collections.html:15 33 31 console-format-collections.html:19 -
trunk/LayoutTests/inspector/console/console-format-expected.txt
r125186 r125284 47 47 CONSOLE MESSAGE: line 54: -Infinity 48 48 CONSOLE MESSAGE: line 55: -Infinity 49 CONSOLE MESSAGE: line 54: test,test2,,,test4,,,,, 50 CONSOLE MESSAGE: line 55: test,test2,,,test4,,,,, 49 51 Tests that console logging dumps proper messages. 50 52 … … 52 54 Message format for string console-format.html:13 53 55 Object Object console-format.html:14 54 ["test", "test2", undefined × 2, "test4", undefined × 5] console-format.html:2055 ["test", "test2", undefined × 2, "test4", undefined × 5] console-format.html:2156 Array[10] console-format.html:20 57 Array[10] console-format.html:21 56 58 Array[10] console-format.html:22 57 59 /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i console-format.html:54 … … 137 139 globals[18] 138 140 -Infinity 141 ["test", "test2", 4: "test4", foo: Object] console-format.html:54 142 [Array[10]] console-format.html:55 143 globals[19] 144 ["test", "test2", undefined × 2, "test4", undefined × 5] 139 145 -
trunk/LayoutTests/inspector/console/console-format.html
r125174 r125284 44 44 regex1, regex2, str, str2, error, node, func, multilinefunc, num, linkify, 45 45 null, undefined, valuelessAttribute, valuedAttribute, existingAttribute, throwingLengthGetter, 46 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY 46 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array 47 47 ]; 48 48 -
trunk/LayoutTests/inspector/console/console-tests-expected.txt
r110693 r125284 42 42 function () { } console-tests.html:28 console-message console-log-level 43 43 function f() { } console-tests.html:29 console-message console-log-level 44 [1, 2,3] console-tests.html:30 console-message console-log-level44 Array[3] console-tests.html:30 console-message console-log-level 45 45 /regexp.*/ console-tests.html:31 console-message console-log-level 46 46 -
trunk/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt
r125174 r125284 19 19 Tests that console nicely formats HTML Collections and NodeLists. 20 20 21 [<select id="sel" name="sel">…</select>] console-format-collections.html:15 22 [<script src="../../http/tests/inspector/inspector-test.js"></script>, <script src="../../http/tests/inspector/console-test.js"></script>, <script>…</script>] console-format-collections.html:19 23 [<option value="1">one</option>, <option value="2">two</option>] console-format-collections.html:23 24 [<html>…</html>, <head>…</head>, <script src="../../http/tests/inspector/inspector-test.js"></script>, <script src="../../http/tests/inspector/console-test.js"></script>, <script>…</script>, <body onload="onload()">…</body>, <p> 25 Tests that console nicely formats HTML Collections and NodeLists. 26 </p>, <div style="display:none">…</div>, <form id="f">…</form>, <select id="sel" name="sel">…</select>, <option value="1">one</option>, <option value="2">two</option>, <input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">] console-format-collections.html:27 27 [<select id="sel" name="sel">…</select>, <input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">] console-format-collections.html:31 28 [<input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">] console-format-collections.html:35 29 [1, Array[2]] console-format-collections.html:41 21 NodeList[1] console-format-collections.html:15 22 HTMLCollection[3] console-format-collections.html:19 23 HTMLOptionsCollection[2] console-format-collections.html:23 24 HTMLAllCollection[14] console-format-collections.html:27 25 HTMLCollection[3] console-format-collections.html:31 26 NodeList[2] console-format-collections.html:35 27 Array[2] console-format-collections.html:41 30 28 NonArrayWithLength console-format-collections.html:44 31 [1, "2"] console-format-collections.html:5129 Arguments[2] console-format-collections.html:51 32 30 [<select>] console-format-collections.html:15 33 31 [<script>, <script>, <script>] console-format-collections.html:19 -
trunk/Source/WebCore/ChangeLog
r125283 r125284 1 2012-08-10 Pavel Feldman <pfeldman@chromium.org> 2 3 Web Inspector: render arrays as dir in case they were logged into console prior to the front-end opening. 4 https://bugs.webkit.org/show_bug.cgi?id=93713 5 6 Reviewed by Vsevolod Vlasov. 7 8 Dumping potentially outdated arrays using the "dir" representation. 9 10 * inspector/front-end/ConsoleMessage.js: 11 (WebInspector.ConsoleMessageImpl): 12 (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray): 13 (WebInspector.ConsoleMessageImpl.prototype.clone): 14 * inspector/front-end/ConsoleModel.js: 15 (WebInspector.ConsoleModel.prototype.enableAgent.callback): 16 (WebInspector.ConsoleModel.prototype.enablingConsole): 17 (WebInspector.ConsoleMessage.create): 18 (WebInspector.ConsoleDispatcher.prototype.messageAdded): 19 * inspector/front-end/ConsoleView.js: 20 (WebInspector.ConsoleMessage.create): 21 1 22 2012-08-10 Dana Jansens <danakj@chromium.org> 2 23 -
trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js
r125174 r125284 44 44 * @param {ConsoleAgent.StackTrace=} stackTrace 45 45 * @param {WebInspector.NetworkRequest=} request 46 * @param {boolean=} isOutdated 46 47 */ 47 WebInspector.ConsoleMessageImpl = function(source, level, message, linkifier, type, url, line, repeatCount, parameters, stackTrace, request )48 WebInspector.ConsoleMessageImpl = function(source, level, message, linkifier, type, url, line, repeatCount, parameters, stackTrace, request, isOutdated) 48 49 { 49 50 WebInspector.ConsoleMessage.call(this, source, level, url, line, repeatCount); … … 55 56 this._stackTrace = stackTrace; 56 57 this._request = request; 58 this._isOutdated = isOutdated; 57 59 58 60 this._customFormatters = { … … 362 364 363 365 const maxFlatArrayLength = 100; 364 if ( array.arrayLength() > maxFlatArrayLength)366 if (this._isOutdated || array.arrayLength() > maxFlatArrayLength) 365 367 this._formatParameterAsObject(array, elem, false); 366 368 else … … 714 716 clone: function() 715 717 { 716 return WebInspector.ConsoleMessage.create(this.source, this.level, this._messageText, this.type, this.url, this.line, this.repeatCount, this._parameters, this._stackTrace, this._request );718 return WebInspector.ConsoleMessage.create(this.source, this.level, this._messageText, this.type, this.url, this.line, this.repeatCount, this._parameters, this._stackTrace, this._request, this._isOutdated); 717 719 } 718 720 } -
trunk/Source/WebCore/inspector/front-end/ConsoleModel.js
r113863 r125284 54 54 ConsoleAgent.setMonitoringXHREnabled(true); 55 55 56 ConsoleAgent.enable(); 56 this._enablingConsole = true; 57 function callback() 58 { 59 delete this._enablingConsole; 60 } 61 ConsoleAgent.enable(callback.bind(this)); 62 }, 63 64 /** 65 * @return {boolean} 66 */ 67 enablingConsole: function() 68 { 69 return !!this._enablingConsole; 57 70 }, 58 71 … … 191 204 * @param {ConsoleAgent.StackTrace=} stackTrace 192 205 * @param {WebInspector.NetworkRequest=} request 193 * 206 * @param {boolean=} isOutdated 194 207 * @return {WebInspector.ConsoleMessage} 195 208 */ 196 WebInspector.ConsoleMessage.create = function(source, level, message, type, url, line, repeatCount, parameters, stackTrace, request )209 WebInspector.ConsoleMessage.create = function(source, level, message, type, url, line, repeatCount, parameters, stackTrace, request, isOutdated) 197 210 { 198 211 } … … 255 268 payload.parameters, 256 269 payload.stackTrace, 257 payload.networkRequestId ? WebInspector.networkRequestById(payload.networkRequestId) : undefined); 270 payload.networkRequestId ? WebInspector.networkRequestById(payload.networkRequestId) : undefined, 271 this._console._enablingConsole); 258 272 this._console.addMessage(consoleMessage); 259 273 }, -
trunk/Source/WebCore/inspector/front-end/ConsoleView.js
r124867 r125284 955 955 WebInspector.consoleView = null; 956 956 957 WebInspector.ConsoleMessage.create = function(source, level, message, type, url, line, repeatCount, parameters, stackTrace, request )957 WebInspector.ConsoleMessage.create = function(source, level, message, type, url, line, repeatCount, parameters, stackTrace, request, isOutdated) 958 958 { 959 return new WebInspector.ConsoleMessageImpl(source, level, message, WebInspector.consoleView._linkifier, type, url, line, repeatCount, parameters, stackTrace, request );959 return new WebInspector.ConsoleMessageImpl(source, level, message, WebInspector.consoleView._linkifier, type, url, line, repeatCount, parameters, stackTrace, request, isOutdated); 960 960 }
Note: See TracChangeset
for help on using the changeset viewer.