Bug 94062 - Web Inspector: Implement context menus in CodeMirrorTextEditor
Summary: Web Inspector: Implement context menus in CodeMirrorTextEditor
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jan Keromnes
Depends on: 99319
  Show dependency treegraph
Reported: 2012-08-14 19:32 PDT by Jan Keromnes
Modified: 2012-12-03 10:45 PST (History)
10 users (show)

See Also:

Patch (2.45 KB, patch)
2012-12-02 11:17 PST, Jan Keromnes
no flags Details | Formatted Diff | Diff
Patch (2.46 KB, patch)
2012-12-03 10:05 PST, Jan Keromnes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Keromnes 2012-08-14 19:32:59 PDT
Currently CodeMirrorTextEditor doesn't populate context menus the way DefaultTextEditor does. We should implement them and make sure that exposed features work as expected.
Comment 1 Jan Keromnes 2012-12-02 11:17:18 PST
Created attachment 177143 [details]
Comment 2 Jan Keromnes 2012-12-02 11:22:00 PST
A patch to add a contextmenu handler to the CodeMirror editor. Similarly to DefaultTextEditor's _contextMenu, it handles text body and gutter differently, and for the latter it determines the corresponding line number. This adds back UI controls for disabling / conditional breakpoints.
Comment 3 Pavel Feldman 2012-12-03 09:52:28 PST
Comment on attachment 177143 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=177143&action=review

> Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js:60
> +    this._codeMirror.getWrapperElement().addEventListener("contextmenu", this._contextMenu.bind(this));

does getWrapperElement return this.element?
Comment 4 Jan Keromnes 2012-12-03 10:05:32 PST
Created attachment 177279 [details]
Comment 5 Jan Keromnes 2012-12-03 10:11:21 PST
(In reply to comment #3)
> does getWrapperElement return this.element?

Right, sorry about that.
Comment 6 WebKit Review Bot 2012-12-03 10:45:04 PST
Comment on attachment 177279 [details]

Clearing flags on attachment: 177279

Committed r136414: <http://trac.webkit.org/changeset/136414>
Comment 7 WebKit Review Bot 2012-12-03 10:45:08 PST
All reviewed patches have been landed.  Closing bug.