Bug 113793 - Web Inspector: [CodeMirror] do not show cursor in read-only mode
Summary: Web Inspector: [CodeMirror] do not show cursor in read-only mode
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: Andrey Lushnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-02 09:08 PDT by Andrey Lushnikov
Modified: 2013-04-02 10:47 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.33 KB, patch)
2013-04-02 09:11 PDT, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (1.53 KB, patch)
2013-04-02 10:08 PDT, Andrey Lushnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Lushnikov 2013-04-02 09:08:49 PDT
Do not show cursor in read-only mode.
Comment 1 Andrey Lushnikov 2013-04-02 09:11:42 PDT
Created attachment 196156 [details]
Patch
Comment 2 Alexander Pavlov (apavlov) 2013-04-02 09:22:01 PDT
Comment on attachment 196156 [details]
Patch

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

> Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js:136
> +        if (readOnly)

Why not just

this._codeMirror.setOption("readOnly", isReadOnlySection ? "nocursor" : false); ?
Comment 3 Andrey Lushnikov 2013-04-02 09:43:58 PDT
Comment on attachment 196156 [details]
Patch

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

>> Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js:136
>> +        if (readOnly)
> 
> Why not just
> 
> this._codeMirror.setOption("readOnly", isReadOnlySection ? "nocursor" : false); ?

yep, your solution is much better! Thanks!
Comment 4 Andrey Lushnikov 2013-04-02 10:08:14 PDT
Created attachment 196171 [details]
Patch
Comment 5 Alexander Pavlov (apavlov) 2013-04-02 10:42:52 PDT
Comment on attachment 196171 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        No new tests.

We usually specify the reason for which a change has no tests. E.g., "No new tests - a UI change"
Comment 6 WebKit Review Bot 2013-04-02 10:47:56 PDT
Comment on attachment 196171 [details]
Patch

Clearing flags on attachment: 196171

Committed r147451: <http://trac.webkit.org/changeset/147451>
Comment 7 WebKit Review Bot 2013-04-02 10:47:59 PDT
All reviewed patches have been landed.  Closing bug.