Bug 108947

Summary: Web Inspector: show whitespace characters in DTE
Product: WebKit Reporter: Andrey Lushnikov <lushnikov>
Component: Web Inspector (Deprecated)Assignee: Andrey Lushnikov <lushnikov>
Status: RESOLVED FIXED    
Severity: Normal CC: aandrey, apavlov, buildbot, dglazkov, keishi, loislo, pfeldman, pmuellr, rniwa, 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
Patch
none
Patch
none
Patch
none
Patch none

Andrey Lushnikov
Reported 2013-02-05 08:06:58 PST
Make an option to show whitespace characters in DefaultTextEditor.
Attachments
Patch (17.33 KB, patch)
2013-02-05 08:44 PST, Andrey Lushnikov
no flags
Patch (17.22 KB, patch)
2013-02-06 02:09 PST, Andrey Lushnikov
no flags
Patch (17.82 KB, patch)
2013-02-06 04:32 PST, Andrey Lushnikov
no flags
Patch (17.78 KB, patch)
2013-02-06 07:48 PST, Andrey Lushnikov
no flags
Patch (17.79 KB, patch)
2013-02-07 04:07 PST, Andrey Lushnikov
no flags
Patch (17.48 KB, patch)
2013-02-07 07:06 PST, Andrey Lushnikov
no flags
Andrey Lushnikov
Comment 1 2013-02-05 08:44:52 PST
Andrey Adaikin
Comment 2 2013-02-05 09:25:27 PST
Isn't it getting too heavy having everything in one file? Do we want to extract a "core editor"? Will this new functionality automatically work in other editor impls (code mirror)?
WebKit Review Bot
Comment 3 2013-02-05 09:28:22 PST
Comment on attachment 186632 [details] Patch Attachment 186632 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16379671 New failing tests: inspector/editor/text-editor-show-whitespaces.html
Build Bot
Comment 4 2013-02-05 09:31:41 PST
Comment on attachment 186632 [details] Patch Attachment 186632 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16369823 New failing tests: inspector/editor/text-editor-show-whitespaces.html
Pavel Feldman
Comment 5 2013-02-05 10:04:04 PST
Comment on attachment 186632 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186632&action=review > Source/WebCore/English.lproj/localizedStrings.js:393 > +localizedStrings["Show whitespaces"] = "Show whitespaces"; Show whitespace > Source/WebCore/inspector/front-end/DefaultTextEditor.js:1411 > + if (!visibleTo) { no {} around single line block > Source/WebCore/inspector/front-end/DefaultTextEditor.js:2022 > + var cssClass = ranges[i].token ? "webkit-" + ranges[i].token : ""; Will this work for tab character? Note that it can be of different size.
Build Bot
Comment 6 2013-02-05 10:16:30 PST
Comment on attachment 186632 [details] Patch Attachment 186632 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16366882 New failing tests: inspector/editor/text-editor-show-whitespaces.html
Alexander Pavlov (apavlov)
Comment 7 2013-02-05 12:02:24 PST
Comment on attachment 186632 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186632&action=review > Source/WebCore/inspector/front-end/DefaultTextEditor.js:1395 > +WebInspector.TextEditorMainPanel._ConsequtiveSpaces = { _Consecutive... >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2022 >> + var cssClass = ranges[i].token ? "webkit-" + ranges[i].token : ""; > > Will this work for tab character? Note that it can be of different size. Tabs are also typically rendered differently (usually using the RIGHT ARROW character, perhaps &#2192;) > Source/WebCore/inspector/front-end/DefaultTextEditor.js:2027 > + for(var whiteSpaceLength = 16; whiteSpaceLength > 0; whiteSpaceLength >>= 1) missing whitespace after "for" > Source/WebCore/inspector/front-end/Settings.js:113 > + this.showWhitespacesInEditor = this.createSetting("showWhitespacesInEditor", false); showWhitespaceInEditor
Andrey Lushnikov
Comment 8 2013-02-06 02:05:24 PST
Comment on attachment 186632 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186632&action=review >> Source/WebCore/English.lproj/localizedStrings.js:393 >> +localizedStrings["Show whitespaces"] = "Show whitespaces"; > > Show whitespace fixed everywhere >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1395 >> +WebInspector.TextEditorMainPanel._ConsequtiveSpaces = { > > _Consecutive... renamed into _ConsecutiveWhitespaceChars >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1411 >> + if (!visibleTo) { > > no {} around single line block fixed >>> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2022 >>> + var cssClass = ranges[i].token ? "webkit-" + ranges[i].token : ""; >> >> Will this work for tab character? Note that it can be of different size. > > Tabs are also typically rendered differently (usually using the RIGHT ARROW character, perhaps &#2192;) no, this won't work for tab chars. Tabs have to be separated into a separate token "tabs" by lexer, which explicitly mean changes in re2js grammar. I believe this change is massive enough to worth a separate patch. >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2027 >> + for(var whiteSpaceLength = 16; whiteSpaceLength > 0; whiteSpaceLength >>= 1) > > missing whitespace after "for" fixed >> Source/WebCore/inspector/front-end/Settings.js:113 >> + this.showWhitespacesInEditor = this.createSetting("showWhitespacesInEditor", false); > > showWhitespaceInEditor fixed
Andrey Lushnikov
Comment 9 2013-02-06 02:09:54 PST
WebKit Review Bot
Comment 10 2013-02-06 03:13:10 PST
Comment on attachment 186797 [details] Patch Attachment 186797 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16392170 New failing tests: inspector/editor/text-editor-show-whitespace.html
Pavel Feldman
Comment 11 2013-02-06 04:05:29 PST
Comment on attachment 186797 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186797&action=review > Source/WebCore/inspector/front-end/DefaultTextEditor.js:2022 > + var cssClass = ranges[i].token ? "webkit-" + ranges[i].token : ""; You should probably extract a method: as is, it has more logic than the rest of range rendering.
Andrey Lushnikov
Comment 12 2013-02-06 04:32:04 PST
WebKit Review Bot
Comment 13 2013-02-06 06:46:51 PST
Comment on attachment 186825 [details] Patch Rejecting attachment 186825 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=gce-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 186825, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue Last 500 characters of output: fuzz 2 (offset -1 lines). patching file Source/WebCore/inspector/front-end/inspectorSyntaxHighlight.css patching file LayoutTests/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file LayoutTests/inspector/editor/text-editor-show-whitespace-expected.txt patching file LayoutTests/inspector/editor/text-editor-show-whitespace.html Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', '--force', '--reviewer', 'Pavel Feldman']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue Full output: http://queues.webkit.org/results/16390296
Andrey Lushnikov
Comment 14 2013-02-06 07:48:46 PST
Build Bot
Comment 15 2013-02-06 10:30:58 PST
Comment on attachment 186855 [details] Patch Attachment 186855 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16401204 New failing tests: inspector/editor/text-editor-show-whitespace.html
Build Bot
Comment 16 2013-02-06 11:18:23 PST
Comment on attachment 186855 [details] Patch Attachment 186855 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16400215 New failing tests: inspector/editor/text-editor-show-whitespace.html
Build Bot
Comment 17 2013-02-06 19:02:39 PST
Comment on attachment 186855 [details] Patch Attachment 186855 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16405014 New failing tests: inspector/editor/text-editor-show-whitespace.html fast/js/array-sort-modifying-tostring.html
Andrey Lushnikov
Comment 18 2013-02-07 04:07:38 PST
Build Bot
Comment 19 2013-02-07 05:29:37 PST
Comment on attachment 187054 [details] Patch Attachment 187054 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16445139 New failing tests: http/tests/cache/cached-main-resource.html inspector/editor/text-editor-show-whitespace.html
Build Bot
Comment 20 2013-02-07 06:28:45 PST
Comment on attachment 187054 [details] Patch Attachment 187054 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/16443141 New failing tests: inspector/editor/text-editor-show-whitespace.html
Andrey Lushnikov
Comment 21 2013-02-07 07:06:02 PST
WebKit Review Bot
Comment 22 2013-02-09 01:59:47 PST
Comment on attachment 187100 [details] Patch Clearing flags on attachment: 187100 Committed r142351: <http://trac.webkit.org/changeset/142351>
WebKit Review Bot
Comment 23 2013-02-09 01:59:52 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.