Summary: | Web Inspector: implement smart braces functionality | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrey Lushnikov <lushnikov> | ||||||||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Andrey Lushnikov <lushnikov> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | apavlov, gyuyoung.kim, jochen, keishi, loislo, pfeldman, pmuellr, rakuco, vsevik, web-inspector-bugs, webkit.review.bot, yurys | ||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||
Hardware: | All | ||||||||||||||||
OS: | All | ||||||||||||||||
Attachments: |
|
Description
Andrey Lushnikov
2013-02-07 08:56:57 PST
Created attachment 187125 [details]
Patch
Created attachment 187133 [details]
Patch
Created attachment 187809 [details]
Patch
Comment on attachment 187809 [details]
Patch
test expectations not updated
Created attachment 187811 [details]
Patch
Created attachment 187819 [details]
Patch
Comment on attachment 187819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=187819&action=review > Source/WebCore/inspector/front-end/DefaultTextEditor.js:1398 > + this._textInputInterceptors["("] = this._handleBracePairInsertion.bind(this, "()"); registerInterceptor("(", "()", this._handleBracePairInsertion); would look more user-friendly > Source/WebCore/inspector/front-end/DefaultTextEditor.js:2829 > + var interceptor = this._textInputInterceptors[event.data]; textInput will trigger for pasting text as well and you don't want interceptors to work there. Instad of text input interceptors, you want keyDown handlers. Created attachment 188329 [details]
Patch
Comment on attachment 187819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=187819&action=review >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1398 >> + this._textInputInterceptors["("] = this._handleBracePairInsertion.bind(this, "()"); > > registerInterceptor("(", "()", this._handleBracePairInsertion); would look more user-friendly not sure I got your idea.. Do you mean we should create a public "registerInterceptor" method? >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2829 >> + var interceptor = this._textInputInterceptors[event.data]; > > textInput will trigger for pasting text as well and you don't want interceptors to work there. Instad of text input interceptors, you want keyDown handlers. fixed to handling in keyPress Comment on attachment 188329 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188329&action=review > Source/WebCore/inspector/front-end/DefaultTextEditor.js:3549 > + } else return false > Source/WebCore/inspector/front-end/DefaultTextEditor.js:3595 > + } else return false; Comment on attachment 188329 [details] Patch Clearing flags on attachment: 188329 Committed r142983: <http://trac.webkit.org/changeset/142983> All reviewed patches have been landed. Closing bug. |