[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
pfeldman at chromium.org
pfeldman at chromium.org
Thu Oct 29 20:33:28 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 93f29e756f486ec7b49475dfa4c5e0fb404cd74c
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 24 11:57:53 2009 +0000
2009-09-24 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Fix formatting for messages derived from resource warnings,
couple of drive-by formatting fixes.
https://bugs.webkit.org/show_bug.cgi?id=29705
* inspector/InspectorFrontend.cpp:
(WebCore::InspectorFrontend::addMessageToConsole):
* inspector/front-end/ConsoleView.js:
* inspector/front-end/InjectedScript.js:
(InjectedScript._evaluateAndWrap):
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype.update):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c21a943..107991e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-09-24 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Fix formatting for messages derived from resource warnings,
+ couple of drive-by formatting fixes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29705
+
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addMessageToConsole):
+ * inspector/front-end/ConsoleView.js:
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._evaluateAndWrap):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+
2009-09-22 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp
index 3bdfa97..c9793cb 100644
--- a/WebCore/inspector/InspectorFrontend.cpp
+++ b/WebCore/inspector/InspectorFrontend.cpp
@@ -83,13 +83,8 @@ void InspectorFrontend::addMessageToConsole(const ScriptObject& messageObj, cons
} else if (!wrappedArguments.isEmpty()) {
for (unsigned i = 0; i < wrappedArguments.size(); ++i)
function->appendArgument(m_inspectorController->wrapObject(wrappedArguments[i]));
- } else {
- // FIXME: avoid manual wrapping here.
- ScriptObject textWrapper = ScriptObject::createNew(m_scriptState);
- textWrapper.set("type", "string");
- textWrapper.set("description", message);
- function->appendArgument(textWrapper);
- }
+ } else
+ function->appendArgument(message);
function->call();
}
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 575b13a..4f50ecc 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -608,7 +608,7 @@ WebInspector.ConsoleMessage.prototype = {
this.formattedMessage = span;
break;
case WebInspector.ConsoleMessage.MessageType.Object:
- this.formattedMessage = this._format([WebInspector.ObjectProxy.wrapPrimitiveValue("%O"), args[0]]);
+ this.formattedMessage = this._format(["%O", args[0]]);
break;
default:
this.formattedMessage = this._format(args);
@@ -631,6 +631,13 @@ WebInspector.ConsoleMessage.prototype = {
if (!parameters.length)
return formattedResult;
+ // Formatting code below assumes that parameters are all wrappers whereas frontend console
+ // API allows passing arbitrary values as messages (strings, numberts, etc.). Wrap them here.
+ for (var i = 0; i < parameters.length; ++i) {
+ if (typeof parameters[i] !== "object" && typeof parameters[i] !== "function")
+ parameters[i] = WebInspector.ObjectProxy.wrapPrimitiveValue(parameters[i]);
+ }
+
function formatForConsole(obj)
{
return WebInspector.console._format(obj);
diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js
index 726c7cc..0603b33 100644
--- a/WebCore/inspector/front-end/InjectedScript.js
+++ b/WebCore/inspector/front-end/InjectedScript.js
@@ -536,11 +536,11 @@ InjectedScript._evaluateAndWrap = function(evalFunction, object, expression)
result.value = InspectorController.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression));
// Handle error that might have happened while describing result.
if (result.value.errorText) {
- result.value = InspectorController.wrapObject(result.value.errorText);
+ result.value = result.value.errorText;
result.isException = true;
}
} catch (e) {
- result.value = InspectorController.wrapObject(e.toString());
+ result.value = e.toString();
result.isException = true;
}
return result;
@@ -1100,10 +1100,6 @@ Object.describe = function(obj, abbreviated)
return objectText;
case "regexp":
return String(obj).replace(/([\\\/])/g, "\\$1").replace(/\\(\/[gim]*)$/, "$1").substring(1);
- case "boolean":
- case "number":
- case "null":
- return obj;
default:
return String(obj);
}
diff --git a/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js b/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
index b568939..5e1bf5c 100644
--- a/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
+++ b/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
@@ -84,9 +84,13 @@ WebInspector.WatchExpressionsSection.prototype = {
{
function appendResult(expression, watchIndex, result, exception)
{
- // The null check catches some other cases, like null itself, and NaN
- if ((typeof result !== "object") || (result == null))
- result = new WebInspector.ObjectProxy(null, [], 0, String(result), false);
+ if (exception) {
+ // Exception results are not wrappers, but text messages.
+ result = WebInspector.ObjectProxy.wrapPrimitiveValue(result);
+ } else if (result.type === "string") {
+ // Evaluation result is intentionally not abbreviated. However, we'd like to distinguish between null and "null"
+ result.description = "\"" + result.description + "\"";
+ }
var property = new WebInspector.ObjectPropertyProxy(expression, result);
property.watchIndex = watchIndex;
@@ -95,7 +99,7 @@ WebInspector.WatchExpressionsSection.prototype = {
// since otherwise you get DOMWindow
if (property.name === WebInspector.WatchExpressionsSection.NewWatchExpression)
property.value.description = "";
-
+
// To clarify what's going on here:
// In the outer function, we calculate the number of properties
// that we're going to be updating, and set that in the
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list