Changeset 136414 in webkit
- Timestamp:
- Dec 3, 2012, 10:44:10 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r136412 r136414 1 2012-12-03 Jan Keromnes <janx@linux.com> 2 3 Web Inspector: Implement context menus in CodeMirrorTextEditor 4 https://bugs.webkit.org/show_bug.cgi?id=94062 5 6 Reviewed by Pavel Feldman. 7 8 Listen for contextmenu events in the editor and handle them differently 9 if triggered on gutter line number or in text body. This adds controls 10 for breakpoints (including disabled / conditional), debugger navigation 11 and text input methods. 12 13 * inspector/front-end/CodeMirrorTextEditor.js: 14 (WebInspector.CodeMirrorTextEditor): 15 (WebInspector.CodeMirrorTextEditor.prototype._contextMenu): 16 1 17 2012-12-03 Nate Chapin <japhet@chromium.org> 2 18 -
trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js
r134561 r136414 58 58 this._codeMirror.on("change", this._change.bind(this)); 59 59 this._codeMirror.on("gutterClick", this._gutterClick.bind(this)); 60 this.element.addEventListener("contextmenu", this._contextMenu.bind(this)); 60 61 61 62 this._lastRange = this.range(); … … 125 126 { 126 127 this.dispatchEventToListeners(WebInspector.TextEditor.Events.GutterClick, { lineNumber: lineNumber, event: event }); 128 }, 129 130 _contextMenu: function(event) 131 { 132 var contextMenu = new WebInspector.ContextMenu(event); 133 var target = event.target.enclosingNodeOrSelfWithClass("CodeMirror-gutter-elt"); 134 if (target) 135 this._delegate.populateLineGutterContextMenu(contextMenu, parseInt(target.textContent, 10) - 1); 136 else 137 this._delegate.populateTextAreaContextMenu(contextMenu, null); 138 contextMenu.show(); 127 139 }, 128 140
Note:
See TracChangeset
for help on using the changeset viewer.