summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/SourceFrame.js
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-05-11 18:35:50 +0100
committerBen Murdoch <benm@google.com>2010-05-14 10:23:05 +0100
commit21939df44de1705786c545cd1bf519d47250322d (patch)
treeef56c310f5c0cdc379c2abb2e212308a3281ce20 /WebCore/inspector/front-end/SourceFrame.js
parent4ff1d8891d520763f17675827154340c7c740f90 (diff)
downloadexternal_webkit-21939df44de1705786c545cd1bf519d47250322d.zip
external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.gz
external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.bz2
Merge Webkit at r58956: Initial merge by Git.
Change-Id: I1d9fb60ea2c3f2ddc04c17a871acdb39353be228
Diffstat (limited to 'WebCore/inspector/front-end/SourceFrame.js')
-rw-r--r--WebCore/inspector/front-end/SourceFrame.js29
1 files changed, 12 insertions, 17 deletions
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index 99280fc..2dec650 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -39,7 +39,6 @@ WebInspector.SourceFrame = function(parentElement, addBreakpointDelegate, remove
this._rowMessages = {};
this._messageBubbles = {};
this.breakpoints = [];
- this._shortcuts = {};
this._loaded = false;
@@ -55,9 +54,12 @@ WebInspector.SourceFrame.prototype = {
{
this._visible = visible;
this._createViewerIfNeeded();
- if (!visible && this._textViewer)
- this._textViewer.freeCachedElements();
-
+
+ if (!visible) {
+ this._hidePopup();
+ if (this._textViewer)
+ this._textViewer.freeCachedElements();
+ }
},
get executionLine()
@@ -149,6 +151,11 @@ WebInspector.SourceFrame.prototype = {
this._textModel.setText(null, content);
},
+ get textModel()
+ {
+ return this._textModel;
+ },
+
highlightLine: function(line)
{
if (this._textViewer)
@@ -164,7 +171,6 @@ WebInspector.SourceFrame.prototype = {
this._textViewer = new WebInspector.TextViewer(this._textModel, WebInspector.platform, this._url);
var element = this._textViewer.element;
- element.addEventListener("keydown", this._keyDown.bind(this), true);
element.addEventListener("contextmenu", this._contextMenu.bind(this), true);
element.addEventListener("mousedown", this._mouseDown.bind(this), true);
element.addEventListener("mousemove", this._mouseMove.bind(this), true);
@@ -669,17 +675,6 @@ WebInspector.SourceFrame.prototype = {
return conditionElement;
},
- _keyDown: function(event)
- {
- var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
- var handler = this._shortcuts[shortcut];
- if (handler) {
- handler(event);
- event.preventDefault();
- } else
- WebInspector.documentKeyDown(event);
- },
-
_evalSelectionInCallFrame: function(event)
{
if (!WebInspector.panels.scripts || !WebInspector.panels.scripts.paused)
@@ -689,7 +684,7 @@ WebInspector.SourceFrame.prototype = {
if (!selection.rangeCount)
return;
- var expression = selection.getRangeAt(0).toString().trimWhitespace();
+ var expression = selection.getRangeAt(0).toString().trim();
WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, "console", function(result, exception) {
WebInspector.showConsole();
var commandMessage = new WebInspector.ConsoleCommand(expression);