Skip to content
  • apavlov@chromium.org's avatar
    Web Inspector: Implement SCSS source highlighter · f9cf43dc
    apavlov@chromium.org authored
    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: http://svn.webkit.org/repository/webkit/trunk@127864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f9cf43dc