Web Inspector: Implement SCSS source highlighter
authorapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Sep 2012 13:24:43 +0000 (13:24 +0000)
committerapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Sep 2012 13:24:43 +0000 (13:24 +0000)
commit0075c976c8fd5f251e4bd61a536eef1722caa1dc
tree9eb4d55f5e06b067a56e5f5cd6f334b84ea2ec02
parente0639151e6b7c7e5f83d6b29fabdec1e79320175
Web Inspector: Implement SCSS source highlighter
https://bugs.webkit.org/show_bug.cgi?id=95585

Reviewed by Vsevolod Vlasov.

Source/WebCore:

This change modifies the existing CSS highlighter to support SCSS as well. The "text/x-scss" mime-type is assigned to SASSSource.

* inspector/front-end/CSSCompletions.js:
(WebInspector.CSSCompletions.cssPropertiesMetainfoKeySet):
* inspector/front-end/ContentProviders.js:
(WebInspector.StaticContentProvider): Enabled clients to supply the content mime-type.
(WebInspector.StaticContentProvider.prototype.mimeType):
(WebInspector.StaticContentProvider.prototype.requestContent): Use client-supplied content mime-type, if any.
* inspector/front-end/SASSSourceMapping.js:
(WebInspector.SASSSource): Construct StaticContentProvider with the "text/x-scss" mime-type.
* inspector/front-end/SourceCSSTokenizer.js:
(WebInspector.SourceCSSTokenizer):
(WebInspector.SourceCSSTokenizer.prototype.nextToken):
* inspector/front-end/SourceCSSTokenizer.re2js: Extended with the SCSS syntax.
* inspector/front-end/SourceTokenizer.js:
(WebInspector.SourceTokenizer.Registry):
* inspector/front-end/inspectorSyntaxHighlight.css:
(.webkit-css-bang-keyword):

LayoutTests:

Test modified to cover the SCSS syntax as well.

* inspector/syntax-highlight-css-expected.txt:
* inspector/syntax-highlight-css.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/syntax-highlight-css-expected.txt
LayoutTests/inspector/syntax-highlight-css.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/CSSCompletions.js
Source/WebCore/inspector/front-end/ContentProviders.js
Source/WebCore/inspector/front-end/SASSSourceMapping.js
Source/WebCore/inspector/front-end/SourceCSSTokenizer.js
Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js
Source/WebCore/inspector/front-end/SourceTokenizer.js
Source/WebCore/inspector/front-end/inspectorSyntaxHighlight.css