Changeset 46331 in webkit


Ignore:
Timestamp:
Jul 24, 2009 12:51:39 AM (15 years ago)
Author:
abarth@webkit.org
Message:

2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>

Reviewed by Timothy Hatcher.

Inspector: Should Syntax Highlight JSON
https://bugs.webkit.org/show_bug.cgi?id=27503

  • inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype._contentLoaded):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r46330 r46331  
     12009-07-24  Joseph Pecoraro  <joepeck02@gmail.com>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Inspector: Should Syntax Highlight JSON
     6        https://bugs.webkit.org/show_bug.cgi?id=27503
     7
     8        * inspector/front-end/SourceView.js:
     9        (WebInspector.SourceView.prototype._contentLoaded):
     10
    1112009-07-24  Mike Fenton  <mike.fenton@torchmobile.com>
    212
  • trunk/WebCore/inspector/front-end/SourceView.js

    r44230 r46331  
    105105        delete this._frameNeedsSetup;
    106106        this.sourceFrame.removeEventListener("content loaded", this._contentLoaded, this);
    107 
    108         if (this.resource.type === WebInspector.Resource.Type.Script) {
     107       
     108        if (this.resource.type === WebInspector.Resource.Type.Script
     109            || this.resource.mimeType === 'application/json'
     110            || this.resource.mimeType === 'application/javascript'
     111            || /\.js(on)?$/.test(this.resource.lastPathComponent) ) {
    109112            this.sourceFrame.addEventListener("syntax highlighting complete", this._syntaxHighlightingComplete, this);
    110113            this.sourceFrame.syntaxHighlightJavascript();
Note: See TracChangeset for help on using the changeset viewer.