Changeset 51242 in webkit
- Timestamp:
- Nov 20, 2009 10:40:57 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51240 r51242 1 2009-11-20 Brian Weinstein <bweinstein@apple.com> 2 3 Reviewed by Tim Hatcher. 4 5 Fixes <http://webkit.org/b/31699>. 6 Web Inspector: Should Cache Values of InspectorController.platform() and port(). 7 8 Refactor the Inspector to cache the value of InspectorController.platform 9 and InspectorController.port, because those need to call into C++, they are 10 being called more and more as we add platform specific keyboard shortcuts, and 11 they shouldn't change in the lifecycle of the Web Inspector. 12 13 * inspector/front-end/AbstractTimelinePanel.js: 14 (WebInspector.AbstractTimelinePanel.prototype._updateFilter): 15 * inspector/front-end/ConsoleView.js: 16 (WebInspector.ConsoleView.prototype._updateFilter): 17 * inspector/front-end/ElementsPanel.js: 18 (WebInspector.ElementsPanel.prototype.handleKeyEvent): 19 * inspector/front-end/ScriptsPanel.js: 20 (WebInspector.ScriptsPanel): 21 * inspector/front-end/SourceFrame.js: 22 (WebInspector.SourceFrame.prototype._loaded): 23 * inspector/front-end/inspector.js: 24 (WebInspector.get platform): 25 (WebInspector.get port): 26 (WebInspector.loaded): 27 (WebInspector.documentKeyDown): 28 (WebInspector.toolbarDragStart): 29 1 30 2009-11-20 Dirk Schulze <krit@webkit.org> 2 31 … … 104 133 Test: fast/ruby/ruby-text-indent.html 105 134 106 * css/html.css: reset text-indent on <ruby> and <rt> elements 135 * css/html.css: reset text-indent on <ruby> and <rt> elements 107 136 108 137 2009-11-19 Brian Weinstein <bweinstein@apple.com> -
trunk/WebCore/inspector/front-end/AbstractTimelinePanel.js
r51115 r51242 190 190 _updateFilter: function(e) 191 191 { 192 var isMac = InspectorController.platform().indexOf("mac-") === 0;192 var isMac = WebInspector.platform.indexOf("mac-") === 0; 193 193 var selectMultiple = false; 194 194 if (isMac && e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey) -
trunk/WebCore/inspector/front-end/ConsoleView.js
r50663 r51242 102 102 _updateFilter: function(e) 103 103 { 104 var isMac = InspectorController.platform().indexOf("mac-") === 0;104 var isMac = WebInspector.platform.indexOf("mac-") === 0; 105 105 var selectMultiple = false; 106 106 if (isMac && e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey) -
trunk/WebCore/inspector/front-end/ElementsPanel.js
r51225 r51242 1002 1002 // This shortcut matches Firebug. 1003 1003 if (event.keyIdentifier === "U+0043") { // C key 1004 var isMac = InspectorController.platform().indexOf("mac-") === 0;1004 var isMac = WebInspector.platform.indexOf("mac-") === 0; 1005 1005 if (isMac) 1006 1006 var isNodeSearchKey = event.metaKey && !event.ctrlKey && !event.altKey && event.shiftKey; -
trunk/WebCore/inspector/front-end/ScriptsPanel.js
r51156 r51242 163 163 this._shortcuts = {}; 164 164 165 var isMac = InspectorController.platform().indexOf("mac-") === 0;165 var isMac = WebInspector.platform.indexOf("mac-") === 0; 166 166 var platformSpecificModifier = isMac ? WebInspector.KeyboardShortcut.Modifiers.Meta : WebInspector.KeyboardShortcut.Modifiers.Ctrl; 167 167 -
trunk/WebCore/inspector/front-end/SourceFrame.js
r51134 r51242 208 208 209 209 // Register 'eval' shortcut. 210 var isMac = InspectorController.platform().indexOf("mac-") === 0;210 var isMac = WebInspector.platform.indexOf("mac-") === 0; 211 211 var platformSpecificModifier = isMac ? WebInspector.KeyboardShortcut.Modifiers.Meta : WebInspector.KeyboardShortcut.Modifiers.Ctrl; 212 212 var shortcut = WebInspector.KeyboardShortcut.makeKey(69 /* 'E' */, platformSpecificModifier | WebInspector.KeyboardShortcut.Modifiers.Shift); -
trunk/WebCore/inspector/front-end/inspector.js
r51182 r51242 73 73 cookieDomains: {}, 74 74 missingLocalizedStrings: {}, 75 76 get platform() 77 { 78 if (!("_platform" in this)) 79 this._platform = InspectorController.platform(); 80 81 return this._platform; 82 }, 83 84 get port() 85 { 86 if (!("_port" in this)) 87 this._port = InspectorController.port(); 88 89 return this._port; 90 }, 75 91 76 92 get previousFocusElement() … … 391 407 WebInspector.loaded = function() 392 408 { 393 var platform = InspectorController.platform();409 var platform = WebInspector.platform; 394 410 document.body.addStyleClass("platform-" + platform); 395 var port = InspectorController.port();411 var port = WebInspector.port; 396 412 document.body.addStyleClass("port-" + port); 397 413 … … 621 637 622 638 if (!event.handled) { 623 var isMac = InspectorController.platform().indexOf("mac-") === 0;639 var isMac = WebInspector.platform.indexOf("mac-") === 0; 624 640 625 641 switch (event.keyIdentifier) { … … 846 862 WebInspector.toolbarDragStart = function(event) 847 863 { 848 if ((!WebInspector.attached && InspectorController.platform() !== "mac-leopard") || InspectorController.port()== "qt")864 if ((!WebInspector.attached && WebInspector.platform !== "mac-leopard") || WebInspector.port == "qt") 849 865 return; 850 866
Note: See TracChangeset
for help on using the changeset viewer.