Changeset 125079 in webkit
- Timestamp:
- Aug 8, 2012 1:14:52 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 33 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r125064 r125079 1 2012-08-08 Pavel Feldman <pfeldman@chromium.org> 2 3 REGRESSION(r125046): Breaks debug build (assertion in protocol type checks) (Requested by pfeldman on #webkit). 4 https://bugs.webkit.org/show_bug.cgi?id=93505 5 6 Not reviewed: roll out. 7 8 * inspector/console/command-line-api-inspect-expected.txt: 9 * inspector/console/console-dir-expected.txt: 10 * inspector/console/console-eval-global-expected.txt: 11 * inspector/console/console-eval-global.html: 12 * inspector/console/console-format-collections-expected.txt: 13 * inspector/console/console-format-collections.html: 14 * inspector/console/console-format-expected.txt: 15 * inspector/console/console-format.html: 16 * inspector/console/console-log-document-proto-expected.txt: 17 * inspector/console/console-log-document-proto.html: 18 * inspector/console/console-log-toString-object-expected.txt: 19 * inspector/debugger/watch-expressions-panel-switch-expected.txt: 20 * inspector/elements/event-listener-sidebar-expected.txt: 21 * inspector/elements/event-listeners-about-blank-expected.txt: 22 * platform/chromium/inspector/console/console-dir-expected.txt: 23 * platform/chromium/inspector/console/console-eval-global-expected.txt: Copied from LayoutTests/inspector/console/console-eval-global-expected.txt. 24 * platform/chromium/inspector/console/console-format-collections-expected.txt: 25 * platform/chromium/inspector/console/console-format-expected.txt: Copied from LayoutTests/inspector/console/console-format-expected.txt. 26 * platform/chromium/inspector/console/console-log-document-proto-expected.txt: 27 * platform/chromium/inspector/debugger/watch-expressions-panel-switch-expected.txt: 28 * platform/chromium/inspector/elements/event-listener-sidebar-expected.txt: Copied from LayoutTests/inspector/elements/event-listener-sidebar-expected.txt. 29 1 30 2012-08-08 Florin Malita <fmalita@chromium.org> 2 31 -
trunk/LayoutTests/inspector/console/command-line-api-inspect-expected.txt
r125046 r125079 5 5 6 6 7 WebInspector.inspect called with: <p>7 WebInspector.inspect called with: HTMLParagraphElement 8 8 WebInspector.inspect's hints are: [] 9 9 inspect($('p1')) = -
trunk/LayoutTests/inspector/console/console-dir-expected.txt
r125046 r125079 13 13 14 14 NodeList[1] 15 0: <html>15 0: HTMLHtmlElement 16 16 constructor: NodeListConstructor 17 17 length: 1 -
trunk/LayoutTests/inspector/console/console-eval-global-expected.txt
r125046 r125079 3 3 foo 4 4 "fooValue" 5 bar 6 Object 5 bar1 6 ReferenceError: Can't find variable: bar1 7 7 -
trunk/LayoutTests/inspector/console/console-eval-global.html
r125046 r125079 16 16 function step1() 17 17 { 18 InspectorTest.evaluateInConsole("bar ", step2);18 InspectorTest.evaluateInConsole("bar1", step2); 19 19 } 20 20 -
trunk/LayoutTests/inspector/console/console-format-collections-expected.txt
r125046 r125079 1 CONSOLE MESSAGE: line 15: [object NodeList]2 CONSOLE MESSAGE: line 19: [object HTMLCollection]3 CONSOLE MESSAGE: line 23: [object HTMLOptionsCollection]4 CONSOLE MESSAGE: line 27: [object HTMLAllCollection]5 CONSOLE MESSAGE: line 31: [object HTMLCollection]6 CONSOLE MESSAGE: line 35: [object NodeList]7 CONSOLE MESSAGE: line 41: 1,2,8 CONSOLE MESSAGE: line 44: [object Object]9 CONSOLE MESSAGE: line 51: [object Arguments]10 1 CONSOLE MESSAGE: line 15: [object NodeList] 11 2 CONSOLE MESSAGE: line 19: [object HTMLCollection] … … 30 21 NonArrayWithLength console-format-collections.html:44 31 22 [1, "2"] console-format-collections.html:51 32 [<select>] console-format-collections.html:1533 console-format-collections.html:1934 [<option>, <option>, selectedIndex: 0] console-format-collections.html:2335 console-format-collections.html:2736 console-format-collections.html:3137 [<input>, <input>] console-format-collections.html:3538 [1, Array[2]] console-format-collections.html:4139 NonArrayWithLength {keys: Array[0]} console-format-collections.html:4440 [1, "2"] console-format-collections.html:5141 Page reloaded.42 23 -
trunk/LayoutTests/inspector/console/console-format-collections.html
r125046 r125079 5 5 <script> 6 6 7 function logToConsole()7 function onload() 8 8 { 9 9 var formElement = document.getElementById("f"); … … 53 53 } 54 54 55 function onload()56 {57 logToConsole();58 }59 60 55 function NonArrayWithLength() 61 56 { … … 71 66 function test() 72 67 { 73 InspectorTest.evaluateInPage("logToConsole()", callback); 74 75 function callback() 76 { 77 InspectorTest.dumpConsoleMessages(); 78 InspectorTest.completeTest(); 79 } 68 InspectorTest.dumpConsoleMessages(); 69 InspectorTest.completeTest(); 80 70 } 81 71 </script> -
trunk/LayoutTests/inspector/console/console-format-expected.txt
r125046 r125079 56 56 Array[10] console-format.html:22 57 57 /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i console-format.html:54 58 [/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\ …?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i] console-format.html:5558 [/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i] console-format.html:55 59 59 globals[0] 60 60 /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i … … 75 75 globals[4] 76 76 Error 77 <body onload="onload()"> console-format.html:5478 [<body >] console-format.html:5577 <body onload="onload()">…</body> console-format.html:54 78 [<body onload="onload()">…</body>] console-format.html:55 79 79 globals[5] 80 <body onload="onload()"> 80 <body onload="onload()">…</body> 81 81 function () { return 1; } console-format.html:54 82 82 [function () { return 1; }] console-format.html:55 … … 110 110 undefined 111 111 attr="" console-format.html:54 112 [attr ] console-format.html:55112 [attr=""] console-format.html:55 113 113 globals[12] 114 114 attr="" 115 attr="value" "value"console-format.html:54116 [attr ] console-format.html:55115 attr="value" console-format.html:54 116 [attr="value"] console-format.html:55 117 117 globals[13] 118 attr="value" "value"119 id="x" "x"console-format.html:54120 [id ] console-format.html:55118 attr="value" 119 id="x" console-format.html:54 120 [id="x"] console-format.html:55 121 121 globals[14] 122 id="x" "x"122 id="x" 123 123 Object console-format.html:54 124 124 [Object] console-format.html:55 -
trunk/LayoutTests/inspector/console/console-format.html
r125046 r125079 15 15 16 16 var array = ["test", "test2"]; array.length = 10; 17 array.foo = {};17 array.foo = "bar"; 18 18 array[4] = "test4"; 19 19 … … 66 66 var next = current + 1; 67 67 if (next == total.description) { 68 InspectorTest.expandConsoleMessages();69 68 InspectorTest.dumpConsoleMessages(); 70 69 InspectorTest.completeTest(); 71 } else 70 } 71 else 72 72 loopOverGlobals(next, total); 73 73 } -
trunk/LayoutTests/inspector/console/console-log-document-proto-expected.txt
r125046 r125079 1 1 CONSOLE MESSAGE: line 6: [object HTMLDocumentPrototype] 2 Test that console. dir(document.__proto__) won't result in an exception when the message is formatted in the inspector.Bug 27169.2 Test that console.log(document.__proto__) won't result in an exception when the message is formatted in the inspector.Bug 27169. 3 3 4 4 HTMLDocumentPrototype console-log-document-proto.html:6 -
trunk/LayoutTests/inspector/console/console-log-document-proto.html
r125046 r125079 4 4 <script src="../../http/tests/inspector/console-test.js"></script> 5 5 <script> 6 console. dir(document.__proto__);6 console.log(document.__proto__); 7 7 8 8 function test() … … 15 15 <body onload="runTest()"> 16 16 <p> 17 Test that console. dir(document.__proto__) won't result in an exception when the message17 Test that console.log(document.__proto__) won't result in an exception when the message 18 18 is formatted in the inspector.<a bug="https://bugs.webkit.org/show_bug.cgi?id=27169">Bug 27169.</a> 19 19 </p> -
trunk/LayoutTests/inspector/console/console-log-toString-object-expected.txt
r125046 r125079 4 4 5 5 Page reloaded. 6 Object {toString: Object}console-log-toString-object.html:76 Object console-log-toString-object.html:7 7 7 -
trunk/LayoutTests/inspector/debugger/watch-expressions-panel-switch-expected.txt
r125046 r125079 7 7 Watch expressions updated. 8 8 [expanded] 9 window.document: #document9 window.document: HTMLDocument 10 10 windowa.document: ReferenceError: Can't find variable: windowa 11 11 Debugger was disabled. -
trunk/LayoutTests/inspector/elements/event-listener-sidebar-expected.txt
r125046 r125079 8 8 lineNumber: 19 9 9 listenerBody: function (event) { console.log("click - document - capturing"); } 10 node: #document10 node: HTMLDocument 11 11 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 12 12 type: click … … 15 15 isAttribute: false 16 16 listenerBody: ObjectHandler 17 node: #document17 node: HTMLDocument 18 18 type: click 19 19 useCapture: true … … 22 22 lineNumber: 15 23 23 listenerBody: function (event) { console.log("click - button - capturing"); } 24 node: <button>24 node: HTMLButtonElement 25 25 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 26 26 type: click … … 30 30 lineNumber: 12 31 31 listenerBody: function clickHandler(event) { console.log("click - button - bubbling (registered before attribute)"); } 32 node: <button>32 node: HTMLButtonElement 33 33 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 34 34 type: click … … 38 38 lineNumber: 16 39 39 listenerBody: function (event) { console.log("click - button - attribute"); } 40 node: <button>40 node: HTMLButtonElement 41 41 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 42 42 type: click … … 46 46 lineNumber: 17 47 47 listenerBody: function (event) { console.log("click - button - bubbling (registered after attribute)"); } 48 node: <button>48 node: HTMLButtonElement 49 49 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 50 50 type: click … … 54 54 lineNumber: 6 55 55 listenerBody: function documentClickHandler(event) { console.log("click - document - attribute"); } 56 node: #document56 node: HTMLDocument 57 57 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 58 58 type: click … … 64 64 lineNumber: 10 65 65 listenerBody: function f() {} 66 node: <body>66 node: HTMLBodyElement 67 67 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 68 68 type: custom event … … 74 74 lineNumber: 14 75 75 listenerBody: function hoverHandler(event) { console.log("hover - button - bubbling"); } 76 node: <button>76 node: HTMLButtonElement 77 77 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 78 78 type: hover … … 84 84 lineNumber: 19 85 85 listenerBody: function (event) { console.log("click - document - capturing"); } 86 node: #document86 node: HTMLDocument 87 87 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 88 88 type: click … … 91 91 isAttribute: false 92 92 listenerBody: ObjectHandler 93 node: #document93 node: HTMLDocument 94 94 type: click 95 95 useCapture: true … … 98 98 lineNumber: 6 99 99 listenerBody: function documentClickHandler(event) { console.log("click - document - attribute"); } 100 node: #document100 node: HTMLDocument 101 101 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 102 102 type: click … … 108 108 lineNumber: 10 109 109 listenerBody: function f() {} 110 node: <body>110 node: HTMLBodyElement 111 111 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 112 112 type: custom event -
trunk/LayoutTests/inspector/elements/event-listeners-about-blank-expected.txt
r125046 r125079 8 8 lineNumber: 9 9 9 listenerBody: function f() {} 10 node: <body>10 node: HTMLBodyElement 11 11 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listeners-about-blank.html 12 12 type: click … … 18 18 lineNumber: 9 19 19 listenerBody: function f() {} 20 node: <div>20 node: HTMLDivElement 21 21 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listeners-about-blank.html 22 22 type: hover -
trunk/LayoutTests/platform/chromium/inspector/console/console-dir-expected.txt
r125046 r125079 13 13 14 14 NodeList[1] 15 0: <html>15 0: HTMLHtmlElement 16 16 length: 1 17 17 __proto__: NodeList console-dir.html:10 -
trunk/LayoutTests/platform/chromium/inspector/console/console-eval-global-expected.txt
r125077 r125079 3 3 foo 4 4 "fooValue" 5 bar 6 Object 5 bar1 6 ReferenceError: bar1 is not defined 7 7 -
trunk/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt
r125046 r125079 1 CONSOLE MESSAGE: line 15: [object NodeList]2 CONSOLE MESSAGE: line 19: [object HTMLCollection]3 CONSOLE MESSAGE: line 23: [object HTMLOptionsCollection]4 CONSOLE MESSAGE: line 27: undefined5 CONSOLE MESSAGE: line 31: [object HTMLCollection]6 CONSOLE MESSAGE: line 35: [object NodeList]7 CONSOLE MESSAGE: line 41: 1,2,8 CONSOLE MESSAGE: line 44: [object Object]9 CONSOLE MESSAGE: line 51: [object Arguments]10 1 CONSOLE MESSAGE: line 15: [object NodeList] 11 2 CONSOLE MESSAGE: line 19: [object HTMLCollection] … … 30 21 NonArrayWithLength console-format-collections.html:44 31 22 [1, "2"] console-format-collections.html:51 32 [<select>] console-format-collections.html:1533 [<script>, <script>, <script>] console-format-collections.html:1934 [<option>, <option>, selectedIndex: 0] console-format-collections.html:2335 [<html>, <head>, <script>, <script>, <script>, <body>, <p>, <div>, <form>, <select>, <option>, <option>, <input>, <input>] console-format-collections.html:2736 [<select>, <input>, <input>] console-format-collections.html:3137 [<input>, <input>] console-format-collections.html:3538 [1, Array[2]] console-format-collections.html:4139 NonArrayWithLength {keys: Array[0]} console-format-collections.html:4440 [1, "2"] console-format-collections.html:5141 23 -
trunk/LayoutTests/platform/chromium/inspector/console/console-format-expected.txt
r125077 r125079 56 56 Array[10] console-format.html:22 57 57 /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i console-format.html:54 58 [/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\ …?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i] console-format.html:5558 [/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i] console-format.html:55 59 59 globals[0] 60 60 /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i … … 75 75 globals[4] 76 76 Error 77 <body onload="onload()"> console-format.html:5478 [<body >] console-format.html:5577 <body onload="onload()">…</body> console-format.html:54 78 [<body onload="onload()">…</body>] console-format.html:55 79 79 globals[5] 80 <body onload="onload()"> 80 <body onload="onload()">…</body> 81 81 function () { return 1; } console-format.html:54 82 82 [function () { return 1; }] console-format.html:55 … … 110 110 undefined 111 111 attr="" console-format.html:54 112 [attr ] console-format.html:55112 [attr=""] console-format.html:55 113 113 globals[12] 114 114 attr="" 115 attr="value" "value"console-format.html:54116 [attr ] console-format.html:55115 attr="value" console-format.html:54 116 [attr="value"] console-format.html:55 117 117 globals[13] 118 attr="value" "value"119 id="x" "x"console-format.html:54120 [id ] console-format.html:55118 attr="value" 119 id="x" console-format.html:54 120 [id="x"] console-format.html:55 121 121 globals[14] 122 id="x" "x"122 id="x" 123 123 Object console-format.html:54 124 124 [Object] console-format.html:55 -
trunk/LayoutTests/platform/chromium/inspector/console/console-log-document-proto-expected.txt
r125046 r125079 1 1 CONSOLE MESSAGE: line 6: [object Object] 2 Test that console. dir(document.__proto__) won't result in an exception when the message is formatted in the inspector.Bug 27169.2 Test that console.log(document.__proto__) won't result in an exception when the message is formatted in the inspector.Bug 27169. 3 3 4 4 HTMLDocument console-log-document-proto.html:6 -
trunk/LayoutTests/platform/chromium/inspector/debugger/watch-expressions-panel-switch-expected.txt
r125046 r125079 7 7 Watch expressions updated. 8 8 [expanded] 9 window.document: #document9 window.document: HTMLDocument 10 10 windowa.document: ReferenceError: windowa is not defined 11 11 Debugger was disabled. -
trunk/LayoutTests/platform/chromium/inspector/elements/event-listener-sidebar-expected.txt
r125077 r125079 8 8 lineNumber: 19 9 9 listenerBody: function (event) { console.log("click - document - capturing"); } 10 node: #document10 node: HTMLDocument 11 11 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 12 12 type: click … … 15 15 isAttribute: false 16 16 listenerBody: ObjectHandler 17 node: #document17 node: HTMLDocument 18 18 type: click 19 19 useCapture: true … … 22 22 lineNumber: 15 23 23 listenerBody: function (event) { console.log("click - button - capturing"); } 24 node: <button>24 node: HTMLButtonElement 25 25 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 26 26 type: click … … 30 30 lineNumber: 12 31 31 listenerBody: function clickHandler(event) { console.log("click - button - bubbling (registered before attribute)"); } 32 node: <button>32 node: HTMLButtonElement 33 33 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 34 34 type: click … … 38 38 lineNumber: 16 39 39 listenerBody: function (event) { console.log("click - button - attribute"); } 40 node: <button>40 node: HTMLButtonElement 41 41 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 42 42 type: click … … 46 46 lineNumber: 17 47 47 listenerBody: function (event) { console.log("click - button - bubbling (registered after attribute)"); } 48 node: <button>48 node: HTMLButtonElement 49 49 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 50 50 type: click … … 54 54 lineNumber: 6 55 55 listenerBody: function documentClickHandler(event) { console.log("click - document - attribute"); } 56 node: #document56 node: HTMLDocument 57 57 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 58 58 type: click … … 64 64 lineNumber: 10 65 65 listenerBody: function f() {} 66 node: <body>66 node: HTMLBodyElement 67 67 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 68 68 type: custom event … … 74 74 lineNumber: 14 75 75 listenerBody: function hoverHandler(event) { console.log("hover - button - bubbling"); } 76 node: <button>76 node: HTMLButtonElement 77 77 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 78 78 type: hover … … 84 84 lineNumber: 19 85 85 listenerBody: function (event) { console.log("click - document - capturing"); } 86 node: #document86 node: HTMLDocument 87 87 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 88 88 type: click … … 91 91 isAttribute: false 92 92 listenerBody: ObjectHandler 93 node: #document93 node: HTMLDocument 94 94 type: click 95 95 useCapture: true … … 98 98 lineNumber: 6 99 99 listenerBody: function documentClickHandler(event) { console.log("click - document - attribute"); } 100 node: #document100 node: HTMLDocument 101 101 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 102 102 type: click … … 108 108 lineNumber: 10 109 109 listenerBody: function f() {} 110 node: <body>110 node: HTMLBodyElement 111 111 sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html 112 112 type: custom event -
trunk/Source/WebCore/ChangeLog
r125077 r125079 1 2012-08-08 Pavel Feldman <pfeldman@chromium.org> 2 3 REGRESSION(r125046): Breaks debug build (assertion in protocol type checks) (Requested by pfeldman on #webkit). 4 https://bugs.webkit.org/show_bug.cgi?id=93505 5 6 Not reviewed: roll out. 7 8 * inspector/ConsoleMessage.cpp: 9 (WebCore::ConsoleMessage::addToFrontend): 10 * inspector/ConsoleMessage.h: 11 (ConsoleMessage): 12 * inspector/InjectedScript.cpp: 13 (WebCore::InjectedScript::wrapObject): 14 * inspector/InjectedScript.h: 15 (InjectedScript): 16 * inspector/InjectedScriptSource.js: 17 (.): 18 * inspector/InspectorConsoleAgent.cpp: 19 (WebCore::InspectorConsoleAgent::enable): 20 (WebCore::InspectorConsoleAgent::addConsoleMessage): 21 * inspector/front-end/ConsoleMessage.js: 22 (WebInspector.ConsoleMessageImpl.prototype._format): 23 (WebInspector.ConsoleMessageImpl.prototype._formatParameter): 24 (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject): 25 (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode): 26 (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray): 27 (WebInspector.ConsoleMessageImpl.prototype._printArray): 28 (WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry): 29 (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString): 30 * inspector/front-end/DOMExtension.js: 31 * inspector/front-end/ObjectPropertiesSection.js: 32 (WebInspector.ObjectPropertiesSection): 33 * inspector/front-end/PropertiesSection.js: 34 * inspector/front-end/RemoteObject.js: 35 (WebInspector.RemoteObject): 36 (WebInspector.RemoteObject.fromPayload): 37 * inspector/front-end/Section.js: 38 * inspector/front-end/inspector.css: 39 (.console-group-messages .section .header .title): 40 (.section .properties .name, .event-properties .name): 41 1 42 2012-08-08 Adam Barth <abarth@webkit.org> 2 43 -
trunk/Source/WebCore/inspector/ConsoleMessage.cpp
r125046 r125079 134 134 } 135 135 136 void ConsoleMessage::addToFrontend(InspectorFrontend::Console* frontend, InjectedScriptManager* injectedScriptManager , bool generatePreview)136 void ConsoleMessage::addToFrontend(InspectorFrontend::Console* frontend, InjectedScriptManager* injectedScriptManager) 137 137 { 138 138 RefPtr<TypeBuilder::Console::ConsoleMessage> jsonObj = TypeBuilder::Console::ConsoleMessage::create() … … 152 152 RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject> > jsonArgs = TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>::create(); 153 153 for (unsigned i = 0; i < m_arguments->argumentCount(); ++i) { 154 RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript.wrapObject(m_arguments->argumentAt(i), "console" , generatePreview);154 RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript.wrapObject(m_arguments->argumentAt(i), "console"); 155 155 if (!inspectorValue) { 156 156 ASSERT_NOT_REACHED(); -
trunk/Source/WebCore/inspector/ConsoleMessage.h
r125046 r125079 57 57 ~ConsoleMessage(); 58 58 59 void addToFrontend(InspectorFrontend::Console*, InjectedScriptManager* , bool generatePreview);59 void addToFrontend(InspectorFrontend::Console*, InjectedScriptManager*); 60 60 void updateRepeatCountInConsole(InspectorFrontend::Console*); 61 61 void incrementCount() { ++m_repeatCount; } -
trunk/Source/WebCore/inspector/InjectedScript.cpp
r125046 r125079 181 181 #endif 182 182 183 PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const ScriptValue& value, const String& groupName , bool generatePreview) const183 PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const ScriptValue& value, const String& groupName) const 184 184 { 185 185 ASSERT(!hasNoValue()); … … 188 188 wrapFunction.appendArgument(groupName); 189 189 wrapFunction.appendArgument(canAccessInspectedWindow()); 190 wrapFunction.appendArgument(generatePreview);191 190 bool hadException = false; 192 191 ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException); -
trunk/Source/WebCore/inspector/InjectedScript.h
r125046 r125079 87 87 #endif 88 88 89 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapObject(const ScriptValue&, const String& groupName , bool generatePreview = false) const;89 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapObject(const ScriptValue&, const String& groupName) const; 90 90 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapNode(Node*, const String& groupName); 91 91 PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapSerializedObject(SerializedScriptValue*, const String& groupName) const; -
trunk/Source/WebCore/inspector/InjectedScriptSource.js
r125046 r125079 72 72 * @param {string} groupName 73 73 * @param {boolean} canAccessInspectedWindow 74 * @param {boolean} generatePreview75 74 * @return {Object} 76 75 */ 77 wrapObject: function(object, groupName, canAccessInspectedWindow , generatePreview)76 wrapObject: function(object, groupName, canAccessInspectedWindow) 78 77 { 79 78 if (canAccessInspectedWindow) 80 return this._wrapObject(object, groupName , false, generatePreview);79 return this._wrapObject(object, groupName); 81 80 82 81 var result = {}; … … 130 129 * @param {string=} objectGroupName 131 130 * @param {boolean=} forceValueType 132 * @param {boolean=} generatePreview133 131 * @return {InjectedScript.RemoteObject} 134 132 */ 135 _wrapObject: function(object, objectGroupName, forceValueType , generatePreview)133 _wrapObject: function(object, objectGroupName, forceValueType) 136 134 { 137 135 try { 138 return new InjectedScript.RemoteObject(object, objectGroupName, forceValueType , generatePreview);136 return new InjectedScript.RemoteObject(object, objectGroupName, forceValueType); 139 137 } catch (e) { 140 138 try { … … 407 405 try { 408 406 return { wasThrown: false, 409 result: this._wrapObject(this._evaluateOn(evalFunction, object, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI), objectGroup, returnByValue , false) };407 result: this._wrapObject(this._evaluateOn(evalFunction, object, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI), objectGroup, returnByValue) }; 410 408 } catch (e) { 411 409 return this._createThrownValue(e, objectGroup); … … 638 636 return this._toString(obj); 639 637 640 if (subtype === "node") {641 var description = obj.nodeName.toLowerCase();642 switch (obj.nodeType) {643 case 1 /* Node.ELEMENT_NODE */:644 description = "<" + description + ">";645 break;646 case 10 /*Node.DOCUMENT_TYPE_NODE */:647 description = "<!DOCTYPE " + description + ">";648 break;649 }650 return description;651 }652 653 638 var className = InjectedScriptHost.internalConstructorName(obj); 654 639 if (subtype === "array") { … … 694 679 * @param {string=} objectGroupName 695 680 * @param {boolean=} forceValueType 696 * @param {boolean=} generatePreview 697 */ 698 InjectedScript.RemoteObject = function(object, objectGroupName, forceValueType, generatePreview) 681 */ 682 InjectedScript.RemoteObject = function(object, objectGroupName, forceValueType) 699 683 { 700 684 this.type = typeof object; … … 715 699 716 700 this.objectId = injectedScript._bind(object, objectGroupName); 717 var subtype = injectedScript._subtype(object) ;701 var subtype = injectedScript._subtype(object) 718 702 if (subtype) 719 703 this.subtype = subtype; 720 704 this.className = InjectedScriptHost.internalConstructorName(object); 721 705 this.description = injectedScript._describe(object); 722 723 if (generatePreview && (this.type === "object" || injectedScript._isHTMLAllCollection(object)))724 this.preview = this._generatePreview(/** @type {!Object} */ object);725 706 } 726 707 727 InjectedScript.RemoteObject.prototype = {728 /**729 * @param {!Object} object730 */731 _generatePreview: function(object)732 {733 var preview = [];734 var isArray = this.subtype === "array";735 var elementsToDump = isArray ? 100 : 5;736 737 var propertyNames = Object.getOwnPropertyNames(object);738 var lossless = true;739 var overflow = false;740 741 try {742 for (var i = 0; i < propertyNames.length; ++i) {743 if (preview.length >= elementsToDump) {744 overflow = true;745 lossless = false;746 break;747 }748 var name = propertyNames[i];749 if (isArray && name === "length")750 continue;751 752 var descriptor = Object.getOwnPropertyDescriptor(object, name);753 if (!("value" in descriptor) || !descriptor.enumerable) {754 lossless = false;755 continue;756 }757 758 var value = descriptor.value;759 if (value === null) {760 preview.push([name, "null"]);761 continue;762 }763 764 const maxLength = 100;765 var type = typeof value;766 767 if (InjectedScript.primitiveTypes[type]) {768 if (type === "string" && value.length > maxLength) {769 value = this._abbreviateString(value, maxLength, true);770 lossless = false;771 }772 preview.push([name, type, value + ""]);773 continue;774 }775 776 lossless = false;777 778 if (type === "function")779 continue;780 781 var subtype = injectedScript._subtype(value);782 preview.push([name, type, this._abbreviateString(injectedScript._describe(value), maxLength, subtype === "regexp"), subtype]);783 }784 if (!preview.length)785 return undefined;786 787 if (!lossless)788 preview.push("lossy");789 if (overflow)790 preview.push("overflow");791 return preview;792 } catch (e) {793 return undefined;794 }795 },796 797 /**798 * @param {string} string799 * @param {number} maxLength800 * @param {boolean=} middle801 * @returns802 */803 _abbreviateString: function(string, maxLength, middle)804 {805 if (string.length <= maxLength)806 return string;807 if (middle) {808 var leftHalf = maxLength >> 1;809 var rightHalf = maxLength - leftHalf - 1;810 return string.substr(0, leftHalf) + "\u2026" + string.substr(string.length - rightHalf, rightHalf);811 }812 return string.substr(0, maxLength) + "\u2026";813 }814 }815 708 /** 816 709 * @constructor -
trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp
r125046 r125079 84 84 if (m_expiredConsoleMessageCount) { 85 85 ConsoleMessage expiredMessage(OtherMessageSource, LogMessageType, WarningMessageLevel, String::format("%d console messages are not shown.", m_expiredConsoleMessageCount), "", 0, ""); 86 expiredMessage.addToFrontend(m_frontend, m_injectedScriptManager , false);86 expiredMessage.addToFrontend(m_frontend, m_injectedScriptManager); 87 87 } 88 88 89 89 size_t messageCount = m_consoleMessages.size(); 90 90 for (size_t i = 0; i < messageCount; ++i) 91 m_consoleMessages[i]->addToFrontend(m_frontend, m_injectedScriptManager , false);91 m_consoleMessages[i]->addToFrontend(m_frontend, m_injectedScriptManager); 92 92 } 93 93 … … 282 282 m_consoleMessages.append(consoleMessage); 283 283 if (m_frontend && m_state->getBoolean(ConsoleAgentState::consoleMessagesEnabled)) 284 m_previousMessage->addToFrontend(m_frontend, m_injectedScriptManager , true);284 m_previousMessage->addToFrontend(m_frontend, m_injectedScriptManager); 285 285 } 286 286 -
trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js
r125046 r125079 226 226 formattedResult.appendChild(document.createTextNode(parameters[i].description)); 227 227 else 228 formattedResult.appendChild(this._formatParameter(parameters[i] , false, true));228 formattedResult.appendChild(this._formatParameter(parameters[i])); 229 229 if (i < parameters.length - 1) 230 230 formattedResult.appendChild(document.createTextNode(" ")); … … 235 235 /** 236 236 * @param {boolean=} forceObjectFormat 237 * @param {boolean=} includePreview238 237 */ 239 _formatParameter: function(output, forceObjectFormat , includePreview)238 _formatParameter: function(output, forceObjectFormat) 240 239 { 241 240 var type; … … 255 254 var span = document.createElement("span"); 256 255 span.className = "console-formatted-" + type + " source-code"; 257 formatter.call(this, output, span , includePreview);256 formatter.call(this, output, span); 258 257 return span; 259 258 }, … … 264 263 }, 265 264 266 _formatParameterAsObject: function(obj, elem, includePreview) 267 { 268 this._formatParameterAsArrayOrObject(obj, obj.description, elem, includePreview); 269 }, 270 271 /** 272 * @param {WebInspector.RemoteObject} obj 273 * @param {string} description 274 * @param {Element} elem 275 * @param {boolean} includePreview 276 */ 277 _formatParameterAsArrayOrObject: function(obj, description, elem, includePreview) 278 { 279 var titleElement = document.createElement("span"); 280 if (description) 281 titleElement.createTextChild(description); 282 if (includePreview && obj.previewProperties) { 283 titleElement.addStyleClass("console-object-preview"); 284 var lossless = this._appendObjectPreview(obj, description, titleElement); 285 if (lossless) { 286 elem.appendChild(titleElement); 287 return; 288 } 289 } 290 var section = new WebInspector.ObjectPropertiesSection(obj, titleElement); 265 _formatParameterAsObject: function(obj, elem) 266 { 267 var section = new WebInspector.ObjectPropertiesSection(obj, obj.description); 291 268 section.enableContextMenu(); 292 269 elem.appendChild(section.element); 293 },294 295 /**296 * @param {WebInspector.RemoteObject} obj297 * @param {string} description298 * @param {Element} titleElement299 * @return {boolean} true iff preview captured all information.300 */301 _appendObjectPreview: function(obj, description, titleElement)302 {303 var preview = obj.previewProperties;304 var isLosslessPreview = true;305 var isArray = obj.subtype === "array";306 307 if (description)308 titleElement.createTextChild(" ");309 titleElement.createTextChild(isArray ? "[" : "{");310 for (var i = 0; i < preview.length; ++i) {311 var property = preview[i];312 if (property === "lossy") {313 isLosslessPreview = false;314 continue;315 }316 if (property === "overflow") {317 titleElement.createChild("span").textContent = "\u2026";318 break;319 }320 321 var name = property[0];322 var type = property[1];323 var value = property[2];324 325 if (i > 0)326 titleElement.createTextChild(", ");327 328 if (!isArray || name != i) {329 titleElement.createChild("span", "name").textContent = name;330 titleElement.createTextChild(": ");331 }332 333 var span = titleElement.createChild("span", "console-formatted-" + type);334 switch (type) {335 case "object":336 var subtype = property[3];337 if (subtype === "node")338 span.addStyleClass("console-formatted-preview-node");339 else if (subtype === "regexp")340 span.addStyleClass("console-formatted-string");341 span.textContent = value;342 break;343 case "string":344 span.textContent = "\"" + value.replace(/\n/g, "\u21B5") + "\"";345 break;346 case "null":347 case "undefined":348 span.textContent = type;349 break;350 default:351 span.textContent = String(value);352 }353 }354 titleElement.createTextChild(isArray ? "]" : "}");355 return isLosslessPreview;356 270 }, 357 271 … … 363 277 // Sometimes DOM is loaded after the sync message is being formatted, so we get no 364 278 // nodeId here. So we fall back to object formatting here. 365 this._formatParameterAsObject(object, elem , false);279 this._formatParameterAsObject(object, elem); 366 280 return; 367 281 } … … 380 294 _formatParameterAsArray: function(array, elem) 381 295 { 382 if (array.previewProperties) {383 this._formatParameterAsArrayOrObject(array, "", elem, true);384 return;385 }386 387 296 const maxFlatArrayLength = 100; 388 297 if (array.arrayLength() > maxFlatArrayLength) … … 444 353 if (i < length - 1) 445 354 elem.appendChild(document.createTextNode(", ")); 446 } 355 } 447 356 appendUndefined(elem, length); 448 357 … … 453 362 { 454 363 // Prevent infinite expansion of cross-referencing arrays. 455 return this._formatParameter(output, output.subtype && output.subtype === "array" , false);364 return this._formatParameter(output, output.subtype && output.subtype === "array"); 456 365 }, 457 366 … … 462 371 function parameterFormatter(force, obj) 463 372 { 464 return this._formatParameter(obj, force , false);373 return this._formatParameter(obj, force); 465 374 } 466 375 -
trunk/Source/WebCore/inspector/front-end/DOMExtension.js
r125046 r125079 254 254 255 255 /** 256 * @param {string} text257 */258 Element.prototype.createTextChild = function(text)259 {260 var element = this.ownerDocument.createTextNode(text);261 this.appendChild(element);262 return element;263 }264 265 DocumentFragment.prototype.createTextChild = Element.prototype.createTextChild;266 267 /**268 256 * @return {number} 269 257 */ -
trunk/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js
r125046 r125079 29 29 * @extends {WebInspector.PropertiesSection} 30 30 * @param {WebInspector.RemoteObject=} object 31 * @param {string |Element=} title31 * @param {string=} title 32 32 * @param {string=} subtitle 33 33 * @param {string=} emptyPlaceholder … … 46 46 this.skipProto = false; 47 47 48 WebInspector.PropertiesSection.call(this, title || "", subtitle);48 WebInspector.PropertiesSection.call(this, title, subtitle); 49 49 } 50 50 -
trunk/Source/WebCore/inspector/front-end/PropertiesSection.js
r125046 r125079 31 31 * @constructor 32 32 * @extends {WebInspector.Section} 33 * @param {string|Element} title34 33 * @param {string=} subtitle 35 34 */ -
trunk/Source/WebCore/inspector/front-end/RemoteObject.js
r125046 r125079 36 36 * @param {*} value 37 37 * @param {string=} description 38 * @param {Array=} previewProperties 39 */ 40 WebInspector.RemoteObject = function(objectId, type, subtype, value, description, previewProperties) 38 */ 39 WebInspector.RemoteObject = function(objectId, type, subtype, value, description) 41 40 { 42 41 this._type = type; … … 47 46 this._description = description; 48 47 this._hasChildren = true; 49 this._previewProperties = previewProperties;50 48 } else { 51 49 // Primitive or null object. … … 107 105 console.assert(typeof payload === "object", "Remote object payload should only be an object"); 108 106 109 return new WebInspector.RemoteObject(payload.objectId, payload.type, payload.subtype, payload.value, payload.description , payload.preview);107 return new WebInspector.RemoteObject(payload.objectId, payload.type, payload.subtype, payload.value, payload.description); 110 108 } 111 109 … … 155 153 { 156 154 return this._hasChildren; 157 },158 159 /** @return {Array|undefined} */160 get previewProperties()161 {162 return this._previewProperties;163 155 }, 164 156 -
trunk/Source/WebCore/inspector/front-end/Section.js
r125046 r125079 30 30 /** 31 31 * @constructor 32 * @param {string|Element} title33 32 * @param {string=} subtitle 34 33 */ -
trunk/Source/WebCore/inspector/front-end/inspector.css
r125046 r125079 1026 1026 color: black; 1027 1027 font-weight: normal; 1028 line-height: 13px;1029 1028 } 1030 1029 … … 1087 1086 .console-formatted-null, .console-formatted-undefined { 1088 1087 color: rgb(128, 128, 128); 1089 }1090 1091 .console-formatted-preview-node,1092 .section .console-formatted-node {1093 color: rgb(136, 18, 128);1094 }1095 1096 .console-object-preview {1097 font-style: italic;1098 1088 } 1099 1089 … … 1591 1581 } 1592 1582 1593 .section .properties .name, .event-properties .name , .console-formatted-object .name{1583 .section .properties .name, .event-properties .name { 1594 1584 color: rgb(136, 19, 145); 1595 1585 }
Note: See TracChangeset
for help on using the changeset viewer.