[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
bweinstein at apple.com
bweinstein at apple.com
Wed Apr 7 23:52:05 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 16352f166799273056b30646ac0c37271671bbc7
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 20 18:40:57 2009 +0000
Fixes <http://webkit.org/b/31699>.
Web Inspector: Should Cache Values of InspectorController.platform() and port().
Reviewed by Tim Hatcher.
Refactor the Inspector to cache the value of InspectorController.platform
and InspectorController.port, because those need to call into C++, they are
being called more and more as we add platform specific keyboard shortcuts, and
they shouldn't change in the lifecycle of the Web Inspector.
* inspector/front-end/AbstractTimelinePanel.js:
(WebInspector.AbstractTimelinePanel.prototype._updateFilter):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._updateFilter):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.handleKeyEvent):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype._loaded):
* inspector/front-end/inspector.js:
(WebInspector.get platform):
(WebInspector.get port):
(WebInspector.loaded):
(WebInspector.documentKeyDown):
(WebInspector.toolbarDragStart):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c361d50..52a1b26 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,32 @@
+2009-11-20 Brian Weinstein <bweinstein at apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fixes <http://webkit.org/b/31699>.
+ Web Inspector: Should Cache Values of InspectorController.platform() and port().
+
+ Refactor the Inspector to cache the value of InspectorController.platform
+ and InspectorController.port, because those need to call into C++, they are
+ being called more and more as we add platform specific keyboard shortcuts, and
+ they shouldn't change in the lifecycle of the Web Inspector.
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._updateFilter):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.handleKeyEvent):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/inspector.js:
+ (WebInspector.get platform):
+ (WebInspector.get port):
+ (WebInspector.loaded):
+ (WebInspector.documentKeyDown):
+ (WebInspector.toolbarDragStart):
+
2009-11-20 Dirk Schulze <krit at webkit.org>
Unreviewed build fix for filters enabled builds.
@@ -103,7 +132,7 @@
Test: fast/ruby/ruby-text-indent.html
- * css/html.css: reset text-indent on <ruby> and <rt> elements
+ * css/html.css: reset text-indent on <ruby> and <rt> elements
2009-11-19 Brian Weinstein <bweinstein at apple.com>
diff --git a/WebCore/inspector/front-end/AbstractTimelinePanel.js b/WebCore/inspector/front-end/AbstractTimelinePanel.js
index eb16602..e009bbb 100644
--- a/WebCore/inspector/front-end/AbstractTimelinePanel.js
+++ b/WebCore/inspector/front-end/AbstractTimelinePanel.js
@@ -189,7 +189,7 @@ WebInspector.AbstractTimelinePanel.prototype = {
_updateFilter: function(e)
{
- var isMac = InspectorController.platform().indexOf("mac-") === 0;
+ var isMac = WebInspector.platform.indexOf("mac-") === 0;
var selectMultiple = false;
if (isMac && e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey)
selectMultiple = true;
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index f03c647..f97720b 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -101,7 +101,7 @@ WebInspector.ConsoleView.prototype = {
_updateFilter: function(e)
{
- var isMac = InspectorController.platform().indexOf("mac-") === 0;
+ var isMac = WebInspector.platform.indexOf("mac-") === 0;
var selectMultiple = false;
if (isMac && e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey)
selectMultiple = true;
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index b319635..164855b 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -1001,7 +1001,7 @@ WebInspector.ElementsPanel.prototype = {
// Cmd/Control + Shift + C should be a shortcut to clicking the Node Search Button.
// This shortcut matches Firebug.
if (event.keyIdentifier === "U+0043") { // C key
- var isMac = InspectorController.platform().indexOf("mac-") === 0;
+ var isMac = WebInspector.platform.indexOf("mac-") === 0;
if (isMac)
var isNodeSearchKey = event.metaKey && !event.ctrlKey && !event.altKey && event.shiftKey;
else
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index 551367a..ef3f9b8 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -162,7 +162,7 @@ WebInspector.ScriptsPanel = function()
this._shortcuts = {};
- var isMac = InspectorController.platform().indexOf("mac-") === 0;
+ var isMac = WebInspector.platform.indexOf("mac-") === 0;
var platformSpecificModifier = isMac ? WebInspector.KeyboardShortcut.Modifiers.Meta : WebInspector.KeyboardShortcut.Modifiers.Ctrl;
// Continue.
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index f2929ee..bcbcb8f 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -207,7 +207,7 @@ WebInspector.SourceFrame.prototype = {
this.element.contentDocument.addEventListener("webkitAnimationEnd", this._highlightLineEnds.bind(this), false);
// Register 'eval' shortcut.
- var isMac = InspectorController.platform().indexOf("mac-") === 0;
+ var isMac = WebInspector.platform.indexOf("mac-") === 0;
var platformSpecificModifier = isMac ? WebInspector.KeyboardShortcut.Modifiers.Meta : WebInspector.KeyboardShortcut.Modifiers.Ctrl;
var shortcut = WebInspector.KeyboardShortcut.makeKey(69 /* 'E' */, platformSpecificModifier | WebInspector.KeyboardShortcut.Modifiers.Shift);
this._shortcuts[shortcut] = this._evalSelectionInCallFrame.bind(this);
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index b632c2c..c38583a 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -72,6 +72,22 @@ var WebInspector = {
resourceURLMap: {},
cookieDomains: {},
missingLocalizedStrings: {},
+
+ get platform()
+ {
+ if (!("_platform" in this))
+ this._platform = InspectorController.platform();
+
+ return this._platform;
+ },
+
+ get port()
+ {
+ if (!("_port" in this))
+ this._port = InspectorController.port();
+
+ return this._port;
+ },
get previousFocusElement()
{
@@ -390,9 +406,9 @@ var WebInspector = {
WebInspector.loaded = function()
{
- var platform = InspectorController.platform();
+ var platform = WebInspector.platform;
document.body.addStyleClass("platform-" + platform);
- var port = InspectorController.port();
+ var port = WebInspector.port;
document.body.addStyleClass("port-" + port);
this._loadPreferences();
@@ -620,7 +636,7 @@ WebInspector.documentKeyDown = function(event)
WebInspector[this.currentFocusElement.id + "KeyDown"](event);
if (!event.handled) {
- var isMac = InspectorController.platform().indexOf("mac-") === 0;
+ var isMac = WebInspector.platform.indexOf("mac-") === 0;
switch (event.keyIdentifier) {
case "U+001B": // Escape key
@@ -845,7 +861,7 @@ WebInspector.toggleAttach = function()
WebInspector.toolbarDragStart = function(event)
{
- if ((!WebInspector.attached && InspectorController.platform() !== "mac-leopard") || InspectorController.port() == "qt")
+ if ((!WebInspector.attached && WebInspector.platform !== "mac-leopard") || WebInspector.port == "qt")
return;
var target = event.target;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list