- Revision
- 88918
- Author
- [email protected]
- Date
- 2011-06-15 04:31:26 -0700 (Wed, 15 Jun 2011)
Log Message
2011-06-15 Pavel Feldman <[email protected]>
Reviewed by Yury Semikhatsky.
Web Inspector: [REGRESSION] errors in watches and in console are not rendered in red.
https://bugs.webkit.org/show_bug.cgi?id=62708
* inspector/debugger/error-in-watch-expressions-expected.txt: Added.
* inspector/debugger/error-in-watch-expressions.html: Added.
2011-06-15 Pavel Feldman <[email protected]>
Reviewed by Yury Semikhatsky.
Web Inspector: [REGRESSION] errors in watches and in console are not rendered in red.
https://bugs.webkit.org/show_bug.cgi?id=62708
Test: inspector/debugger/error-in-watch-expressions.html
* inspector/front-end/RemoteObject.js:
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype.update.appendResult):
(WebInspector.WatchExpressionsSection.prototype.update):
(WebInspector.WatchExpressionTreeElement.prototype.update):
* inspector/front-end/inspector.css:
(.console-error-level .console-message-text, .console-error-level .section .header .title):
(.console-formatted-object, .console-formatted-node):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (88917 => 88918)
--- trunk/LayoutTests/ChangeLog 2011-06-15 11:02:44 UTC (rev 88917)
+++ trunk/LayoutTests/ChangeLog 2011-06-15 11:31:26 UTC (rev 88918)
@@ -1,3 +1,13 @@
+2011-06-15 Pavel Feldman <[email protected]>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: [REGRESSION] errors in watches and in console are not rendered in red.
+ https://bugs.webkit.org/show_bug.cgi?id=62708
+
+ * inspector/debugger/error-in-watch-expressions-expected.txt: Added.
+ * inspector/debugger/error-in-watch-expressions.html: Added.
+
2011-06-15 Pavel Podivilov <[email protected]>
Reviewed by Yury Semikhatsky.
Added: trunk/LayoutTests/inspector/debugger/error-in-watch-expressions-expected.txt (0 => 88918)
--- trunk/LayoutTests/inspector/debugger/error-in-watch-expressions-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/debugger/error-in-watch-expressions-expected.txt 2011-06-15 11:31:26 UTC (rev 88918)
@@ -0,0 +1,5 @@
+Tests that watches pane renders errors in red.
+
+foo: 123#$%: [Exception: SyntaxError]
+SUCCESS
+
Property changes on: trunk/LayoutTests/inspector/debugger/error-in-watch-expressions-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/inspector/debugger/error-in-watch-expressions.html (0 => 88918)
--- trunk/LayoutTests/inspector/debugger/error-in-watch-expressions.html (rev 0)
+++ trunk/LayoutTests/inspector/debugger/error-in-watch-expressions.html 2011-06-15 11:31:26 UTC (rev 88918)
@@ -0,0 +1,34 @@
+<html>
+<head>
+<script src=""
+<script>
+
+var foo = 123
+
+var test = function()
+{
+ var watchExpressionsSection = WebInspector.panels.scripts.sidebarPanes.watchExpressions.section;
+ watchExpressionsSection.addExpression();
+ watchExpressionsSection.watchExpressions[0] = "foo";
+ watchExpressionsSection.watchExpressions[1] = "#$%";
+ watchExpressionsSection.update();
+ InspectorTest.runAfterPendingDispatches(step1);
+
+ function step1()
+ {
+ InspectorTest.addResult(watchExpressionsSection.element.textContent);
+ InspectorTest.addResult(watchExpressionsSection.element.innerHTML.indexOf("watch-expressions-error-level") !== -1 ? "SUCCESS" : "FAILED");
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+
+<body _onload_="runTest()">
+<p>
+Tests that watches pane renders errors in red.
+</p>
+
+</body>
+</html>
Property changes on: trunk/LayoutTests/inspector/debugger/error-in-watch-expressions.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (88917 => 88918)
--- trunk/Source/WebCore/ChangeLog 2011-06-15 11:02:44 UTC (rev 88917)
+++ trunk/Source/WebCore/ChangeLog 2011-06-15 11:31:26 UTC (rev 88918)
@@ -1,3 +1,21 @@
+2011-06-15 Pavel Feldman <[email protected]>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: [REGRESSION] errors in watches and in console are not rendered in red.
+ https://bugs.webkit.org/show_bug.cgi?id=62708
+
+ Test: inspector/debugger/error-in-watch-expressions.html
+
+ * inspector/front-end/RemoteObject.js:
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update.appendResult):
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ (WebInspector.WatchExpressionTreeElement.prototype.update):
+ * inspector/front-end/inspector.css:
+ (.console-error-level .console-message-text, .console-error-level .section .header .title):
+ (.console-formatted-object, .console-formatted-node):
+
2011-06-15 Carlos Garcia Campos <[email protected]>
Unreviewed. Remove unneeded constructor declaration added by mistake in r88800.
Modified: trunk/Source/WebCore/inspector/front-end/RemoteObject.js (88917 => 88918)
--- trunk/Source/WebCore/inspector/front-end/RemoteObject.js 2011-06-15 11:02:44 UTC (rev 88917)
+++ trunk/Source/WebCore/inspector/front-end/RemoteObject.js 2011-06-15 11:31:26 UTC (rev 88918)
@@ -102,11 +102,6 @@
return this._hasChildren;
},
- isError: function()
- {
- return this._type === "error";
- },
-
getOwnProperties: function(callback)
{
this._getProperties(false, callback);
Modified: trunk/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js (88917 => 88918)
--- trunk/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js 2011-06-15 11:02:44 UTC (rev 88917)
+++ trunk/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js 2011-06-15 11:31:26 UTC (rev 88918)
@@ -102,12 +102,14 @@
WebInspector.WatchExpressionsSection.prototype = {
update: function(e)
{
- e && e.stopPropagation();
+ if (e)
+ e.stopPropagation();
- function appendResult(_expression_, watchIndex, result)
+ function appendResult(_expression_, watchIndex, result, wasThrown)
{
var property = new WebInspector.RemoteObjectProperty(_expression_, result);
property.watchIndex = watchIndex;
+ property.wasThrown = wasThrown;
// To clarify what's going on here:
// In the outer function, we calculate the number of properties
@@ -262,7 +264,7 @@
{
WebInspector.ObjectPropertyTreeElement.prototype.update.call(this);
- if (this.property.value.isError())
+ if (this.property.wasThrown)
this.valueElement.addStyleClass("watch-expressions-error-level");
var deleteButton = document.createElement("input");
Modified: trunk/Source/WebCore/inspector/front-end/inspector.css (88917 => 88918)
--- trunk/Source/WebCore/inspector/front-end/inspector.css 2011-06-15 11:02:44 UTC (rev 88917)
+++ trunk/Source/WebCore/inspector/front-end/inspector.css 2011-06-15 11:31:26 UTC (rev 88918)
@@ -768,8 +768,8 @@
display: none;
}
-.console-error-level .console-message-text {
- color: red;
+.console-error-level .console-message-text, .console-error-level .section .header .title {
+ color: red !important;
}
.console-debug-level .console-message-text {
@@ -881,6 +881,7 @@
position: relative;
display: inline-block;
vertical-align: top;
+ color: black;
}
.console-formatted-object .section, .console-formatted-node .section {