Bug 101607 - Web Inspector: stop using cursorCoords in CodeMirrorTextEditor
Summary: Web Inspector: stop using cursorCoords in CodeMirrorTextEditor
Status: RESOLVED FIXED
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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-08 08:04 PST by Jan Keromnes
Modified: 2012-11-08 22:46 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.54 KB, patch)
2012-11-08 08:15 PST, Jan Keromnes
no flags Details | Formatted Diff | Diff
Patch (2.58 KB, patch)
2012-11-08 09:35 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-11-08 08:04:03 PST
In CodeMirror v3, the API changed, and the method instance.cursorCoords(start) doesn't return what we expect anymore. We should use instance.getCursor(start) instead.
Comment 1 Jan Keromnes 2012-11-08 08:10:26 PST
(In reply to comment #6 bug 99319)
> (From update of attachment 173038 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=173038&action=review
> 
> > Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js:-57
> > -    CodeMirror.on(this._codeMirror, "change", this._change.bind(this));
> 
> Why this was wrong? It seems to work for me.

Using the global `CodeMirror.on(instance, event)` function C-style is not wrong, but I think that the `instance.on(event)` variant is less confusing.
Comment 2 Jan Keromnes 2012-11-08 08:15:19 PST
Created attachment 173048 [details]
Patch
Comment 3 WebKit Review Bot 2012-11-08 09:30:59 PST
Comment on attachment 173048 [details]
Patch

Rejecting attachment 173048 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1

ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/14770257
Comment 4 Jan Keromnes 2012-11-08 09:35:05 PST
Created attachment 173058 [details]
Patch
Comment 5 WebKit Review Bot 2012-11-08 22:46:55 PST
Comment on attachment 173058 [details]
Patch

Clearing flags on attachment: 173058

Committed r134014: <http://trac.webkit.org/changeset/134014>
Comment 6 WebKit Review Bot 2012-11-08 22:46:59 PST
All reviewed patches have been landed.  Closing bug.