Bug 113793

Summary: Web Inspector: [CodeMirror] do not show cursor in read-only mode
Product: WebKit Reporter: Andrey Lushnikov <lushnikov>
Component: Web Inspector (Deprecated)Assignee: Andrey Lushnikov <lushnikov>
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 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.