diff --git a/src/LiveDevelopment/Agents/CSSAgent.js b/src/LiveDevelopment/Agents/CSSAgent.js index 97f89677ec9..f727103c937 100644 --- a/src/LiveDevelopment/Agents/CSSAgent.js +++ b/src/LiveDevelopment/Agents/CSSAgent.js @@ -31,7 +31,7 @@ */ define(function CSSAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); diff --git a/src/LiveDevelopment/Agents/ConsoleAgent.js b/src/LiveDevelopment/Agents/ConsoleAgent.js index 29b0e462870..a58c646abc3 100644 --- a/src/LiveDevelopment/Agents/ConsoleAgent.js +++ b/src/LiveDevelopment/Agents/ConsoleAgent.js @@ -30,7 +30,7 @@ * local console. */ define(function ConsoleAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); diff --git a/src/LiveDevelopment/Agents/DOMAgent.js b/src/LiveDevelopment/Agents/DOMAgent.js index eea4d33f126..5f676d807e9 100644 --- a/src/LiveDevelopment/Agents/DOMAgent.js +++ b/src/LiveDevelopment/Agents/DOMAgent.js @@ -36,7 +36,7 @@ * the document. */ define(function DOMAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); var RemoteAgent = require("LiveDevelopment/Agents/RemoteAgent"); diff --git a/src/LiveDevelopment/Agents/DOMHelpers.js b/src/LiveDevelopment/Agents/DOMHelpers.js index 056bc542248..a45195a0b72 100644 --- a/src/LiveDevelopment/Agents/DOMHelpers.js +++ b/src/LiveDevelopment/Agents/DOMHelpers.js @@ -29,7 +29,7 @@ * DOMHelpers is a collection of functions used by the DOMAgent exports `eachNode(src, callback)` */ define(function DOMHelpersModule(require, exports, module) { - 'use strict'; + "use strict"; /** Test if the given character is a quote character * {char} source character @@ -145,8 +145,8 @@ define(function DOMHelpersModule(require, exports, module) { function _extractAttributes(content) { // remove the node name and the closing bracket and optional slash - content = content.replace(/^<\S+\s*/, ''); - content = content.replace(/\s*\/?>$/, ''); + content = content.replace(/^<\S+\s*/, ""); + content = content.replace(/\s*\/?>$/, ""); if (content.length === 0) { return; } @@ -205,7 +205,7 @@ define(function DOMHelpersModule(require, exports, module) { } // closed node (/ at the end) - if (content[content.length - 2] === '/') { + if (content[content.length - 2] === "/") { payload.closed = true; } } diff --git a/src/LiveDevelopment/Agents/DOMNode.js b/src/LiveDevelopment/Agents/DOMNode.js index c0d50676132..31927e6c135 100644 --- a/src/LiveDevelopment/Agents/DOMNode.js +++ b/src/LiveDevelopment/Agents/DOMNode.js @@ -33,7 +33,7 @@ * iterated using `each()` or `find()`. `dump` shows the entire tree on the console. */ define(function DOMNodeModule(require, exports, module) { - 'use strict'; + "use strict"; var DOMHelpers = require("LiveDevelopment/Agents/DOMHelpers"); diff --git a/src/LiveDevelopment/Agents/EditAgent.js b/src/LiveDevelopment/Agents/EditAgent.js index 624e308209f..c867e9c711f 100644 --- a/src/LiveDevelopment/Agents/EditAgent.js +++ b/src/LiveDevelopment/Agents/EditAgent.js @@ -30,7 +30,7 @@ * document. */ define(function EditAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); var DOMAgent = require("LiveDevelopment/Agents/DOMAgent"); diff --git a/src/LiveDevelopment/Agents/GotoAgent.js b/src/LiveDevelopment/Agents/GotoAgent.js index 7005e570bb9..1a40553c87d 100644 --- a/src/LiveDevelopment/Agents/GotoAgent.js +++ b/src/LiveDevelopment/Agents/GotoAgent.js @@ -29,7 +29,7 @@ * GotoAgent constructs and responds to the in-browser goto dialog. */ define(function GotoAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); var DOMAgent = require("LiveDevelopment/Agents/DOMAgent"); @@ -54,7 +54,7 @@ define(function GotoAgent(require, exports, module) { * @param {string} URL */ function _fileFromURL(url) { - var comp = url.split('/'); + var comp = url.split("/"); return comp[comp.length - 1]; } @@ -171,7 +171,7 @@ define(function GotoAgent(require, exports, module) { var matches = /^(.*):([^:]+)$/.exec(url); if (matches) { url = matches[1]; - location = matches[2].split(','); + location = matches[2].split(","); if (location.length === 1) { location = parseInt(location[0], 10); } else { diff --git a/src/LiveDevelopment/Agents/HighlightAgent.js b/src/LiveDevelopment/Agents/HighlightAgent.js index 95f897a5351..d9e7fca0286 100644 --- a/src/LiveDevelopment/Agents/HighlightAgent.js +++ b/src/LiveDevelopment/Agents/HighlightAgent.js @@ -30,7 +30,7 @@ * highlight requests, and allows highlighting nodes and rules in the browser. */ define(function HighlightAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); var RemoteAgent = require("LiveDevelopment/Agents/RemoteAgent"); diff --git a/src/LiveDevelopment/Agents/NetworkAgent.js b/src/LiveDevelopment/Agents/NetworkAgent.js index 09e79379641..9cabc7939da 100644 --- a/src/LiveDevelopment/Agents/NetworkAgent.js +++ b/src/LiveDevelopment/Agents/NetworkAgent.js @@ -30,7 +30,7 @@ * `wasURLRequested(url)` to query whether a resource was loaded. */ define(function NetworkAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); diff --git a/src/LiveDevelopment/Agents/RemoteAgent.js b/src/LiveDevelopment/Agents/RemoteAgent.js index df2fad7f257..f00ab972880 100644 --- a/src/LiveDevelopment/Agents/RemoteAgent.js +++ b/src/LiveDevelopment/Agents/RemoteAgent.js @@ -32,7 +32,7 @@ * Inspector named "Remote.EVENT". */ define(function RemoteAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); diff --git a/src/LiveDevelopment/Agents/RemoteFunctions.js b/src/LiveDevelopment/Agents/RemoteFunctions.js index 7db7f89d7f8..07006a94183 100644 --- a/src/LiveDevelopment/Agents/RemoteFunctions.js +++ b/src/LiveDevelopment/Agents/RemoteFunctions.js @@ -31,7 +31,7 @@ * exported functions. */ function RemoteFunctions() { - 'use strict'; + "use strict"; var _body = window.document.getElementsByTagName("body")[0]; // the document body var _sourceHighlight; // the highlighted element in the source diff --git a/src/LiveDevelopment/Agents/ScriptAgent.js b/src/LiveDevelopment/Agents/ScriptAgent.js index e527a5889f2..d6dde99e816 100644 --- a/src/LiveDevelopment/Agents/ScriptAgent.js +++ b/src/LiveDevelopment/Agents/ScriptAgent.js @@ -30,7 +30,7 @@ * interfaces with the remote debugger. */ define(function ScriptAgent(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); var DOMAgent = require("LiveDevelopment/Agents/DOMAgent"); diff --git a/src/LiveDevelopment/Documents/CSSDocument.js b/src/LiveDevelopment/Documents/CSSDocument.js index 6f754e25d01..1f50a614c87 100644 --- a/src/LiveDevelopment/Documents/CSSDocument.js +++ b/src/LiveDevelopment/Documents/CSSDocument.js @@ -46,7 +46,7 @@ * 2nd argument to the listener will be this CSSDocument. */ define(function CSSDocumentModule(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); var CSSAgent = require("LiveDevelopment/Agents/CSSAgent"); diff --git a/src/LiveDevelopment/Documents/HTMLDocument.js b/src/LiveDevelopment/Documents/HTMLDocument.js index 0fe1cc0871a..9b967502447 100644 --- a/src/LiveDevelopment/Documents/HTMLDocument.js +++ b/src/LiveDevelopment/Documents/HTMLDocument.js @@ -42,7 +42,7 @@ * editor. */ define(function HTMLDocumentModule(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); var DOMAgent = require("LiveDevelopment/Agents/DOMAgent"); diff --git a/src/LiveDevelopment/Documents/JSDocument.js b/src/LiveDevelopment/Documents/JSDocument.js index 27df2f4869a..d2cb2cbbd3c 100644 --- a/src/LiveDevelopment/Documents/JSDocument.js +++ b/src/LiveDevelopment/Documents/JSDocument.js @@ -43,7 +43,7 @@ * line is missing. */ define(function JSDocumentModule(require, exports, module) { - 'use strict'; + "use strict"; var Inspector = require("LiveDevelopment/Inspector/Inspector"); var ScriptAgent = require("LiveDevelopment/Agents/ScriptAgent"); diff --git a/src/LiveDevelopment/Inspector/Inspector.js b/src/LiveDevelopment/Inspector/Inspector.js index 7d856f0ab0b..29c0435e926 100644 --- a/src/LiveDevelopment/Inspector/Inspector.js +++ b/src/LiveDevelopment/Inspector/Inspector.js @@ -81,7 +81,7 @@ * that stores all returned values as an object. */ define(function Inspector(require, exports, module) { - 'use strict'; + "use strict"; var _messageId = 1; // id used for remote method calls, auto-incrementing var _messageCallbacks = {}; // {id -> function} for remote method calls diff --git a/src/LiveDevelopment/Inspector/jsdoc.rb b/src/LiveDevelopment/Inspector/jsdoc.rb index 1b7c523ce29..ed4467032a5 100644 --- a/src/LiveDevelopment/Inspector/jsdoc.rb +++ b/src/LiveDevelopment/Inspector/jsdoc.rb @@ -27,14 +27,14 @@ # Required Ruby Gems # json date open-uri -require 'rubygems' -require 'json' -require 'date' -require 'open-uri' +require "rubygems" +require "json" +require "date" +require "open-uri" -#INSPECTOR_URL = 'http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/inspector/Inspector.json' -INSPECTOR_URL = 'Inspector.json' -OUTPUT = 'inspector.html' +#INSPECTOR_URL = "http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/inspector/Inspector.json" +INSPECTOR_URL = "Inspector.json" +OUTPUT = "inspector.html" class NilClass def empty? @@ -53,15 +53,15 @@ def upcaseFirst class JSDoc def typedef(domain, info) - return '[' + typedef(domain, info['items']) + ']' if info['items'] - if info['$ref'] - ref = info['$ref'] - ref = domain + '.' + ref unless ref =~ /\./ - r = "#{ref}" if info['$ref'] - elsif info['enum'] - r = "( #{info['enum'].join ' | '} )" + return "[" + typedef(domain, info['items']) + "]" if info['items'] + if info["$ref"] + ref = info["$ref"] + ref = domain + "." + ref unless ref =~ /\./ + r = "#{ref}" if info["$ref"] + elsif info["enum"] + r = "( #{info['enum'].join " | "} )" else - r = info['type'].upcaseFirst + r = info["type"].upcaseFirst end r end @@ -73,9 +73,9 @@ def initialize(input, output) def open @in = JSON.parse(File.open(@input).read) - @in['domains'].sort! { |a,b| a['domain'] <=> b['domain'] } + @in["domains"].sort! { |a,b| a["domain"] <=> b["domain"] } @version = "#{@in['version']['major']}.#{@in['version']['minor']}" - File.open(@output, 'w') do |out| + File.open(@output, "w") do |out| @out = out yield end @@ -85,7 +85,7 @@ def run open do writeDocument do writeTOC - @in['domains'].each { |domain| writeDomain domain } + @in["domains"].each { |domain| writeDomain domain } end end end @@ -97,41 +97,41 @@ def write(*args) def writeParams(domain, params, prefixLine = false) return unless params write prefixLine if prefixLine - write '