Web Inspector: show whitespace characters in DTE
https://bugs.webkit.org/show_bug.cgi?id=108947

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-02-09
Reviewed by Pavel Feldman.

Source/WebCore:

New test: inspector/editor/text-editor-show-whitespaces.html

Split consecutive whitespace characters into groups of 16, 8, 4, 2 and 1 and
add ::before pseudoclass for this groups which contains necessary
amount of "dots" (u+00b7). Add a setting "Show whitespace" for this
option in "Sources" section of "General" tab.

* English.lproj/localizedStrings.js:
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype.wasShown):
(WebInspector.TextEditorMainPanel.prototype.willHide):
(WebInspector.TextEditorMainPanel.prototype._renderRanges):
(WebInspector.TextEditorMainPanel.prototype._renderWhitespaceCharsWithFixedSizeSpans):
(WebInspector.TextEditorMainPanel.prototype._paintLine):
* inspector/front-end/Settings.js:
* inspector/front-end/SettingsScreen.js:
(WebInspector.GenericSettingsTab):
* inspector/front-end/inspectorSyntaxHighlight.css:
(.webkit-whitespace-1::before):
(.webkit-whitespace-2::before):
(.webkit-whitespace-4::before):
(.webkit-whitespace-8::before):
(.webkit-whitespace-16::before):
(.webkit-whitespace::before):

LayoutTests:

Add layout test to verify whitespace highlight functionality.

* inspector/editor/text-editor-show-whitespace-expected.txt: Added.
* inspector/editor/text-editor-show-whitespace.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142351 268f45cc-cd09-0410-ab3c-d52691b4dbfc