Bug 101607

Summary: Web Inspector: stop using cursorCoords in CodeMirrorTextEditor
Product: WebKit Reporter: Jan Keromnes <janx>
Component: Web Inspector (Deprecated)Assignee: Jan Keromnes <janx>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

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.