Skip to content

Instantly share code, notes, and snippets.

@vjeux
Created January 15, 2017 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vjeux/4973a6290cd6badd4ef33b30bc2bce9c to your computer and use it in GitHub Desktop.
Save vjeux/4973a6290cd6badd4ef33b30bc2bce9c to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
diff --git a/pkg/commons-atom/ActiveEditorRegistry.js b/pkg/commons-atom/ActiveEditorRegistry.js
index ed71a95..a957228 100644
--- a/pkg/commons-atom/ActiveEditorRegistry.js
+++ b/pkg/commons-atom/ActiveEditorRegistry.js
@@ -121,10 +121,8 @@ export default class ActiveEditorRegistry<T: Provider, V> {
if (editor == null) {
return Observable.of(editor);
}
- return Observable.concat(
- Observable.of(editor),
- this._newProviderEvents.mapTo(editor)
- );
+ return Observable
+ .concat(Observable.of(editor), this._newProviderEvents.mapTo(editor));
});
const results = repeatedEditors.switchMap(editorArg => {
// Necessary so the type refinement holds in the callback later
@@ -153,10 +151,8 @@ export default class ActiveEditorRegistry<T: Provider, V> {
// It's possible that the active provider for an editor changes over time.
// Thus, we have to subscribe to both edits and saves.
return Observable
- .merge(
- eventSources.changesForEditor(editor).map(() => "edit"),
- eventSources.savesForEditor(editor).map(() => "save")
- )
+
+ .merge(eventSources.changesForEditor(editor).map(() => "edit"), eventSources.savesForEditor(editor).map(() => "save"))
.flatMap(event => {
const provider = this._getProviderForEditor(editor);
if (provider != null) {
diff --git a/pkg/commons-atom/arcanist.js b/pkg/commons-atom/arcanist.js
index 89332b2..7346f99 100644
--- a/pkg/commons-atom/arcanist.js
+++ b/pkg/commons-atom/arcanist.js
@@ -39,10 +39,8 @@ export function findArcProjectIdAndDirectory(
.then(result => {
// Store the path in local storage for `getLastProjectPath`.
if (result != null) {
- localStorage.setItem(
- `${STORAGE_KEY}.${result.projectId}`,
- result.directory
- );
+ localStorage
+ .setItem(`${STORAGE_KEY}.${result.projectId}`, result.directory);
}
arcInfoResultCache.set(src, result);
return result;
diff --git a/pkg/commons-atom/browser-cookies.js b/pkg/commons-atom/browser-cookies.js
index 77f7b3a..aaf6052 100644
--- a/pkg/commons-atom/browser-cookies.js
+++ b/pkg/commons-atom/browser-cookies.js
@@ -18,21 +18,18 @@ export default {
getCookies(domain: string): Promise<{ [key: string]: string }> {
return new Promise((resolve, reject) => {
// $FlowFixMe: Add types for electron$WebContents
- remote.getCurrentWindow().webContents.session.cookies.get({ domain }, (
- error,
- cookies
- ) =>
- {
- if (error) {
- reject(error);
- } else {
- const cookieMap = {};
- cookies.forEach(cookie => {
- cookieMap[cookie.name] = cookie.value;
- });
- resolve(cookieMap);
- }
- });
+ remote
+ .getCurrentWindow().webContents.session.cookies.get({ domain }, (error, cookies) => {
+ if (error) {
+ reject(error);
+ } else {
+ const cookieMap = {};
+ cookies.forEach(cookie => {
+ cookieMap[cookie.name] = cookie.value;
+ });
+ resolve(cookieMap);
+ }
+ });
});
},
setCookie(
@@ -43,16 +40,14 @@ export default {
): Promise<void> {
return new Promise((resolve, reject) => {
// $FlowFixMe: Add types for electron$WebContents
- remote.getCurrentWindow().webContents.session.cookies.set(
- { url, domain, name, value },
- error => {
- if (error) {
- reject(error);
- } else {
- resolve();
- }
+ remote
+ .getCurrentWindow().webContents.session.cookies.set({ url, domain, name, value }, error => {
+ if (error) {
+ reject(error);
+ } else {
+ resolve();
}
- );
+ });
});
}
}
diff --git a/pkg/commons-atom/consumeFirstProvider.js b/pkg/commons-atom/consumeFirstProvider.js
index 8c9bb0c..9c0d1c1 100644
--- a/pkg/commons-atom/consumeFirstProvider.js
+++ b/pkg/commons-atom/consumeFirstProvider.js
@@ -18,15 +18,12 @@ export default function consumeFirstProvider(
version: string = "0.0.0"
): Promise<any> {
return new Promise((resolve, reject) => {
- const subscription = atom.packages.serviceHub.consume(
- keyPath,
- version,
- provider => {
- process.nextTick(() => {
- resolve(provider);
- subscription.dispose();
- });
- }
- );
+ const subscription = atom.packages.serviceHub
+ .consume(keyPath, version, provider => {
+ process.nextTick(() => {
+ resolve(provider);
+ subscription.dispose();
+ });
+ });
});
}
diff --git a/pkg/commons-atom/debounced.js b/pkg/commons-atom/debounced.js
index ffaed41..7ee9bcf 100644
--- a/pkg/commons-atom/debounced.js
+++ b/pkg/commons-atom/debounced.js
@@ -52,11 +52,11 @@ export function editorChangesDebounced(
editor: atom$TextEditor,
debounceInterval: number = DEFAULT_EDITOR_DEBOUNCE_INTERVAL_MS
): Observable<void> {
- return // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is
+ return;
+ // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is
// configurable.
- observableFromSubscribeFunction(
- callback => editor.onDidChange(callback)
- ).debounceTime(debounceInterval);
+ observableFromSubscribeFunction(callback => editor.onDidChange(callback))
+ .debounceTime(debounceInterval);
}
export function editorScrollTopDebounced(
@@ -76,9 +76,8 @@ export function observeTextEditorsPositions(
editorDebounceInterval: number = DEFAULT_EDITOR_DEBOUNCE_INTERVAL_MS,
positionDebounceInterval: number = DEFAULT_POSITION_DEBOUNCE_INTERVAL_MS
): Observable<?EditorPosition> {
- return observeActiveEditorsDebounced(
- editorDebounceInterval
- ).switchMap(editor => {
+ return observeActiveEditorsDebounced(editorDebounceInterval)
+ .switchMap(editor => {
return editor == null
? Observable.of(null)
: getCursorPositions(editor)
diff --git a/pkg/commons-atom/spec/ActiveEditorRegistry-spec.js b/pkg/commons-atom/spec/ActiveEditorRegistry-spec.js
index 142db01..f42f017 100644
--- a/pkg/commons-atom/spec/ActiveEditorRegistry-spec.js
+++ b/pkg/commons-atom/spec/ActiveEditorRegistry-spec.js
@@ -153,10 +153,8 @@ describe("ActiveEditorRegistry", () => {
config.updateOnEdit = false;
initializeService();
// Have to re-add this since the re-initialization kills it
- activeEditorRegistry.consumeProvider({
- priority: 10,
- grammarScopes: [ "text.plain.null-grammar" ]
- });
+ activeEditorRegistry
+ .consumeProvider({ priority: 10, grammarScopes: [ "text.plain.null-grammar" ] });
});
it("should generate and respond to save events", () => {
@@ -189,15 +187,10 @@ describe("ActiveEditorRegistry", () => {
beforeEach(() => {
initializeService();
// Have to re-add this since the re-initialization kills it
- activeEditorRegistry.consumeProvider({
- priority: 10,
- grammarScopes: [ "text.plain.null-grammar" ]
- });
- activeEditorRegistry.consumeProvider({
- priority: 10,
- grammarScopes: [ "source.cpp" ],
- updateOnEdit: false
- });
+ activeEditorRegistry
+ .consumeProvider({ priority: 10, grammarScopes: [ "text.plain.null-grammar" ] });
+ activeEditorRegistry
+ .consumeProvider({ priority: 10, grammarScopes: [ "source.cpp" ], updateOnEdit: false });
spyOn(editor2, "getGrammar").andReturn({ scopeName: "source.cpp" });
});
diff --git a/pkg/commons-atom/spec/ContextMenu-spec.js b/pkg/commons-atom/spec/ContextMenu-spec.js
index 8edc367..d0ff4b2 100644
--- a/pkg/commons-atom/spec/ContextMenu-spec.js
+++ b/pkg/commons-atom/spec/ContextMenu-spec.js
@@ -227,9 +227,8 @@ describe("ContextMenu", () => {
function getTemplateForContextMenu(): Array<atom$ContextMenuItem> {
// $FlowIgnore: This relies on an non-public API of Atom's ContextMenuManager.
- const template: Array<atom$ContextMenuItem> = atom.contextMenu.templateForElement(
- div
- );
+ const template: Array<atom$ContextMenuItem> = atom.contextMenu
+ .templateForElement(div);
const lastItem = template[template.length - 1];
// Unfortunately, Atom does not give us a way to exclude the 'Inspect Element' item from
// a custom context menu. For now, we exclude it from the template to reduce noise in our
diff --git a/pkg/commons-atom/spec/browser-cookies.js b/pkg/commons-atom/spec/browser-cookies.js
index 46e6aff..3783af1 100644
--- a/pkg/commons-atom/spec/browser-cookies.js
+++ b/pkg/commons-atom/spec/browser-cookies.js
@@ -28,12 +28,8 @@ describe("browser", () => {
const now = Date.now().toString();
const cookiesBefore = await browserCookies.getCookies("example.com");
expect(cookiesBefore.now).not.toBe(now);
- await browserCookies.setCookie(
- "http://example.com",
- "example.com",
- "now",
- now
- );
+ await browserCookies
+ .setCookie("http://example.com", "example.com", "now", now);
const cookiesAfter = await browserCookies.getCookies("example.com");
expect(cookiesAfter.now).toBe(now);
})
diff --git a/pkg/commons-atom/spec/observe-grammar-for-text-editors-spec.js b/pkg/commons-atom/spec/observe-grammar-for-text-editors-spec.js
index e98fee0..f36c282 100644
--- a/pkg/commons-atom/spec/observe-grammar-for-text-editors-spec.js
+++ b/pkg/commons-atom/spec/observe-grammar-for-text-editors-spec.js
@@ -20,13 +20,11 @@ describe("observeGrammarForTextEditors", () => {
observeGrammarForTextEditors.__reset__();
// The grammar registry is cleared automatically after Atom 1.3.0+
atom.grammars.clear();
- atom.grammars.loadGrammarSync(
- nuclideUri.join(__dirname, "grammars/objective-c.cson")
- );
+ atom
+ .grammars.loadGrammarSync(nuclideUri.join(__dirname, "grammars/objective-c.cson"));
objcGrammar = nullthrows(atom.grammars.grammarForScopeName("source.objc"));
- atom.grammars.loadGrammarSync(
- nuclideUri.join(__dirname, "grammars/javascript.cson")
- );
+ atom
+ .grammars.loadGrammarSync(nuclideUri.join(__dirname, "grammars/javascript.cson"));
jsGrammar = nullthrows(atom.grammars.grammarForScopeName("source.js"));
});
diff --git a/pkg/commons-atom/spec/observe-language-text-editors-spec.js b/pkg/commons-atom/spec/observe-language-text-editors-spec.js
index 5747b82..11947d3 100644
--- a/pkg/commons-atom/spec/observe-language-text-editors-spec.js
+++ b/pkg/commons-atom/spec/observe-language-text-editors-spec.js
@@ -22,19 +22,16 @@ describe("observeLanguageTextEditors", () => {
beforeEach(() => {
observeGrammarForTextEditors.__reset__();
- atom.grammars.loadGrammarSync(
- nuclideUri.join(__dirname, "grammars/objective-c.cson")
- );
+ atom
+ .grammars.loadGrammarSync(nuclideUri.join(__dirname, "grammars/objective-c.cson"));
objcGrammar = nullthrows(atom.grammars.grammarForScopeName("source.objc"));
- atom.grammars.loadGrammarSync(
- nuclideUri.join(__dirname, "grammars/java.cson")
- );
+ atom
+ .grammars.loadGrammarSync(nuclideUri.join(__dirname, "grammars/java.cson"));
javaGrammar = nullthrows(atom.grammars.grammarForScopeName("source.java"));
- atom.grammars.loadGrammarSync(
- nuclideUri.join(__dirname, "grammars/javascript.cson")
- );
+ atom
+ .grammars.loadGrammarSync(nuclideUri.join(__dirname, "grammars/javascript.cson"));
jsGrammar = nullthrows(atom.grammars.grammarForScopeName("source.js"));
nullGrammar = nullthrows(
atom.grammars.grammarForScopeName("text.plain.null-grammar")
diff --git a/pkg/commons-atom/spec/register-grammar-spec.js b/pkg/commons-atom/spec/register-grammar-spec.js
index b74e824..df15b64 100644
--- a/pkg/commons-atom/spec/register-grammar-spec.js
+++ b/pkg/commons-atom/spec/register-grammar-spec.js
@@ -14,9 +14,8 @@ import registerGrammar from "../register-grammar";
describe("registerGrammar", () => {
it("works", () => {
waitsForPromise(async () => {
- atom.grammars.loadGrammarSync(
- nuclideUri.join(__dirname, "grammars/javascript.cson")
- );
+ atom
+ .grammars.loadGrammarSync(nuclideUri.join(__dirname, "grammars/javascript.cson"));
registerGrammar("source.js", [ "cats" ]);
const textEditor = await atom.workspace.open("file.cats");
expect(textEditor.getGrammar().scopeName).toBe("source.js");
diff --git a/pkg/commons-atom/streamProcessToConsoleMessages.js b/pkg/commons-atom/streamProcessToConsoleMessages.js
index 4154d47..6bc2c43 100644
--- a/pkg/commons-atom/streamProcessToConsoleMessages.js
+++ b/pkg/commons-atom/streamProcessToConsoleMessages.js
@@ -46,22 +46,16 @@ export function pipeProcessMessagesToConsole(
case "exit":
if (processMessage.exitCode === 0) {
// TODO(asriram) t13831340 Check if console was initially open, if yes then dont close here
- progressUpdates.next({
- text: `${processName} completed successfully`,
- level: "success"
- });
- atom.notifications.addSuccess("Operation completed successfully", {
- detail: `${processName} finished`
- });
+ progressUpdates
+ .next({ text: `${processName} completed successfully`, level: "success" });
+ atom
+ .notifications.addSuccess("Operation completed successfully", { detail: `${processName} finished` });
} else {
// Keep console open
- progressUpdates.next({
- text: `${processName} exited with non zero code`,
- level: "error"
- });
- atom.notifications.addError("Operation Failed", {
- detail: "Check console for output"
- });
+ progressUpdates
+ .next({ text: `${processName} exited with non zero code`, level: "error" });
+ atom
+ .notifications.addError("Operation Failed", { detail: "Check console for output" });
}
break;
}
diff --git a/pkg/commons-atom/testHelpers.js b/pkg/commons-atom/testHelpers.js
index 864c234..99fd471 100644
--- a/pkg/commons-atom/testHelpers.js
+++ b/pkg/commons-atom/testHelpers.js
@@ -172,7 +172,8 @@ export function getMountedReactRootNames(): Array<string> {
ReactComponentTreeHookPath != null,
"ReactComponentTreeHook could not be found in the module cache."
);
- const ReactComponentTreeHook = require.cache[ReactComponentTreeHookPath].exports;
+ const ReactComponentTreeHook = require.cache[ReactComponentTreeHookPath]
+ .exports;
const reactRootNames = ReactComponentTreeHook.getRootIDs().map(rootID => {
return ReactComponentTreeHook.getDisplayName(rootID);
});
diff --git a/pkg/commons-atom/text-editor.js b/pkg/commons-atom/text-editor.js
index 6ecdada..d1fdc94 100644
--- a/pkg/commons-atom/text-editor.js
+++ b/pkg/commons-atom/text-editor.js
@@ -89,9 +89,8 @@ export function getCursorPositions(
invariant(cursor != null);
return Observable.merge(
Observable.of(cursor.getBufferPosition()),
- observableFromSubscribeFunction(
- cursor.onDidChangePosition.bind(cursor)
- ).map(event => event.newBufferPosition)
+ observableFromSubscribeFunction(cursor.onDidChangePosition.bind(cursor))
+ .map(event => event.newBufferPosition)
);
}
@@ -181,9 +180,8 @@ export function observeTextEditors(
export function isValidTextEditor(item: mixed): boolean {
// eslint-disable-next-line nuclide-internal/atom-apis
if (atom.workspace.isTextEditor(item)) {
- return !nuclideUri.isBrokenDeserializedUri(
- ((item: any): atom$TextEditor).getPath()
- );
+ return !nuclideUri
+ .isBrokenDeserializedUri(((item: any): atom$TextEditor).getPath());
}
return false;
}
diff --git a/pkg/commons-atom/vcs.js b/pkg/commons-atom/vcs.js
index 5a5d3b0..420ace8 100644
--- a/pkg/commons-atom/vcs.js
+++ b/pkg/commons-atom/vcs.js
@@ -201,9 +201,8 @@ async function hgActionToPath(
}
const repository = repositoryForPath(nodePath);
if (repository == null || repository.getType() !== "hg") {
- atom.notifications.addError(
- `Cannot ${actionName} a non-mercurial repository path`
- );
+ atom
+ .notifications.addError(`Cannot ${actionName} a non-mercurial repository path`);
return;
}
const hgRepository: HgRepositoryClient = (repository: any);
@@ -224,8 +223,8 @@ async function hgActionToPath(
export function getHgRepositories(): Set<HgRepositoryClient> {
return new Set(
- (// Flow doesn't understand that this filters to hg repositories only, so cast through `any`
- arrayCompact(atom.project.getRepositories()).filter(
+ // Flow doesn't understand that this filters to hg repositories only, so cast through `any`
+ (arrayCompact(atom.project.getRepositories()).filter(
repository => repository.getType() === "hg"
): Array<any>)
);
@@ -340,13 +339,8 @@ export function getMultiRootFileChanges(
const sortedFilePaths = Array
.from(fileChanges.entries())
- .sort(
- ([ filePath1 ], [ filePath2 ]) =>
- nuclideUri
- .basename(filePath1)
- .toLowerCase()
- .localeCompare(nuclideUri.basename(filePath2).toLowerCase())
- );
+
+ .sort(([ filePath1 ], [ filePath2 ]) => nuclideUri.basename(filePath1).toLowerCase().localeCompare(nuclideUri.basename(filePath2).toLowerCase()));
const changedRoots = new Map(
roots.map(root => {
diff --git a/pkg/commons-node/observable.js b/pkg/commons-node/observable.js
index 10be73f..5de6ee3 100644
--- a/pkg/commons-node/observable.js
+++ b/pkg/commons-node/observable.js
@@ -32,21 +32,17 @@ export function splitStream(input: Observable<string>): Observable<string> {
}
}
- return input.subscribe(
- value => {
- const lines = (current + value).split("\n");
- current = lines.pop();
- lines.forEach(line => observer.next(line + "\n"));
- },
- error => {
- onEnd();
- observer.error(error);
- },
- () => {
- onEnd();
- observer.complete();
- }
- );
+ return input.subscribe(value => {
+ const lines = (current + value).split("\n");
+ current = lines.pop();
+ lines.forEach(line => observer.next(line + "\n"));
+ }, error => {
+ onEnd();
+ observer.error(error);
+ }, () => {
+ onEnd();
+ observer.complete();
+ });
});
}
@@ -64,25 +60,21 @@ export function bufferUntil<T>(
buffer = null;
}
};
- return stream.subscribe(
- x => {
- if (buffer == null) {
- buffer = [];
- }
- buffer.push(x);
- if (condition(x)) {
- flush();
- }
- },
- err => {
- flush();
- observer.error(err);
- },
- () => {
+ return stream.subscribe(x => {
+ if (buffer == null) {
+ buffer = [];
+ }
+ buffer.push(x);
+ if (condition(x)) {
flush();
- observer.complete();
}
- );
+ }, err => {
+ flush();
+ observer.error(err);
+ }, () => {
+ flush();
+ observer.complete();
+ });
});
}
diff --git a/pkg/commons-node/process.js b/pkg/commons-node/process.js
index 60cdc57..f87ff2b 100644
--- a/pkg/commons-node/process.js
+++ b/pkg/commons-node/process.js
@@ -37,11 +37,8 @@ function logCall(duration, command, args) {
// Trim the history once in a while, to avoid doing expensive array
// manipulation all the time after we reached the end of the history
if (loggedCalls.length > MAX_LOGGED_CALLS) {
- loggedCalls.splice(0, loggedCalls.length - PREVERVED_HISTORY_CALLS, {
- time: new Date(),
- duration: 0,
- command: "... history stripped ..."
- });
+ loggedCalls
+ .splice(0, loggedCalls.length - PREVERVED_HISTORY_CALLS, { time: new Date(), duration: 0, command: "... history stripped ..." });
}
loggedCalls.push({
duration,
@@ -410,11 +407,8 @@ function observeProcessExitMessage(
process: child_process$ChildProcess
): Observable<ProcessExitMessage> {
return Observable
- .fromEvent(process, "exit", (exitCode: ?number, signal: ?string) => ({
- kind: "exit",
- exitCode,
- signal
- }))
+
+ .fromEvent(process, "exit", (exitCode: ?number, signal: ?string) => ({ kind: "exit", exitCode, signal }))
.filter(message => message.signal !== "SIGUSR1")
.take(1);
}
@@ -439,10 +433,8 @@ export function getOutputStream(
return Observable.defer(() => {
// We need to start listening for the exit event immediately, but defer emitting it until the
// (buffered) output streams end.
- const exit = observeProcessExit(
- () => process,
- killTreeOnComplete
- ).publishReplay();
+ const exit = observeProcessExit(() => process, killTreeOnComplete)
+ .publishReplay();
const exitSub = exit.connect();
const error = Observable
@@ -452,12 +444,10 @@ export function getOutputStream(
// This utility, however, treats the exit event as stream-ending, which helps us to avoid easy
// bugs. We give a short (100ms) timeout for the stdout and stderr streams to close.
const close = exit.delay(100);
- const stdout = splitStream(
- observeStream(process.stdout).takeUntil(close)
- ).map(data => ({ kind: "stdout", data }));
- const stderr = splitStream(
- observeStream(process.stderr).takeUntil(close)
- ).map(data => ({ kind: "stderr", data }));
+ const stdout = splitStream(observeStream(process.stdout).takeUntil(close))
+ .map(data => ({ kind: "stdout", data }));
+ const stderr = splitStream(observeStream(process.stderr).takeUntil(close))
+ .map(data => ({ kind: "stderr", data }));
return takeWhileInclusive(
Observable.merge(Observable.merge(stdout, stderr).concat(exit), error),
@@ -705,10 +695,8 @@ export async function getOriginalEnvironment(): Promise<Object> {
// envVar should look like A=value_of_A
const equalIndex = envVar.indexOf("=");
if (equalIndex !== -1) {
- cachedOriginalEnvironment[envVar.substring(
- 0,
- equalIndex
- )] = envVar.substring(equalIndex + 1);
+ cachedOriginalEnvironment[envVar.substring(0, equalIndex)] = envVar
+ .substring(equalIndex + 1);
}
}
} else {
diff --git a/pkg/commons-node/spec/ScribeProcess-spec.js b/pkg/commons-node/spec/ScribeProcess-spec.js
index 41a16f6..1511d51 100644
--- a/pkg/commons-node/spec/ScribeProcess-spec.js
+++ b/pkg/commons-node/spec/ScribeProcess-spec.js
@@ -86,9 +86,8 @@ describe("scribe_cat test suites", () => {
const localScribeProcess = scribeProcess = new ScribeProcess("test");
const firstPart = "A nuclide is an atomic species".split(" ");
- const secondPart = "characterized by the specific constitution of its nucleus.".split(
- " "
- );
+ const secondPart = "characterized by the specific constitution of its nucleus."
+ .split(" ");
waitsForPromise(async () => {
firstPart.map(message => localScribeProcess.write(message));
diff --git a/pkg/commons-node/spec/observable-spec.js b/pkg/commons-node/spec/observable-spec.js
index 7699d1f..dbf5726 100644
--- a/pkg/commons-node/spec/observable-spec.js
+++ b/pkg/commons-node/spec/observable-spec.js
@@ -251,14 +251,10 @@ describe("reconcileSetDiffs", () => {
const disposables = { a: createDisposable(), b: createDisposable() };
const addAction = item => disposables[item.key];
reconcileSetDiffs(diffs, addAction, x => x.key);
- diffs.next({
- added: new Set([ { key: "a" }, { key: "b" } ]),
- removed: new Set()
- });
- diffs.next({
- added: new Set(),
- removed: new Set([ { key: "a" }, { key: "b" } ])
- });
+ diffs
+ .next({ added: new Set([ { key: "a" }, { key: "b" } ]), removed: new Set() });
+ diffs
+ .next({ added: new Set(), removed: new Set([ { key: "a" }, { key: "b" } ]) });
expect(disposables.a.dispose).toHaveBeenCalled();
expect(disposables.b.dispose).toHaveBeenCalled();
}
diff --git a/pkg/commons-node/spec/wootr-spec.js b/pkg/commons-node/spec/wootr-spec.js
index 3047334..d2fd60e 100644
--- a/pkg/commons-node/spec/wootr-spec.js
+++ b/pkg/commons-node/spec/wootr-spec.js
@@ -26,30 +26,14 @@ describe("wootr", () => {
it("should combine adjacent runs", () => {
const wstring = new WString(1);
- wstring.insert(1, {
- startId: { site: 1, h: 1 },
- visible: true,
- startDegree: 1,
- length: 1
- });
- wstring.insert(2, {
- startId: { site: 1, h: 2 },
- visible: true,
- startDegree: 2,
- length: 1
- });
- wstring.insert(3, {
- startId: { site: 1, h: 3 },
- visible: true,
- startDegree: 3,
- length: 1
- });
- wstring.insert(4, {
- startId: { site: 1, h: 4 },
- visible: true,
- startDegree: 4,
- length: 1
- });
+ wstring
+ .insert(1, { startId: { site: 1, h: 1 }, visible: true, startDegree: 1, length: 1 });
+ wstring
+ .insert(2, { startId: { site: 1, h: 2 }, visible: true, startDegree: 2, length: 1 });
+ wstring
+ .insert(3, { startId: { site: 1, h: 3 }, visible: true, startDegree: 3, length: 1 });
+ wstring
+ .insert(4, { startId: { site: 1, h: 4 }, visible: true, startDegree: 4, length: 1 });
expect(
wstring._string[1]
@@ -60,18 +44,10 @@ describe("wootr", () => {
it("should append run when inserted after incompatible run", () => {
const wstring = new WString(1);
- wstring.insert(1, {
- startId: { site: 1, h: 1 },
- visible: true,
- startDegree: 1,
- length: 1
- });
- wstring.insert(2, {
- startId: { site: 2, h: 1 },
- visible: true,
- startDegree: 2,
- length: 1
- });
+ wstring
+ .insert(1, { startId: { site: 1, h: 1 }, visible: true, startDegree: 1, length: 1 });
+ wstring
+ .insert(2, { startId: { site: 2, h: 1 }, visible: true, startDegree: 2, length: 1 });
expect(
wstring._string[1]
@@ -87,30 +63,14 @@ describe("wootr", () => {
it("should split runs when inserted inside a run", () => {
const wstring = new WString(1);
- wstring.insert(1, {
- startId: { site: 1, h: 1 },
- visible: true,
- startDegree: 1,
- length: 1
- });
- wstring.insert(2, {
- startId: { site: 1, h: 2 },
- visible: true,
- startDegree: 2,
- length: 1
- });
- wstring.insert(2, {
- startId: { site: 1, h: 3 },
- visible: true,
- startDegree: 3,
- length: 1
- });
- wstring.insert(3, {
- startId: { site: 1, h: 4 },
- visible: true,
- startDegree: 4,
- length: 1
- });
+ wstring
+ .insert(1, { startId: { site: 1, h: 1 }, visible: true, startDegree: 1, length: 1 });
+ wstring
+ .insert(2, { startId: { site: 1, h: 2 }, visible: true, startDegree: 2, length: 1 });
+ wstring
+ .insert(2, { startId: { site: 1, h: 3 }, visible: true, startDegree: 3, length: 1 });
+ wstring
+ .insert(3, { startId: { site: 1, h: 4 }, visible: true, startDegree: 4, length: 1 });
expect(
wstring._string[1]
@@ -133,37 +93,17 @@ describe("wootr", () => {
() => {
const wstring = new WString(1);
const wstring2 = new WString(2);
- wstring.insert(1, {
- startId: { site: 1, h: 1 },
- visible: true,
- startDegree: 1,
- length: 1
- });
- wstring.insert(2, {
- startId: { site: 1, h: 2 },
- visible: true,
- startDegree: 2,
- length: 1
- });
- wstring.insert(3, {
- startId: { site: 1, h: 3 },
- visible: true,
- startDegree: 3,
- length: 1
- });
- wstring.insert(4, {
- startId: { site: 1, h: 4 },
- visible: true,
- startDegree: 4,
- length: 1
- });
-
- wstring2.insert(1, {
- startId: { site: 1, h: 1 },
- visible: true,
- startDegree: 1,
- length: 4
- });
+ wstring
+ .insert(1, { startId: { site: 1, h: 1 }, visible: true, startDegree: 1, length: 1 });
+ wstring
+ .insert(2, { startId: { site: 1, h: 2 }, visible: true, startDegree: 2, length: 1 });
+ wstring
+ .insert(3, { startId: { site: 1, h: 3 }, visible: true, startDegree: 3, length: 1 });
+ wstring
+ .insert(4, { startId: { site: 1, h: 4 }, visible: true, startDegree: 4, length: 1 });
+
+ wstring2
+ .insert(1, { startId: { site: 1, h: 1 }, visible: true, startDegree: 1, length: 4 });
expect(wstring2._string).toEqual(wstring._string);
}
@@ -545,9 +485,8 @@ describe("wootr", () => {
const wstring = new WString(1);
const wstring2 = new WString(2);
- wstring2.receive(
- JSON.parse(JSON.stringify(wstring.genInsert(0, "text")))
- );
+ wstring2
+ .receive(JSON.parse(JSON.stringify(wstring.genInsert(0, "text"))));
expect(wstring2._string).toEqual(wstring._string);
diff --git a/pkg/commons-node/string.js b/pkg/commons-node/string.js
index 164da1d..3ab1f71 100644
--- a/pkg/commons-node/string.js
+++ b/pkg/commons-node/string.js
@@ -12,7 +12,8 @@ import invariant from "assert";
import { parse } from "shell-quote";
export function stringifyError(error: Error): string {
- return `name: ${error.name}, message: ${error.message}, stack: ${error.stack}.`;
+ return `name: ${error.name}, message: ${error.message}, stack: ${error
+ .stack}.`;
}
// As of Flow v0.28, Flow does not alllow implicit string coercion of null or undefined. Use this to
diff --git a/pkg/commons-node/tasks.js b/pkg/commons-node/tasks.js
index e24e1e9..45a2650 100644
--- a/pkg/commons-node/tasks.js
+++ b/pkg/commons-node/tasks.js
@@ -83,16 +83,14 @@ export function observableFromTask(task: Task): Observable<TaskEvent> {
let finished = false;
const events = typeof task.onProgress === "function"
- ? observableFromSubscribeFunction(
- task.onProgress.bind(task)
- ).map(progress => ({ type: "progress", progress }))
+ ? observableFromSubscribeFunction(task.onProgress.bind(task))
+ .map(progress => ({ type: "progress", progress }))
: Observable.never();
const completeEvents = observableFromSubscribeFunction(
task.onDidComplete.bind(task)
);
- const errors = observableFromSubscribeFunction(
- task.onDidError.bind(task)
- ).switchMap(Observable.throw);
+ const errors = observableFromSubscribeFunction(task.onDidError.bind(task))
+ .switchMap(Observable.throw);
const subscription = new Subscription();
diff --git a/pkg/commons-node/wootr.js b/pkg/commons-node/wootr.js
index 609ec87..c257614 100644
--- a/pkg/commons-node/wootr.js
+++ b/pkg/commons-node/wootr.js
@@ -59,16 +59,8 @@ export class WString {
this._ops = [];
if (length > 0) {
this._localId = length;
- this.insert(
- 1,
- {
- startId: { site: siteId, h: 1 },
- visible: true,
- startDegree: 1,
- length
- },
- length
- );
+ this
+ .insert(1, { startId: { site: siteId, h: 1 }, visible: true, startDegree: 1, length }, length);
}
}
@@ -185,12 +177,8 @@ export class WString {
const original = this._string[originalIndex];
if (offset > 0) {
- runs.push({
- startId: { site: original.startId.site, h: original.startId.h },
- visible: original.visible,
- length: offset,
- startDegree: original.startDegree
- });
+ runs
+ .push({ startId: { site: original.startId.site, h: original.startId.h }, visible: original.visible, length: offset, startDegree: original.startDegree });
}
runs.push({
@@ -201,15 +189,8 @@ export class WString {
});
if (offset < original.length - 1) {
- runs.push({
- startId: {
- site: original.startId.site,
- h: original.startId.h + offset + 1
- },
- visible: original.visible,
- length: original.length - (offset + 1),
- startDegree: original.startDegree + offset + 1
- });
+ runs
+ .push({ startId: { site: original.startId.site, h: original.startId.h + offset + 1 }, visible: original.visible, length: original.length - (offset + 1), startDegree: original.startDegree + offset + 1 });
}
this._string.splice(originalIndex, 1, ...runs);
diff --git a/pkg/hyperclick/lib/HyperclickForTextEditor.js b/pkg/hyperclick/lib/HyperclickForTextEditor.js
index e2a0644..2cfc139 100644
--- a/pkg/hyperclick/lib/HyperclickForTextEditor.js
+++ b/pkg/hyperclick/lib/HyperclickForTextEditor.js
@@ -377,10 +377,8 @@ export default class HyperclickForTextEditor {
const marker = this._textEditor.markBufferRange(markerRange, {
invalidate: "never"
});
- this._textEditor.decorateMarker(marker, {
- type: "highlight",
- class: "hyperclick"
- });
+ this
+ ._textEditor.decorateMarker(marker, { type: "highlight", class: "hyperclick" });
return marker;
});
}
diff --git a/pkg/nuclide-adb-logcat/lib/createMessageStream.js b/pkg/nuclide-adb-logcat/lib/createMessageStream.js
index 63eea1b..6e3220f 100644
--- a/pkg/nuclide-adb-logcat/lib/createMessageStream.js
+++ b/pkg/nuclide-adb-logcat/lib/createMessageStream.js
@@ -90,10 +90,8 @@ function filter(messages: Observable<Message>): Observable<Message> {
try {
return new RegExp(source);
} catch (err) {
- atom.notifications.addError(
- "The nuclide-adb-logcat.whitelistedTags setting contains an invalid regular expression" +
- " string. Fix it in your Atom settings."
- );
+ atom
+ .notifications.addError("The nuclide-adb-logcat.whitelistedTags setting contains an invalid regular expression" + " string. Fix it in your Atom settings.");
return /.*/;
}
});
diff --git a/pkg/nuclide-adb-logcat/lib/createProcessStream.js b/pkg/nuclide-adb-logcat/lib/createProcessStream.js
index 7b98f71..d4405be 100644
--- a/pkg/nuclide-adb-logcat/lib/createProcessStream.js
+++ b/pkg/nuclide-adb-logcat/lib/createProcessStream.js
@@ -20,7 +20,8 @@ export function createProcessStream(): Observable<string> {
.skipUntil(Observable.interval(1000).take(1));
const otherEvents = processEvents.filter(event => event.kind !== "stdout");
- return // Only get the text from stdout.
+ return;
+ // Only get the text from stdout.
compact(
Observable
.merge(stdoutEvents, otherEvents)
diff --git a/pkg/nuclide-analytics/lib/main.js b/pkg/nuclide-analytics/lib/main.js
index cb2940c..384cc5e 100644
--- a/pkg/nuclide-analytics/lib/main.js
+++ b/pkg/nuclide-analytics/lib/main.js
@@ -114,16 +114,13 @@ export function trackTiming<T>(eventName: string, operation: () => T): T {
// Atom uses a different Promise implementation than Nuclide, so the following is not true:
// invariant(result instanceof Promise);
// For the method returning a Promise, track the time after the promise is resolved/rejected.
- return (result: any).then(
- value => {
- tracker.onSuccess();
- return value;
- },
- reason => {
- tracker.onError(reason instanceof Error ? reason : new Error(reason));
- return Promise.reject(reason);
- }
- );
+ return (result: any).then(value => {
+ tracker.onSuccess();
+ return value;
+ }, reason => {
+ tracker.onError(reason instanceof Error ? reason : new Error(reason));
+ return Promise.reject(reason);
+ });
} else {
tracker.onSuccess();
return result;
diff --git a/pkg/nuclide-arcanist-rpc/spec/arcanist-base-spec.js b/pkg/nuclide-arcanist-rpc/spec/arcanist-base-spec.js
index 95b0d23..37587f1 100644
--- a/pkg/nuclide-arcanist-rpc/spec/arcanist-base-spec.js
+++ b/pkg/nuclide-arcanist-rpc/spec/arcanist-base-spec.js
@@ -33,16 +33,8 @@ describe("nuclide-arcanist-rpc", () => {
file2Path = nuclideUri.join(rootPath, "file2");
nestedPath = nuclideUri.join(rootPath, "nested-project");
- await Promise.all([
- fsPromise.rename(
- nuclideUri.join(rootPath, ".arcconfig.test"),
- nuclideUri.join(rootPath, ".arcconfig")
- ),
- fsPromise.rename(
- nuclideUri.join(nestedPath, ".arcconfig.test"),
- nuclideUri.join(nestedPath, ".arcconfig")
- )
- ]);
+ await Promise
+ .all([ fsPromise.rename(nuclideUri.join(rootPath, ".arcconfig.test"), nuclideUri.join(rootPath, ".arcconfig")), fsPromise.rename(nuclideUri.join(nestedPath, ".arcconfig.test"), nuclideUri.join(nestedPath, ".arcconfig")) ]);
});
});
diff --git a/pkg/nuclide-arcanist/lib/ArcBuildSystem.js b/pkg/nuclide-arcanist/lib/ArcBuildSystem.js
index 05d61f0..470e2fa 100644
--- a/pkg/nuclide-arcanist/lib/ArcBuildSystem.js
+++ b/pkg/nuclide-arcanist/lib/ArcBuildSystem.js
@@ -61,9 +61,8 @@ export default class ArcBuildSystem {
if (this._tasks == null) {
this._tasks = Observable.concat(
Observable.of(this._model.getTaskList()),
- observableFromSubscribeFunction(
- this._model.onChange.bind(this._model)
- ).map(() => this._model.getTaskList())
+ observableFromSubscribeFunction(this._model.onChange.bind(this._model))
+ .map(() => this._model.getTaskList())
);
}
return new UniversalDisposable(this._tasks.subscribe({ next: cb }));
diff --git a/pkg/nuclide-arcanist/lib/ArcanistDiagnosticsProvider.js b/pkg/nuclide-arcanist/lib/ArcanistDiagnosticsProvider.js
index 676dfb8..ae62082 100644
--- a/pkg/nuclide-arcanist/lib/ArcanistDiagnosticsProvider.js
+++ b/pkg/nuclide-arcanist/lib/ArcanistDiagnosticsProvider.js
@@ -63,10 +63,8 @@ export class ArcanistDiagnosticsProvider {
if (runningProcess != null) {
runningProcess.complete();
}
- this._providerBase.publishMessageInvalidation({
- scope: "file",
- filePaths: [ path ]
- });
+ this
+ ._providerBase.publishMessageInvalidation({ scope: "file", filePaths: [ path ] });
})
);
}
@@ -81,7 +79,8 @@ export class ArcanistDiagnosticsProvider {
if (path == null) {
return Promise.resolve();
}
- return this._busySignalProvider.reportBusy(
+ return this._busySignalProvider
+ .reportBusy(
`Waiting for arc lint results for \`${textEditor.getTitle()}\``,
() => this._runLint(textEditor),
{ onlyForFile: path }
diff --git a/pkg/nuclide-arcanist/lib/openArcDeepLink.js b/pkg/nuclide-arcanist/lib/openArcDeepLink.js
index 1fd24ff..c9c8658 100644
--- a/pkg/nuclide-arcanist/lib/openArcDeepLink.js
+++ b/pkg/nuclide-arcanist/lib/openArcDeepLink.js
@@ -72,9 +72,8 @@ export async function openArcDeepLink(
if (matches.length > 1) {
const existing = await asyncFilter(matches, async directory => {
const fsService = getFileSystemServiceByNuclideUri(directory);
- return fsService.exists(
- nuclideUri.join(nuclideUri.getPath(directory), paths[0])
- );
+ return fsService
+ .exists(nuclideUri.join(nuclideUri.getPath(directory), paths[0]));
});
match = existing[0] || match;
}
diff --git a/pkg/nuclide-arcanist/lib/tryReopenProject.js b/pkg/nuclide-arcanist/lib/tryReopenProject.js
index 0e4344b..87ed906 100644
--- a/pkg/nuclide-arcanist/lib/tryReopenProject.js
+++ b/pkg/nuclide-arcanist/lib/tryReopenProject.js
@@ -22,35 +22,33 @@ export default async function tryReopenProject(
return null;
}
const response = await new Promise(resolve => {
- const notification = atom.notifications.addInfo(
- `Project \`${projectId}\` not open`,
- {
- description: `You tried to open a file in the \`${projectId}\` project, but it doesn't ` +
- "seem to be in your open projects.<br />" +
- `You last had it open at \`${nuclideUri.nuclideUriToDisplayString(
- lastPath
- )}\`.<br />` +
- "Would you like to try re-opening it?",
- dismissable: true,
- buttons: [
- {
- className: "icon icon-file-add",
- onDidClick: () => {
- resolve(true);
- notification.dismiss();
- },
- text: "Open Project"
+ const notification = atom.notifications
+ .addInfo(`Project \`${projectId}\` not open`, {
+ description: `You tried to open a file in the \`${projectId}\` project, but it doesn't ` +
+ "seem to be in your open projects.<br />" +
+ `You last had it open at \`${nuclideUri.nuclideUriToDisplayString(
+ lastPath
+ )}\`.<br />` +
+ "Would you like to try re-opening it?",
+ dismissable: true,
+ buttons: [
+ {
+ className: "icon icon-file-add",
+ onDidClick: () => {
+ resolve(true);
+ notification.dismiss();
},
- {
- onDidClick: () => {
- resolve(false);
- notification.dismiss();
- },
- text: "Cancel"
- }
- ]
- }
- );
+ text: "Open Project"
+ },
+ {
+ onDidClick: () => {
+ resolve(false);
+ notification.dismiss();
+ },
+ text: "Cancel"
+ }
+ ]
+ });
const disposable = notification.onDidDismiss(() => {
resolve(false);
disposable.dispose();
diff --git a/pkg/nuclide-atom-script/samples/markdown.js b/pkg/nuclide-atom-script/samples/markdown.js
index a3ec6b6..667c347 100644
--- a/pkg/nuclide-atom-script/samples/markdown.js
+++ b/pkg/nuclide-atom-script/samples/markdown.js
@@ -23,17 +23,12 @@ export default async function runCommand(
const argv = await new Promise((resolve, reject) => {
resolve(
yargs
- .usage(
- `Usage: atom-script ${__dirname}/markdown.js -o <output file> <input file>`
- )
+
+ .usage(`Usage: atom-script ${__dirname}/markdown.js -o <output file> <input file>`)
.help("h")
.alias("h", "help")
- .option("out", {
- alias: "o",
- demand: false,
- describe: "Must specify a path to an output file.",
- type: "string"
- })
+
+ .option("out", { alias: "o", demand: false, describe: "Must specify a path to an output file.", type: "string" })
.demand(1, "Must specify a path to a Markdown file.")
.exitProcess(false)
.fail(reject)
diff --git a/pkg/nuclide-blame-provider-hg/lib/HgBlameProvider.js b/pkg/nuclide-blame-provider-hg/lib/HgBlameProvider.js
index b4bb19c..a537f71 100644
--- a/pkg/nuclide-blame-provider-hg/lib/HgBlameProvider.js
+++ b/pkg/nuclide-blame-provider-hg/lib/HgBlameProvider.js
@@ -18,14 +18,10 @@ const logger = getLogger();
function canProvideBlameForEditor(editor: atom$TextEditor): boolean {
if (editor.isModified()) {
- atom.notifications.addInfo(
- "There is Hg blame information for this file, but only for saved changes. " +
- "Save, then try again."
- );
- logger.info(
- "nuclide-blame: Could not open Hg blame due to unsaved changes in file: " +
- String(editor.getPath())
- );
+ atom
+ .notifications.addInfo("There is Hg blame information for this file, but only for saved changes. " + "Save, then try again.");
+ logger
+ .info("nuclide-blame: Could not open Hg blame due to unsaved changes in file: " + String(editor.getPath()));
return false;
}
const repo = hgRepositoryForEditor(editor);
diff --git a/pkg/nuclide-blame/lib/BlameGutter.js b/pkg/nuclide-blame/lib/BlameGutter.js
index 131773c..b4ae636 100644
--- a/pkg/nuclide-blame/lib/BlameGutter.js
+++ b/pkg/nuclide-blame/lib/BlameGutter.js
@@ -210,14 +210,8 @@ export default class BlameGutter {
const blameInfo = blameForEditor[bufferLine];
if (blameInfo) {
- this._setBlameLine(
- bufferLine,
- blameInfo,
- isFirstLine,
- isLastLine,
- oldest,
- newest
- );
+ this
+ ._setBlameLine(bufferLine, blameInfo, isFirstLine, isLastLine, oldest, newest);
}
allPreviousBlamedLines.delete(bufferLine);
}
diff --git a/pkg/nuclide-blame/lib/main.js b/pkg/nuclide-blame/lib/main.js
index dbd6360..092f476 100644
--- a/pkg/nuclide-blame/lib/main.js
+++ b/pkg/nuclide-blame/lib/main.js
@@ -55,17 +55,14 @@ class Activation {
})
);
this._packageDisposables.add(
- atom.commands.add(
- "atom-text-editor",
- "nuclide-blame:toggle-blame",
- () => {
- if (this._canShowBlame()) {
- this._showBlame();
- } else if (this._canHideBlame()) {
- this._hideBlame();
- }
+ atom.commands
+ .add("atom-text-editor", "nuclide-blame:toggle-blame", () => {
+ if (this._canShowBlame()) {
+ this._showBlame();
+ } else if (this._canHideBlame()) {
+ this._hideBlame();
}
- ),
+ }),
atom.commands.add("atom-text-editor", "nuclide-blame:hide-blame", () => {
if (this._canHideBlame()) {
this._hideBlame();
@@ -125,14 +122,11 @@ class Activation {
track("blame-open", { editorPath: editor.getPath() || "" });
} else {
- atom.notifications.addInfo(
- "Could not open blame: no blame information currently available for this file."
- );
+ atom
+ .notifications.addInfo("Could not open blame: no blame information currently available for this file.");
- getLogger().info(
- "nuclide-blame: Could not open blame: no blame provider currently available for this " +
- `file: ${String(editor.getPath())}`
- );
+ getLogger()
+ .info("nuclide-blame: Could not open blame: no blame provider currently available for this " + `file: ${String(editor.getPath())}`);
}
}
}
@@ -196,10 +190,8 @@ class Activation {
callback() {
findBlameableNodes(contextMenu).forEach(async node => {
const editor = await goToLocation(node.uri);
- atom.commands.dispatch(
- atom.views.getView(editor),
- "nuclide-blame:toggle-blame"
- );
+ atom
+ .commands.dispatch(atom.views.getView(editor), "nuclide-blame:toggle-blame");
});
},
shouldDisplay() {
diff --git a/pkg/nuclide-bookshelf/lib/accumulateState.js b/pkg/nuclide-bookshelf/lib/accumulateState.js
index 4c1f15a..d897990 100644
--- a/pkg/nuclide-bookshelf/lib/accumulateState.js
+++ b/pkg/nuclide-bookshelf/lib/accumulateState.js
@@ -161,8 +161,8 @@ function accumulateUpdatePaneItemState(
Array
.from(state.repositoryPathToState.entries())
.map(([ repositoryPath, repositoryState ]) => {
- const fileList = (repositoryPathToEditors.get(repositoryPath) ||
- []).map(textEditor => textEditor.getPath() || "");
+ const fileList = (repositoryPathToEditors.get(repositoryPath) || [])
+ .map(textEditor => textEditor.getPath() || "");
return [
repositoryPath,
accumulateRepositoryStateUpdatePaneItemState(
diff --git a/pkg/nuclide-bookshelf/lib/applyActionMiddleware.js b/pkg/nuclide-bookshelf/lib/applyActionMiddleware.js
index 4a3c484..243ad22 100644
--- a/pkg/nuclide-bookshelf/lib/applyActionMiddleware.js
+++ b/pkg/nuclide-bookshelf/lib/applyActionMiddleware.js
@@ -43,17 +43,13 @@ export function applyActionMiddleware(
const output = Observable.merge(
// Let the unhandled ActionTypes pass through.
actions.filter(action => HANDLED_ACTION_TYPES.indexOf(action.type) === -1),
- getActionsOfType(
- actions,
- ActionType.ADD_PROJECT_REPOSITORY
- ).flatMap(action => {
+ getActionsOfType(actions, ActionType.ADD_PROJECT_REPOSITORY)
+ .flatMap(action => {
invariant(action.type === ActionType.ADD_PROJECT_REPOSITORY);
return watchProjectRepository(action, getState);
}),
- getActionsOfType(
- actions,
- ActionType.RESTORE_PANE_ITEM_STATE
- ).switchMap(action => {
+ getActionsOfType(actions, ActionType.RESTORE_PANE_ITEM_STATE)
+ .switchMap(action => {
invariant(action.type === ActionType.RESTORE_PANE_ITEM_STATE);
return restorePaneItemState(action, getState);
})
diff --git a/pkg/nuclide-bookshelf/lib/main.js b/pkg/nuclide-bookshelf/lib/main.js
index 5f37965..4a59fcf 100644
--- a/pkg/nuclide-bookshelf/lib/main.js
+++ b/pkg/nuclide-bookshelf/lib/main.js
@@ -74,22 +74,15 @@ class Activation {
};
const commands = new Commands(dispatch, () => states.getValue());
- const addedRepoSubscription = getHgRepositoryStream().subscribe(
- repository => {
- // $FlowFixMe wrong repository type
- commands.addProjectRepository(repository);
- }
- );
+ const addedRepoSubscription = getHgRepositoryStream()
+ .subscribe(repository => {
+ // $FlowFixMe wrong repository type
+ commands.addProjectRepository(repository);
+ });
const paneStateChangeSubscription = Observable
- .merge(
- observableFromSubscribeFunction(
- atom.workspace.onDidAddPaneItem.bind(atom.workspace)
- ),
- observableFromSubscribeFunction(
- atom.workspace.onDidDestroyPaneItem.bind(atom.workspace)
- )
- )
+
+ .merge(observableFromSubscribeFunction(atom.workspace.onDidAddPaneItem.bind(atom.workspace)), observableFromSubscribeFunction(atom.workspace.onDidDestroyPaneItem.bind(atom.workspace)))
.subscribe(() => {
commands.updatePaneItemState();
});
diff --git a/pkg/nuclide-bookshelf/lib/utils.js b/pkg/nuclide-bookshelf/lib/utils.js
index 1ebf292..3d13bac 100644
--- a/pkg/nuclide-bookshelf/lib/utils.js
+++ b/pkg/nuclide-bookshelf/lib/utils.js
@@ -96,10 +96,8 @@ export function getRepoPathToEditors(): Map<NuclideUri, Array<atom$TextEditor>>
.forEach(({ repository, textEditor }) => {
invariant(repository);
const repositoryPath = repository.getWorkingDirectory();
- reposToEditors.set(
- repositoryPath,
- (reposToEditors.get(repositoryPath) || []).concat([ textEditor ])
- );
+ reposToEditors
+ .set(repositoryPath, (reposToEditors.get(repositoryPath) || []).concat([ textEditor ]));
});
return reposToEditors;
}
@@ -122,7 +120,8 @@ export function shortHeadChangedNotification(
? `to \`${newShortHead}\``
: "";
- const shortHeadChangeNotification = atom.notifications.addInfo(
+ const shortHeadChangeNotification = atom.notifications
+ .addInfo(
`\`${workingDirectoryName}\`'s active bookmark has changed ${newShortHeadDisplayText}`,
{
detail: "Would you like to open the files you had active then?\n \n" +
@@ -138,10 +137,8 @@ export function shortHeadChangedNotification(
},
{
onDidClick: () => {
- featureConfig.set(
- ACTIVE_SHORTHEAD_CHANGE_BEHAVIOR_CONFIG,
- ActiveShortHeadChangeBehavior.ALWAYS_IGNORE
- );
+ featureConfig
+ .set(ACTIVE_SHORTHEAD_CHANGE_BEHAVIOR_CONFIG, ActiveShortHeadChangeBehavior.ALWAYS_IGNORE);
observer.complete();
},
text: "Always ignore"
@@ -167,29 +164,27 @@ export function getShortHeadChangesFromStateStream(
): Observable<RepositoryShortHeadChange> {
return states
.pairwise()
- .flatMap((
- [ oldBookShelfState, newBookShelfState ]: [BookShelfState, BookShelfState]
- ) =>
- {
- const {
- repositoryPathToState: oldRepositoryPathToState
- } = oldBookShelfState;
-
- return Observable.from(
- Array
- .from(newBookShelfState.repositoryPathToState.entries())
- .filter(([ repositoryPath, newRepositoryState ]) => {
- const oldRepositoryState = oldRepositoryPathToState.get(
- repositoryPath
- );
- return oldRepositoryState != null &&
- oldRepositoryState.activeShortHead !==
- newRepositoryState.activeShortHead;
- })
- .map(([ repositoryPath, newRepositoryState ]) => {
- const { activeShortHead } = newRepositoryState;
- return { repositoryPath, activeShortHead };
- })
- );
- });
+
+ .flatMap(([ oldBookShelfState, newBookShelfState ]: [BookShelfState, BookShelfState]) => {
+ const {
+ repositoryPathToState: oldRepositoryPathToState
+ } = oldBookShelfState;
+
+ return Observable.from(
+ Array
+ .from(newBookShelfState.repositoryPathToState.entries())
+ .filter(([ repositoryPath, newRepositoryState ]) => {
+ const oldRepositoryState = oldRepositoryPathToState.get(
+ repositoryPath
+ );
+ return oldRepositoryState != null &&
+ oldRepositoryState.activeShortHead !==
+ newRepositoryState.activeShortHead;
+ })
+ .map(([ repositoryPath, newRepositoryState ]) => {
+ const { activeShortHead } = newRepositoryState;
+ return { repositoryPath, activeShortHead };
+ })
+ );
+ });
}
diff --git a/pkg/nuclide-bookshelf/spec/accumulateState-spec.js b/pkg/nuclide-bookshelf/spec/accumulateState-spec.js
index 6d6b0c4..1748e86 100644
--- a/pkg/nuclide-bookshelf/spec/accumulateState-spec.js
+++ b/pkg/nuclide-bookshelf/spec/accumulateState-spec.js
@@ -63,9 +63,8 @@ describe("BookShelf accumulateState", () => {
expect(fakeRepository.getWorkingDirectory).toHaveBeenCalled();
expect(emptyState.repositoryPathToState.size).toBe(0);
expect(newState.repositoryPathToState.size).toBe(1);
- const addedRepoState: BookShelfRepositoryState = newState.repositoryPathToState.get(
- REPO_PATH_1
- );
+ const addedRepoState: BookShelfRepositoryState = newState
+ .repositoryPathToState.get(REPO_PATH_1);
expect(addedRepoState).toBeDefined();
expect(addedRepoState.activeShortHead).toBe(EMPTY_SHORTHEAD);
expect(addedRepoState.isRestoring).toBeFalsy();
@@ -81,9 +80,8 @@ describe("BookShelf accumulateState", () => {
const newState = accumulateState(oneRepoState, addRepositoryAction);
expect(fakeRepository.getWorkingDirectory).toHaveBeenCalled();
expect(newState.repositoryPathToState.size).toBe(1);
- const keptRepoState: BookShelfRepositoryState = newState.repositoryPathToState.get(
- REPO_PATH_1
- );
+ const keptRepoState: BookShelfRepositoryState = newState
+ .repositoryPathToState.get(REPO_PATH_1);
expect(keptRepoState).toBeDefined();
expect(keptRepoState.activeShortHead).toBe(ACTIVE_SHOTHEAD_1);
expect(keptRepoState.isRestoring).toBeFalsy();
@@ -136,9 +134,8 @@ describe("BookShelf accumulateState", () => {
const newState = accumulateState(emptyState, updateBookmarksAction);
expect(emptyState.repositoryPathToState.size).toBe(0);
expect(newState.repositoryPathToState.size).toBe(1);
- const newRepositoryState: BookShelfRepositoryState = newState.repositoryPathToState.get(
- REPO_PATH_1
- );
+ const newRepositoryState: BookShelfRepositoryState = newState
+ .repositoryPathToState.get(REPO_PATH_1);
expect(newRepositoryState.activeShortHead).toBe("a");
expect(newRepositoryState.isRestoring).toBe(false);
expect(newRepositoryState.shortHeadsToFileList.size).toBe(0);
@@ -164,9 +161,8 @@ describe("BookShelf accumulateState", () => {
const newState = accumulateState(oneRepoState, updateBookmarksAction);
expect(newState.repositoryPathToState.size).toBe(1);
- const newRepositoryState: BookShelfRepositoryState = newState.repositoryPathToState.get(
- REPO_PATH_1
- );
+ const newRepositoryState: BookShelfRepositoryState = newState
+ .repositoryPathToState.get(REPO_PATH_1);
expect(newRepositoryState.activeShortHead).toBe(SHOTHEAD_1_2);
expect(newRepositoryState.isRestoring).toBe(false);
expect(newRepositoryState.shortHeadsToFileList.size).toBe(1);
diff --git a/pkg/nuclide-bookshelf/spec/applyActionMiddleware-spec.js b/pkg/nuclide-bookshelf/spec/applyActionMiddleware-spec.js
index 16cfedd..70bd568 100644
--- a/pkg/nuclide-bookshelf/spec/applyActionMiddleware-spec.js
+++ b/pkg/nuclide-bookshelf/spec/applyActionMiddleware-spec.js
@@ -59,12 +59,8 @@ describe("BookShelf applyActionMiddleware", () => {
}),
getBookmarks: jasmine
.createSpy()
- .andReturn(
- Promise.resolve([
- { bookmark: SHOTHEAD_1_1, active: false },
- { bookmark: SHOTHEAD_1_2, active: true }
- ])
- )
+
+ .andReturn(Promise.resolve([ { bookmark: SHOTHEAD_1_1, active: false }, { bookmark: SHOTHEAD_1_2, active: true } ]))
}: any);
oneRepoState = getDummyBookShelfState();
diff --git a/pkg/nuclide-bookshelf/spec/utils-spec.js b/pkg/nuclide-bookshelf/spec/utils-spec.js
index bf7028e..4bf6c98 100644
--- a/pkg/nuclide-bookshelf/spec/utils-spec.js
+++ b/pkg/nuclide-bookshelf/spec/utils-spec.js
@@ -195,9 +195,8 @@ describe("BookShelf Utils", () => {
const newActiveShortHead = "foo_bar";
const newStateWithShortHeadChange = getDummyBookShelfState();
- const newRepositoryState = newStateWithShortHeadChange.repositoryPathToState.get(
- DUMMY_REPO_PATH_1
- );
+ const newRepositoryState = newStateWithShortHeadChange.repositoryPathToState
+ .get(DUMMY_REPO_PATH_1);
newRepositoryState.activeShortHead = newActiveShortHead;
states.next(newStateWithShortHeadChange);
diff --git a/pkg/nuclide-buck-rpc/lib/BuckService.js b/pkg/nuclide-buck-rpc/lib/BuckService.js
index d94fa3a..f117f25 100644
--- a/pkg/nuclide-buck-rpc/lib/BuckService.js
+++ b/pkg/nuclide-buck-rpc/lib/BuckService.js
@@ -399,10 +399,8 @@ function _buildWithOutput(
});
return Observable
.fromPromise(_getBuckCommandAndOptions(rootPath))
- .switchMap(
- ({ pathToBuck, buckCommandOptions }) =>
- observeProcess(() => safeSpawn(pathToBuck, args, buckCommandOptions))
- );
+
+ .switchMap(({ pathToBuck, buckCommandOptions }) => observeProcess(() => safeSpawn(pathToBuck, args, buckCommandOptions)));
}
/**
diff --git a/pkg/nuclide-buck-rpc/spec/BuckService-spec.js b/pkg/nuclide-buck-rpc/spec/BuckService-spec.js
index df3b0f5..ca77f5e 100644
--- a/pkg/nuclide-buck-rpc/spec/BuckService-spec.js
+++ b/pkg/nuclide-buck-rpc/spec/BuckService-spec.js
@@ -74,9 +74,8 @@ describe("BuckService (test-project-with-failing-targets)", () => {
jasmine.useRealClock();
waitsForPromise(async () => {
try {
- await BuckService.build(buckRoot, [ "//:good_rule" ], {
- commandOptions: { timeout: 1 }
- });
+ await BuckService
+ .build(buckRoot, [ "//:good_rule" ], { commandOptions: { timeout: 1 } });
} catch (e) {
expect(e.message).toMatch("Command failed");
return;
@@ -88,9 +87,8 @@ describe("BuckService (test-project-with-failing-targets)", () => {
it("respects extra arguments", () => {
waitsForPromise(async () => {
try {
- await BuckService.build(buckRoot, [ "//:good_rule" ], {
- extraArguments: [ "--help" ]
- });
+ await BuckService
+ .build(buckRoot, [ "//:good_rule" ], { extraArguments: [ "--help" ] });
} catch (e) {
// The help option, naturally, lists itself.
expect(e.message).toContain("--help");
diff --git a/pkg/nuclide-buck/lib/BuckBuildSystem.js b/pkg/nuclide-buck/lib/BuckBuildSystem.js
index 85a6996..fc9b464 100644
--- a/pkg/nuclide-buck/lib/BuckBuildSystem.js
+++ b/pkg/nuclide-buck/lib/BuckBuildSystem.js
@@ -140,11 +140,9 @@ export class BuckBuildSystem {
}
getTaskList() {
- const {
- buckRoot,
- buildTarget,
- buildRuleType
- } = this._getStore().getState();
+ const { buckRoot, buildTarget, buildRuleType } = this
+ ._getStore()
+ .getState();
return TASKS.map(task => ({
...task,
disabled: buckRoot == null,
@@ -227,7 +225,8 @@ export class BuckBuildSystem {
isLoadingPlatforms: false,
buildTarget: this._serializedState.buildTarget || "",
buildRuleType: null,
- selectedDeploymentTarget: this._serializedState.selectedDeploymentTarget,
+ selectedDeploymentTarget: this._serializedState
+ .selectedDeploymentTarget,
taskSettings: this._serializedState.taskSettings || {}
};
const epics = Object
@@ -283,11 +282,9 @@ export class BuckBuildSystem {
task.cancel();
},
getTrackingData: () => {
- const {
- buckRoot,
- buildTarget,
- taskSettings
- } = this._getStore().getState();
+ const { buckRoot, buildTarget, taskSettings } = this
+ ._getStore()
+ .getState();
return { buckRoot, buildTarget, taskSettings };
}
};
@@ -349,11 +346,8 @@ export class BuckBuildSystem {
if (this._store == null) {
return;
}
- const {
- buildTarget,
- taskSettings,
- selectedDeploymentTarget
- } = this._store.getState();
+ const { buildTarget, taskSettings, selectedDeploymentTarget } = this._store
+ .getState();
return { buildTarget, taskSettings, selectedDeploymentTarget };
}
@@ -404,10 +398,8 @@ export class BuckBuildSystem {
buckService.getWebSocketStream(buckRoot, httpPort).refCount()
).share();
} else {
- this._logOutput(
- "Enable httpserver in your .buckconfig for better output.",
- "warning"
- );
+ this
+ ._logOutput("Enable httpserver in your .buckconfig for better output.", "warning");
}
const isDebug = taskType === "debug";
@@ -505,9 +497,8 @@ export class BuckBuildSystem {
messages.push(diagnostic);
changedFiles.set(diagnostic.filePath, messages);
});
- this._diagnosticUpdates.next({
- filePathToMessages: changedFiles
- });
+ this
+ ._diagnosticUpdates.next({ filePathToMessages: changedFiles });
} else if (event.type === "error") {
errorMessage = event.message;
}
@@ -521,10 +512,8 @@ export class BuckBuildSystem {
.map(event => event.type === "progress" ? event : null)
.finally(() => {
if (fileDiagnostics.size > 0) {
- this._logOutput(
- "Compilation errors detected: open the Diagnostics pane to jump to them.",
- "info"
- );
+ this
+ ._logOutput("Compilation errors detected: open the Diagnostics pane to jump to them.", "info");
}
})
);
@@ -575,18 +564,14 @@ function runBuckCommand(
if (debug) {
// Stop any existing debugging sessions, as install hangs if an existing
// app that's being overwritten is being debugged.
- atom.commands.dispatch(
- atom.views.getView(atom.workspace),
- "nuclide-debugger:stop-debugging"
- );
+ atom
+ .commands.dispatch(atom.views.getView(atom.workspace), "nuclide-debugger:stop-debugging");
}
if (subcommand === "install") {
return buckService
- .installWithOutput(buckRoot, [ buildTarget ], args, simulator, {
- run: true,
- debug
- })
+
+ .installWithOutput(buckRoot, [ buildTarget ], args, simulator, { run: true, debug })
.refCount();
} else if (subcommand === "build") {
return buckService
diff --git a/pkg/nuclide-buck/lib/BuckEventStream.js b/pkg/nuclide-buck/lib/BuckEventStream.js
index 795cf01..dc83246 100644
--- a/pkg/nuclide-buck/lib/BuckEventStream.js
+++ b/pkg/nuclide-buck/lib/BuckEventStream.js
@@ -69,10 +69,8 @@ export function getEventsFromSocket(
message.exitCode === 0 ? "info" : "error"
);
case "BuildProgressUpdated":
- return Observable.of({
- type: "progress",
- progress: message.progressValue
- });
+ return Observable
+ .of({ type: "progress", progress: message.progressValue });
}
return Observable.empty();
})
@@ -178,13 +176,8 @@ export function combineEventStreams(
mergedEvents,
finiteSocketEvents
.filter(isBuildFinishEvent)
- .switchMapTo(
- Observable.of({ type: "progress", progress: null }, {
- type: "log",
- message: "Installing...",
- level: "info"
- })
- )
+
+ .switchMapTo(Observable.of({ type: "progress", progress: null }, { type: "log", message: "Installing...", level: "info" }))
);
}
return mergedEvents;
@@ -199,9 +192,8 @@ export function getDiagnosticEvents(
// For log messages, try to detect compile errors and emit diagnostics.
if (event.type === "log") {
return Observable
- .fromPromise(
- diagnosticsParser.getDiagnostics(event.message, event.level, buckRoot)
- )
+
+ .fromPromise(diagnosticsParser.getDiagnostics(event.message, event.level, buckRoot))
.map(diagnostics => ({ type: "diagnostics", diagnostics }));
}
return Observable.empty();
diff --git a/pkg/nuclide-buck/lib/BuckToolbar.js b/pkg/nuclide-buck/lib/BuckToolbar.js
index 41f7f51..caf4623 100644
--- a/pkg/nuclide-buck/lib/BuckToolbar.js
+++ b/pkg/nuclide-buck/lib/BuckToolbar.js
@@ -47,9 +47,8 @@ export default class BuckToolbar extends React.Component {
constructor(props: Props) {
super(props);
- (this: any)._handleDeploymentTargetChange = this._handleDeploymentTargetChange.bind(
- this
- );
+ (this: any)._handleDeploymentTargetChange = this
+ ._handleDeploymentTargetChange.bind(this);
this.state = { settingsVisible: false };
}
@@ -112,20 +111,8 @@ export default class BuckToolbar extends React.Component {
} else if (platformGroups.length) {
const options = this._optionsFromPlatformGroups(platformGroups);
- widgets.push(
- (
- <Dropdown
- key="simulator-dropdown"
- className="inline-block"
- value={selectedDeploymentTarget}
- options={options}
- onChange={this._handleDeploymentTargetChange}
- size="sm"
- title="Choose a device"
- selectionComparator={shallowequal}
- />
- )
- );
+ widgets
+ .push(<Dropdown key="simulator-dropdown" className="inline-block" value={selectedDeploymentTarget} options={options} onChange={this._handleDeploymentTargetChange} size="sm" title="Choose a device" selectionComparator={shallowequal} />);
}
const { activeTaskType } = this.props;
diff --git a/pkg/nuclide-buck/lib/LLDBEventStream.js b/pkg/nuclide-buck/lib/LLDBEventStream.js
index e490e2e..44ac7f1 100644
--- a/pkg/nuclide-buck/lib/LLDBEventStream.js
+++ b/pkg/nuclide-buck/lib/LLDBEventStream.js
@@ -132,33 +132,18 @@ export function getLLDBBuildEvents(
.filter(message => message.kind === "exit" && message.exitCode === 0)
.switchMap(() => {
return Observable
- .fromPromise(
- debugBuckTarget(buckService, buckRoot, buildTarget, runArguments)
- )
- .map(path => ({
- type: "log",
- message: `Launched LLDB debugger with ${path}`,
- level: "info"
- }))
+
+ .fromPromise(debugBuckTarget(buckService, buckRoot, buildTarget, runArguments))
+
+ .map(path => ({ type: "log", message: `Launched LLDB debugger with ${path}`, level: "info" }))
.catch(err => {
- getLogger().error(
- `Failed to launch LLDB debugger for ${buildTarget}`,
- err
- );
- return Observable.of({
- type: "log",
- message: `Failed to launch LLDB debugger: ${err.message}`,
- level: "error"
- });
+ getLogger()
+ .error(`Failed to launch LLDB debugger for ${buildTarget}`, err);
+ return Observable
+ .of({ type: "log", message: `Failed to launch LLDB debugger: ${err.message}`, level: "error" });
})
- .startWith(
- {
- type: "log",
- message: `Launching LLDB debugger for ${buildTarget}...`,
- level: "log"
- },
- { type: "progress", progress: null }
- );
+
+ .startWith({ type: "log", message: `Launching LLDB debugger for ${buildTarget}...`, level: "log" }, { type: "progress", progress: null });
});
}
@@ -182,11 +167,8 @@ export function getLLDBInstallEvents(
return Observable
.fromPromise(debugPidWithLLDB(lldbPid, buckRoot))
.ignoreElements()
- .startWith({
- type: "log",
- message: `Attaching LLDB debugger to pid ${lldbPid}...`,
- level: "info"
- });
+
+ .startWith({ type: "log", message: `Attaching LLDB debugger to pid ${lldbPid}...`, level: "info" });
});
});
}
diff --git a/pkg/nuclide-buck/lib/PlatformService.js b/pkg/nuclide-buck/lib/PlatformService.js
index ff0e176..508fbea 100644
--- a/pkg/nuclide-buck/lib/PlatformService.js
+++ b/pkg/nuclide-buck/lib/PlatformService.js
@@ -45,9 +45,8 @@ export class PlatformService {
return Observable.from(observables).combineAll().map(platformGroups => {
return platformGroups
.filter(p => p != null)
- .sort(
- (a, b) => a.name.toUpperCase().localeCompare(b.name.toUpperCase())
- );
+
+ .sort((a, b) => a.name.toUpperCase().localeCompare(b.name.toUpperCase()));
});
});
}
diff --git a/pkg/nuclide-buck/lib/observeBuildCommands.js b/pkg/nuclide-buck/lib/observeBuildCommands.js
index 84bda3b..3b4aac9 100644
--- a/pkg/nuclide-buck/lib/observeBuildCommands.js
+++ b/pkg/nuclide-buck/lib/observeBuildCommands.js
@@ -66,7 +66,8 @@ export default function observeBuildCommands(store: Store): IDisposable {
featureConfig.set(CONFIG_KEY, false);
}
track("buck-prompt.shown", { buildTarget: args[0] });
- const notification = atom.notifications.addInfo(
+ const notification = atom.notifications
+ .addInfo(
`You recently ran \`buck build ${args.join(
" "
)}\` from the command line.<br />` +
@@ -81,10 +82,8 @@ export default function observeBuildCommands(store: Store): IDisposable {
onDidClick: () => {
track("buck-prompt.clicked", { buildTarget: args[0] });
store.dispatch(Actions.setBuildTarget(args[0]));
- atom.commands.dispatch(
- atom.views.getView(atom.workspace),
- "nuclide-task-runner:Buck-build"
- );
+ atom
+ .commands.dispatch(atom.views.getView(atom.workspace), "nuclide-task-runner:Buck-build");
dismiss();
}
},
diff --git a/pkg/nuclide-buck/spec/BuckBuildSystem-spec.js b/pkg/nuclide-buck/spec/BuckBuildSystem-spec.js
index d3a3851..4cf9d8d 100644
--- a/pkg/nuclide-buck/spec/BuckBuildSystem-spec.js
+++ b/pkg/nuclide-buck/spec/BuckBuildSystem-spec.js
@@ -24,13 +24,8 @@ describe("BuckBuildSystem", () => {
const subscription = buckBuildSystem.getOutputMessages().subscribe(spy);
const result = await buckBuildSystem
- ._consumeEventStream(
- Observable.from([
- { type: "log", message: "test", level: "error" },
- { type: "log", message: "test2", level: "warning" },
- { type: "progress", progress: 1 }
- ])
- )
+
+ ._consumeEventStream(Observable.from([ { type: "log", message: "test", level: "error" }, { type: "log", message: "test2", level: "warning" }, { type: "progress", progress: 1 } ]))
.toArray()
.toPromise();
@@ -48,9 +43,8 @@ describe("BuckBuildSystem", () => {
it("emits diagnostics", () => {
waitsForPromise(async () => {
const spy = jasmine.createSpy("diagnostics");
- const subscription = buckBuildSystem.getDiagnosticProvider().updates.subscribe(
- spy
- );
+ const subscription = buckBuildSystem.getDiagnosticProvider().updates
+ .subscribe(spy);
const outputSpy = jasmine.createSpy("output");
const outputSubscription = buckBuildSystem
@@ -65,19 +59,8 @@ describe("BuckBuildSystem", () => {
};
const result = await buckBuildSystem
- ._consumeEventStream(
- Observable.from([
- { type: "diagnostics", diagnostics: [ diagnostic ] },
- {
- type: "diagnostics",
- diagnostics: [ { ...diagnostic, type: "Warning" } ]
- },
- {
- type: "diagnostics",
- diagnostics: [ { ...diagnostic, filePath: "b" } ]
- }
- ])
- )
+
+ ._consumeEventStream(Observable.from([ { type: "diagnostics", diagnostics: [ diagnostic ] }, { type: "diagnostics", diagnostics: [ { ...diagnostic, type: "Warning" } ] }, { type: "diagnostics", diagnostics: [ { ...diagnostic, filePath: "b" } ] } ]))
.toArray()
.toPromise();
diff --git a/pkg/nuclide-clang-rpc/lib/ClangServer.js b/pkg/nuclide-clang-rpc/lib/ClangServer.js
index 816e3c6..b792c41 100644
--- a/pkg/nuclide-clang-rpc/lib/ClangServer.js
+++ b/pkg/nuclide-clang-rpc/lib/ClangServer.js
@@ -103,13 +103,10 @@ export default class ClangServer extends RpcProcess {
this._flagsSubscription = watchFile(flagsData.flagsFile)
.refCount()
.take(1)
- .subscribe(
- x => {
- this._flagsChanged = true;
- },
- // ignore errors
- () => {}
- );
+ .subscribe(x => {
+ this._flagsChanged = true;
+ }, // ignore errors
+ () => {});
}
}
@@ -159,10 +156,8 @@ export default class ClangServer extends RpcProcess {
const service = await this.getService();
return await service
.compile(contents)
- .then(result => ({
- ...result,
- accurateFlags: !this._usesDefaultFlags
- }));
+
+ .then(result => ({ ...result, accurateFlags: !this._usesDefaultFlags }));
} finally {
if (--this._pendingCompileRequests === 0) {
this._serverStatus.next(ClangServer.Status.READY);
diff --git a/pkg/nuclide-clang-rpc/lib/ClangService.js b/pkg/nuclide-clang-rpc/lib/ClangService.js
index 0811015..b63726c 100644
--- a/pkg/nuclide-clang-rpc/lib/ClangService.js
+++ b/pkg/nuclide-clang-rpc/lib/ClangService.js
@@ -139,13 +139,8 @@ export async function getCompletions(
): Promise<?Array<ClangCompletion>> {
const service = await getClangService(src, contents, defaultFlags);
if (service != null) {
- return service.get_completions(
- contents,
- line,
- column,
- tokenStartColumn,
- prefix
- );
+ return service
+ .get_completions(contents, line, column, tokenStartColumn, prefix);
}
}
diff --git a/pkg/nuclide-clang-rpc/spec/ClangFlagsManager-spec.js b/pkg/nuclide-clang-rpc/spec/ClangFlagsManager-spec.js
index c42412a..90edce9 100644
--- a/pkg/nuclide-clang-rpc/spec/ClangFlagsManager-spec.js
+++ b/pkg/nuclide-clang-rpc/spec/ClangFlagsManager-spec.js
@@ -24,10 +24,8 @@ describe("ClangFlagsManager", () => {
BuckService,
"getRootForPath"
).andReturn(nuclideUri.join(__dirname, "fixtures"));
- ownerSpy = spyOn(
- BuckService,
- "getOwners"
- ).andReturn(// Default header targets should be ignored
+ ownerSpy = spyOn(BuckService, "getOwners")
+ .andReturn(// Default header targets should be ignored
[ "//test:__default_headers__", "//test" ]);
spyOn(
BuckService,
diff --git a/pkg/nuclide-clang-rpc/spec/ClangServerManager-spec.js b/pkg/nuclide-clang-rpc/spec/ClangServerManager-spec.js
index 5ce28bd..90d5bce 100644
--- a/pkg/nuclide-clang-rpc/spec/ClangServerManager-spec.js
+++ b/pkg/nuclide-clang-rpc/spec/ClangServerManager-spec.js
@@ -23,9 +23,8 @@ describe("ClangServerManager", () => {
it("uses flags from manager if available", () => {
waitsForPromise(async () => {
- serverManager._flagsManager.getFlagsForSrc.andReturn(
- Promise.resolve({ flags: [ "a" ] })
- );
+ serverManager
+ ._flagsManager.getFlagsForSrc.andReturn(Promise.resolve({ flags: [ "a" ] }));
const flagsResult = await serverManager._getFlags("test.cpp");
expect(flagsResult).toEqual({ flags: [ "a" ], usesDefaultFlags: false });
});
@@ -74,9 +73,8 @@ describe("ClangServerManager", () => {
const servers = [];
for (let i = 0; i < 21; i++) {
// eslint-disable-next-line no-await-in-loop
- servers.push(
- await serverManager.getClangServer(`test${i}.cpp`, "", [])
- );
+ servers
+ .push(await serverManager.getClangServer(`test${i}.cpp`, "", []));
}
invariant(servers[0]);
expect(servers[0]._disposed).toBe(true);
diff --git a/pkg/nuclide-clang-rpc/spec/ClangService-spec.js b/pkg/nuclide-clang-rpc/spec/ClangService-spec.js
index 6e55019..e62ef4a 100644
--- a/pkg/nuclide-clang-rpc/spec/ClangService-spec.js
+++ b/pkg/nuclide-clang-rpc/spec/ClangService-spec.js
@@ -13,10 +13,8 @@ import { formatCode } from "..";
describe("ClangService.formatCode", () => {
it("uses clang-format correctly", () => {
waitsForPromise(async () => {
- const spy = spyOn(
- require("../../commons-node/process"),
- "checkOutput"
- ).andReturn({ stdout: '{ "Cursor": 4, "Incomplete": false }\ntest2' });
+ const spy = spyOn(require("../../commons-node/process"), "checkOutput")
+ .andReturn({ stdout: '{ "Cursor": 4, "Incomplete": false }\ntest2' });
const result = await formatCode("test.cpp", "test", 1, 2, 3);
expect(result).toEqual({ newCursor: 4, formatted: "test2" });
expect(
diff --git a/pkg/nuclide-clang-rpc/spec/utils-spec.js b/pkg/nuclide-clang-rpc/spec/utils-spec.js
index 2659baf..879008b 100644
--- a/pkg/nuclide-clang-rpc/spec/utils-spec.js
+++ b/pkg/nuclide-clang-rpc/spec/utils-spec.js
@@ -57,10 +57,8 @@ describe("findIncludingSourceFile", () => {
it("returns null for invalid paths", () => {
waitsForPromise(async () => {
- const file = await findIncludingSourceFile(
- "/this/is/not/a/path",
- "/"
- ).toPromise();
+ const file = await findIncludingSourceFile("/this/is/not/a/path", "/")
+ .toPromise();
expect(file).toBeNull();
});
});
diff --git a/pkg/nuclide-clang/lib/AutocompleteHelpers.js b/pkg/nuclide-clang/lib/AutocompleteHelpers.js
index a5e7ebf..e879f50 100644
--- a/pkg/nuclide-clang/lib/AutocompleteHelpers.js
+++ b/pkg/nuclide-clang/lib/AutocompleteHelpers.js
@@ -145,8 +145,8 @@ function _convertArgsToMultiLineSnippet(
throw Error("This is a bug! Spaces count is negative.");
}
- const line = `${" ".repeat(spacesCnt)}${arg.text}:\${${index +
- 1}:${arg.placeholder}}\n`;
+ const line = `${" ".repeat(spacesCnt)}${arg.text}:\${${index + 1}:${arg
+ .placeholder}}\n`;
if (index > 0 && line[colonPosition - arg.offset] !== ":") {
throw Error("This is a bug! Colons are not aligned!");
}
@@ -176,11 +176,8 @@ function getCompletionBodyInline(completion: ClangCompletion): string {
for (let i = lastNonOptional + 1; i <= lastOptional; i++) {
mergedSpelling += chunks[i].spelling;
}
- chunks.splice(lastNonOptional + 1, lastOptional - lastNonOptional, {
- spelling: mergedSpelling,
- isPlaceHolder: true,
- isOptional: true
- });
+ chunks
+ .splice(lastNonOptional + 1, lastOptional - lastNonOptional, { spelling: mergedSpelling, isPlaceHolder: true, isOptional: true });
}
}
diff --git a/pkg/nuclide-clang/lib/ClangLinter.js b/pkg/nuclide-clang/lib/ClangLinter.js
index 4f17214..3be2bf6 100644
--- a/pkg/nuclide-clang/lib/ClangLinter.js
+++ b/pkg/nuclide-clang/lib/ClangLinter.js
@@ -126,16 +126,8 @@ export default class ClangLinter {
}
}
- result.push({
- scope: "file",
- providerName: "Clang",
- type: diagnostic.severity === 2 ? "Warning" : "Error",
- filePath,
- text: diagnostic.spelling,
- range,
- trace,
- fix
- });
+ result
+ .push({ scope: "file", providerName: "Clang", type: diagnostic.severity === 2 ? "Warning" : "Error", filePath, text: diagnostic.spelling, range, trace, fix });
});
} else {
result.push({
diff --git a/pkg/nuclide-clang/lib/main.js b/pkg/nuclide-clang/lib/main.js
index ad59c24..69f08e1 100644
--- a/pkg/nuclide-clang/lib/main.js
+++ b/pkg/nuclide-clang/lib/main.js
@@ -43,21 +43,18 @@ export function activate() {
// and reset all compilation flags. Useful when BUCK targets or headers change,
// since those are heavily cached for performance. Also great for testing!
subscriptions.add(
- atom.commands.add(
- "atom-workspace",
- "nuclide-clang:clean-and-rebuild",
- async () => {
- const editor = atom.workspace.getActiveTextEditor();
- if (editor == null) {
- return;
- }
- const path = editor.getPath();
- if (path == null) {
- return;
- }
- await reset(editor);
+ atom.commands
+ .add("atom-workspace", "nuclide-clang:clean-and-rebuild", async () => {
+ const editor = atom.workspace.getActiveTextEditor();
+ if (editor == null) {
+ return;
}
- )
+ const path = editor.getPath();
+ if (path == null) {
+ return;
+ }
+ await reset(editor);
+ })
);
busySignalProvider = new BusySignalProviderBase();
@@ -129,10 +126,8 @@ export function provideLinter(): LinterProvider {
lint(editor) {
const getResult = () => ClangLinter.lint(editor);
if (busySignalProvider) {
- return busySignalProvider.reportBusy(
- `Clang: compiling \`${editor.getTitle()}\``,
- getResult
- );
+ return busySignalProvider
+ .reportBusy(`Clang: compiling \`${editor.getTitle()}\``, getResult);
}
return getResult();
}
diff --git a/pkg/nuclide-clang/spec/Refactoring-spec.js b/pkg/nuclide-clang/spec/Refactoring-spec.js
index 41ec50c..c0b29f5 100644
--- a/pkg/nuclide-clang/spec/Refactoring-spec.js
+++ b/pkg/nuclide-clang/spec/Refactoring-spec.js
@@ -26,10 +26,8 @@ describe("Refactoring", () => {
describe("Refactoring.refactoringsAtPoint", () => {
it("returns refactorings for a variable", () => {
waitsForPromise({ timeout: 15000 }, async () => {
- const refactorings = await Refactoring.refactoringsAtPoint(
- fakeEditor,
- new Point(2, 6)
- );
+ const refactorings = await Refactoring
+ .refactoringsAtPoint(fakeEditor, new Point(2, 6));
expect(
refactorings
).toEqual([ { kind: "rename", symbolAtPoint: { text: "var2", range: new Range([ 2, 2 ], [ 2, 17 ]) } } ]);
@@ -38,10 +36,8 @@ describe("Refactoring", () => {
it("returns nothing for a function", () => {
waitsForPromise({ timeout: 15000 }, async () => {
- const refactorings = await Refactoring.refactoringsAtPoint(
- fakeEditor,
- new Point(1, 5)
- );
+ const refactorings = await Refactoring
+ .refactoringsAtPoint(fakeEditor, new Point(1, 5));
expect(refactorings).toEqual([]);
});
});
diff --git a/pkg/nuclide-code-format/lib/CodeFormatManager.js b/pkg/nuclide-code-format/lib/CodeFormatManager.js
index 3926ed1..f5719a3 100644
--- a/pkg/nuclide-code-format/lib/CodeFormatManager.js
+++ b/pkg/nuclide-code-format/lib/CodeFormatManager.js
@@ -98,9 +98,8 @@ export default class CodeFormatManager {
if (!matchingProviders.length) {
if (displayErrors) {
- atom.notifications.addError(
- "No Code-Format providers registered for scope: " + scopeName
- );
+ atom
+ .notifications.addError("No Code-Format providers registered for scope: " + scopeName);
}
return false;
}
diff --git a/pkg/nuclide-code-highlight/lib/CodeHighlightManager.js b/pkg/nuclide-code-highlight/lib/CodeHighlightManager.js
index 225ee42..191be54 100644
--- a/pkg/nuclide-code-highlight/lib/CodeHighlightManager.js
+++ b/pkg/nuclide-code-highlight/lib/CodeHighlightManager.js
@@ -81,10 +81,8 @@ export default class CodeHighlightManager {
range => editor.markBufferRange(range, {})
);
this._markers.forEach(marker => {
- editor.decorateMarker(marker, {
- type: "highlight",
- class: "nuclide-code-highlight-marker"
- });
+ editor
+ .decorateMarker(marker, { type: "highlight", class: "nuclide-code-highlight-marker" });
});
}
diff --git a/pkg/nuclide-console/lib/LogTailer.js b/pkg/nuclide-console/lib/LogTailer.js
index 4ff3e7d..050ba85 100644
--- a/pkg/nuclide-console/lib/LogTailer.js
+++ b/pkg/nuclide-console/lib/LogTailer.js
@@ -108,7 +108,8 @@ export class LogTailer {
if (!errorWasHandled) {
// Default error handling.
- const message = `An unexpected error occurred while running the ${this._name} process` +
+ const message = `An unexpected error occurred while running the ${this
+ ._name} process` +
(err.message ? `:\n\n**${err.message}**` : ".");
const notification = atom.notifications.addError(message, {
dismissable: true,
diff --git a/pkg/nuclide-console/lib/main.js b/pkg/nuclide-console/lib/main.js
index e5815b5..398cadd 100644
--- a/pkg/nuclide-console/lib/main.js
+++ b/pkg/nuclide-console/lib/main.js
@@ -52,7 +52,8 @@ class Activation {
{ label: "Copy Message", command: "nuclide-console:copy-message" }
]
}),
- atom.commands.add(
+ atom.commands
+ .add(
".nuclide-console-record",
"nuclide-console:copy-message",
event => {
diff --git a/pkg/nuclide-console/lib/redux/Epics.js b/pkg/nuclide-console/lib/redux/Epics.js
index 82309f6..168dad4 100644
--- a/pkg/nuclide-console/lib/redux/Epics.js
+++ b/pkg/nuclide-console/lib/redux/Epics.js
@@ -59,15 +59,8 @@ export function executeEpic(
// TODO: Is this the best way to do this? Might want to go through nuclide-executors and have
// that register output sources?
return Observable
- .of(
- Actions.recordReceived({
- sourceId: currentExecutorId,
- kind: "request",
- level: "log",
- text: code,
- scopeName: executor.scopeName
- })
- )
+
+ .of(Actions.recordReceived({ sourceId: currentExecutorId, kind: "request", level: "log", text: code, scopeName: executor.scopeName }))
.finally(() => {
executor.send(code);
});
diff --git a/pkg/nuclide-console/lib/ui/ConsoleContainer.js b/pkg/nuclide-console/lib/ui/ConsoleContainer.js
index 275194d..76f5163 100644
--- a/pkg/nuclide-console/lib/ui/ConsoleContainer.js
+++ b/pkg/nuclide-console/lib/ui/ConsoleContainer.js
@@ -154,16 +154,8 @@ export class ConsoleContainer extends React.Component {
const currentExecutor = currentExecutorId != null
? state.executors.get(currentExecutorId)
: null;
- this.setState({
- ready: true,
- currentExecutor,
- executors: state.executors,
- providers: state.providers,
- providerStatuses: state.providerStatuses,
- records: state.records,
- history: state.history,
- sources: getSources(state)
- });
+ this
+ .setState({ ready: true, currentExecutor, executors: state.executors, providers: state.providers, providerStatuses: state.providerStatuses, records: state.records, history: state.history, sources: getSources(state) });
});
}
@@ -309,13 +301,8 @@ function getSources(state: AppState): Array<Source> {
for (let i = 0, len = state.records.length; i < len; i++) {
const record = state.records[i];
if (!mapOfSources.has(record.sourceId)) {
- mapOfSources.set(record.sourceId, {
- id: record.sourceId,
- name: record.sourceId,
- status: "stopped",
- start: undefined,
- stop: undefined
- });
+ mapOfSources
+ .set(record.sourceId, { id: record.sourceId, name: record.sourceId, status: "stopped", start: undefined, stop: undefined });
}
}
diff --git a/pkg/nuclide-console/lib/ui/ConsoleHeader.js b/pkg/nuclide-console/lib/ui/ConsoleHeader.js
index 7c2cb58..4ac905b 100644
--- a/pkg/nuclide-console/lib/ui/ConsoleHeader.js
+++ b/pkg/nuclide-console/lib/ui/ConsoleHeader.js
@@ -41,9 +41,8 @@ export default class ConsoleHeader extends React.Component {
(this: any)._handleClearButtonClick = this._handleClearButtonClick.bind(
this
);
- (this: any)._handleReToggleButtonClick = this._handleReToggleButtonClick.bind(
- this
- );
+ (this: any)._handleReToggleButtonClick = this._handleReToggleButtonClick
+ .bind(this);
(this: any)._renderOption = this._renderOption.bind(this);
}
diff --git a/pkg/nuclide-console/lib/ui/InputArea.js b/pkg/nuclide-console/lib/ui/InputArea.js
index 0b208c3..7f416ca 100644
--- a/pkg/nuclide-console/lib/ui/InputArea.js
+++ b/pkg/nuclide-console/lib/ui/InputArea.js
@@ -92,9 +92,8 @@ export default class OutputTable extends React.Component {
} else {
this.setState({ historyIndex });
}
- editor.setText(
- this.props.history[this.props.history.length - historyIndex - 1]
- );
+ editor
+ .setText(this.props.history[this.props.history.length - historyIndex - 1]);
} else if (event.which === DOWN_KEY_CODE) {
if (this.props.history.length === 0) {
return;
@@ -106,9 +105,8 @@ export default class OutputTable extends React.Component {
if (historyIndex === -1) {
editor.setText(this.state.draft);
} else {
- editor.setText(
- this.props.history[this.props.history.length - historyIndex - 1]
- );
+ editor
+ .setText(this.props.history[this.props.history.length - historyIndex - 1]);
}
}
}
diff --git a/pkg/nuclide-console/lib/ui/PromptButton.js b/pkg/nuclide-console/lib/ui/PromptButton.js
index 9faef66..169eea1 100644
--- a/pkg/nuclide-console/lib/ui/PromptButton.js
+++ b/pkg/nuclide-console/lib/ui/PromptButton.js
@@ -52,12 +52,8 @@ export default class PromptButton extends React.Component {
const menu = new remote.Menu();
// TODO: Sort alphabetically by label
this.props.options.forEach(option => {
- menu.append(new remote.MenuItem({
- type: "checkbox",
- checked: this.props.value === option.id,
- label: option.label,
- click: () => this.props.onChange(option.id)
- }));
+ menu
+ .append(new remote.MenuItem({ type: "checkbox", checked: this.props.value === option.id, label: option.label, click: () => this.props.onChange(option.id) }));
});
menu.popup(currentWindow, event.clientX, event.clientY);
}
diff --git a/pkg/nuclide-console/spec/Reducers-spec.js b/pkg/nuclide-console/spec/Reducers-spec.js
index 76e422b..1d7802e 100644
--- a/pkg/nuclide-console/spec/Reducers-spec.js
+++ b/pkg/nuclide-console/spec/Reducers-spec.js
@@ -39,10 +39,8 @@ describe("createStateStream", () => {
};
const actions = [];
for (let i = 0; i < 5; i++) {
- actions.push({
- type: Actions.RECORD_RECEIVED,
- payload: { record: { level: "info", text: i.toString() } }
- });
+ actions
+ .push({ type: Actions.RECORD_RECEIVED, payload: { record: { level: "info", text: i.toString() } } });
}
finalState = ((actions: any): Array<Action>).reduce(
Reducers,
diff --git a/pkg/nuclide-context-view/lib/main.js b/pkg/nuclide-context-view/lib/main.js
index d63f1d8..d1f1daf 100644
--- a/pkg/nuclide-context-view/lib/main.js
+++ b/pkg/nuclide-context-view/lib/main.js
@@ -105,11 +105,8 @@ export function getHomeFragments(): HomeFragments {
icon: "info",
description: "Easily navigate between symbols and their definitions in your code",
command: () => {
- atom.commands.dispatch(
- atom.views.getView(atom.workspace),
- "nuclide-context-view:toggle",
- { visible: true }
- );
+ atom
+ .commands.dispatch(atom.views.getView(atom.workspace), "nuclide-context-view:toggle", { visible: true });
}
},
priority: 2
@@ -130,12 +127,9 @@ export function consumeWorkspaceViewsService(api: WorkspaceViewsService): void {
new Disposable(
() => api.destroyWhere(item => item instanceof ContextViewManager)
),
- atom.commands.add(
- "atom-workspace",
- "nuclide-context-view:toggle",
- event => {
- api.toggle(WORKSPACE_VIEW_URI, (event: any).detail);
- }
- )
+ atom.commands
+ .add("atom-workspace", "nuclide-context-view:toggle", event => {
+ api.toggle(WORKSPACE_VIEW_URI, (event: any).detail);
+ })
);
}
diff --git a/pkg/nuclide-ctags-rpc/VendorLib/ctags-prebuilt/lib/ctags.js b/pkg/nuclide-ctags-rpc/VendorLib/ctags-prebuilt/lib/ctags.js
index 04b8f52..734b5b0 100644
--- a/pkg/nuclide-ctags-rpc/VendorLib/ctags-prebuilt/lib/ctags.js
+++ b/pkg/nuclide-ctags-rpc/VendorLib/ctags-prebuilt/lib/ctags.js
@@ -8,12 +8,8 @@ var binding_path = path.join(
// ABI v49 is only for Electron. https://github.com/electron/electron/issues/5851
process.versions.modules === "49"
? [ "electron", "v1.3", process.platform, process.arch ].join("-")
- : [
- "node",
- "v" + process.versions.modules,
- process.platform,
- process.arch
- ].join("-"),
+ : [ "node", "v" + process.versions.modules, process.platform, process.arch ]
+ .join("-"),
"ctags.node"
);
@@ -42,10 +38,8 @@ exports.findTags = function(tagsFilePath, tag, options, callback) {
}
var tagsWrapper = new Tags(tagsFilePath);
- tagsWrapper.findTags(tag, partialMatch, caseInsensitive, limit, function(
- error,
- tags
- ) {
+ tagsWrapper
+ .findTags(tag, partialMatch, caseInsensitive, limit, function(error, tags) {
tagsWrapper.end();
callback(error, tags);
});
diff --git a/pkg/nuclide-ctags-rpc/lib/CtagsService.js b/pkg/nuclide-ctags-rpc/lib/CtagsService.js
index 8d7eec7..383a086 100644
--- a/pkg/nuclide-ctags-rpc/lib/CtagsService.js
+++ b/pkg/nuclide-ctags-rpc/lib/CtagsService.js
@@ -57,35 +57,32 @@ export class CtagsService {
const dir = nuclideUri.dirname(this._tagsPath);
return new Promise((resolve, reject) => {
- ctags.findTags(this._tagsPath, query, options, async (
- error,
- tags: Array<Object>
- ) =>
- {
- if (error != null) {
- reject(error);
- } else {
- const processed = await Promise.all(
- tags.map(async tag => {
- // Convert relative paths to absolute ones.
- tag.file = nuclideUri.join(dir, tag.file);
- // Tag files are often not perfectly in sync - filter out missing files.
- if (await fsPromise.exists(tag.file)) {
- if (tag.fields != null) {
- const map = new Map();
- for (const key in tag.fields) {
- map.set(key, tag.fields[key]);
- }
- tag.fields = map;
+ ctags
+ .findTags(this._tagsPath, query, options, async (error, tags: Array<Object>) => {
+ if (error != null) {
+ reject(error);
+ } else {
+ const processed = await Promise.all(
+ tags.map(async tag => {
+ // Convert relative paths to absolute ones.
+ tag.file = nuclideUri.join(dir, tag.file);
+ // Tag files are often not perfectly in sync - filter out missing files.
+ if (await fsPromise.exists(tag.file)) {
+ if (tag.fields != null) {
+ const map = new Map();
+ for (const key in tag.fields) {
+ map.set(key, tag.fields[key]);
}
- return tag;
+ tag.fields = map;
}
- return null;
- })
- );
- resolve(arrayCompact(processed));
- }
- });
+ return tag;
+ }
+ return null;
+ })
+ );
+ resolve(arrayCompact(processed));
+ }
+ });
});
}
diff --git a/pkg/nuclide-ctags/lib/utils.js b/pkg/nuclide-ctags/lib/utils.js
index d3090a6..9ebb39c 100644
--- a/pkg/nuclide-ctags/lib/utils.js
+++ b/pkg/nuclide-ctags/lib/utils.js
@@ -77,10 +77,8 @@ export async function getLineNumberForTag(tag: CtagsResult): Promise<number> {
}
}
} catch (e) {
- getLogger().warn(
- `nuclide-ctags: Could not locate pattern in ${tag.file}`,
- e
- );
+ getLogger()
+ .warn(`nuclide-ctags: Could not locate pattern in ${tag.file}`, e);
}
}
diff --git a/pkg/nuclide-ctags/spec/HyperclickHelpers-spec.js b/pkg/nuclide-ctags/spec/HyperclickHelpers-spec.js
index 6861e58..b2075d3 100644
--- a/pkg/nuclide-ctags/spec/HyperclickHelpers-spec.js
+++ b/pkg/nuclide-ctags/spec/HyperclickHelpers-spec.js
@@ -92,11 +92,8 @@ describe("HyperclickHelpers", () => {
}
];
- const result = await HyperclickHelpers.getSuggestionForWord(
- fakeEditor,
- "A",
- new Range([ 0, 0 ], [ 0, 1 ])
- );
+ const result = await HyperclickHelpers
+ .getSuggestionForWord(fakeEditor, "A", new Range([ 0, 0 ], [ 0, 1 ]));
invariant(result);
// Note the ordering (by matching path prefix).
@@ -135,11 +132,11 @@ describe("HyperclickHelpers", () => {
}
];
- const result = await HyperclickHelpers.getSuggestionForWord(
- fakeEditor,
- "test",
- new Range([ 0, 0 ], [ 0, 1 ])
- );
+ const result = await HyperclickHelpers
+ .getSuggestionForWord(fakeEditor, "test", new Range([ 0, 0 ], [
+ 0,
+ 1
+ ]));
invariant(result);
invariant(typeof result.callback === "function");
@@ -151,11 +148,11 @@ describe("HyperclickHelpers", () => {
it("returns null for no results", () => {
waitsForPromise(async () => {
findTagsResult = [];
- const result = await HyperclickHelpers.getSuggestionForWord(
- fakeEditor,
- "test",
- new Range([ 0, 0 ], [ 0, 1 ])
- );
+ const result = await HyperclickHelpers
+ .getSuggestionForWord(fakeEditor, "test", new Range([ 0, 0 ], [
+ 0,
+ 1
+ ]));
expect(result).toBe(null);
});
});
diff --git a/pkg/nuclide-ctags/spec/QuickOpenHelpers-spec.js b/pkg/nuclide-ctags/spec/QuickOpenHelpers-spec.js
index 0879ede..9ce9c75 100644
--- a/pkg/nuclide-ctags/spec/QuickOpenHelpers-spec.js
+++ b/pkg/nuclide-ctags/spec/QuickOpenHelpers-spec.js
@@ -84,9 +84,8 @@ describe("QuickOpenHelpers", () => {
const renderedNode = ReactDOM.findDOMNode(renderedComponent);
expect(
- renderedNode.querySelectorAll(
- ".omnisearch-symbol-result-filename"
- ).length
+ renderedNode.querySelectorAll(".omnisearch-symbol-result-filename")
+ .length
).toBe(1);
expect(renderedNode.querySelectorAll(".icon-code").length).toBe(1);
});
diff --git a/pkg/nuclide-current-working-directory/lib/CwdApi.js b/pkg/nuclide-current-working-directory/lib/CwdApi.js
index b8520e6..9196bb0 100644
--- a/pkg/nuclide-current-working-directory/lib/CwdApi.js
+++ b/pkg/nuclide-current-working-directory/lib/CwdApi.js
@@ -28,11 +28,8 @@ export class CwdApi {
this._cwd$ = // Re-check the CWD every time the project paths change.
// Adding/removing projects can affect the validity of cwdPath.
this._cwdPath$
- .merge(
- observableFromSubscribeFunction(
- cb => atom.project.onDidChangePaths(cb)
- ).mapTo(null)
- )
+
+ .merge(observableFromSubscribeFunction(cb => atom.project.onDidChangePaths(cb)).mapTo(null))
.map(() => this.getCwd())
.map(directory => isValidDirectory(directory) ? directory : null)
.distinctUntilChanged();
diff --git a/pkg/nuclide-datatip/lib/DatatipManager.js b/pkg/nuclide-datatip/lib/DatatipManager.js
index 3c25d7c..b2238f0 100644
--- a/pkg/nuclide-datatip/lib/DatatipManager.js
+++ b/pkg/nuclide-datatip/lib/DatatipManager.js
@@ -332,14 +332,8 @@ class DatatipManagerForEditor {
_setStartFetchingDebounce(): void {
this._startFetchingDebounce = debounce(
() => {
- this._startFetching(
- () =>
- getBufferPosition(
- this._editor,
- this._editorView,
- this._lastMoveEvent
- )
- );
+ this
+ ._startFetching(() => getBufferPosition(this._editor, this._editorView, this._lastMoveEvent));
},
ensurePositiveNumber(
(featureConfig.get("nuclide-datatip.datatipDebounceDelay"): any),
diff --git a/pkg/nuclide-datatip/lib/PinnedDatatip.js b/pkg/nuclide-datatip/lib/PinnedDatatip.js
index ccd2583..6759396 100644
--- a/pkg/nuclide-datatip/lib/PinnedDatatip.js
+++ b/pkg/nuclide-datatip/lib/PinnedDatatip.js
@@ -88,14 +88,10 @@ export class PinnedDatatip {
this._boundHandleMouseLeave
);
this._subscriptions.add(new Disposable(() => {
- this._hostElement.removeEventListener(
- "mouseenter",
- this._boundHandleMouseEnter
- );
- this._hostElement.removeEventListener(
- "mouseleave",
- this._boundHandleMouseLeave
- );
+ this
+ ._hostElement.removeEventListener("mouseenter", this._boundHandleMouseEnter);
+ this
+ ._hostElement.removeEventListener("mouseleave", this._boundHandleMouseLeave);
}));
this._mouseUpTimeout = null;
this._offset = { x: 0, y: 0 };
@@ -158,15 +154,11 @@ export class PinnedDatatip {
this._ensureMouseSubscriptionDisposed();
this._mouseSubscription = documentMouseMove$()
.takeUntil(documentMouseUp$())
- .subscribe(
- (e: MouseEvent) => {
- this.handleGlobalMouseMove(e);
- },
- (error: any) => {},
- () => {
- this.handleGlobalMouseUp();
- }
- );
+ .subscribe((e: MouseEvent) => {
+ this.handleGlobalMouseMove(e);
+ }, (error: any) => {}, () => {
+ this.handleGlobalMouseUp();
+ });
}
handleCapturedClick(event: SyntheticEvent): void {
@@ -225,11 +217,8 @@ export class PinnedDatatip {
invalidate: "never"
});
this._marker = marker;
- _editor.decorateMarker(marker, {
- type: "overlay",
- position: "head",
- item: this._hostElement
- });
+ _editor
+ .decorateMarker(marker, { type: "overlay", position: "head", item: this._hostElement });
this._rangeDecoration = _editor.decorateMarker(marker, {
type: "highlight",
class: rangeClassname
@@ -237,10 +226,8 @@ export class PinnedDatatip {
} else {
// `this._rangeDecoration` is guaranteed to exist iff `this._marker` exists.
invariant(this._rangeDecoration);
- this._rangeDecoration.setProperties({
- type: "highlight",
- class: rangeClassname
- });
+ this
+ ._rangeDecoration.setProperties({ type: "highlight", class: rangeClassname });
}
}
diff --git a/pkg/nuclide-debugger-base/lib/DebuggerInstance.js b/pkg/nuclide-debugger-base/lib/DebuggerInstance.js
index 9aefa3a..c7fa55b 100644
--- a/pkg/nuclide-debugger-base/lib/DebuggerInstance.js
+++ b/pkg/nuclide-debugger-base/lib/DebuggerInstance.js
@@ -114,11 +114,8 @@ export class DebuggerInstance extends DebuggerInstanceBase {
this._rpcService
.getServerMessageObservable()
.refCount()
- .subscribe(
- this._handleServerMessage.bind(this),
- this._handleServerError.bind(this),
- this._handleSessionEnd.bind(this)
- )
+
+ .subscribe(this._handleServerMessage.bind(this), this._handleServerError.bind(this), this._handleSessionEnd.bind(this))
));
}
@@ -153,9 +150,8 @@ export class DebuggerInstance extends DebuggerInstanceBase {
if (this._chromeWebSocket) {
this
.getLogger()
- .log(
- "Already connected to Chrome WebSocket. Discarding new connection."
- );
+
+ .log("Already connected to Chrome WebSocket. Discarding new connection.");
webSocket.close();
return;
}
diff --git a/pkg/nuclide-debugger-base/lib/DebuggerRpcServiceBase.js b/pkg/nuclide-debugger-base/lib/DebuggerRpcServiceBase.js
index 5a9aaa5..78132fd 100644
--- a/pkg/nuclide-debugger-base/lib/DebuggerRpcServiceBase.js
+++ b/pkg/nuclide-debugger-base/lib/DebuggerRpcServiceBase.js
@@ -83,9 +83,8 @@ export class DebuggerWebsocketRpcService extends DebuggerRpcServiceBase {
} else {
this
.getLogger()
- .logInfo(
- `Nuclide sent message to server after socket closed: ${message}`
- );
+
+ .logInfo(`Nuclide sent message to server after socket closed: ${message}`);
}
return Promise.resolve();
}
diff --git a/pkg/nuclide-debugger-common/lib/DebuggerRpcServiceBase.js b/pkg/nuclide-debugger-common/lib/DebuggerRpcServiceBase.js
index 21c8c80..f649694 100644
--- a/pkg/nuclide-debugger-common/lib/DebuggerRpcServiceBase.js
+++ b/pkg/nuclide-debugger-common/lib/DebuggerRpcServiceBase.js
@@ -106,9 +106,8 @@ export class DebuggerRpcWebSocketService extends DebuggerRpcServiceBase {
} else {
this
.getLogger()
- .logInfo(
- `Nuclide sent message to server after socket closed: ${message}`
- );
+
+ .logInfo(`Nuclide sent message to server after socket closed: ${message}`);
}
return Promise.resolve();
}
diff --git a/pkg/nuclide-debugger-iwdp-rpc/lib/BreakpointManager.js b/pkg/nuclide-debugger-iwdp-rpc/lib/BreakpointManager.js
index 0b5946b..41ac104 100644
--- a/pkg/nuclide-debugger-iwdp-rpc/lib/BreakpointManager.js
+++ b/pkg/nuclide-debugger-iwdp-rpc/lib/BreakpointManager.js
@@ -69,13 +69,8 @@ export class BreakpointManager {
// We are assuming that breakpoints will only be unresolved if they are sent when there
// are no connections present.
breakpoint.resolved = true;
- this._sendMessageToClient({
- method: "Debugger.breakpointResolved",
- params: {
- breakpointId: breakpoint.nuclideId,
- location: response.result.location
- }
- });
+ this
+ ._sendMessageToClient({ method: "Debugger.breakpointResolved", params: { breakpointId: breakpoint.nuclideId, location: response.result.location } });
})
);
}
diff --git a/pkg/nuclide-debugger-iwdp-rpc/lib/ConnectionMultiplexer.js b/pkg/nuclide-debugger-iwdp-rpc/lib/ConnectionMultiplexer.js
index f31ecb1..955220c 100644
--- a/pkg/nuclide-debugger-iwdp-rpc/lib/ConnectionMultiplexer.js
+++ b/pkg/nuclide-debugger-iwdp-rpc/lib/ConnectionMultiplexer.js
@@ -224,10 +224,8 @@ export class ConnectionMultiplexer {
const response = await connection.sendCommand(message);
this._sendMessageToClient(response);
} else {
- this._replyWithError(
- message.id,
- "Runtime.getProperties sent but we have no connections"
- );
+ this
+ ._replyWithError(message.id, "Runtime.getProperties sent but we have no connections");
}
}
@@ -236,10 +234,8 @@ export class ConnectionMultiplexer {
const response = await this._enabledConnection.sendCommand(message);
this._sendMessageToClient(response);
} else {
- this._replyWithError(
- message.id,
- `${message.method} sent to running connection`
- );
+ this
+ ._replyWithError(message.id, `${message.method} sent to running connection`);
}
}
diff --git a/pkg/nuclide-debugger-iwdp-rpc/lib/connectToIwdp.js b/pkg/nuclide-debugger-iwdp-rpc/lib/connectToIwdp.js
index 9e863f8..1d3de3e 100644
--- a/pkg/nuclide-debugger-iwdp-rpc/lib/connectToIwdp.js
+++ b/pkg/nuclide-debugger-iwdp-rpc/lib/connectToIwdp.js
@@ -52,9 +52,8 @@ export function connectToIwdp(): Observable<IosDeviceInfo> {
} else if (message.kind === "exit") {
return Observable.empty();
} else {
- return Observable.throw(new Error(
- `Error for ios_webkit_debug_proxy: ${JSON.stringify(message)}`
- ));
+ return Observable
+ .throw(new Error(`Error for ios_webkit_debug_proxy: ${JSON.stringify(message)}`));
}
})
.mergeMap(deviceInfos => deviceInfos)
diff --git a/pkg/nuclide-debugger-iwdp/lib/AttachUiComponent.js b/pkg/nuclide-debugger-iwdp/lib/AttachUiComponent.js
index 34d6261..66c9191 100644
--- a/pkg/nuclide-debugger-iwdp/lib/AttachUiComponent.js
+++ b/pkg/nuclide-debugger-iwdp/lib/AttachUiComponent.js
@@ -31,7 +31,8 @@ const TARGET_ENVIRONMENTS = [
{ label: "Android", value: "Android" }
];
-export class AttachUiComponent extends React.Component<void, PropsType, StateType> {
+export class AttachUiComponent extends React
+ .Component<void, PropsType, StateType> {
props: PropsType;
state: StateType;
diff --git a/pkg/nuclide-debugger-native-rpc/lib/NativeDebuggerServiceImplementation.js b/pkg/nuclide-debugger-native-rpc/lib/NativeDebuggerServiceImplementation.js
index 3b6f80a..d3fe62a 100644
--- a/pkg/nuclide-debugger-native-rpc/lib/NativeDebuggerServiceImplementation.js
+++ b/pkg/nuclide-debugger-native-rpc/lib/NativeDebuggerServiceImplementation.js
@@ -174,15 +174,8 @@ export class NativeDebuggerService extends DebuggerRpcWebSocketService {
const ipcStream = lldbProcess.stdio[IPC_CHANNEL_FD];
this
.getSubscriptions()
- .add(
- splitStream(observeStream(ipcStream)).subscribe(
- this._handleIpcMessage.bind(this, ipcStream),
- error =>
- this
- .getLogger()
- .logError(`ipcStream error: ${JSON.stringify(error)}`)
- )
- );
+
+ .add(splitStream(observeStream(ipcStream)).subscribe(this._handleIpcMessage.bind(this, ipcStream), error => this.getLogger().logError(`ipcStream error: ${JSON.stringify(error)}`)));
}
_handleIpcMessage(ipcStream: Object, message: string): void {
@@ -281,14 +274,12 @@ export class NativeDebuggerService extends DebuggerRpcWebSocketService {
const errorMessage = chunk.toString();
this
.getClientCallback()
- .sendUserOutputMessage(
- JSON.stringify({ level: "error", text: errorMessage })
- );
+
+ .sendUserOutputMessage(JSON.stringify({ level: "error", text: errorMessage }));
this
.getLogger()
- .logError(
- `child process(${lldbProcess.pid}) stderr: ${errorMessage}`
- );
+
+ .logError(`child process(${lldbProcess.pid}) stderr: ${errorMessage}`);
});
lldbProcess.on("error", (err: Object) => {
reject(`debugger server error: ${JSON.stringify(err)}`);
diff --git a/pkg/nuclide-debugger-native/lib/AttachUIComponent.js b/pkg/nuclide-debugger-native/lib/AttachUIComponent.js
index c48f278..a5dadaa 100644
--- a/pkg/nuclide-debugger-native/lib/AttachUIComponent.js
+++ b/pkg/nuclide-debugger-native/lib/AttachUIComponent.js
@@ -78,7 +78,8 @@ function getCompareFunction(
return () => 0;
}
-export class AttachUIComponent extends React.Component<void, PropsType, StateType> {
+export class AttachUIComponent extends React
+ .Component<void, PropsType, StateType> {
props: PropsType;
state: StateType;
@@ -93,9 +94,8 @@ export class AttachUIComponent extends React.Component<void, PropsType, StateTyp
this
);
(this: any)._handleAttachClick = this._handleAttachClick.bind(this);
- (this: any)._handleParentVisibilityChanged = this._handleParentVisibilityChanged.bind(
- this
- );
+ (this: any)._handleParentVisibilityChanged = this
+ ._handleParentVisibilityChanged.bind(this);
(this: any)._updateAttachTargetList = this._updateAttachTargetList.bind(
this
);
diff --git a/pkg/nuclide-debugger-native/lib/LLDBLaunchAttachProvider.js b/pkg/nuclide-debugger-native/lib/LLDBLaunchAttachProvider.js
index 993f6d3..d152c9c 100644
--- a/pkg/nuclide-debugger-native/lib/LLDBLaunchAttachProvider.js
+++ b/pkg/nuclide-debugger-native/lib/LLDBLaunchAttachProvider.js
@@ -66,11 +66,8 @@ export class LLDBLaunchAttachProvider extends DebuggerLaunchAttachProvider {
): ?React.Element<any> {
const action = this._uiProviderMap.get(actionName);
if (action) {
- return action.getComponent(
- this._store,
- this._actions,
- parentEventEmitter
- );
+ return action
+ .getComponent(this._store, this._actions, parentEventEmitter);
}
return null;
}
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/CallFramesProvider.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/CallFramesProvider.js
index 9471965..1ebd6f5 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/CallFramesProvider.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/CallFramesProvider.js
@@ -81,14 +81,11 @@ CallFramesProvider.prototype = {
resolveScopeId: function(objectId, callback) {
var scopeIdMatch = SCOPE_ID_MATCHER.exec(objectId);
if (!scopeIdMatch) throw new Error('Invalid scope id "' + objectId + '"');
- this._debuggerClient.request(
- "scope",
- { number: Number(scopeIdMatch[2]), frameNumber: Number(scopeIdMatch[1]) },
- function(err, result) {
- if (err) callback(err);
- else callback(null, result.object.ref);
- }
- );
+ this
+ ._debuggerClient.request("scope", { number: Number(scopeIdMatch[2]), frameNumber: Number(scopeIdMatch[1]) }, function(err, result) {
+ if (err) callback(err);
+ else callback(null, result.object.ref);
+ });
}
};
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerAgent.js
index 8fc8778..ad1badb 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerAgent.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerAgent.js
@@ -196,7 +196,8 @@ DebuggerAgent.prototype = {
return;
}
- this._breakEventHandler.continueToLocationBreakpointId = response.breakpoint;
+ this._breakEventHandler.continueToLocationBreakpointId = response
+ .breakpoint;
this._debuggerClient.request("continue", undefined, function(
error,
@@ -208,10 +209,8 @@ DebuggerAgent.prototype = {
);
},
getScriptSource: function(params, done) {
- this._scriptManager.getScriptSourceById(Number(params.scriptId), function(
- err,
- source
- ) {
+ this
+ ._scriptManager.getScriptSourceById(Number(params.scriptId), function(err, source) {
if (err) return done(err);
return done(null, { scriptSource: source });
});
@@ -247,10 +246,8 @@ DebuggerAgent.prototype = {
breakEventHandler.fetchCallFrames(function(err, response) {
var callframes = [];
if (err) {
- frontendClient.sendLogToConsole(
- "error",
- "Cannot update stack trace after a script changed: " + err
- );
+ frontendClient
+ .sendLogToConsole("error", "Cannot update stack trace after a script changed: " + err);
} else {
callframes = response;
}
@@ -266,10 +263,8 @@ DebuggerAgent.prototype = {
},
_persistScriptChanges: function(scriptId, newSource) {
if (!this._saveLiveEdit) {
- this._warn(
- "Saving of live-edit changes back to source files is disabled by configuration.\n" +
- 'Change the option "saveLiveEdit" in config.json to enable this feature.'
- );
+ this
+ ._warn("Saving of live-edit changes back to source files is disabled by configuration.\n" + 'Change the option "saveLiveEdit" in config.json to enable this feature.');
return;
}
@@ -281,11 +276,8 @@ DebuggerAgent.prototype = {
var scriptFile = source.v8name;
if (!scriptFile || scriptFile.indexOf(path.sep) == -1) {
- this._warn(
- 'Cannot save changes to disk: script id %s "%s" was not loaded from a file.',
- scriptId,
- scriptFile || "null"
- );
+ this
+ ._warn('Cannot save changes to disk: script id %s "%s" was not loaded from a file.', scriptId, scriptFile || "null");
return;
}
@@ -300,10 +292,8 @@ DebuggerAgent.prototype = {
);
},
_warn: function() {
- this._frontendClient.sendLogToConsole(
- "warning",
- format.apply(this, arguments)
- );
+ this
+ ._frontendClient.sendLogToConsole("warning", format.apply(this, arguments));
},
setPauseOnExceptions: function(params, done) {
var args = [
@@ -340,10 +330,8 @@ DebuggerAgent.prototype = {
condition: params.condition
};
- this._debuggerClient.request("setbreakpoint", requestParams, function(
- error,
- response
- ) {
+ this
+ ._debuggerClient.request("setbreakpoint", requestParams, function(error, response) {
if (error != null) {
done(error);
return;
@@ -358,10 +346,8 @@ DebuggerAgent.prototype = {
});
},
removeBreakpoint: function(params, done) {
- this._debuggerClient.clearBreakpoint(params.breakpointId, function(
- error,
- response
- ) {
+ this
+ ._debuggerClient.clearBreakpoint(params.breakpointId, function(error, response) {
done(error, null);
});
},
@@ -396,21 +382,18 @@ DebuggerAgent.prototype = {
var expression = params.expression;
var frame = Number(params.callFrameId);
- self._debuggerClient.request(
- "evaluate",
- { expression: params.expression, frame: frame },
- function(err, result) {
- // Errors from V8 are actually just messages, so we need to fill them out a bit.
- if (err) {
- err = convert.v8ErrorToInspectorError(err);
- }
-
- done(null, {
- result: err || convert.v8ResultToInspectorResult(result),
- wasThrown: !!err
- });
+ self
+ ._debuggerClient.request("evaluate", { expression: params.expression, frame: frame }, function(err, result) {
+ // Errors from V8 are actually just messages, so we need to fill them out a bit.
+ if (err) {
+ err = convert.v8ErrorToInspectorError(err);
}
- );
+
+ done(null, {
+ result: err || convert.v8ResultToInspectorResult(result),
+ wasThrown: !!err
+ });
+ });
},
getFunctionDetails: function(params, done) {
var handle = params.functionId;
@@ -436,11 +419,8 @@ DebuggerAgent.prototype = {
}
},
_getFunctionDetailsOfObjectId: function(handle, callback) {
- this._debuggerClient.request(
- "lookup",
- { handles: [ handle ], includeSource: false },
- callback
- );
+ this
+ ._debuggerClient.request("lookup", { handles: [ handle ], includeSource: false }, callback);
},
_getFunctionDetailsOfConsoleId: function(handle, callback) {
this._consoleClient.lookupConsoleId(handle, callback);
@@ -449,11 +429,8 @@ DebuggerAgent.prototype = {
this._heapProfilerClient.lookupHeapObjectId(handle, callback);
},
restartFrame: function(params, done) {
- this._debuggerClient.request(
- "restartframe",
- { frame: Number(params.callFrameId) },
- this._handleChangeLiveOrRestartFrameResponse.bind(this, done)
- );
+ this
+ ._debuggerClient.request("restartframe", { frame: Number(params.callFrameId) }, this._handleChangeLiveOrRestartFrameResponse.bind(this, done));
},
setVariableValue: function(params, done) {
var version = this._debuggerClient.target.nodeVersion;
@@ -471,20 +448,10 @@ DebuggerAgent.prototype = {
_doSetVariableValue: function(params, done) {
var value = convert.inspectorValueToV8Value(params.newValue);
- this._debuggerClient.request(
- "setVariableValue",
- {
- name: params.variableName,
- scope: {
- number: Number(params.scopeNumber),
- frameNumber: Number(params.callFrameId)
- },
- newValue: value
- },
- function(err, result) {
- done(err, result);
- }
- );
+ this
+ ._debuggerClient.request("setVariableValue", { name: params.variableName, scope: { number: Number(params.scopeNumber), frameNumber: Number(params.callFrameId) }, newValue: value }, function(err, result) {
+ done(err, result);
+ });
},
setSkipAllPauses: function(params, done) {
if (params.skipped) done(new Error("Not implemented."));
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerClient.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerClient.js
index e1caf0c..5ef59e4 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerClient.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerClient.js
@@ -146,13 +146,10 @@ DebuggerClient.prototype.clearBreakpoint = function(breakpointId, done) {
* @param {function(error, response)} done
*/
DebuggerClient.prototype.evaluateGlobal = function(expression, done) {
- this.request(
- "evaluate",
- { expression: "JSON.stringify(" + expression + ")", global: true },
- function _handleEvaluateResponse(err, result) {
- done(err, JSON.parse(result.value));
- }
- );
+ this
+ .request("evaluate", { expression: "JSON.stringify(" + expression + ")", global: true }, function _handleEvaluateResponse(err, result) {
+ done(err, JSON.parse(result.value));
+ });
};
/**
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/FrontendClient.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/FrontendClient.js
index 80d3aa2..bc93560 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/FrontendClient.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/FrontendClient.js
@@ -143,19 +143,8 @@ FrontendClient.prototype.resumeEvents = function() {
*/
FrontendClient.prototype.sendLogToConsole = function(level, text) {
this.sendEvent("Console.showConsole");
- this.sendEvent("Console.messageAdded", {
- message: {
- source: 3,
- type: 0,
- level: level,
- line: 0,
- column: 0,
- url: "",
- groupLevel: 7,
- repeatCount: 1,
- text: text
- }
- });
+ this
+ .sendEvent("Console.messageAdded", { message: { source: 3, type: 0, level: level, line: 0, column: 0, url: "", groupLevel: 7, repeatCount: 1, text: text } });
};
/**
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/FrontendCommandHandler.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/FrontendCommandHandler.js
index cea9016..7f3f2cc 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/FrontendCommandHandler.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/FrontendCommandHandler.js
@@ -37,86 +37,32 @@ function FrontendCommandHandler(config, session) {
FrontendCommandHandler.prototype = {
_initializeRegistry: function() {
- this._registerAgent("Debugger", new DebuggerAgent(
- this._config,
- this._session
- ));
- this._registerAgent("Console", new ConsoleAgent(
- this._config,
- this._session
- ));
- this._registerAgent("Runtime", new RuntimeAgent(
- this._config,
- this._session
- ));
+ this
+ ._registerAgent("Debugger", new DebuggerAgent(this._config, this._session));
+ this
+ ._registerAgent("Console", new ConsoleAgent(this._config, this._session));
+ this
+ ._registerAgent("Runtime", new RuntimeAgent(this._config, this._session));
this._registerAgent("Page", new PageAgent(this._config, this._session));
- this._registerAgent("Network", new NetworkAgent(
- this._config,
- this._session
- ));
- this._registerAgent("Profiler", new ProfilerAgent(
- this._config,
- this._session
- ));
- this._registerAgent("HeapProfiler", new HeapProfilerAgent(
- this._config,
- this._session
- ));
+ this
+ ._registerAgent("Network", new NetworkAgent(this._config, this._session));
+ this
+ ._registerAgent("Profiler", new ProfilerAgent(this._config, this._session));
+ this
+ ._registerAgent("HeapProfiler", new HeapProfilerAgent(this._config, this._session));
//TODO(3y3):
// Remove next from noop before closing #341:
// - DOMDebugger.setXHRBreakpoint
// - DOMDebugger.removeXHRBreakpoint
- this._registerNoopCommands(
- "Network.enable",
- "Network.setCacheDisabled",
- "Console.enable",
- "Console.setMonitoringXHREnabled",
- "Console.addInspectedHeapObject",
- "Database.enable",
- "DOMDebugger.setXHRBreakpoint",
- "DOMDebugger.removeXHRBreakpoint",
- "DOMDebugger.setInstrumentationBreakpoint",
- "DOMDebugger.removeInstrumentationBreakpoint",
- "DOMStorage.enable",
- "DOM.hideHighlight",
- "Inspector.enable",
- "Page.addScriptToEvaluateOnLoad",
- "Page.removeScriptToEvaluateOnLoad",
- "Page.setDeviceOrientationOverride",
- "Page.clearDeviceOrientationOverride",
- "Page.setGeolocationOverride",
- "Page.clearGeolocationOverride",
- "Page.setContinuousPaintingEnabled",
- "Page.setEmulatedMedia",
- "Page.setDeviceMetricsOverride",
- "Page.setScriptExecutionDisabled",
- "Page.setShowDebugBorders",
- "Page.setShowFPSCounter",
- "Page.setShowScrollBottleneckRects",
- "Page.setShowViewportSizeOnResize",
- "Page.setShowPaintRects",
- "Page.setForceCompositingMode",
- "CSS.enable",
- "CSS.disable",
- "DOM.enable",
- "DOM.disable",
- "Runtime.run",
- "IndexedDB.enable",
- "HeapProfiler.enable",
- "Debugger.setAsyncCallStackDepth",
- "Debugger.skipStackFrames",
- "Console.setTracingBasedTimeline",
- "Profiler.setSamplingInterval",
- "Worker.setAutoconnectToWorkers"
- );
+ this
+ ._registerNoopCommands("Network.enable", "Network.setCacheDisabled", "Console.enable", "Console.setMonitoringXHREnabled", "Console.addInspectedHeapObject", "Database.enable", "DOMDebugger.setXHRBreakpoint", "DOMDebugger.removeXHRBreakpoint", "DOMDebugger.setInstrumentationBreakpoint", "DOMDebugger.removeInstrumentationBreakpoint", "DOMStorage.enable", "DOM.hideHighlight", "Inspector.enable", "Page.addScriptToEvaluateOnLoad", "Page.removeScriptToEvaluateOnLoad", "Page.setDeviceOrientationOverride", "Page.clearDeviceOrientationOverride", "Page.setGeolocationOverride", "Page.clearGeolocationOverride", "Page.setContinuousPaintingEnabled", "Page.setEmulatedMedia", "Page.setDeviceMetricsOverride", "Page.setScriptExecutionDisabled", "Page.setShowDebugBorders", "Page.setShowFPSCounter", "Page.setShowScrollBottleneckRects", "Page.setShowViewportSizeOnResize", "Page.setShowPaintRects", "Page.setForceCompositingMode", "CSS.enable", "CSS.disable", "DOM.enable", "DOM.disable", "Runtime.run", "IndexedDB.enable", "HeapProfiler.enable", "Debugger.setAsyncCallStackDepth", "Debugger.skipStackFrames", "Console.setTracingBasedTimeline", "Profiler.setSamplingInterval", "Worker.setAutoconnectToWorkers");
this._registerQuery("CSS.getSupportedCSSProperties", { cssProperties: [] });
this._registerQuery("Worker.canInspectWorkers", { result: false });
this._registerQuery("Page.getScriptExecutionStatus", { result: "enabled" });
- this._registerQuery("IndexedDB.requestDatabaseNames", {
- databaseNames: []
- });
+ this
+ ._registerQuery("IndexedDB.requestDatabaseNames", { databaseNames: [] });
},
_registerAgent: function(name, agent) {
this._agents[name] = agent;
@@ -158,12 +104,8 @@ FrontendCommandHandler.prototype = {
method;
if (this._specialCommands[fullMethodName]) {
- this._handleMethodResult(
- requestId,
- fullMethodName,
- null,
- this._specialCommands[fullMethodName].result
- );
+ this
+ ._handleMethodResult(requestId, fullMethodName, null, this._specialCommands[fullMethodName].result);
return;
}
@@ -193,14 +135,11 @@ FrontendCommandHandler.prototype = {
);
},
_sendNotImplementedResponse: function(requestId, fullMethodName) {
- console.log(
- "Received request for a method not implemented:",
- fullMethodName
- );
+ console
+ .log("Received request for a method not implemented:", fullMethodName);
- this._handleMethodResult(requestId, fullMethodName, new Error(
- "Not implemented."
- ));
+ this
+ ._handleMethodResult(requestId, fullMethodName, new Error("Not implemented."));
},
_handleMethodResult: function(requestId, fullMethodName, error, result) {
var response;
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/HeapProfilerAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/HeapProfilerAgent.js
index 2173cff..bfea95f 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/HeapProfilerAgent.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/HeapProfilerAgent.js
@@ -36,12 +36,8 @@ function HeapProfilerAgent(config, session) {
}
HeapProfilerAgent.prototype._inject = function() {
- this._translateEventToFrontend(
- "reportHeapSnapshotProgress",
- "addHeapSnapshotChunk",
- "heapStatsUpdate",
- "lastSeenObjectId"
- );
+ this
+ ._translateEventToFrontend("reportHeapSnapshotProgress", "addHeapSnapshotChunk", "heapStatsUpdate", "lastSeenObjectId");
this._injectorClient.injection(
function(require, debug, options) {
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/HeapProfilerAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/HeapProfilerAgent.js
index 2c0d458..011c41d 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/HeapProfilerAgent.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/HeapProfilerAgent.js
@@ -16,11 +16,8 @@ module.exports = function(require, debug, options) {
function reportProgress(done, total) {
if (!debuggerConnected) return false;
//Abort
- debug.command("HeapProfiler.reportHeapSnapshotProgress", {
- done: done,
- total: total,
- finished: done === total
- });
+ debug
+ .command("HeapProfiler.reportHeapSnapshotProgress", { done: done, total: total, finished: done === total });
}
function sendSnapshotChunk(data) {
@@ -38,13 +35,10 @@ module.exports = function(require, debug, options) {
function heapStatsCallback() {
if (!debuggerConnected || !heapStatsState.trackingEnabled) return false;
//Abort
- debug.command("HeapProfiler.heapStatsUpdate", {
- statsUpdate: heapStatsState.samples
- });
- debug.command("HeapProfiler.lastSeenObjectId", {
- lastSeenObjectId: heapStatsState.lastSeenObjectId,
- timestamp: Date.now()
- });
+ debug
+ .command("HeapProfiler.heapStatsUpdate", { statsUpdate: heapStatsState.samples });
+ debug
+ .command("HeapProfiler.lastSeenObjectId", { lastSeenObjectId: heapStatsState.lastSeenObjectId, timestamp: Date.now() });
heapStatsState.samples.length = 0;
heapStatsState.timeout = setTimeout(heapStatsLoop, 100);
@@ -64,16 +58,12 @@ module.exports = function(require, debug, options) {
debug.register("HeapProfiler.heapStatsUpdate", debug.commandToEvent);
debug.register("HeapProfiler.lastSeenObjectId", debug.commandToEvent);
- debug.register(
- "HeapProfiler.reportHeapSnapshotProgress",
- debug.commandToEvent
- );
+ debug
+ .register("HeapProfiler.reportHeapSnapshotProgress", debug.commandToEvent);
debug.register("HeapProfiler.addHeapSnapshotChunk", debug.commandToEvent);
- debug.register("HeapProfiler.getObjectByHeapObjectId", function(
- request,
- response
- ) {
+ debug
+ .register("HeapProfiler.getObjectByHeapObjectId", function(request, response) {
var objectId = request.arguments.objectId, result;
try {
@@ -87,11 +77,8 @@ module.exports = function(require, debug, options) {
response.body = { result: result };
});
- debug.registerAsync("HeapProfiler.takeHeapSnapshot", function(
- request,
- response,
- done
- ) {
+ debug
+ .registerAsync("HeapProfiler.takeHeapSnapshot", function(request, response, done) {
var needsReportProgress = request.arguments.reportProgress;
var snapshot = profiler.takeSnapshot(
needsReportProgress ? reportProgress : false
@@ -105,20 +92,15 @@ module.exports = function(require, debug, options) {
snapshot.serialize(sendSnapshotChunk.bind(snapshot), sendSnapshotFinished);
});
- debug.register("HeapProfiler.startTrackingHeapObjects", function(
- request,
- response
- ) {
+ debug
+ .register("HeapProfiler.startTrackingHeapObjects", function(request, response) {
heapStatsState.trackingEnabled = true;
profiler.startTrackingHeapObjects();
heapStatsLoop();
});
- debug.registerAsync("HeapProfiler.stopTrackingHeapObjects", function(
- request,
- response,
- done
- ) {
+ debug
+ .registerAsync("HeapProfiler.stopTrackingHeapObjects", function(request, response, done) {
heapStatsState.trackingEnabled = false;
profiler.stopTrackingHeapObjects();
@@ -135,10 +117,8 @@ module.exports = function(require, debug, options) {
snapshot.serialize(sendSnapshotChunk.bind(snapshot), sendSnapshotFinished);
});
- debug.register("HeapProfiler._lookupHeapObjectId", function(
- request,
- response
- ) {
+ debug
+ .register("HeapProfiler._lookupHeapObjectId", function(request, response) {
var objectId = request.arguments.objectId;
var mirror = profilerCache[objectId];
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/NetworkAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/NetworkAgent.js
index 6abd196..08f8c19 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/NetworkAgent.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/NetworkAgent.js
@@ -88,25 +88,22 @@ module.exports = function injection(require, debug, options) {
Error.prepareStackTrace = backup;
- return stack.reduce(
- function(stack, frame) {
- var fileName = frame.getFileName();
+ return stack.reduce(function(stack, frame) {
+ var fileName = frame.getFileName();
- fileName = debug.convert.v8NameToInspectorUrl(fileName);
+ fileName = debug.convert.v8NameToInspectorUrl(fileName);
- var url = fileName || frame.getEvalOrigin();
+ var url = fileName || frame.getEvalOrigin();
- stack.push({
- url: url,
- functionName: frame.getFunctionName(),
- lineNumber: frame.getLineNumber(),
- columnNumber: frame.getColumnNumber()
- });
+ stack.push({
+ url: url,
+ functionName: frame.getFunctionName(),
+ lineNumber: frame.getLineNumber(),
+ columnNumber: frame.getColumnNumber()
+ });
- return stack;
- },
- []
- );
+ return stack;
+ }, []);
}
function renderHeaders(request) {
@@ -270,9 +267,8 @@ module.exports = function injection(require, debug, options) {
requestInfo.handled = true;
debug.emitEvent("Network.requestWillBeSent", requestInfo);
- debug.emitEvent("Network._requestWillBeSent", {
- requestId: requestInfo.requestId
- });
+ debug
+ .emitEvent("Network._requestWillBeSent", { requestId: requestInfo.requestId });
}
function handleSocket(requestInfo, socket) {
@@ -308,9 +304,8 @@ module.exports = function injection(require, debug, options) {
var failureInfo = constructFailureInfo(this, err, !err);
debug.emitEvent("Network.loadingFailed", failureInfo);
- debug.emitEvent("Network._loadingFailed", {
- requestId: this.__inspector_ID__
- });
+ debug
+ .emitEvent("Network._loadingFailed", { requestId: this.__inspector_ID__ });
}
function handleHttpResponse(wasHandled, response) {
@@ -337,17 +332,11 @@ module.exports = function injection(require, debug, options) {
if (chunk) {
dataLength += chunk.length;
- debug.emitEvent("Network._dataReceived", {
- requestId: requestId,
- data: chunk + ""
- });
-
- debug.emitEvent("Network.dataReceived", {
- requestId: requestId,
- timestamp: timestamp(),
- dataLength: chunk.length,
- encodedDataLength: chunk.length
- });
+ debug
+ .emitEvent("Network._dataReceived", { requestId: requestId, data: chunk + "" });
+
+ debug
+ .emitEvent("Network.dataReceived", { requestId: requestId, timestamp: timestamp(), dataLength: chunk.length, encodedDataLength: chunk.length });
}
return push.apply(this, arguments);
@@ -358,11 +347,8 @@ module.exports = function injection(require, debug, options) {
debug.emitEvent("Network._loadingFinished", { requestId: requestId });
- debug.emitEvent("Network.loadingFinished", {
- requestId: requestId,
- timestamp: timestamp(),
- encodedDataLength: dataLength
- });
+ debug
+ .emitEvent("Network.loadingFinished", { requestId: requestId, timestamp: timestamp(), encodedDataLength: dataLength });
});
}
@@ -406,18 +392,11 @@ module.exports = function injection(require, debug, options) {
options = debug.getFromFrame(1, "options");
if (!options || !(options instanceof Object)) {
- console.error(
- "Unexpected state in node-inspector network profiling.\n" +
- "Something wrong with request `options` object in frame #1\n" +
- "Current stackstace:",
- new Error().stack
- );
+ console
+ .error("Unexpected state in node-inspector network profiling.\n" + "Something wrong with request `options` object in frame #1\n" + "Current stackstace:", new Error().stack);
} else {
- handleHttpRequest.call(this, {
- host: options.host,
- port: options.port,
- path: this.path
- });
+ handleHttpRequest
+ .call(this, { host: options.host, port: options.port, path: this.path });
}
options = null;
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorClient.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorClient.js
index 9802287..b3de046 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorClient.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorClient.js
@@ -48,12 +48,8 @@ InjectorClient.prototype.inject = function(cb) {
var _water = [];
if (this.needsInject) {
- _water.unshift(
- this._getFuncWithNMInScope.bind(this),
- this._findNMInScope.bind(this),
- this._inject.bind(this),
- this._onInjection.bind(this)
- );
+ _water
+ .unshift(this._getFuncWithNMInScope.bind(this), this._findNMInScope.bind(this), this._inject.bind(this), this._onInjection.bind(this));
}
if (this.needsInject && this._debuggerClient.isRunning) {
@@ -138,17 +134,10 @@ InjectorClient.prototype._inject = function(NM, cb) {
")" +
"})(NM)";
- this._debuggerClient.request(
- "evaluate",
- {
- expression: injection,
- global: true,
- additional_context: [ { name: "NM", handle: NM } ]
- },
- function(error) {
- cb(error);
- }
- );
+ this
+ ._debuggerClient.request("evaluate", { expression: injection, global: true, additional_context: [ { name: "NM", handle: NM } ] }, function(error) {
+ cb(error);
+ });
};
/**
@@ -166,17 +155,8 @@ InjectorClient.prototype.close = function() {
};
InjectorClient.prototype.injection = function(injection, options, callback) {
- this._debuggerClient.request(
- "evaluate",
- {
- expression: "(" + injection.toString() + ")" +
- "(process._require, process._debugObject, " +
- JSON.stringify(options) +
- ")",
- global: true
- },
- callback
- );
+ this
+ ._debuggerClient.request("evaluate", { expression: "(" + injection.toString() + ")" + "(process._require, process._debugObject, " + JSON.stringify(options) + ")", global: true }, callback);
};
module.exports.InjectorClient = InjectorClient;
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/NetworkAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/NetworkAgent.js
index ce407e3..5ab6004 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/NetworkAgent.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/NetworkAgent.js
@@ -25,18 +25,11 @@ function NetworkAgent(config, session) {
}
NetworkAgent.prototype._inject = function() {
- this._translateEventToFrontend(
- "requestWillBeSent",
- "responseReceived",
- "dataReceived",
- "loadingFinished",
- "loadingFailed"
- );
+ this
+ ._translateEventToFrontend("requestWillBeSent", "responseReceived", "dataReceived", "loadingFinished", "loadingFailed");
- this._handleEvent(
- "_requestWillBeSent",
- this._registerInDataStorage.bind(this)
- );
+ this
+ ._handleEvent("_requestWillBeSent", this._registerInDataStorage.bind(this));
this._handleEvent("_dataReceived", this._saveToDataStorage.bind(this));
this._handleEvent("_loadingFinished", this._constructRequestData.bind(this));
this._handleEvent("_loadingFailed", this._dumpRequestData.bind(this));
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/PageAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/PageAgent.js
index 582c186..00aff2c 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/PageAgent.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/PageAgent.js
@@ -45,26 +45,16 @@ extend(PageAgent.prototype, {
if (this._debuggerClient.isReady) {
this._doGetResourceTree(params, cb);
} else {
- this._debuggerClient.once(
- "connect",
- this._doGetResourceTree.bind(this, params, cb)
- );
+ this
+ ._debuggerClient.once("connect", this._doGetResourceTree.bind(this, params, cb));
}
},
_doGetResourceTree: function(params, done) {
var cwd = this._debuggerClient.target.cwd;
var filename = this._debuggerClient.target.filename;
- async.waterfall(
- [
- this._resolveMainAppScript.bind(this, cwd, filename),
- this._getResourceTreeForAppScript.bind(
- this,
- this._debuggerClient.target
- )
- ],
- done
- );
+ async
+ .waterfall([ this._resolveMainAppScript.bind(this, cwd, filename), this._getResourceTreeForAppScript.bind(this, this._debuggerClient.target) ], done);
},
_resolveMainAppScript: function(startDirectory, mainAppScript, done) {
this._scriptManager.mainAppScript = mainAppScript;
@@ -167,18 +157,12 @@ extend(PageAgent.prototype, {
var content = "// There is no main module loaded in node.\n" +
"// This is expected when you are debugging node's interactive REPL console.";
- return process.nextTick(
- this._convertScriptSourceToGetResourceResponse.bind(this, content, done)
- );
+ return process
+ .nextTick(this._convertScriptSourceToGetResourceResponse.bind(this, content, done));
}
- async.waterfall(
- [
- this._scriptStorage.load.bind(this._scriptStorage, scriptName),
- this._convertScriptSourceToGetResourceResponse.bind(this)
- ],
- done
- );
+ async
+ .waterfall([ this._scriptStorage.load.bind(this._scriptStorage, scriptName), this._convertScriptSourceToGetResourceResponse.bind(this) ], done);
},
_convertScriptSourceToGetResourceResponse: function(source, done) {
return done(null, { content: source });
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ProfilerAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ProfilerAgent.js
index 4cd1094..c2d1132 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ProfilerAgent.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ProfilerAgent.js
@@ -27,10 +27,8 @@ function ProfilerAgent(config, session) {
}
ProfilerAgent.prototype._inject = function(injected) {
- this._translateEventToFrontend(
- "consoleProfileStarted",
- "consoleProfileFinished"
- );
+ this
+ ._translateEventToFrontend("consoleProfileStarted", "consoleProfileFinished");
this._injectorClient.injection(
function(require, debug, options) {
@@ -97,14 +95,8 @@ ProfilerAgent.prototype._checkCompatibility = function() {
var version = this._debuggerClient.target.nodeVersion;
var isCompatible = ProfilerAgent.nodeVersionIsCompatible(version);
if (!isCompatible) {
- this._frontendClient.sendLogToConsole(
- "warning",
- "Your Node version (" + version +
- ") has a partial support of profiler.\n" +
- "The stack frames tree doesn't show all stack frames due to low sampling rate.\n" +
- "The profiling data is incomplete and may show misleading results.\n" +
- "Update Node to v0.11.13 or newer to get full support."
- );
+ this
+ ._frontendClient.sendLogToConsole("warning", "Your Node version (" + version + ") has a partial support of profiler.\n" + "The stack frames tree doesn't show all stack frames due to low sampling rate.\n" + "The profiling data is incomplete and may show misleading results.\n" + "Update Node to v0.11.13 or newer to get full support.");
}
};
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/RuntimeAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/RuntimeAgent.js
index d6c0d1d..df16c94 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/RuntimeAgent.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/RuntimeAgent.js
@@ -23,28 +23,24 @@ RuntimeAgent.prototype = {
enable: function(params, done) {
done();
//Relative to WorkerRuntimeAgent::enable in core/inspector/WorkerRuntimeAgent.cpp
- this._frontendClient.sendEvent("Runtime.executionContextCreated", {
- context: { id: 1, isPageContext: false, name: "node-inspector" }
- });
+ this
+ ._frontendClient.sendEvent("Runtime.executionContextCreated", { context: { id: 1, isPageContext: false, name: "node-inspector" } });
},
evaluate: function(params, done) {
var self = this;
- self._debuggerClient.request(
- "evaluate",
- { expression: params.expression, global: true },
- function(err, result) {
- // Errors from V8 are actually just messages, so we need to fill them out a bit.
- if (err) {
- err = convert.v8ErrorToInspectorError(err);
- }
-
- done(null, {
- result: err || convert.v8ResultToInspectorResult(result),
- wasThrown: !!err
- });
+ self
+ ._debuggerClient.request("evaluate", { expression: params.expression, global: true }, function(err, result) {
+ // Errors from V8 are actually just messages, so we need to fill them out a bit.
+ if (err) {
+ err = convert.v8ErrorToInspectorError(err);
}
- );
+
+ done(null, {
+ result: err || convert.v8ResultToInspectorResult(result),
+ wasThrown: !!err
+ });
+ });
},
callFunctionOn: function(params, done) {
function callFunctionWithParams(err, evaluateParams) {
@@ -62,12 +58,8 @@ RuntimeAgent.prototype = {
this._debuggerClient.request("evaluate", evaluateParams, callback);
}
- this._createEvaluateParamsForFunctionCall(
- params.objectId,
- params.functionDeclaration,
- params.arguments,
- callFunctionWithParams.bind(this)
- );
+ this
+ ._createEvaluateParamsForFunctionCall(params.objectId, params.functionDeclaration, params.arguments, callFunctionWithParams.bind(this));
},
_createEvaluateParamsForFunctionCall: function(
selfId,
@@ -210,11 +202,8 @@ RuntimeAgent.prototype = {
_getPropertiesOfObjectId: function(objectId, options, done) {
var handle = parseInt(objectId, 10);
var request = { handles: [ handle ], includeSource: false };
- this._debuggerClient.request("lookup", request, function(
- error,
- responseBody,
- responseRefs
- ) {
+ this
+ ._debuggerClient.request("lookup", request, function(error, responseBody, responseRefs) {
if (error) {
done(error);
return;
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptFileStorage.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptFileStorage.js
index 8488ba2..b2cfefc 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptFileStorage.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptFileStorage.js
@@ -125,13 +125,10 @@ $class._findApplicationRootForRealFile = function(file, callback) {
var mainDir = path.dirname(file);
var parentDir = path.dirname(mainDir);
- async.detect(
- [ mainDir, parentDir ],
- this._isApplicationRoot.bind(this),
- function(result) {
- callback(null, result || mainDir, !!result);
- }
- );
+ async
+ .detect([ mainDir, parentDir ], this._isApplicationRoot.bind(this), function(result) {
+ callback(null, result || mainDir, !!result);
+ });
};
/**
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptManager.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptManager.js
index 5a30a21..90e0841 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptManager.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptManager.js
@@ -35,10 +35,8 @@ ScriptManager.prototype = Object.create(events.EventEmitter.prototype, {
_onAfterCompile: {
value: function(event) {
if (!event.script) {
- console.log(
- "Unexpected error: debugger emitted afterCompile event" +
- "with no script data."
- );
+ console
+ .log("Unexpected error: debugger emitted afterCompile event" + "with no script data.");
return;
}
this.addScript(event.script);
@@ -100,20 +98,17 @@ ScriptManager.prototype = Object.create(events.EventEmitter.prototype, {
},
getScriptSourceById: {
value: function(id, callback) {
- this._debuggerClient.request(
- "scripts",
- { includeSource: true, types: 4, ids: [ id ] },
- function handleScriptSourceResponse(err, result) {
- if (err) return callback(err);
+ this
+ ._debuggerClient.request("scripts", { includeSource: true, types: 4, ids: [ id ] }, function handleScriptSourceResponse(err, result) {
+ if (err) return callback(err);
- // Some modules gets unloaded (?) after they are parsed,
- // e.g. node_modules/express/node_modules/methods/index.js
- // V8 request 'scripts' returns an empty result in such case
- var source = result.length > 0 ? result[0].source : undefined;
+ // Some modules gets unloaded (?) after they are parsed,
+ // e.g. node_modules/express/node_modules/methods/index.js
+ // V8 request 'scripts' returns an empty result in such case
+ var source = result.length > 0 ? result[0].source : undefined;
- callback(null, source);
- }
- );
+ callback(null, source);
+ });
}
},
_requireScriptFromApp: {
@@ -184,12 +179,8 @@ ScriptManager.prototype = Object.create(events.EventEmitter.prototype, {
v8data.source,
function onGetSourceMapUrlReturn(err, sourceMapUrl) {
if (err) {
- console.log(
- "Warning: cannot parse SourceMap URL for script %s (id %d). %s",
- localPath,
- v8data.id,
- err
- );
+ console
+ .log("Warning: cannot parse SourceMap URL for script %s (id %d). %s", localPath, v8data.id, err);
}
debug(
@@ -332,10 +323,8 @@ ScriptManager.prototype = Object.create(events.EventEmitter.prototype, {
};
}
- async.waterfall(
- [ getSource, this._parseSourceMapUrlFromScriptSource.bind(this) ],
- callback
- );
+ async
+ .waterfall([ getSource, this._parseSourceMapUrlFromScriptSource.bind(this) ], callback);
}
},
_parseSourceMapUrlFromScriptSource: {
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/convert.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/convert.js
index 0dd72b4..76a2e7a 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/convert.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/convert.js
@@ -151,14 +151,8 @@ exports.v8ObjectToInspectorProperties = function(obj, refs, options) {
if (ownProperties && proto) {
proto = refs[proto.ref];
if (proto.type !== "undefined") {
- props.push({
- name: "__proto__",
- value: exports.v8RefToInspectorObject(proto),
- writable: true,
- configurable: true,
- enumerable: false,
- isOwn: true
- });
+ props
+ .push({ name: "__proto__", value: exports.v8RefToInspectorObject(proto), writable: true, configurable: true, enumerable: false, isOwn: true });
}
}
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/debugger.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/debugger.js
index 5a53df5..1adddd4 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/debugger.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/debugger.js
@@ -61,7 +61,8 @@ Debugger.prototype._onConnectionError = function(err) {
if (err.code == "ECONNREFUSED") {
err.helpString = "Is node running with --debug port " + this._port + "?";
} else if (err.code == "ECONNRESET") {
- err.helpString = "Check there is no other debugger client attached to port " +
+ err
+ .helpString = "Check there is no other debugger client attached to port " +
this._port +
".";
}
@@ -109,9 +110,8 @@ Debugger.prototype._processResponse = function(message) {
Debugger.prototype.send = function(data) {
debugProtocol("request: " + data);
if (this.connected) {
- this._connection.write(
- "Content-Length: " + Buffer.byteLength(data, "utf8") + "\r\n\r\n" + data
- );
+ this
+ ._connection.write("Content-Length: " + Buffer.byteLength(data, "utf8") + "\r\n\r\n" + data);
}
};
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/plugins.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/plugins.js
index 9db34c2..dafb4e1 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/plugins.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/plugins.js
@@ -275,16 +275,8 @@ ProtocolJson.prototype._onItemConflict = function(
"` already exists."
);
} else {
- console.warn(
- "Item with " + state.uname + " `" + toMergeItem[state.uname] + "`" +
- " in " +
- state.section +
- " section" +
- " of " +
- state.domain +
- " domain" +
- " was owerriden."
- );
+ console
+ .warn("Item with " + state.uname + " `" + toMergeItem[state.uname] + "`" + " in " + state.section + " section" + " of " + state.domain + " domain" + " was owerriden.");
}
};
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/session.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/session.js
index 3c3cfd9..ebc8f53 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/session.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/session.js
@@ -3,9 +3,8 @@ var EventEmitter = require("events").EventEmitter,
DebuggerClient = require("./DebuggerClient").DebuggerClient,
ScriptManager = require("./ScriptManager").ScriptManager,
FrontendClient = require("./FrontendClient").FrontendClient,
- FrontendCommandHandler = require(
- "./FrontendCommandHandler"
- ).FrontendCommandHandler,
+ FrontendCommandHandler = require("./FrontendCommandHandler")
+ .FrontendCommandHandler,
BreakEventHandler = require("./BreakEventHandler").BreakEventHandler,
ConsoleClient = require("./ConsoleClient").ConsoleClient,
HeapProfilerClient = require("./HeapProfilerClient").HeapProfilerClient,
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/ms/index.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/ms/index.js
index 526af87..5678103 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/ms/index.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/ms/index.js
@@ -36,9 +36,8 @@ module.exports = function(val, options) {
function parse(str) {
str = "" + str;
if (str.length > 10000) return;
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
- str
- );
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i
+ .exec(str);
if (!match) return;
var n = parseFloat(match[1]);
var type = (match[2] || "ms").toLowerCase();
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/DebuggerScript.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/DebuggerScript.js
index 2a18de3..e5cb291 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/DebuggerScript.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/DebuggerScript.js
@@ -43,7 +43,8 @@
NoScopes: 2
};
- DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.DontPauseOnExceptions;
+ DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState
+ .DontPauseOnExceptions;
Debug.clearBreakOnException();
Debug.clearBreakOnUncaughtException();
@@ -255,11 +256,8 @@
if (index < 0) return undefined;
var frameCount = execState.frameCount();
if (index >= frameCount) return undefined;
- return DebuggerScript._frameMirrorToJSCallFrame(
- execState.frame(index),
- undefined,
- DebuggerScript.ScopeInfoDetails.NoScopes
- );
+ return DebuggerScript
+ ._frameMirrorToJSCallFrame(execState.frame(index), undefined, DebuggerScript.ScopeInfoDetails.NoScopes);
};
DebuggerScript.stepIntoStatement = function(execState) {
@@ -349,9 +347,8 @@
for (var i = 0; i < breakpoints.length; i++) {
var breakpoint = breakpoints[i];
var scriptBreakPoint = breakpoint.script_break_point();
- numbers.push(
- scriptBreakPoint ? scriptBreakPoint.number() : breakpoint.number()
- );
+ numbers
+ .push(scriptBreakPoint ? scriptBreakPoint.number() : breakpoint.number());
}
return numbers;
};
@@ -540,10 +537,8 @@
// the same properties.
// Reset scope object prototype to null so that the proto properties
// don't appear in the local scope section.
- var properties = MakeMirror(
- scopeObject,
- true /* transient */
- ).properties();
+ var properties = MakeMirror(scopeObject, true /* transient */)
+ .properties();
// Almost always Script scope will be empty, so just filter out that noise.
// Also drop empty Block scopes, should we get any.
if (
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/InjectedScriptSource.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/InjectedScriptSource.js
index c53587c..e0c3004 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/InjectedScriptSource.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/InjectedScriptSource.js
@@ -231,9 +231,11 @@
*/
function doesAttributeHaveObservableSideEffectOnGet(object, attribute) {
for (var interfaceName in domAttributesWithObservableSideEffectOnGet) {
- var isInstance = InjectedScriptHost.suppressWarningsAndCallFunction(
+ var isInstance = InjectedScriptHost
+ .suppressWarningsAndCallFunction(
function(object, interfaceName) {
- return /* suppressBlacklist */
+ return;
+ /* suppressBlacklist */
typeof inspectedGlobalObject[interfaceName] === "function" &&
object instanceof inspectedGlobalObject[interfaceName];
},
@@ -301,7 +303,8 @@
result.type = typeof object;
if (this.isPrimitiveValue(object)) result.value = object;
else result.description = toString(object);
- return /** @type {!RuntimeAgent.RemoteObject} */
+ return;
+ /** @type {!RuntimeAgent.RemoteObject} */
result;
},
/**
@@ -599,7 +602,8 @@
InjectedScriptHost.isDOMWrapper(object) &&
!doesAttributeHaveObservableSideEffectOnGet(object, name)
) {
- descriptor.value = InjectedScriptHost.suppressWarningsAndCallFunction(
+ descriptor.value = InjectedScriptHost
+ .suppressWarningsAndCallFunction(
function(attribute) {
return this[attribute];
},
@@ -741,9 +745,8 @@
if (args) {
var resolvedArgs = [];
- var callArgs /** @type {!Array.<!RuntimeAgent.CallArgument>} */ = InjectedScriptHost.eval(
- args
- );
+ var callArgs /** @type {!Array.<!RuntimeAgent.CallArgument>} */ = InjectedScriptHost
+ .eval(args);
for (var i = 0; i < callArgs.length; ++i) {
try {
resolvedArgs[i] = this._resolveCallArgument(callArgs[i]);
@@ -1011,20 +1014,14 @@
var prefix = "";
var suffix = "";
if (injectCommandLineAPI) {
- InjectedScriptHost.setNonEnumProperty(
- inspectedGlobalObject,
- "__commandLineAPI",
- new CommandLineAPI(this._commandLineAPIImpl, callFrame)
- );
+ InjectedScriptHost
+ .setNonEnumProperty(inspectedGlobalObject, "__commandLineAPI", new CommandLineAPI(this._commandLineAPIImpl, callFrame));
prefix = "with (typeof __commandLineAPI !== 'undefined' ? __commandLineAPI : { __proto__: null }) {";
suffix = "}";
}
if (injectScopeChain) {
- InjectedScriptHost.setNonEnumProperty(
- inspectedGlobalObject,
- "__scopeChainForEval",
- scopeChain
- );
+ InjectedScriptHost
+ .setNonEnumProperty(inspectedGlobalObject, "__scopeChainForEval", scopeChain);
for (var i = 0; i < scopeChain.length; ++i) {
prefix = "with (typeof __scopeChainForEval !== 'undefined' ? __scopeChainForEval[" +
i +
@@ -1164,9 +1161,8 @@
newValueJsonString
) {
try {
- var newValueJson /** @type {!RuntimeAgent.CallArgument} */ = InjectedScriptHost.eval(
- "(" + newValueJsonString + ")"
- );
+ var newValueJson /** @type {!RuntimeAgent.CallArgument} */ = InjectedScriptHost
+ .eval("(" + newValueJsonString + ")");
var resolvedValue = this._resolveCallArgument(newValueJson);
if (typeof callFrameId === "string") {
var callFrame = this._callFrameForId(topCallFrame, callFrameId);
@@ -1179,12 +1175,8 @@
var func = this._objectForId(parsedFunctionId);
if (typeof func !== "function")
return "Could not resolve function by id";
- InjectedScriptHost.setFunctionVariableValue(
- func,
- scopeNumber,
- variableName,
- resolvedValue
- );
+ InjectedScriptHost
+ .setFunctionVariableValue(func, scopeNumber, variableName, resolvedValue);
}
} catch (e) {
return toString(e);
@@ -1290,7 +1282,8 @@
if (isSymbol(obj)) {
try {
- return /** @type {string} */
+ return;
+ /** @type {string} */
InjectedScriptHost.callFunction(Symbol.prototype.toString, obj) ||
"Symbol";
} catch (e) {
@@ -1429,12 +1422,8 @@
function logError(error) {
Promise
.resolve()
- .then(
- inspectedGlobalObject.console.error.bind(
- inspectedGlobalObject.console,
- "Custom Formatter Failed: " + error.message
- )
- );
+
+ .then(inspectedGlobalObject.console.error.bind(inspectedGlobalObject.console, "Custom Formatter Failed: " + error.message));
}
try {
@@ -1488,7 +1477,9 @@
__proto__: null
};
if (this.subtype)
- preview.subtype /** @type {!RuntimeAgent.ObjectPreviewSubtype.<string>} */ = this.subtype;
+ preview
+ .subtype /** @type {!RuntimeAgent.ObjectPreviewSubtype.<string>} */ = this
+ .subtype;
return preview;
},
/**
@@ -1640,17 +1631,8 @@
// Render own properties.
if (value === null) {
- this._appendPropertyPreview(
- preview,
- {
- name: name,
- type: "object",
- subtype: "null",
- value: "null",
- __proto__: null
- },
- propertiesThreshold
- );
+ this
+ ._appendPropertyPreview(preview, { name: name, type: "object", subtype: "null", value: "null", __proto__: null }, propertiesThreshold);
continue;
}
@@ -1660,16 +1642,8 @@
value = this._abbreviateString(value, maxLength, true);
preview.lossless = false;
}
- this._appendPropertyPreview(
- preview,
- {
- name: name,
- type: type,
- value: toStringDescription(value),
- __proto__: null
- },
- propertiesThreshold
- );
+ this
+ ._appendPropertyPreview(preview, { name: name, type: type, value: toStringDescription(value), __proto__: null }, propertiesThreshold);
continue;
}
@@ -2043,21 +2017,15 @@
* @return {*}
*/
dir: function(var_args) {
- return InjectedScriptHost.callFunction(
- inspectedGlobalObject.console.dir,
- inspectedGlobalObject.console,
- slice(arguments)
- );
+ return InjectedScriptHost
+ .callFunction(inspectedGlobalObject.console.dir, inspectedGlobalObject.console, slice(arguments));
},
/**
* @return {*}
*/
dirxml: function(var_args) {
- return InjectedScriptHost.callFunction(
- inspectedGlobalObject.console.dirxml,
- inspectedGlobalObject.console,
- slice(arguments)
- );
+ return InjectedScriptHost
+ .callFunction(inspectedGlobalObject.console.dirxml, inspectedGlobalObject.console, slice(arguments));
},
/**
* @return {!Array.<string>}
@@ -2077,21 +2045,15 @@
* @return {*}
*/
profile: function(opt_title) {
- return InjectedScriptHost.callFunction(
- inspectedGlobalObject.console.profile,
- inspectedGlobalObject.console,
- slice(arguments)
- );
+ return InjectedScriptHost
+ .callFunction(inspectedGlobalObject.console.profile, inspectedGlobalObject.console, slice(arguments));
},
/**
* @return {*}
*/
profileEnd: function(opt_title) {
- return InjectedScriptHost.callFunction(
- inspectedGlobalObject.console.profileEnd,
- inspectedGlobalObject.console,
- slice(arguments)
- );
+ return InjectedScriptHost
+ .callFunction(inspectedGlobalObject.console.profileEnd, inspectedGlobalObject.console, slice(arguments));
},
/**
* @param {!Object} object
@@ -2180,11 +2142,8 @@
InjectedScriptHost.unmonitorFunction(fn);
},
table: function(data, opt_columns) {
- InjectedScriptHost.callFunction(
- inspectedGlobalObject.console.table,
- inspectedGlobalObject.console,
- slice(arguments)
- );
+ InjectedScriptHost
+ .callFunction(inspectedGlobalObject.console.table, inspectedGlobalObject.console, slice(arguments));
},
/**
* @param {number} num
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/v8-debug.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/v8-debug.js
index 6cf93f5..8db33fe 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/v8-debug.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/v8-debug.js
@@ -8,12 +8,8 @@ var binding = require(
"build",
"debug",
"v" + pack.version,
- [
- "node",
- "v" + process.versions.modules,
- process.platform,
- process.arch
- ].join("-"),
+ [ "node", "v" + process.versions.modules, process.platform, process.arch ]
+ .join("-"),
"debug.node"
].join("/")
);
@@ -47,8 +43,10 @@ var overrides = {
// Convert the JSON string to an object.
request = JSON.parse(json_request);
- var handle = this.extendedProcessDebugJSONRequestHandles_[request.command];
- var asyncHandle = this.extendedProcessDebugJSONRequestAsyncHandles_[request.command];
+ var handle = this.extendedProcessDebugJSONRequestHandles_[request
+ .command];
+ var asyncHandle = this
+ .extendedProcessDebugJSONRequestAsyncHandles_[request.command];
var asyncResponse;
if (!handle && !asyncHandle) return;
@@ -183,14 +181,13 @@ V8Debug.prototype.register = V8Debug.prototype.registerCommand = function(
overrides.extendedProcessDebugJSONRequestHandles_[name] = func;
};
-V8Debug.prototype.registerAsync = V8Debug.prototype.registerAsyncCommand = function(
- name,
- func
-) {
+V8Debug.prototype.registerAsync = V8Debug.prototype
+ .registerAsyncCommand = function(name, func) {
overrides.extendedProcessDebugJSONRequestAsyncHandles_[name] = func;
};
-V8Debug.prototype.command = V8Debug.prototype.sendCommand = V8Debug.prototype.emitEvent = sendCommand;
+V8Debug.prototype.command = V8Debug.prototype.sendCommand = V8Debug.prototype
+ .emitEvent = sendCommand;
function sendCommand(name, attributes, userdata) {
var message = {
seq: 0,
@@ -293,10 +290,8 @@ V8Debug.prototype.enableWebkitProtocol = function() {
var injectedScript = InjectedScript(InjectedScriptHost, global, 1);
this.registerAgentCommand = function(command, parameters, callback) {
- this.registerCommand(command, new WebkitProtocolCallback(
- parameters,
- callback
- ));
+ this
+ .registerCommand(command, new WebkitProtocolCallback(parameters, callback));
};
this._webkitProtocolEnabled = true;
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-profiler/v8-profiler.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-profiler/v8-profiler.js
index 8fe4483..2e9bc1d 100644
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-profiler/v8-profiler.js
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-profiler/v8-profiler.js
@@ -5,12 +5,8 @@ var binding = require(
"build",
"profiler",
"v" + pack.version,
- [
- "node",
- "v" + process.versions.modules,
- process.platform,
- process.arch
- ].join("-"),
+ [ "node", "v" + process.versions.modules, process.platform, process.arch ]
+ .join("-"),
"profiler.node"
].join("/")
);
diff --git a/pkg/nuclide-debugger-node/lib/AttachUIComponent.js b/pkg/nuclide-debugger-node/lib/AttachUIComponent.js
index 8476632..dc71637 100644
--- a/pkg/nuclide-debugger-node/lib/AttachUIComponent.js
+++ b/pkg/nuclide-debugger-node/lib/AttachUIComponent.js
@@ -78,7 +78,8 @@ function getCompareFunction(
return () => 0;
}
-export class AttachUIComponent extends React.Component<void, PropsType, StateType> {
+export class AttachUIComponent extends React
+ .Component<void, PropsType, StateType> {
props: PropsType;
state: StateType;
@@ -93,9 +94,8 @@ export class AttachUIComponent extends React.Component<void, PropsType, StateTyp
this
);
(this: any)._handleAttachClick = this._handleAttachClick.bind(this);
- (this: any)._handleParentVisibilityChanged = this._handleParentVisibilityChanged.bind(
- this
- );
+ (this: any)._handleParentVisibilityChanged = this
+ ._handleParentVisibilityChanged.bind(this);
(this: any)._updateAttachTargetList = this._updateAttachTargetList.bind(
this
);
diff --git a/pkg/nuclide-debugger-php-rpc/lib/Connection.js b/pkg/nuclide-debugger-php-rpc/lib/Connection.js
index 300d7ec..04f4cde 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/Connection.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/Connection.js
@@ -59,19 +59,12 @@ export class Connection {
this._isDummyViewable = false;
this._disposables = new CompositeDisposable();
if (onStatusCallback != null) {
- this._disposables.add(
- this.onStatus(
- (status, ...args) => onStatusCallback(this, status, ...args)
- )
- );
+ this
+ ._disposables.add(this.onStatus((status, ...args) => onStatusCallback(this, status, ...args)));
}
if (onNotificationCallback != null) {
- this._disposables.add(
- this.onNotification(
- (notifyName, notify) =>
- onNotificationCallback(this, notifyName, notify)
- )
- );
+ this
+ ._disposables.add(this.onNotification((notifyName, notify) => onNotificationCallback(this, notifyName, notify)));
}
this._stopReason = null;
}
diff --git a/pkg/nuclide-debugger-php-rpc/lib/ConnectionMultiplexer.js b/pkg/nuclide-debugger-php-rpc/lib/ConnectionMultiplexer.js
index 8459367..aec823f 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/ConnectionMultiplexer.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/ConnectionMultiplexer.js
@@ -158,13 +158,12 @@ export class ConnectionMultiplexer {
if (launchScriptPath != null) {
this._launchedScriptProcessPromise = new Promise(resolve => {
- this._launchedScriptProcess = launchPhpScriptWithXDebugEnabled(
+ this
+ ._launchedScriptProcess = launchPhpScriptWithXDebugEnabled(
launchScriptPath,
text => {
- this._clientCallback.sendUserMessage("outputWindow", {
- level: "info",
- text
- });
+ this
+ ._clientCallback.sendUserMessage("outputWindow", { level: "info", text });
resolve();
}
);
@@ -243,14 +242,10 @@ export class ConnectionMultiplexer {
if (connection.isDummyConnection()) {
this._dummyConnection = connection;
const text = "Pre-loading is done! You can use console window now.";
- this._clientCallback.sendUserMessage("console", {
- text,
- level: "warning"
- });
- this._clientCallback.sendUserMessage("outputWindow", {
- text,
- level: "success"
- });
+ this
+ ._clientCallback.sendUserMessage("console", { text, level: "warning" });
+ this
+ ._clientCallback.sendUserMessage("outputWindow", { text, level: "success" });
}
}
@@ -262,10 +257,8 @@ export class ConnectionMultiplexer {
switch (notifyName) {
case BREAKPOINT_RESOLVED_NOTIFICATION:
const xdebugBreakpoint: DbgpBreakpoint = notify;
- const breakpointId = this._breakpointStore.getBreakpointIdFromConnection(
- connection,
- xdebugBreakpoint
- );
+ const breakpointId = this._breakpointStore
+ .getBreakpointIdFromConnection(connection, xdebugBreakpoint);
if (breakpointId == null) {
throw Error(
`Cannot find xdebug breakpoint ${JSON.stringify(
@@ -394,15 +387,20 @@ export class ConnectionMultiplexer {
// Only enable connection paused by async_break if user has explicitly issued an async_break.
connection.getStatus() === ConnectionStatus.Break &&
(connection.getStopReason() !== ASYNC_BREAK ||
- this._status ===
- ConnectionMultiplexerStatus.UserAsyncBreakSent) && (!getSettings().singleThreadStepping || this._lastEnabledConnection === null || connection === this._lastEnabledConnection) && (!connection.isDummyConnection() || connection.isViewable());
+ this._status === ConnectionMultiplexerStatus.UserAsyncBreakSent) &&
+ (!getSettings().singleThreadStepping ||
+ this._lastEnabledConnection === null ||
+ connection === this._lastEnabledConnection) &&
+ (!connection.isDummyConnection() || connection.isViewable());
}
_isFirstStartingConnection(connection: Connection): boolean {
- return // Dummy connection + first connection.
+ return;
+ // Dummy connection + first connection.
this._status === ConnectionMultiplexerStatus.UserAsyncBreakSent &&
connection.getStatus() === ConnectionStatus.Starting &&
- this._connections.size === 2 && !connection.isDummyConnection();
+ this._connections.size === 2 &&
+ !connection.isDummyConnection();
}
_enableConnection(connection: Connection): void {
@@ -527,7 +525,8 @@ export class ConnectionMultiplexer {
if (result.wasThrown) {
const message = {
text: "Failed to evaluate " +
- `"${expression}": (${result.error.$.code}) ${result.error.message[0]}`,
+ `"${expression}": (${result.error.$.code}) ${result.error
+ .message[0]}`,
level: "error"
};
this._clientCallback.sendUserMessage("console", message);
@@ -707,10 +706,8 @@ export class ConnectionMultiplexer {
const stdoutRequestSucceeded = await connection.sendStdoutRequest();
if (!stdoutRequestSucceeded) {
logger.logError("HHVM returned failure for a stdout request");
- this._clientCallback.sendUserMessage("outputWindow", {
- level: "error",
- text: "HHVM failed to redirect stdout, so no output will be sent to the output window."
- });
+ this
+ ._clientCallback.sendUserMessage("outputWindow", { level: "error", text: "HHVM failed to redirect stdout, so no output will be sent to the output window." });
}
// TODO: Stderr redirection is not implemented in HHVM so we won't check this return value.
await connection.sendStderrRequest();
diff --git a/pkg/nuclide-debugger-php-rpc/lib/DataCache.js b/pkg/nuclide-debugger-php-rpc/lib/DataCache.js
index 4746aa2..6906994 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/DataCache.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/DataCache.js
@@ -164,9 +164,8 @@ export class DataCache {
logger.log(`DataCache.getProperties call on ID: ${remoteId}`);
const id = JSON.parse(remoteId);
if (id.enableCount !== this._enableCount) {
- logger.logErrorAndThrow(
- `Got request for stale RemoteObjectId ${remoteId}`
- );
+ logger
+ .logErrorAndThrow(`Got request for stale RemoteObjectId ${remoteId}`);
}
// context and single paged ids require getting children from the debuggee and converting
diff --git a/pkg/nuclide-debugger-php-rpc/lib/DbgpConnector.js b/pkg/nuclide-debugger-php-rpc/lib/DbgpConnector.js
index 6705a9a..ad2f2ec 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/DbgpConnector.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/DbgpConnector.js
@@ -106,7 +106,8 @@ export class DbgpConnector {
_onServerError(error: Object): void {
let errorMessage;
if (error.code === "EADDRINUSE") {
- errorMessage = `Can't start debugging because port ${this._port} is being used by another process. ` +
+ errorMessage = `Can't start debugging because port ${this
+ ._port} is being used by another process. ` +
"Try running 'killall node' on your devserver and then restarting Nuclide.";
} else {
errorMessage = `Unknown debugger socket error: ${error.code}.`;
@@ -139,12 +140,8 @@ export class DbgpConnector {
}
if (messages.length !== 1) {
- this._failConnection(
- socket,
- "Expected a single connection message. Got " + messages.length,
- "PHP sent a malformed request, please file a bug to the Nuclide developers.<br />" +
- "Error: Expected a single connection message."
- );
+ this
+ ._failConnection(socket, "Expected a single connection message. Got " + messages.length, "PHP sent a malformed request, please file a bug to the Nuclide developers.<br />" + "Error: Expected a single connection message.");
return;
}
@@ -166,10 +163,8 @@ export class DbgpConnector {
*/
_checkListening(socket: Socket, message: string): boolean {
if (!this.isListening()) {
- logger.log(
- "Ignoring " + message + " on port " + this._port +
- " after stopped connection."
- );
+ logger
+ .log("Ignoring " + message + " on port " + this._port + " after stopped connection.");
return false;
}
return true;
diff --git a/pkg/nuclide-debugger-php-rpc/lib/DbgpMessageHandler.js b/pkg/nuclide-debugger-php-rpc/lib/DbgpMessageHandler.js
index 2418eda..1d91afb 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/DbgpMessageHandler.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/DbgpMessageHandler.js
@@ -60,11 +60,8 @@ export class DbgpMessageHandler {
// Verify that we can't get another message without completing previous one.
if (prevIncompletedMessage && components.length !== 0) {
- logger.logErrorAndThrow(
- "Error: got extra messages without completing previous message. " +
- `Previous message was: ${JSON.stringify(prevIncompletedMessage)}. ` +
- `Remaining components: ${JSON.stringify(components)}`
- );
+ logger
+ .logErrorAndThrow("Error: got extra messages without completing previous message. " + `Previous message was: ${JSON.stringify(prevIncompletedMessage)}. ` + `Remaining components: ${JSON.stringify(components)}`);
}
const isIncompleteResponse = components.length % 2 === 0;
@@ -73,10 +70,8 @@ export class DbgpMessageHandler {
if (!isIncompleteResponse) {
const lastComponent = components.pop();
if (lastComponent.length !== 0) {
- logger.logErrorAndThrow(
- "The complete response should terminate with" +
- ` zero character while got: ${lastComponent} `
- );
+ logger
+ .logErrorAndThrow("The complete response should terminate with" + ` zero character while got: ${lastComponent} `);
}
}
@@ -88,10 +83,8 @@ export class DbgpMessageHandler {
const length = Number(components.pop());
const lastMessage = { length, content };
if (!this._isIncompletedMessage(lastMessage)) {
- logger.logErrorAndThrow(
- "The last message should be a fragment of a full message: " +
- JSON.stringify(lastMessage)
- );
+ logger
+ .logErrorAndThrow("The last message should be a fragment of a full message: " + JSON.stringify(lastMessage));
}
prevIncompletedMessage = lastMessage;
}
@@ -104,11 +97,8 @@ export class DbgpMessageHandler {
content: components.shift()
};
if (!this._isCompletedMessage(message)) {
- logger.logErrorAndThrow(
- `Got message length(${message.content.length}) ` +
- `not equal to expected(${message.length}). ` +
- `Message was: ${JSON.stringify(message)}`
- );
+ logger
+ .logErrorAndThrow(`Got message length(${message.content.length}) ` + `not equal to expected(${message.length}). ` + `Message was: ${JSON.stringify(message)}`);
}
results.push(this._parseXml(message));
}
diff --git a/pkg/nuclide-debugger-php-rpc/lib/DbgpSocket.js b/pkg/nuclide-debugger-php-rpc/lib/DbgpSocket.js
index ba5a8c9..4b68843 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/DbgpSocket.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/DbgpSocket.js
@@ -214,10 +214,8 @@ export class DbgpSocket {
// Then send a user-friendly message to the console, and trigger a UI update by moving to
// running status briefly, and then back to break status.
this._emitStatus(ConnectionStatus.DummyIsViewable);
- this._emitStatus(
- ConnectionStatus.Stdout,
- "Hit breakpoint in evaluated code."
- );
+ this
+ ._emitStatus(ConnectionStatus.Stdout, "Hit breakpoint in evaluated code.");
this._emitStatus(ConnectionStatus.Running);
this._emitStatus(ConnectionStatus.Break);
return; // Return early so that we don't complete any request.
@@ -278,11 +276,8 @@ export class DbgpSocket {
if (notifyName === "breakpoint_resolved") {
const breakpoint = notify.breakpoint[0].$;
if (breakpoint == null) {
- logger.logError(
- `Fail to get breakpoint from 'breakpoint_resolved' notify: ${JSON.stringify(
- notify
- )}`
- );
+ logger
+ .logError(`Fail to get breakpoint from 'breakpoint_resolved' notify: ${JSON.stringify(notify)}`);
return;
}
this._emitNotification(BREAKPOINT_RESOLVED_NOTIFICATION, breakpoint);
@@ -300,10 +295,8 @@ export class DbgpSocket {
): void {
this._calls.delete(transactionId);
if (call.command !== command) {
- logger.logError(
- "Bad command in response. Found " + command + ". expected " +
- call.command
- );
+ logger
+ .logError("Bad command in response. Found " + command + ". expected " + call.command);
return;
}
try {
@@ -392,9 +385,8 @@ export class DbgpSocket {
} else if (result.property != null) {
return { result: result.property[0], wasThrown: false };
} else {
- logger.log(
- `Received non-error evaluateOnCallFrame response with no properties: ${expression}`
- );
+ logger
+ .log(`Received non-error evaluateOnCallFrame response with no properties: ${expression}`);
return { result: DEFAULT_DBGP_PROPERTY, wasThrown: false };
}
}
@@ -463,9 +455,8 @@ export class DbgpSocket {
} else if (response.property != null) {
return { result: response.property[0], wasThrown: false };
} else {
- logger.log(
- `Received non-error runtimeEvaluate response with no properties: ${expr}`
- );
+ logger
+ .log(`Received non-error runtimeEvaluate response with no properties: ${expr}`);
}
return { result: DEFAULT_DBGP_PROPERTY, wasThrown: false };
}
diff --git a/pkg/nuclide-debugger-php-rpc/lib/DebuggerHandler.js b/pkg/nuclide-debugger-php-rpc/lib/DebuggerHandler.js
index c3bd093..015c0d9 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/DebuggerHandler.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/DebuggerHandler.js
@@ -164,11 +164,8 @@ export class DebuggerHandler extends Handler {
async _setBreakpointByUrl(id: number, params: Object): Promise<void> {
const { lineNumber, url, columnNumber, condition } = params;
if (!url || columnNumber !== 0) {
- this.replyWithError(
- id,
- "Invalid arguments to Debugger.setBreakpointByUrl: " +
- JSON.stringify(params)
- );
+ this
+ .replyWithError(id, "Invalid arguments to Debugger.setBreakpointByUrl: " + JSON.stringify(params));
return;
}
this._files.registerFile(url);
@@ -307,13 +304,12 @@ export class DebuggerHandler extends Handler {
// May only call when in paused state.
async _sendPausedMessage(): Promise<any> {
- const requestSwitchMessage = this._connectionMultiplexer.getRequestSwitchMessage();
+ const requestSwitchMessage = this._connectionMultiplexer
+ .getRequestSwitchMessage();
this._connectionMultiplexer.resetRequestSwitchMessage();
if (requestSwitchMessage != null) {
- this.sendUserMessage("outputWindow", {
- level: "info",
- text: requestSwitchMessage
- });
+ this
+ .sendUserMessage("outputWindow", { level: "info", text: requestSwitchMessage });
}
this.sendMethod("Debugger.paused", {
callFrames: await this._getStackFrames(),
diff --git a/pkg/nuclide-debugger-php-rpc/lib/FileCache.js b/pkg/nuclide-debugger-php-rpc/lib/FileCache.js
index 7cc0a9c..e42fdc9 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/FileCache.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/FileCache.js
@@ -30,14 +30,8 @@ export default class FileCache {
const filepath = uriToPath(fileUrl);
if (!this._files.has(filepath)) {
this._files.set(filepath, new File(filepath));
- this._callback.sendServerMethod("Debugger.scriptParsed", {
- scriptId: filepath,
- url: fileUrl,
- startLine: 0,
- startColumn: 0,
- endLine: 0,
- endColumn: 0
- });
+ this
+ ._callback.sendServerMethod("Debugger.scriptParsed", { scriptId: filepath, url: fileUrl, startLine: 0, startColumn: 0, endLine: 0, endColumn: 0 });
}
const result = this._files.get(filepath);
invariant(result != null);
diff --git a/pkg/nuclide-debugger-php-rpc/lib/ObjectId.js b/pkg/nuclide-debugger-php-rpc/lib/ObjectId.js
index 5ea8eb6..d4d15f9 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/ObjectId.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/ObjectId.js
@@ -147,10 +147,8 @@ export function countOfObjectId(
parentEndIndex: number
): number {
if (isSinglePageObjectId(id)) {
- return Math.min(
- pagesize,
- parentEndIndex - startIndexOfObjectId(id, pagesize)
- );
+ return Math
+ .min(pagesize, parentEndIndex - startIndexOfObjectId(id, pagesize));
} else {
invariant(id.elementRange);
return id.elementRange.count;
diff --git a/pkg/nuclide-debugger-php-rpc/lib/PageHandler.js b/pkg/nuclide-debugger-php-rpc/lib/PageHandler.js
index 21af8d8..46514dc 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/PageHandler.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/PageHandler.js
@@ -30,7 +30,8 @@ export default class PageHandler extends Handler {
break;
case "getResourceTree":
- this.replyToCommand(
+ this
+ .replyToCommand(
id,
// For now, return a dummy resource tree so various initializations in
// client happens.
diff --git a/pkg/nuclide-debugger-php-rpc/lib/PhpDebuggerService.js b/pkg/nuclide-debugger-php-rpc/lib/PhpDebuggerService.js
index 4ed8488..90ab952 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/PhpDebuggerService.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/PhpDebuggerService.js
@@ -132,11 +132,8 @@ export class PhpDebuggerService {
async _warnIfHphpdAttached(): Promise<void> {
const mightBeAttached = await hphpdMightBeAttached();
if (mightBeAttached) {
- this._clientCallback.sendUserMessage("notification", {
- type: "warning",
- message: "You may have an hphpd instance currently attached to your server!" +
- "<br />Please kill it, or the Nuclide debugger may not work properly."
- });
+ this
+ ._clientCallback.sendUserMessage("notification", { type: "warning", message: "You may have an hphpd instance currently attached to your server!" + "<br />Please kill it, or the Nuclide debugger may not work properly." });
}
}
diff --git a/pkg/nuclide-debugger-php-rpc/lib/helpers.js b/pkg/nuclide-debugger-php-rpc/lib/helpers.js
index 07fc251..f84c11d 100644
--- a/pkg/nuclide-debugger-php-rpc/lib/helpers.js
+++ b/pkg/nuclide-debugger-php-rpc/lib/helpers.js
@@ -42,9 +42,10 @@ export function base64Encode(value: string): string {
export async function hphpdMightBeAttached(): Promise<boolean> {
const processes = await checkOutput("ps", [ "aux" ], {});
return processes.stdout.toString().split("\n").slice(1).some(line => {
- return // hhvm -m debug
- line.indexOf("m debug") >=
- 0 || line.indexOf("mode debug") >= 0; // hhvm --mode debug
+ return;
+ // hhvm -m debug
+ line.indexOf("m debug") >= 0 ||
+ line.indexOf("mode debug") >= 0; // hhvm --mode debug
});
}
@@ -72,9 +73,8 @@ export function uriToPath(uri: string): string {
const components = url.parse(uri);
// Some filename returned from hhvm does not have protocol.
if (components.protocol !== "file:" && components.protocol != null) {
- logger.logErrorAndThrow(
- `unexpected file protocol. Got: ${components.protocol}`
- );
+ logger
+ .logErrorAndThrow(`unexpected file protocol. Got: ${components.protocol}`);
}
return components.pathname || "";
}
diff --git a/pkg/nuclide-debugger-php-rpc/spec/ConnectionMultiplexer-spec.js b/pkg/nuclide-debugger-php-rpc/spec/ConnectionMultiplexer-spec.js
index 9fc685b..f36bfc2 100644
--- a/pkg/nuclide-debugger-php-rpc/spec/ConnectionMultiplexer-spec.js
+++ b/pkg/nuclide-debugger-php-rpc/spec/ConnectionMultiplexer-spec.js
@@ -93,10 +93,8 @@ describe("debugger-hhvm-proxy ConnectionMultiplexer", () => {
});
// $FlowFixMe override instance methods.
connector.listen = jasmine.createSpy("listen").andReturn();
- DbgpConnector = ((spyOn(
- require("../lib/DbgpConnector"),
- "DbgpConnector"
- ).andReturn(connector): any): () => DbgpConnectorType);
+ DbgpConnector = ((spyOn(require("../lib/DbgpConnector"), "DbgpConnector")
+ .andReturn(connector): any): () => DbgpConnectorType);
connectionSpys = [];
connections = [];
@@ -244,11 +242,8 @@ describe("debugger-hhvm-proxy ConnectionMultiplexer", () => {
connection._disposables = new CompositeDisposable(
connection.onStatus((status, ...args) => {
connection._status = status;
- return connectionMultiplexer._connectionOnStatus(
- connection,
- status,
- ...args
- );
+ return connectionMultiplexer
+ ._connectionOnStatus(connection, status, ...args);
}),
connection.onNotification(
connectionMultiplexer._handleNotification.bind(
@@ -269,10 +264,8 @@ describe("debugger-hhvm-proxy ConnectionMultiplexer", () => {
return connection;
}
- Connection = ((spyOn(
- require("../lib/Connection"),
- "Connection"
- ).andCallFake((...args) => {
+ Connection = ((spyOn(require("../lib/Connection"), "Connection")
+ .andCallFake((...args) => {
const isDummy = args[3];
return createConnectionSpy(isDummy);
}): any): () => ConnectionType);
diff --git a/pkg/nuclide-debugger-php-rpc/spec/DataCache-spec.js b/pkg/nuclide-debugger-php-rpc/spec/DataCache-spec.js
index 1dd6fb6..fa1ee07 100644
--- a/pkg/nuclide-debugger-php-rpc/spec/DataCache-spec.js
+++ b/pkg/nuclide-debugger-php-rpc/spec/DataCache-spec.js
@@ -51,13 +51,8 @@ describe("debugger-php-rpc DataCache", () => {
},
getContextsForFrame: jasmine
.createSpy()
- .andReturn(
- Promise.resolve([
- { name: "Locals", id: "0" },
- { name: "Superglobals", id: "1" },
- { name: "User defined constants", id: "2" }
- ])
- ),
+
+ .andReturn(Promise.resolve([ { name: "Locals", id: "0" }, { name: "Superglobals", id: "1" }, { name: "User defined constants", id: "2" } ])),
getContextProperties: jasmine
.createSpy()
.andReturn(Promise.resolve(PROPERTIES))
diff --git a/pkg/nuclide-debugger-php-rpc/spec/DbgpMessageHandler-spec.js b/pkg/nuclide-debugger-php-rpc/spec/DbgpMessageHandler-spec.js
index 2ed9e00..e8772c1 100644
--- a/pkg/nuclide-debugger-php-rpc/spec/DbgpMessageHandler-spec.js
+++ b/pkg/nuclide-debugger-php-rpc/spec/DbgpMessageHandler-spec.js
@@ -148,9 +148,8 @@ describe("debugger-php-rpc DbgpMessageHandler", () => {
const completedMessage2 = makeDbgpMessage(payload);
expect(() => {
- messageHandler.parseMessages(
- completedMessage1 + IncompletedMessage + completedMessage2
- );
+ messageHandler
+ .parseMessages(completedMessage1 + IncompletedMessage + completedMessage2);
}).toThrow();
});
});
diff --git a/pkg/nuclide-debugger-php-rpc/spec/DebuggerHandler-spec.js b/pkg/nuclide-debugger-php-rpc/spec/DebuggerHandler-spec.js
index e83eb52..3cdb9e1 100644
--- a/pkg/nuclide-debugger-php-rpc/spec/DebuggerHandler-spec.js
+++ b/pkg/nuclide-debugger-php-rpc/spec/DebuggerHandler-spec.js
@@ -58,10 +58,8 @@ describe("debugger-php-rpc DebuggerHandler", () => {
onStatusSubscription = jasmine.createSpyObj("onStatusSubscription", [
"dispose"
]);
- const onNotificationSubscription = jasmine.createSpyObj(
- "onNotificationSubscription",
- [ "dispose" ]
- );
+ const onNotificationSubscription = jasmine
+ .createSpyObj("onNotificationSubscription", [ "dispose" ]);
// $FlowFixMe override instance methods.
connectionMultiplexer.onStatus = jasmine
.createSpy("onStatus")
@@ -93,30 +91,8 @@ describe("debugger-php-rpc DebuggerHandler", () => {
waitsForPromise(async () => {
connectionMultiplexer.getStackFrames = jasmine
.createSpy("getStackFrames")
- .andReturn(
- Promise.resolve({
- stack: [
- {
- $: {
- where: "foo",
- level: "0",
- type: "file",
- filename: "file:///usr/test.php",
- lineno: "5"
- }
- },
- {
- $: {
- where: "main",
- level: "1",
- type: "file",
- filename: "file:///usr/test.php",
- lineno: "15"
- }
- }
- ]
- })
- );
+
+ .andReturn(Promise.resolve({ stack: [ { $: { where: "foo", level: "0", type: "file", filename: "file:///usr/test.php", lineno: "5" } }, { $: { where: "main", level: "1", type: "file", filename: "file:///usr/test.php", lineno: "15" } } ] }));
await onStatus(ConnectionMultiplexerStatus.SingleConnectionPaused);
diff --git a/pkg/nuclide-debugger-php-rpc/spec/MessageTranslator-spec.js b/pkg/nuclide-debugger-php-rpc/spec/MessageTranslator-spec.js
index 3f70724..bd173b4 100644
--- a/pkg/nuclide-debugger-php-rpc/spec/MessageTranslator-spec.js
+++ b/pkg/nuclide-debugger-php-rpc/spec/MessageTranslator-spec.js
@@ -50,10 +50,8 @@ describe("debugger-php-rpc MessageTranslator", () => {
});
afterEach(() => {
- jasmine.unspy(
- require("../lib/ConnectionMultiplexer"),
- "ConnectionMultiplexer"
- );
+ jasmine
+ .unspy(require("../lib/ConnectionMultiplexer"), "ConnectionMultiplexer");
clearRequireCache(require, "../lib/MessageTranslator");
});
diff --git a/pkg/nuclide-debugger-php-rpc/spec/PhpDebuggerService-spec.js b/pkg/nuclide-debugger-php-rpc/spec/PhpDebuggerService-spec.js
index 7372dac..ed9514f 100644
--- a/pkg/nuclide-debugger-php-rpc/spec/PhpDebuggerService-spec.js
+++ b/pkg/nuclide-debugger-php-rpc/spec/PhpDebuggerService-spec.js
@@ -39,9 +39,8 @@ describe("debugger-php-rpc proxy", () => {
PhpDebuggerService = ((uncachedRequire(
require,
"../lib/PhpDebuggerService"
- ): any): {
- PhpDebuggerService(): PhpDebuggerServiceType
- }).PhpDebuggerService;
+ ): any): { PhpDebuggerService(): PhpDebuggerServiceType })
+ .PhpDebuggerService;
});
afterEach(() => {
@@ -79,11 +78,8 @@ describe("debugger-php-rpc proxy", () => {
proxy
.getNotificationObservable()
.refCount()
- .subscribe(
- onNotificationMessage,
- onNotificationError,
- onNotificationEnd
- );
+
+ .subscribe(onNotificationMessage, onNotificationError, onNotificationEnd);
const connectionPromise = proxy.debug(config);
diff --git a/pkg/nuclide-debugger-php-rpc/spec/RuntimeHandler-spec.js b/pkg/nuclide-debugger-php-rpc/spec/RuntimeHandler-spec.js
index abbdb2b..1594d06 100644
--- a/pkg/nuclide-debugger-php-rpc/spec/RuntimeHandler-spec.js
+++ b/pkg/nuclide-debugger-php-rpc/spec/RuntimeHandler-spec.js
@@ -58,12 +58,8 @@ describe("debugger-php-rpc RuntimeHandler", () => {
const ownProperties = false;
const generatePreview = false;
const accessorPropertiesOnly = false;
- await handler.handleMethod(1, "getProperties", {
- objectId,
- ownProperties,
- accessorPropertiesOnly,
- generatePreview
- });
+ await handler
+ .handleMethod(1, "getProperties", { objectId, ownProperties, accessorPropertiesOnly, generatePreview });
expect(
connectionMultiplexer.getProperties
).toHaveBeenCalledWith(objectId);
@@ -84,10 +80,8 @@ describe("debugger-php-rpc RuntimeHandler", () => {
it("console", () => {
waitsForPromise(async () => {
- await handler.handleMethod(1, "evaluate", {
- expression,
- objectGroup: "console"
- });
+ await handler
+ .handleMethod(1, "evaluate", { expression, objectGroup: "console" });
expect(
connectionMultiplexer.runtimeEvaluate
).toHaveBeenCalledWith(expression);
@@ -99,10 +93,8 @@ describe("debugger-php-rpc RuntimeHandler", () => {
it("non-console", () => {
waitsForPromise(async () => {
- await handler.handleMethod(1, "evaluate", {
- expression,
- objectGroup: "other"
- });
+ await handler
+ .handleMethod(1, "evaluate", { expression, objectGroup: "other" });
expect(connectionMultiplexer.runtimeEvaluate).not.toHaveBeenCalled();
expect(
clientCallback.replyWithError
diff --git a/pkg/nuclide-debugger-php/lib/AttachUiComponent.js b/pkg/nuclide-debugger-php/lib/AttachUiComponent.js
index 5f082a3..9e156ed 100644
--- a/pkg/nuclide-debugger-php/lib/AttachUiComponent.js
+++ b/pkg/nuclide-debugger-php/lib/AttachUiComponent.js
@@ -28,7 +28,8 @@ type StateType = {
pathMenuItems: Array<{ label: string, value: number }>
};
-export class AttachUiComponent extends React.Component<void, PropsType, StateType> {
+export class AttachUiComponent extends React
+ .Component<void, PropsType, StateType> {
props: PropsType;
state: StateType;
@@ -40,9 +41,8 @@ export class AttachUiComponent extends React.Component<void, PropsType, StateTyp
(this: any)._handleAttachButtonClick = this._handleAttachButtonClick.bind(
this
);
- (this: any)._handlePathsDropdownChange = this._handlePathsDropdownChange.bind(
- this
- );
+ (this: any)._handlePathsDropdownChange = this._handlePathsDropdownChange
+ .bind(this);
this.state = {
selectedPathIndex: 0,
pathMenuItems: this._getPathMenuItems()
@@ -108,7 +108,8 @@ export class AttachUiComponent extends React.Component<void, PropsType, StateTyp
_handleAttachButtonClick(): void {
// Start a debug session with the user-supplied information.
const { hostname } = nuclideUri.parseRemoteUri(this.props.targetUri);
- const selectedPath = this.state.pathMenuItems[this.state.selectedPathIndex].label;
+ const selectedPath = this.state.pathMenuItems[this.state.selectedPathIndex]
+ .label;
const processInfo = new AttachProcessInfo(
nuclideUri.createRemoteUri(hostname, selectedPath)
);
diff --git a/pkg/nuclide-debugger-php/lib/LaunchUiComponent.js b/pkg/nuclide-debugger-php/lib/LaunchUiComponent.js
index b468dca..b07fec9 100644
--- a/pkg/nuclide-debugger-php/lib/LaunchUiComponent.js
+++ b/pkg/nuclide-debugger-php/lib/LaunchUiComponent.js
@@ -28,7 +28,8 @@ type StateType = {
pathMenuItems: Array<{ label: string, value: number }>
};
-export class LaunchUiComponent extends React.Component<void, PropsType, StateType> {
+export class LaunchUiComponent extends React
+ .Component<void, PropsType, StateType> {
props: PropsType;
state: StateType;
@@ -41,9 +42,8 @@ export class LaunchUiComponent extends React.Component<void, PropsType, StateTyp
(this: any)._handleLaunchButtonClick = this._handleLaunchButtonClick.bind(
this
);
- (this: any)._handlePathsDropdownChange = this._handlePathsDropdownChange.bind(
- this
- );
+ (this: any)._handlePathsDropdownChange = this._handlePathsDropdownChange
+ .bind(this);
this.state = {
pathsDropdownIndex: 0,
pathMenuItems: this._getPathMenuItems()
diff --git a/pkg/nuclide-debugger-php/lib/ObservableManager.js b/pkg/nuclide-debugger-php/lib/ObservableManager.js
index 2e2a555..395173d 100644
--- a/pkg/nuclide-debugger-php/lib/ObservableManager.js
+++ b/pkg/nuclide-debugger-php/lib/ObservableManager.js
@@ -64,10 +64,8 @@ export class ObservableManager {
const filteredMesages = sharedOutputWindowMessages
.filter(messageObj => messageObj.method === "Console.messageAdded")
.map(messageObj => {
- return JSON.stringify({
- level: messageObj.params.message.level,
- text: messageObj.params.message.text
- });
+ return JSON
+ .stringify({ level: messageObj.params.message.level, text: messageObj.params.message.text });
});
const outputDisposable = registerConsoleLogging(
"PHP Debugger",
diff --git a/pkg/nuclide-debugger-php/lib/utils.js b/pkg/nuclide-debugger-php/lib/utils.js
index c610518..e3ad459 100644
--- a/pkg/nuclide-debugger-php/lib/utils.js
+++ b/pkg/nuclide-debugger-php/lib/utils.js
@@ -46,7 +46,8 @@ function validateConfig(config): void {
if (!isValidRegex(config.idekeyRegex)) {
invariant(config.idekeyRegex != null);
throw Error(
- `config idekeyRegex is not a valid regular expression: ${config.idekeyRegex}`
+ `config idekeyRegex is not a valid regular expression: ${config
+ .idekeyRegex}`
);
}
}
diff --git a/pkg/nuclide-debugger-python-rpc/debugger/debugger.js b/pkg/nuclide-debugger-python-rpc/debugger/debugger.js
index 520d53a..07fbfe3 100644
--- a/pkg/nuclide-debugger-python-rpc/debugger/debugger.js
+++ b/pkg/nuclide-debugger-python-rpc/debugger/debugger.js
@@ -80,12 +80,8 @@ export function launchDebugger(
// Take requests from the input commander and pass them through to the Python debugger.
// TODO(mbolin): If a `quit` message comes in, we should tear down everything from here
// because the Python code may be locked up such that it won't get the message.
- commander.subscribe(
- write,
- (error: Error) =>
- log(`Unexpected error from commander: ${String(error)}`),
- () => log("Apparently the commander is done.")
- );
+ commander
+ .subscribe(write, (error: Error) => log(`Unexpected error from commander: ${String(error)}`), () => log("Apparently the commander is done."));
connection.on("end", () => {
// In the current design, we only expect there to be one connection ever, so when it
diff --git a/pkg/nuclide-debugger-python-rpc/pdb/pdb.js b/pkg/nuclide-debugger-python-rpc/pdb/pdb.js
index 0d341ad..0809e15 100644
--- a/pkg/nuclide-debugger-python-rpc/pdb/pdb.js
+++ b/pkg/nuclide-debugger-python-rpc/pdb/pdb.js
@@ -18,9 +18,8 @@ import yargs from "yargs";
export default function main(args: Array<string>) {
const argv = yargs
- .usage(
- "Python command-line debugger in JavaScript.\nUsage: $0 <file-to-run.py> <arg1> <arg2>"
- )
+
+ .usage("Python command-line debugger in JavaScript.\nUsage: $0 <file-to-run.py> <arg1> <arg2>")
.help("help")
.alias("h", "help")
.demand(1, "Must specify a Python file")
@@ -92,9 +91,8 @@ function interact(
next(message) {
if (message.event === "start") {
// Give the user a chance to set breakpoints before starting the program.
- console.log(
- "Program started. Type 'c' to continue or 's' to start stepping."
- );
+ console
+ .log("Program started. Type 'c' to continue or 's' to start stepping.");
ask();
} else if (message.event === "stop") {
const { file, line } = message;
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/BreakpointManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/BreakpointManager.js
index b1baf76..626a3a7 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/BreakpointManager.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/BreakpointManager.js
@@ -169,13 +169,8 @@ WebInspector.BreakpointManager.prototype = {
.push(provisionalBreakpoint);
provisionalBreakpoint._updateBreakpoint();
} else {
- this._innerSetBreakpoint(
- uiSourceCode,
- breakpointItem.lineNumber,
- breakpointItem.columnNumber,
- breakpointItem.condition,
- breakpointItem.enabled
- );
+ this
+ ._innerSetBreakpoint(uiSourceCode, breakpointItem.lineNumber, breakpointItem.columnNumber, breakpointItem.condition, breakpointItem.enabled);
}
}
this._provisionalBreakpoints.removeAll(sourceFileId);
@@ -236,11 +231,8 @@ WebInspector.BreakpointManager.prototype = {
if (breakpoints[i].enabled())
this._provisionalBreakpoints.set(sourceFileId, breakpoints[i]);
}
- uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.SourceMappingChanged,
- this._uiSourceCodeMappingChanged,
- this
- );
+ uiSourceCode
+ .removeEventListener(WebInspector.UISourceCode.Events.SourceMappingChanged, this._uiSourceCodeMappingChanged, this);
this._breakpointsForPrimaryUISourceCode.remove(uiSourceCode);
},
/**
@@ -467,10 +459,8 @@ WebInspector.BreakpointManager.prototype = {
);
if (!breakpoints) {
breakpoints = new Map();
- this._breakpointsForUISourceCode.set(
- uiLocation.uiSourceCode,
- breakpoints
- );
+ this
+ ._breakpointsForUISourceCode.set(uiLocation.uiSourceCode, breakpoints);
}
var lineBreakpoints = breakpoints.get(String(uiLocation.lineNumber));
if (!lineBreakpoints) {
@@ -532,10 +522,8 @@ WebInspector.BreakpointManager.prototype = {
++i
) targets[i].debuggerAgent().setBreakpointsActive(active);
- this.dispatchEventToListeners(
- WebInspector.BreakpointManager.Events.BreakpointsActiveStateChanged,
- active
- );
+ this
+ .dispatchEventToListeners(WebInspector.BreakpointManager.Events.BreakpointsActiveStateChanged, active);
},
/**
* @return {boolean}
@@ -602,16 +590,10 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
*/
targetAdded: function(target) {
var networkMapping = this._breakpointManager._networkMapping;
- var debuggerWorkspaceBinding = this._breakpointManager._debuggerWorkspaceBinding;
- this._targetBreakpoints.set(
- target,
- new WebInspector.BreakpointManager.TargetBreakpoint(
- target,
- this,
- networkMapping,
- debuggerWorkspaceBinding
- )
- );
+ var debuggerWorkspaceBinding = this._breakpointManager
+ ._debuggerWorkspaceBinding;
+ this
+ ._targetBreakpoints.set(target, new WebInspector.BreakpointManager.TargetBreakpoint(target, this, networkMapping, debuggerWorkspaceBinding));
},
/**
* @override
@@ -650,10 +632,8 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
* @return {?WebInspector.UISourceCode}
*/
uiSourceCode: function() {
- return this._breakpointManager._workspace.uiSourceCode(
- this._projectId,
- this._path
- );
+ return this
+ ._breakpointManager._workspace.uiSourceCode(this._projectId, this._path);
},
/**
* @param {?WebInspector.UILocation} oldUILocation
@@ -757,11 +737,8 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
* @return {string}
*/
_breakpointStorageId: function() {
- return WebInspector.BreakpointManager._breakpointStorageId(
- this._sourceFileId,
- this._lineNumber,
- this._columnNumber
- );
+ return WebInspector
+ .BreakpointManager._breakpointStorageId(this._sourceFileId, this._lineNumber, this._columnNumber);
},
_fakeBreakpointAtPrimaryLocation: function() {
if (
@@ -786,10 +763,8 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
},
_removeFakeBreakpointAtPrimaryLocation: function() {
if (this._fakePrimaryLocation) {
- this._breakpointManager._uiLocationRemoved(
- this,
- this._fakePrimaryLocation
- );
+ this
+ ._breakpointManager._uiLocationRemoved(this, this._fakePrimaryLocation);
delete this._fakePrimaryLocation;
}
},
@@ -983,10 +958,8 @@ WebInspector.BreakpointManager.TargetBreakpoint.prototype = {
this._resetLocations();
this
._debuggerModel()
- .removeBreakpoint(
- this._debuggerId,
- this._didRemoveFromDebugger.bind(this, callback)
- );
+
+ .removeBreakpoint(this._debuggerId, this._didRemoveFromDebugger.bind(this, callback));
this._scheduleUpdateInDebugger();
this._currentState = null;
return;
@@ -1001,13 +974,8 @@ WebInspector.BreakpointManager.TargetBreakpoint.prototype = {
if (newState.url)
this
._debuggerModel()
- .setBreakpointByURL(
- newState.url,
- newState.lineNumber,
- newState.columnNumber,
- this._breakpoint.condition(),
- updateCallback
- );
+
+ .setBreakpointByURL(newState.url, newState.lineNumber, newState.columnNumber, this._breakpoint.condition(), updateCallback);
else if (newState.scriptId)
this
._debuggerModel()
@@ -1063,11 +1031,8 @@ WebInspector.BreakpointManager.TargetBreakpoint.prototype = {
}
this._resetLocations();
- this.target().debuggerModel.removeBreakpointListener(
- this._debuggerId,
- this._breakpointResolved,
- this
- );
+ this
+ .target().debuggerModel.removeBreakpointListener(this._debuggerId, this._breakpointResolved, this);
delete this._debuggerId;
callback();
},
@@ -1075,9 +1040,8 @@ WebInspector.BreakpointManager.TargetBreakpoint.prototype = {
* @param {!WebInspector.Event} event
*/
_breakpointResolved: function(event) {
- this._addResolvedLocation /** @type {!WebInspector.DebuggerModel.Location}*/(
- event.data
- );
+ this
+ ._addResolvedLocation /** @type {!WebInspector.DebuggerModel.Location}*/(event.data);
},
/**
* @param {!WebInspector.DebuggerModel.Location} location
@@ -1122,16 +1086,10 @@ WebInspector.BreakpointManager.TargetBreakpoint.prototype = {
if (this._debuggerId) this._didRemoveFromDebugger(function() {});
},
_removeEventListeners: function() {
- this.target().debuggerModel.removeEventListener(
- WebInspector.DebuggerModel.Events.DebuggerWasDisabled,
- this._cleanUpAfterDebuggerIsGone,
- this
- );
- this.target().debuggerModel.removeEventListener(
- WebInspector.DebuggerModel.Events.DebuggerWasEnabled,
- this._scheduleUpdateInDebugger,
- this
- );
+ this
+ .target().debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.DebuggerWasDisabled, this._cleanUpAfterDebuggerIsGone, this);
+ this
+ .target().debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.DebuggerWasEnabled, this._scheduleUpdateInDebugger, this);
},
__proto__: WebInspector.SDKObject.prototype
};
@@ -1220,9 +1178,8 @@ WebInspector.BreakpointManager.Storage.prototype = {
*/
_updateBreakpoint: function(breakpoint) {
if (this._muted || !breakpoint._breakpointStorageId()) return;
- this._breakpoints[breakpoint._breakpointStorageId()] = new WebInspector.BreakpointManager.Storage.Item(
- breakpoint
- );
+ this._breakpoints[breakpoint._breakpointStorageId()] = new WebInspector
+ .BreakpointManager.Storage.Item(breakpoint);
this._save();
},
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/CSSWorkspaceBinding.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/CSSWorkspaceBinding.js
index e87aa4a..aa98a21 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/CSSWorkspaceBinding.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/CSSWorkspaceBinding.js
@@ -35,14 +35,8 @@ WebInspector.CSSWorkspaceBinding.prototype = {
* @param {!WebInspector.Target} target
*/
targetAdded: function(target) {
- this._targetToTargetInfo.set(
- target,
- new WebInspector.CSSWorkspaceBinding.TargetInfo(
- target,
- this._workspace,
- this._networkMapping
- )
- );
+ this
+ ._targetToTargetInfo.set(target, new WebInspector.CSSWorkspaceBinding.TargetInfo(target, this._workspace, this._networkMapping));
},
/**
* @override
@@ -263,16 +257,10 @@ WebInspector.CSSWorkspaceBinding.TargetInfo.prototype = {
},
_dispose: function() {
this._reset();
- this._target.cssModel.removeEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetAdded,
- this._styleSheetAdded,
- this
- );
- this._target.cssModel.removeEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetRemoved,
- this._styleSheetRemoved,
- this
- );
+ this
+ ._target.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, this._styleSheetAdded, this);
+ this
+ ._target.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetRemoved, this._styleSheetRemoved, this);
},
_reset: function() {
this._headerInfoById.clear();
@@ -388,29 +376,17 @@ WebInspector.CSSWorkspaceBinding.LiveLocation.prototype = {
_setStyleSheet: function(header) {
this._header = header;
this._binding._addLiveLocation(this);
- this._cssModel.removeEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetAdded,
- this._styleSheetAdded,
- this
- );
- this._cssModel.addEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetRemoved,
- this._styleSheetRemoved,
- this
- );
+ this
+ ._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, this._styleSheetAdded, this);
+ this
+ ._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheetRemoved, this._styleSheetRemoved, this);
},
_clearStyleSheet: function() {
delete this._header;
- this._cssModel.removeEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetRemoved,
- this._styleSheetRemoved,
- this
- );
- this._cssModel.addEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetAdded,
- this._styleSheetAdded,
- this
- );
+ this
+ ._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetRemoved, this._styleSheetRemoved, this);
+ this
+ ._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, this._styleSheetAdded, this);
},
/**
* @override
@@ -420,34 +396,24 @@ WebInspector.CSSWorkspaceBinding.LiveLocation.prototype = {
var cssLocation = this._rawLocation;
if (this._header) {
var headerInfo = this._binding._headerInfo(this._header);
- return headerInfo._rawLocationToUILocation(
- cssLocation.lineNumber,
- cssLocation.columnNumber
- );
+ return headerInfo
+ ._rawLocationToUILocation(cssLocation.lineNumber, cssLocation.columnNumber);
}
var uiSourceCode = this._binding._networkMapping.uiSourceCodeForURL(
cssLocation.url,
cssLocation.target()
);
if (!uiSourceCode) return null;
- return uiSourceCode.uiLocation(
- cssLocation.lineNumber,
- cssLocation.columnNumber
- );
+ return uiSourceCode
+ .uiLocation(cssLocation.lineNumber, cssLocation.columnNumber);
},
dispose: function() {
WebInspector.LiveLocation.prototype.dispose.call(this);
if (this._header) this._binding._removeLiveLocation(this);
- this._cssModel.removeEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetAdded,
- this._styleSheetAdded,
- this
- );
- this._cssModel.removeEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetRemoved,
- this._styleSheetRemoved,
- this
- );
+ this
+ ._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, this._styleSheetAdded, this);
+ this
+ ._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetRemoved, this._styleSheetRemoved, this);
},
__proto__: WebInspector.LiveLocation.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/CompilerScriptMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/CompilerScriptMapping.js
index 2c606c4..1564451 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/CompilerScriptMapping.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/CompilerScriptMapping.js
@@ -70,7 +70,8 @@ WebInspector.CompilerScriptMapping = function(
this._stubUISourceCodes = new Map();
this._stubProjectID = "compiler-script-project";
- this._stubProjectDelegate = new WebInspector.ContentProviderBasedProjectDelegate(
+ this._stubProjectDelegate = new WebInspector
+ .ContentProviderBasedProjectDelegate(
this._workspace,
this._stubProjectID,
WebInspector.projectTypes.Service
@@ -132,9 +133,8 @@ WebInspector.CompilerScriptMapping.prototype = {
if (!networkURL) return null;
var sourceMap = this._sourceMapForURL.get(networkURL);
if (!sourceMap) return null;
- var script /** @type {!WebInspector.Script} */ = this._scriptForSourceMap.get(
- sourceMap
- );
+ var script /** @type {!WebInspector.Script} */ = this._scriptForSourceMap
+ .get(sourceMap);
console.assert(script);
var mappingSearchLinesCount = 5;
// We do not require precise (breakpoint) location but limit the number of lines to search or mapping.
@@ -155,10 +155,8 @@ WebInspector.CompilerScriptMapping.prototype = {
*/
addScript: function(script) {
if (!script.sourceMapURL) {
- script.addEventListener(
- WebInspector.Script.Events.SourceMapURLAdded,
- this._sourceMapURLAdded.bind(this)
- );
+ script
+ .addEventListener(WebInspector.Script.Events.SourceMapURLAdded, this._sourceMapURLAdded.bind(this));
return;
}
@@ -181,28 +179,20 @@ WebInspector.CompilerScriptMapping.prototype = {
var splitURL = WebInspector.ParsedURL.splitURLIntoPathComponents(url);
var parentPath = splitURL.slice(1, -1).join("/");
var name = splitURL.peekLast() || "";
- var uiSourceCodePath = this._stubProjectDelegate.addContentProvider(
- parentPath,
- name,
- url,
- url,
- new WebInspector.StaticContentProvider(
- WebInspector.resourceTypes.Script,
- "\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source map is being loaded!",
- url
- )
- );
- var stubUISourceCode /** @type {!WebInspector.UISourceCode} */ = this._workspace.uiSourceCode(
- this._stubProjectID,
- uiSourceCodePath
- );
+ var uiSourceCodePath = this._stubProjectDelegate
+ .addContentProvider(parentPath, name, url, url, new WebInspector
+ .StaticContentProvider(
+ WebInspector.resourceTypes.Script,
+ "\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source map is being loaded!",
+ url
+ ));
+ var stubUISourceCode /** @type {!WebInspector.UISourceCode} */ = this
+ ._workspace.uiSourceCode(this._stubProjectID, uiSourceCodePath);
this._stubUISourceCodes.set(script.scriptId, stubUISourceCode);
this._debuggerWorkspaceBinding.pushSourceMapping(script, this);
- this._loadSourceMapForScript(
- script,
- this._sourceMapLoaded.bind(this, script, uiSourceCodePath)
- );
+ this
+ ._loadSourceMapForScript(script, this._sourceMapLoaded.bind(this, script, uiSourceCodePath));
},
/**
* @param {!WebInspector.Script} script
@@ -259,13 +249,8 @@ WebInspector.CompilerScriptMapping.prototype = {
}
}
if (missingSources.length) {
- WebInspector.console.warn(
- WebInspector.UIString(
- "Source map %s points to the files missing from the workspace: [%s]",
- sourceMap.url(),
- missingSources.join(", ")
- )
- );
+ WebInspector
+ .console.warn(WebInspector.UIString("Source map %s points to the files missing from the workspace: [%s]", sourceMap.url(), missingSources.join(", ")));
}
this._debuggerWorkspaceBinding.updateLocations(script);
@@ -294,21 +279,15 @@ WebInspector.CompilerScriptMapping.prototype = {
* @param {!WebInspector.UISourceCode} uiSourceCode
*/
_bindUISourceCode: function(uiSourceCode) {
- this._debuggerWorkspaceBinding.setSourceMapping(
- this._target,
- uiSourceCode,
- this
- );
+ this
+ ._debuggerWorkspaceBinding.setSourceMapping(this._target, uiSourceCode, this);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
*/
_unbindUISourceCode: function(uiSourceCode) {
- this._debuggerWorkspaceBinding.setSourceMapping(
- this._target,
- uiSourceCode,
- null
- );
+ this
+ ._debuggerWorkspaceBinding.setSourceMapping(this._target, uiSourceCode, null);
},
/**
* @param {!WebInspector.Event} event
@@ -407,10 +386,7 @@ WebInspector.CompilerScriptMapping.prototype = {
this._sourceMapForURL.clear();
},
dispose: function() {
- this._workspace.removeEventListener(
- WebInspector.Workspace.Events.UISourceCodeAdded,
- this._uiSourceCodeAddedToWorkspace,
- this
- );
+ this
+ ._workspace.removeEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAddedToWorkspace, this);
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentProviderBasedProjectDelegate.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentProviderBasedProjectDelegate.js
index 5f72a55..d74a577 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentProviderBasedProjectDelegate.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentProviderBasedProjectDelegate.js
@@ -332,10 +332,8 @@ WebInspector.ContentProviderBasedProjectDelegate.prototype = {
*/
removeFile: function(path) {
delete this._contentProviders[path];
- this.dispatchEventToListeners(
- WebInspector.ProjectDelegate.Events.FileRemoved,
- path
- );
+ this
+ .dispatchEventToListeners(WebInspector.ProjectDelegate.Events.FileRemoved, path);
},
/**
* @return {!Object.<string, !WebInspector.ContentProvider>}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentScriptProjectDecorator.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentScriptProjectDecorator.js
index 17d53c7..7b527ee 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentScriptProjectDecorator.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentScriptProjectDecorator.js
@@ -6,27 +6,18 @@
* @constructor
*/
WebInspector.ContentScriptProjectDecorator = function() {
- WebInspector.targetManager.addModelListener(
- WebInspector.RuntimeModel,
- WebInspector.RuntimeModel.Events.ExecutionContextCreated,
- this._onContextCreated,
- this
- );
- WebInspector.workspace.addEventListener(
- WebInspector.Workspace.Events.ProjectAdded,
- this._onProjectAdded,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.RuntimeModel, WebInspector.RuntimeModel.Events.ExecutionContextCreated, this._onContextCreated, this);
+ WebInspector
+ .workspace.addEventListener(WebInspector.Workspace.Events.ProjectAdded, this._onProjectAdded, this);
};
/**
* @param {!WebInspector.Project} project
* @param {!WebInspector.ExecutionContext} context
*/
-WebInspector.ContentScriptProjectDecorator._updateProjectWithExtensionName = function(
- project,
- context
-) {
+WebInspector.ContentScriptProjectDecorator
+ ._updateProjectWithExtensionName = function(project, context) {
if (project.url().startsWith(context.origin))
project.setDisplayName(context.name);
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DebuggerWorkspaceBinding.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
index 3c8e5b8..8a9cb56 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
@@ -51,10 +51,8 @@ WebInspector.DebuggerWorkspaceBinding.prototype = {
* @param {!WebInspector.Target} target
*/
targetAdded: function(target) {
- this._targetToData.set(
- target,
- new WebInspector.DebuggerWorkspaceBinding.TargetData(target, this)
- );
+ this
+ ._targetToData.set(target, new WebInspector.DebuggerWorkspaceBinding.TargetData(target, this));
},
/**
* @override
@@ -504,7 +502,8 @@ WebInspector.DebuggerWorkspaceBinding.ScriptInfo.prototype = {
uiLocation,
"Script raw location cannot be mapped to any UI location."
);
- return /** @type {!WebInspector.UILocation} */
+ return;
+ /** @type {!WebInspector.UILocation} */
uiLocation;
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DefaultScriptMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DefaultScriptMapping.js
index de93413..600efab 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DefaultScriptMapping.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DefaultScriptMapping.js
@@ -109,17 +109,11 @@ WebInspector.DefaultScriptMapping.prototype = {
this._uiSourceCodeForScriptId.set(script.scriptId, uiSourceCode);
this._scriptIdForUISourceCode.set(uiSourceCode, script.scriptId);
- this._debuggerWorkspaceBinding.setSourceMapping(
- this._debuggerModel.target(),
- uiSourceCode,
- this
- );
+ this
+ ._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel.target(), uiSourceCode, this);
this._debuggerWorkspaceBinding.pushSourceMapping(script, this);
- script.addEventListener(
- WebInspector.Script.Events.ScriptEdited,
- this._scriptEdited,
- this
- );
+ script
+ .addEventListener(WebInspector.Script.Events.ScriptEdited, this._scriptEdited, this);
},
/**
* @override
@@ -172,12 +166,8 @@ WebInspector.DefaultScriptMapping.projectIdForTarget = function(target) {
* @extends {WebInspector.ContentProviderBasedProjectDelegate}
*/
WebInspector.DebuggerProjectDelegate = function(workspace, id, type) {
- WebInspector.ContentProviderBasedProjectDelegate.call(
- this,
- workspace,
- id,
- type
- );
+ WebInspector
+ .ContentProviderBasedProjectDelegate.call(this, workspace, id, type);
};
WebInspector.DebuggerProjectDelegate.prototype = {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/FileSystemWorkspaceBinding.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
index 2db474d..7214d6a 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
@@ -121,12 +121,8 @@ WebInspector.FileSystemWorkspaceBinding.prototype = {
*/
_fileSystemAdded: function(event) {
var fileSystem /** @type {!WebInspector.IsolatedFileSystem} */ = event.data;
- var boundFileSystem = new WebInspector.FileSystemWorkspaceBinding.FileSystem(
- this,
- fileSystem,
- this._workspace,
- this._networkMapping
- );
+ var boundFileSystem = new WebInspector.FileSystemWorkspaceBinding
+ .FileSystem(this, fileSystem, this._workspace, this._networkMapping);
this._boundFileSystems.set(fileSystem.normalizedPath(), boundFileSystem);
},
/**
@@ -489,10 +485,8 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
indexContent: function(progress) {
progress.setTotalWork(1);
var requestId = this._fileSystemWorkspaceBinding.registerProgress(progress);
- progress.addEventListener(
- WebInspector.Progress.Events.Canceled,
- this._indexingCanceled.bind(this, requestId)
- );
+ progress
+ .addEventListener(WebInspector.Progress.Events.Canceled, this._indexingCanceled.bind(this, requestId));
InspectorFrontendHost.indexPath(requestId, this._fileSystem.path());
},
/**
@@ -597,9 +591,8 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
* @override
*/
remove: function() {
- this._fileSystemWorkspaceBinding._isolatedFileSystemManager.removeFileSystem(
- this._fileSystem.path()
- );
+ this
+ ._fileSystemWorkspaceBinding._isolatedFileSystemManager.removeFileSystem(this._fileSystem.path());
},
/**
* @param {string} filePath
@@ -625,19 +618,15 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
url,
contentType
);
- this.dispatchEventToListeners(
- WebInspector.ProjectDelegate.Events.FileAdded,
- fileDescriptor
- );
+ this
+ .dispatchEventToListeners(WebInspector.ProjectDelegate.Events.FileAdded, fileDescriptor);
},
/**
* @param {string} path
*/
_removeFile: function(path) {
- this.dispatchEventToListeners(
- WebInspector.ProjectDelegate.Events.FileRemoved,
- path
- );
+ this
+ .dispatchEventToListeners(WebInspector.ProjectDelegate.Events.FileRemoved, path);
},
dispose: function() {
this._workspace.removeProject(this._projectId);
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/FileUtils.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/FileUtils.js
index 0a89f45..57a211a 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/FileUtils.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/FileUtils.js
@@ -225,11 +225,8 @@ WebInspector.FileOutputStream.prototype = {
close: function() {
this._closed = true;
if (this._writeCallbacks.length) return;
- WebInspector.fileManager.removeEventListener(
- WebInspector.FileManager.EventTypes.AppendedToURL,
- this._onAppendDone,
- this
- );
+ WebInspector
+ .fileManager.removeEventListener(WebInspector.FileManager.EventTypes.AppendedToURL, this._onAppendDone, this);
WebInspector.fileManager.close(this._fileName);
},
/**
@@ -241,11 +238,8 @@ WebInspector.FileOutputStream.prototype = {
if (callback) callback(this);
if (!this._writeCallbacks.length) {
if (this._closed) {
- WebInspector.fileManager.removeEventListener(
- WebInspector.FileManager.EventTypes.AppendedToURL,
- this._onAppendDone,
- this
- );
+ WebInspector
+ .fileManager.removeEventListener(WebInspector.FileManager.EventTypes.AppendedToURL, this._onAppendDone, this);
WebInspector.fileManager.close(this._fileName);
}
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/Linkifier.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/Linkifier.js
index c241636..e003c5f 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/Linkifier.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/Linkifier.js
@@ -372,10 +372,8 @@ WebInspector.Linkifier.DefaultFormatter.prototype = {
* @extends {WebInspector.Linkifier.DefaultFormatter}
*/
WebInspector.Linkifier.DefaultCSSFormatter = function() {
- WebInspector.Linkifier.DefaultFormatter.call(
- this,
- WebInspector.Linkifier.DefaultCSSFormatter.MaxLengthForDisplayedURLs
- );
+ WebInspector
+ .Linkifier.DefaultFormatter.call(this, WebInspector.Linkifier.DefaultCSSFormatter.MaxLengthForDisplayedURLs);
};
WebInspector.Linkifier.DefaultCSSFormatter.MaxLengthForDisplayedURLs = 30;
@@ -435,13 +433,9 @@ WebInspector.Linkifier.liveLocationText = function(
) {
var script = target.debuggerModel.scriptForId(scriptId);
if (!script) return "";
- var location /** @type {!WebInspector.DebuggerModel.Location} */ = target.debuggerModel.createRawLocation(
- script,
- lineNumber,
- columnNumber || 0
- );
- var uiLocation /** @type {!WebInspector.UILocation} */ = WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(
- location
- );
+ var location /** @type {!WebInspector.DebuggerModel.Location} */ = target
+ .debuggerModel.createRawLocation(script, lineNumber, columnNumber || 0);
+ var uiLocation /** @type {!WebInspector.UILocation} */ = WebInspector
+ .debuggerWorkspaceBinding.rawLocationToUILocation(location);
return uiLocation.linkText();
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkMapping.js
index 3de3277..3e28635 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkMapping.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkMapping.js
@@ -10,11 +10,8 @@
WebInspector.NetworkMapping = function(workspace, fileSystemMapping) {
this._workspace = workspace;
this._fileSystemMapping = fileSystemMapping;
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.RevealSourceLine,
- this._revealSourceLine,
- this
- );
+ InspectorFrontendHost
+ .events.addEventListener(InspectorFrontendHostAPI.Events.RevealSourceLine, this._revealSourceLine, this);
};
WebInspector.NetworkMapping.prototype = {
@@ -134,9 +131,8 @@ WebInspector.NetworkMapping.prototype = {
var uiSourceCode = this.uiSourceCodeForURLForAnyTarget(url);
if (uiSourceCode) {
- WebInspector.Revealer.reveal(
- uiSourceCode.uiLocation(lineNumber, columnNumber)
- );
+ WebInspector
+ .Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber));
return;
}
@@ -147,22 +143,15 @@ WebInspector.NetworkMapping.prototype = {
function listener(event) {
var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data;
if (this.networkURL(uiSourceCode) === url) {
- WebInspector.Revealer.reveal(
- uiSourceCode.uiLocation(lineNumber, columnNumber)
- );
- this._workspace.removeEventListener(
- WebInspector.Workspace.Events.UISourceCodeAdded,
- listener,
- this
- );
+ WebInspector
+ .Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber));
+ this
+ ._workspace.removeEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, listener, this);
}
}
- this._workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeAdded,
- listener,
- this
- );
+ this
+ ._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, listener, this);
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkProject.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkProject.js
index 7d2a6c5..fcae1e7 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkProject.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkProject.js
@@ -131,11 +131,8 @@ WebInspector.NetworkProjectManager.prototype = {
* @param {!WebInspector.Target} target
*/
targetAdded: function(target) {
- new WebInspector.NetworkProject(
- target,
- this._workspace,
- this._networkMapping
- );
+ new WebInspector
+ .NetworkProject(target, this._workspace, this._networkMapping);
},
/**
* @override
@@ -161,36 +158,18 @@ WebInspector.NetworkProject = function(target, workspace, networkMapping) {
this._processedURLs = {};
target[WebInspector.NetworkProject._networkProjectSymbol] = this;
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.ResourceAdded,
- this._resourceAdded,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
- this._mainFrameNavigated,
- this
- );
- target.debuggerModel.addEventListener(
- WebInspector.DebuggerModel.Events.ParsedScriptSource,
- this._parsedScriptSource,
- this
- );
- target.debuggerModel.addEventListener(
- WebInspector.DebuggerModel.Events.FailedToParseScriptSource,
- this._parsedScriptSource,
- this
- );
- target.cssModel.addEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetAdded,
- this._styleSheetAdded,
- this
- );
- target.cssModel.addEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetRemoved,
- this._styleSheetRemoved,
- this
- );
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, this._resourceAdded, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this);
+ target
+ .debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this);
+ target
+ .debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.FailedToParseScriptSource, this._parsedScriptSource, this);
+ target
+ .cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, this._styleSheetAdded, this);
+ target
+ .cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheetRemoved, this._styleSheetRemoved, this);
};
WebInspector.NetworkProject._networkProjectSymbol = Symbol("networkProject");
@@ -280,10 +259,8 @@ WebInspector.NetworkProject.prototype = {
isContentScript || false
);
var path = projectDelegate.addFile(parentPath, name, url, contentProvider);
- var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = this._workspace.uiSourceCode(
- projectDelegate.id(),
- path
- );
+ var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = this._workspace
+ .uiSourceCode(projectDelegate.id(), path);
uiSourceCode[WebInspector.NetworkProject._targetSymbol] = this.target();
console.assert(uiSourceCode);
return uiSourceCode;
@@ -295,11 +272,8 @@ WebInspector.NetworkProject.prototype = {
var splitURL = WebInspector.ParsedURL.splitURLIntoPathComponents(url);
var projectURL = splitURL[0];
var path = splitURL.slice(1).join("/");
- var projectDelegate = this._projectDelegates[WebInspector.NetworkProject.projectId(
- this.target(),
- projectURL,
- false
- )];
+ var projectDelegate = this._projectDelegates[WebInspector.NetworkProject
+ .projectId(this.target(), projectURL, false)];
projectDelegate.removeFile(path);
},
_populate: function() {
@@ -362,10 +336,8 @@ WebInspector.NetworkProject.prototype = {
*/
_resourceAdded: function(event) {
var resource /** @type {!WebInspector.Resource} */ = event.data;
- this._addFile(
- resource.url,
- new WebInspector.NetworkProject.FallbackResource(resource)
- );
+ this
+ ._addFile(resource.url, new WebInspector.NetworkProject.FallbackResource(resource));
},
/**
* @param {!WebInspector.Event} event
@@ -409,36 +381,18 @@ WebInspector.NetworkProject.prototype = {
_dispose: function() {
this._reset();
var target = this.target();
- target.resourceTreeModel.removeEventListener(
- WebInspector.ResourceTreeModel.EventTypes.ResourceAdded,
- this._resourceAdded,
- this
- );
- target.resourceTreeModel.removeEventListener(
- WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
- this._mainFrameNavigated,
- this
- );
- target.debuggerModel.removeEventListener(
- WebInspector.DebuggerModel.Events.ParsedScriptSource,
- this._parsedScriptSource,
- this
- );
- target.debuggerModel.removeEventListener(
- WebInspector.DebuggerModel.Events.FailedToParseScriptSource,
- this._parsedScriptSource,
- this
- );
- target.cssModel.removeEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetAdded,
- this._styleSheetAdded,
- this
- );
- target.cssModel.removeEventListener(
- WebInspector.CSSStyleModel.Events.StyleSheetRemoved,
- this._styleSheetRemoved,
- this
- );
+ target
+ .resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, this._resourceAdded, this);
+ target
+ .resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this);
+ target
+ .debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this);
+ target
+ .debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.FailedToParseScriptSource, this._parsedScriptSource, this);
+ target
+ .cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, this._styleSheetAdded, this);
+ target
+ .cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetRemoved, this._styleSheetRemoved, this);
},
_reset: function() {
this._processedURLs = {};
@@ -498,10 +452,8 @@ WebInspector.NetworkProject.FallbackResource.prototype = {
else if (type === WebInspector.resourceTypes.Script)
contentProvider = scripts[0];
- console.assert(
- contentProvider,
- "Resource content request failed. " + this._resource.url
- );
+ console
+ .assert(contentProvider, "Resource content request failed. " + this._resource.url);
contentProvider.requestContent(callback);
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/PresentationConsoleMessageHelper.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/PresentationConsoleMessageHelper.js
index 32fe4f2..893c2f9 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/PresentationConsoleMessageHelper.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/PresentationConsoleMessageHelper.js
@@ -47,47 +47,23 @@ WebInspector.PresentationConsoleMessageHelper = function(workspace) {
/** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.Object>} */
this._uiSourceCodeToEventTarget = new Map();
- workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeRemoved,
- this._uiSourceCodeRemoved,
- this
- );
- workspace.addEventListener(
- WebInspector.Workspace.Events.ProjectRemoved,
- this._projectRemoved,
- this
- );
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.ConsoleCleared,
- this._consoleCleared,
- this
- );
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.MessageAdded,
- this._onConsoleMessageAdded,
- this
- );
+ workspace
+ .addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved, this._uiSourceCodeRemoved, this);
+ workspace
+ .addEventListener(WebInspector.Workspace.Events.ProjectRemoved, this._projectRemoved, this);
+ WebInspector
+ .multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
+ WebInspector
+ .multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._onConsoleMessageAdded, this);
WebInspector.multitargetConsoleModel
.messages()
.forEach(this._consoleMessageAdded, this);
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.ParsedScriptSource,
- this._parsedScriptSource,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.FailedToParseScriptSource,
- this._parsedScriptSource,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this._debuggerReset,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.FailedToParseScriptSource, this._parsedScriptSource, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
};
/**
@@ -217,9 +193,8 @@ WebInspector.PresentationConsoleMessageHelper.prototype = {
* @param {!WebInspector.DebuggerModel.Location} rawLocation
*/
_addConsoleMessageToScript: function(message, rawLocation) {
- this._presentationConsoleMessages.push(
- new WebInspector.PresentationConsoleMessage(message, rawLocation)
- );
+ this._presentationConsoleMessages.push(new WebInspector
+ .PresentationConsoleMessage(message, rawLocation));
},
/**
* @param {!WebInspector.ConsoleMessage} message
@@ -268,11 +243,8 @@ WebInspector.PresentationConsoleMessageHelper.prototype = {
this._uiSourceCodeToMessages.set(uiSourceCode, messages);
}
messages.push(message);
- this._dispatchConsoleEvent(
- WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageAdded,
- uiSourceCode,
- message
- );
+ this
+ ._dispatchConsoleEvent(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageAdded, uiSourceCode, message);
},
/**
* @param {!WebInspector.PresentationConsoleMessage} message
@@ -282,11 +254,8 @@ WebInspector.PresentationConsoleMessageHelper.prototype = {
var messages = this._uiSourceCodeToMessages.get(uiSourceCode);
if (!messages) return;
messages.remove(message);
- this._dispatchConsoleEvent(
- WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageRemoved,
- uiSourceCode,
- message
- );
+ this
+ ._dispatchConsoleEvent(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageRemoved, uiSourceCode, message);
},
_consoleCleared: function() {
this._pendingConsoleMessages = {};
@@ -328,13 +297,11 @@ WebInspector.PresentationConsoleMessage.prototype = {
*/
_updateLocation: function(uiLocation) {
if (this._uiLocation)
- WebInspector.presentationConsoleMessageHelper._presentationConsoleMessageRemoved(
- this
- );
+ WebInspector.presentationConsoleMessageHelper
+ ._presentationConsoleMessageRemoved(this);
this._uiLocation = uiLocation;
- WebInspector.presentationConsoleMessageHelper._presentationConsoleMessageAdded(
- this
- );
+ WebInspector
+ .presentationConsoleMessageHelper._presentationConsoleMessageAdded(this);
},
get lineNumber() {
return this._uiLocation.lineNumber;
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceScriptMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceScriptMapping.js
index 2cb6179..7aa95a6 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceScriptMapping.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceScriptMapping.js
@@ -261,11 +261,8 @@ WebInspector.ResourceScriptMapping.prototype = {
scriptFile.dispose();
this._setScriptFile(uiSourceCode, null);
}
- this._debuggerWorkspaceBinding.setSourceMapping(
- this._target,
- uiSourceCode,
- null
- );
+ this
+ ._debuggerWorkspaceBinding.setSourceMapping(this._target, uiSourceCode, null);
},
_debuggerReset: function() {
var boundURLs = this._boundURLs.valuesArray();
@@ -281,16 +278,10 @@ WebInspector.ResourceScriptMapping.prototype = {
},
dispose: function() {
this._debuggerReset();
- this._workspace.removeEventListener(
- WebInspector.Workspace.Events.UISourceCodeAdded,
- this._uiSourceCodeAdded,
- this
- );
- this._workspace.removeEventListener(
- WebInspector.Workspace.Events.UISourceCodeRemoved,
- this._uiSourceCodeRemoved,
- this
- );
+ this
+ ._workspace.removeEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this);
+ this
+ ._workspace.removeEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved, this._uiSourceCodeRemoved, this);
}
};
@@ -380,20 +371,16 @@ WebInspector.ResourceScriptFile.prototype = {
this._resourceScriptMapping._hasDivergedFromVM(this._uiSourceCode);
delete this._isDivergingFromVM;
this._hasDivergedFromVM = true;
- this.dispatchEventToListeners(
- WebInspector.ResourceScriptFile.Events.DidDivergeFromVM,
- this._uiSourceCode
- );
+ this
+ .dispatchEventToListeners(WebInspector.ResourceScriptFile.Events.DidDivergeFromVM, this._uiSourceCode);
},
_mergeToVM: function() {
delete this._hasDivergedFromVM;
this._isMergingToVM = true;
this._resourceScriptMapping._hasMergedToVM(this._uiSourceCode);
delete this._isMergingToVM;
- this.dispatchEventToListeners(
- WebInspector.ResourceScriptFile.Events.DidMergeToVM,
- this._uiSourceCode
- );
+ this
+ .dispatchEventToListeners(WebInspector.ResourceScriptFile.Events.DidMergeToVM, this._uiSourceCode);
},
/**
* @return {boolean}
@@ -435,11 +422,8 @@ WebInspector.ResourceScriptFile.prototype = {
return this._script.target();
},
dispose: function() {
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._workingCopyChanged,
- this
- );
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
},
/**
* @param {string} sourceMapURL
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceUtils.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceUtils.js
index 9d4f28d..bec9edd 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceUtils.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceUtils.js
@@ -168,10 +168,8 @@ WebInspector.linkifyStringAsFragment = function(string) {
return urlNode;
}
- return WebInspector.linkifyStringAsFragmentWithCustomLinkifier(
- string,
- linkifier
- );
+ return WebInspector
+ .linkifyStringAsFragmentWithCustomLinkifier(string, linkifier);
};
/**
@@ -216,12 +214,8 @@ WebInspector.linkifyURLAsNode = function(
* @return {!Element}
*/
WebInspector.linkifyDocumentationURLAsNode = function(article, title) {
- return WebInspector.linkifyURLAsNode(
- "https://developer.chrome.com/devtools/docs/" + article,
- title,
- undefined,
- true
- );
+ return WebInspector
+ .linkifyURLAsNode("https://developer.chrome.com/devtools/docs/" + article, title, undefined, true);
};
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/SASSSourceMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/SASSSourceMapping.js
index 53d450d..8240983 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/SASSSourceMapping.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/SASSSourceMapping.js
@@ -192,11 +192,8 @@ WebInspector.SASSSourceMapping.prototype = {
*/
function sassLoadedViaNetwork(statusCode, headers, content) {
if (statusCode >= 400) {
- console.error(
- "Could not load content for " + sassURL + " : " +
- "HTTP status code: " +
- statusCode
- );
+ console
+ .error("Could not load content for " + sassURL + " : " + "HTTP status code: " + statusCode);
return;
}
var lastModified = this._checkLastModified(headers, sassURL);
@@ -246,13 +243,8 @@ WebInspector.SASSSourceMapping.prototype = {
}
if ((now = new Date().getTime()) > pollData.deadlineMs) {
- WebInspector.console.warn(
- WebInspector.UIString(
- "%s hasn't been updated in %d seconds.",
- cssURL,
- this.pollPeriodMs / 1000
- )
- );
+ WebInspector
+ .console.warn(WebInspector.UIString("%s hasn't been updated in %d seconds.", cssURL, this.pollPeriodMs / 1000));
this._stopPolling(cssURL, sassURL);
return;
}
@@ -291,12 +283,8 @@ WebInspector.SASSSourceMapping.prototype = {
this._cssModel.target()
);
if (!cssUISourceCode) {
- WebInspector.console.warn(
- WebInspector.UIString(
- "%s resource missing. Please reload the page.",
- cssURL
- )
- );
+ WebInspector
+ .console.warn(WebInspector.UIString("%s resource missing. Please reload the page.", cssURL));
callback(cssURL, sassURL, true);
return;
}
@@ -319,9 +307,8 @@ WebInspector.SASSSourceMapping.prototype = {
return;
}
var headers = {
- "if-modified-since": new Date(
- data.sassTimestamp.getTime() - 1000
- ).toUTCString()
+ "if-modified-since": new Date(data.sassTimestamp.getTime() - 1000)
+ .toUTCString()
};
WebInspector.NetworkManager.loadResourceForFrontend(
cssURL,
@@ -337,11 +324,8 @@ WebInspector.SASSSourceMapping.prototype = {
*/
function contentLoaded(statusCode, headers, content) {
if (statusCode >= 400) {
- console.error(
- "Could not load content for " + cssURL + " : " +
- "HTTP status code: " +
- statusCode
- );
+ console
+ .error("Could not load content for " + cssURL + " : " + "HTTP status code: " + statusCode);
callback(cssURL, sassURL, true);
return;
}
@@ -455,12 +439,10 @@ WebInspector.SASSSourceMapping.prototype = {
header.sourceMapURL
);
if (!completeSourceMapURL) return;
- this._completeSourceMapURLForCSSURL[header.sourceURL] = completeSourceMapURL;
- this._loadSourceMapAndBindUISourceCode(
- [ header ],
- false,
- completeSourceMapURL
- );
+ this._completeSourceMapURLForCSSURL[header
+ .sourceURL] = completeSourceMapURL;
+ this
+ ._loadSourceMapAndBindUISourceCode([ header ], false, completeSourceMapURL);
},
/**
* @param {!WebInspector.CSSStyleSheetHeader} header
@@ -555,14 +537,16 @@ WebInspector.SASSSourceMapping.prototype = {
return;
}
- var pendingCallbacks = this._pendingSourceMapLoadingCallbacks[completeSourceMapURL];
+ var pendingCallbacks = this
+ ._pendingSourceMapLoadingCallbacks[completeSourceMapURL];
if (pendingCallbacks) {
pendingCallbacks.push(callback);
return;
}
pendingCallbacks = [ callback ];
- this._pendingSourceMapLoadingCallbacks[completeSourceMapURL] = pendingCallbacks;
+ this
+ ._pendingSourceMapLoadingCallbacks[completeSourceMapURL] = pendingCallbacks;
WebInspector.SourceMap.load(
completeSourceMapURL,
@@ -575,7 +559,8 @@ WebInspector.SASSSourceMapping.prototype = {
* @this {WebInspector.SASSSourceMapping}
*/
function sourceMapLoaded(sourceMap) {
- var callbacks = this._pendingSourceMapLoadingCallbacks[completeSourceMapURL];
+ var callbacks = this
+ ._pendingSourceMapLoadingCallbacks[completeSourceMapURL];
delete this._pendingSourceMapLoadingCallbacks[completeSourceMapURL];
if (!callbacks) return;
if (sourceMap) this._sourceMapByURL[completeSourceMapURL] = sourceMap;
@@ -681,9 +666,8 @@ WebInspector.SASSSourceMapping.prototype = {
for (var j = 0; j < ids.length; ++j) {
var header = this._cssModel.styleSheetHeaderForId(ids[j]);
console.assert(header);
- WebInspector.cssWorkspaceBinding.updateLocations /** @type {!WebInspector.CSSStyleSheetHeader} */(
- header
- );
+ WebInspector
+ .cssWorkspaceBinding.updateLocations /** @type {!WebInspector.CSSStyleSheetHeader} */(header);
}
}
},
@@ -691,7 +675,8 @@ WebInspector.SASSSourceMapping.prototype = {
* @param {!WebInspector.Event} event
*/
_uiSourceCodeContentCommitted: function(event) {
- var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data.uiSourceCode;
+ var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data
+ .uiSourceCode;
if (
uiSourceCode.project().type() === WebInspector.projectTypes.FileSystem
) {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/StylesSourceMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/StylesSourceMapping.js
index 8ded873..04c9a6b 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/StylesSourceMapping.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/StylesSourceMapping.js
@@ -195,10 +195,8 @@ WebInspector.StylesSourceMapping.prototype = {
var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data;
var networkURL = this._networkMapping.networkURL(uiSourceCode);
if (!networkURL || !this._urlToHeadersByFrameId[networkURL]) return;
- this._bindUISourceCode(
- uiSourceCode,
- this._urlToHeadersByFrameId[networkURL].valuesArray()[0].valuesArray()[0]
- );
+ this
+ ._bindUISourceCode(uiSourceCode, this._urlToHeadersByFrameId[networkURL].valuesArray()[0].valuesArray()[0]);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -349,16 +347,10 @@ WebInspector.StylesSourceMapping.prototype = {
WebInspector.StyleFile = function(uiSourceCode, mapping) {
this._uiSourceCode = uiSourceCode;
this._mapping = mapping;
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._workingCopyChanged,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._workingCopyCommitted,
- this
- );
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
this._commitThrottler = new WebInspector.Throttler(
WebInspector.StyleFile.updateTimeout
);
@@ -374,10 +366,8 @@ WebInspector.StyleFile.prototype = {
if (this._isAddingRevision) return;
this._isMajorChangePending = true;
- this._commitThrottler.schedule(
- this._commitIncrementalEdit.bind(this),
- true
- );
+ this
+ ._commitThrottler.schedule(this._commitIncrementalEdit.bind(this), true);
},
/**
* @param {!WebInspector.Event} event
@@ -385,10 +375,8 @@ WebInspector.StyleFile.prototype = {
_workingCopyChanged: function(event) {
if (this._isAddingRevision) return;
- this._commitThrottler.schedule(
- this._commitIncrementalEdit.bind(this),
- false
- );
+ this
+ ._commitThrottler.schedule(this._commitIncrementalEdit.bind(this), false);
},
/**
* @param {!WebInspector.Throttler.FinishCallback} finishCallback
@@ -419,15 +407,9 @@ WebInspector.StyleFile.prototype = {
delete this._isAddingRevision;
},
dispose: function() {
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._workingCopyCommitted,
- this
- );
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._workingCopyChanged,
- this
- );
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/TempFile.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/TempFile.js
index 05d4c81..62c1dd9 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/TempFile.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/TempFile.js
@@ -129,9 +129,8 @@ WebInspector.TempFile.prototype = {
write: function(strings, callback) {
var blob = new Blob(strings, { type: "text/plain" });
this._writer.onerror = function(e) {
- WebInspector.console.error(
- "Failed to write into a temp file: " + e.target.error.message
- );
+ WebInspector
+ .console.error("Failed to write into a temp file: " + e.target.error.message);
callback(-1);
};
this._writer.onwriteend = function(e) {
@@ -172,9 +171,8 @@ WebInspector.TempFile.prototype = {
callback /** @type {?string} */(this.result);
};
reader.onerror = function(error) {
- WebInspector.console.error(
- "Failed to read from temp file: " + error.message
- );
+ WebInspector
+ .console.error("Failed to read from temp file: " + error.message);
};
reader.readAsText(file);
}
@@ -229,10 +227,8 @@ WebInspector.DeferredTempFile = function(dirPath, name) {
this._pendingReads = [];
WebInspector.TempFile
.create(dirPath, name)
- .then(
- this._didCreateTempFile.bind(this),
- this._failedToCreateTempFile.bind(this)
- );
+
+ .then(this._didCreateTempFile.bind(this), this._failedToCreateTempFile.bind(this));
};
WebInspector.DeferredTempFile.prototype = {
@@ -259,9 +255,8 @@ WebInspector.DeferredTempFile.prototype = {
* @param {*} e
*/
_failedToCreateTempFile: function(e) {
- WebInspector.console.error(
- "Failed to create temp file " + e.code + " : " + e.message
- );
+ WebInspector
+ .console.error("Failed to create temp file " + e.code + " : " + e.message);
this._notifyFinished();
},
/**
@@ -277,10 +272,8 @@ WebInspector.DeferredTempFile.prototype = {
_writeNextChunk: function() {
var chunk = this._chunks.shift();
this._isWriting = true;
- this._tempFile.write /** @type {!Array.<string>} */(
- chunk.strings,
- this._didWriteChunk.bind(this, chunk.callback)
- );
+ this
+ ._tempFile.write /** @type {!Array.<string>} */(chunk.strings, this._didWriteChunk.bind(this, chunk.callback));
},
/**
* @param {?function(number)} callback
@@ -317,9 +310,8 @@ WebInspector.DeferredTempFile.prototype = {
*/
readRange: function(startOffset, endOffset, callback) {
if (!this._finishedWriting) {
- this._pendingReads.push(
- this.readRange.bind(this, startOffset, endOffset, callback)
- );
+ this
+ ._pendingReads.push(this.readRange.bind(this, startOffset, endOffset, callback));
return;
}
if (!this._tempFile) {
@@ -334,9 +326,8 @@ WebInspector.DeferredTempFile.prototype = {
*/
writeToOutputStream: function(outputStream, delegate) {
if (this._callsPendingOpen) {
- this._callsPendingOpen.push(
- this.writeToOutputStream.bind(this, outputStream, delegate)
- );
+ this
+ ._callsPendingOpen.push(this.writeToOutputStream.bind(this, outputStream, delegate));
return;
}
if (this._tempFile)
@@ -360,9 +351,8 @@ WebInspector.TempFile._clearTempStorage = function(fulfill, reject) {
* @param {!Event} event
*/
function handleError(event) {
- WebInspector.console.error(
- WebInspector.UIString("Failed to clear temp storage: %s", event.data)
- );
+ WebInspector
+ .console.error(WebInspector.UIString("Failed to clear temp storage: %s", event.data));
reject(event.data);
}
@@ -443,9 +433,8 @@ WebInspector.TempFileBackingStorage.prototype = {
appendAccessibleString: function(string) {
this._flush(false);
this._strings.push(string);
- var chunk /** @type {!WebInspector.TempFileBackingStorage.Chunk} */ = this._flush(
- true
- );
+ var chunk /** @type {!WebInspector.TempFileBackingStorage.Chunk} */ = this
+ ._flush(true);
/**
* @param {!WebInspector.TempFileBackingStorage.Chunk} chunk
@@ -453,8 +442,9 @@ WebInspector.TempFileBackingStorage.prototype = {
* @return {!Promise.<?string>}
*/
function readString(chunk, file) {
- if (chunk.string) return /** @type {!Promise.<?string>} */
- Promise.resolve(chunk.string);
+ if (chunk.string) return;
+ /** @type {!Promise.<?string>} */
+ Promise.resolve(chunk.string);
console.assert(chunk.endOffset);
if (!chunk.endOffset)
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/closebrackets.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/closebrackets.js
index 3cedafc..98815a3 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/closebrackets.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/closebrackets.js
@@ -47,11 +47,8 @@
}
for (var i = ranges.length - 1; i >= 0; i--) {
var cur = ranges[i].head;
- cm.replaceRange(
- "",
- Pos(cur.line, cur.ch - 1),
- Pos(cur.line, cur.ch + 1)
- );
+ cm
+ .replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
}
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/codemirror.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/codemirror.js
index f94b24d..6e8714e 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/codemirror.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/codemirror.js
@@ -610,7 +610,8 @@
rmClass(cm.display.wrapper, cm.display.scrollbars.addClass);
}
- cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](
+ cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options
+ .scrollbarStyle](
function(node) {
cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
on(node, "mousedown", function() {
@@ -1061,9 +1062,8 @@
}
if (updateNumber) {
removeChildren(lineView.lineNumber);
- lineView.lineNumber.appendChild(
- document.createTextNode(lineNumberFor(cm.options, lineN))
- );
+ lineView
+ .lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
}
cur = lineView.node.nextSibling;
}
@@ -1760,19 +1760,8 @@
if (top < 0) top = 0;
top = Math.round(top);
bottom = Math.round(bottom);
- fragment.appendChild(
- elt(
- "div",
- null,
- "CodeMirror-selected",
- "position: absolute; left: " + left + "px; top: " + top +
- "px; width: " +
- (width == null ? rightSide - left : width) +
- "px; height: " +
- (bottom - top) +
- "px"
- )
- );
+ fragment
+ .appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + "px; top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px; height: " + (bottom - top) + "px"));
}
function drawForLine(line, fromArg, toArg) {
@@ -1839,11 +1828,8 @@
sFrom.ch,
singleVLine ? fromLine.text.length + 1 : null
).end;
- var rightStart = drawForLine(
- sTo.line,
- singleVLine ? 0 : null,
- sTo.ch
- ).start;
+ var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch)
+ .start;
if (singleVLine) {
if (leftEnd.top < rightStart.top - 2) {
add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
@@ -1895,42 +1881,39 @@
var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));
var changedLines = [];
- doc.iter(
- doc.frontier,
- Math.min(doc.first + doc.size, cm.display.viewTo + 500),
- function(line) {
- if (doc.frontier >= cm.display.viewFrom) {
- // Visible
- var oldStyles = line.styles;
- var highlighted = highlightLine(cm, line, state, true);
- line.styles = highlighted.styles;
- var oldCls = line.styleClasses, newCls = highlighted.classes;
- if (newCls) line.styleClasses = newCls;
- else if (oldCls) line.styleClasses = null;
- var ischange = !oldStyles || oldStyles.length != line.styles.length ||
- oldCls != newCls &&
- (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass ||
- oldCls.textClass != newCls.textClass);
- for (
- var i = 0;
- !ischange && i < oldStyles.length;
- ++i
- ) ischange = oldStyles[i] != line.styles[i];
- if (ischange) changedLines.push(doc.frontier);
- line.stateAfter = copyState(doc.mode, state);
- } else {
- processLine(cm, line.text, state);
- line.stateAfter = doc.frontier % 5 == 0
- ? copyState(doc.mode, state)
- : null;
- }
- ++doc.frontier;
- if (+new Date() > end) {
- startWorker(cm, cm.options.workDelay);
- return true;
- }
+ doc
+ .iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) {
+ if (doc.frontier >= cm.display.viewFrom) {
+ // Visible
+ var oldStyles = line.styles;
+ var highlighted = highlightLine(cm, line, state, true);
+ line.styles = highlighted.styles;
+ var oldCls = line.styleClasses, newCls = highlighted.classes;
+ if (newCls) line.styleClasses = newCls;
+ else if (oldCls) line.styleClasses = null;
+ var ischange = !oldStyles || oldStyles.length != line.styles.length ||
+ oldCls != newCls &&
+ (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass ||
+ oldCls.textClass != newCls.textClass);
+ for (
+ var i = 0;
+ !ischange && i < oldStyles.length;
+ ++i
+ ) ischange = oldStyles[i] != line.styles[i];
+ if (ischange) changedLines.push(doc.frontier);
+ line.stateAfter = copyState(doc.mode, state);
+ } else {
+ processLine(cm, line.text, state);
+ line.stateAfter = doc.frontier % 5 == 0
+ ? copyState(doc.mode, state)
+ : null;
+ }
+ ++doc.frontier;
+ if (+new Date() > end) {
+ startWorker(cm, cm.options.workDelay);
+ return true;
}
- );
+ });
if (changedLines.length) runInOp(cm, function() {
for (
var i = 0;
@@ -2287,7 +2270,8 @@
function clearCaches(cm) {
clearLineMeasurementCache(cm);
- cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
+ cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display
+ .cachedPaddingH = null;
if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;
cm.display.lineNumChars = null;
}
@@ -3883,7 +3867,8 @@
// Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
if (e.dataTransfer.setDragImage && !safari) {
var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
- img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
+ img
+ .src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
if (presto) {
img.width = img.height = 1;
cm.display.wrapper.appendChild(img);
@@ -4277,7 +4262,8 @@
var oldCSS = display.input.style.cssText;
display.inputDiv.style.position = "absolute";
- display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " +
+ display.input.style
+ .cssText = "position: fixed; width: 30px; height: 30px; top: " +
(e.clientY - 5) +
"px; left: " +
(e.clientX - 5) +
@@ -4385,10 +4371,8 @@
var out = [];
for (var i = 0; i < doc.sel.ranges.length; i++) {
var range = doc.sel.ranges[i];
- out.push(new Range(
- adjustForChange(range.anchor, change),
- adjustForChange(range.head, change)
- ));
+ out
+ .push(new Range(adjustForChange(range.anchor, change), adjustForChange(range.head, change)));
}
return normalizeSelection(out, doc.sel.primIndex);
}
@@ -5142,11 +5126,8 @@
addOverlay: methodOp(function(spec, options) {
var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
if (mode.startState) throw new Error("Overlays may not be stateful.");
- this.state.overlays.push({
- mode: mode,
- modeSpec: spec,
- opaque: options && options.opaque
- });
+ this
+ .state.overlays.push({ mode: mode, modeSpec: spec, opaque: options && options.opaque });
this.state.modeGen++;
regChange(this);
}),
@@ -5273,11 +5254,8 @@
return coordsChar(this, coords.left, coords.top);
},
lineAtHeight: function(height, mode) {
- height = fromCoordSystem(
- this,
- { top: height, left: 0 },
- mode || "page"
- ).top;
+ height = fromCoordSystem(this, { top: height, left: 0 }, mode || "page")
+ .top;
return lineAtHeight(this.doc, height + this.display.viewOffset);
},
heightAtLine: function(line, mode) {
@@ -5288,12 +5266,8 @@
end = true;
}
var lineObj = getLine(this.doc, line);
- return intoCoordSystem(
- this,
- lineObj,
- { top: 0, left: 0 },
- mode || "page"
- ).top +
+ return intoCoordSystem(this, lineObj, { top: 0, left: 0 }, mode || "page")
+ .top +
(end ? this.doc.height - heightAtLine(lineObj) : 0);
},
defaultTextHeight: function() {
@@ -5977,18 +5951,12 @@
// editor, mostly used for keybindings.
var commands = CodeMirror.commands = {
selectAll: function(cm) {
- cm.setSelection(
- Pos(cm.firstLine(), 0),
- Pos(cm.lastLine()),
- sel_dontScroll
- );
+ cm
+ .setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);
},
singleSelection: function(cm) {
- cm.setSelection(
- cm.getCursor("anchor"),
- cm.getCursor("head"),
- sel_dontScroll
- );
+ cm
+ .setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll);
},
killLine: function(cm) {
deleteNearSelection(cm, function(range) {
@@ -6052,28 +6020,19 @@
cm.extendSelection(Pos(cm.lastLine()));
},
goLineStart: function(cm) {
- cm.extendSelectionsBy(
- function(range) {
- return lineStart(cm, range.head.line);
- },
- { origin: "+move", bias: 1 }
- );
+ cm.extendSelectionsBy(function(range) {
+ return lineStart(cm, range.head.line);
+ }, { origin: "+move", bias: 1 });
},
goLineStartSmart: function(cm) {
- cm.extendSelectionsBy(
- function(range) {
- return lineStartSmart(cm, range.head);
- },
- { origin: "+move", bias: 1 }
- );
+ cm.extendSelectionsBy(function(range) {
+ return lineStartSmart(cm, range.head);
+ }, { origin: "+move", bias: 1 });
},
goLineEnd: function(cm) {
- cm.extendSelectionsBy(
- function(range) {
- return lineEnd(cm, range.head.line);
- },
- { origin: "+move", bias: -1 }
- );
+ cm.extendSelectionsBy(function(range) {
+ return lineEnd(cm, range.head.line);
+ }, { origin: "+move", bias: -1 });
},
goLineRight: function(cm) {
cm.extendSelectionsBy(
@@ -6198,12 +6157,8 @@
if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1);
if (cur.ch > 0) {
cur = new Pos(cur.line, cur.ch + 1);
- cm.replaceRange(
- line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
- Pos(cur.line, cur.ch - 2),
- cur,
- "+transpose"
- );
+ cm
+ .replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), Pos(cur.line, cur.ch - 2), cur, "+transpose");
} else if (cur.line > cm.doc.first) {
var prev = getLine(cm.doc, cur.line - 1).text;
if (prev)
@@ -6869,9 +6824,8 @@
var widget = options.widgetNode;
linkedDocs(doc, function(doc) {
if (widget) options.widgetNode = widget.cloneNode(true);
- markers.push(
- markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)
- );
+ markers
+ .push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
for (
var i = 0;
i < doc.linked.length;
@@ -6883,13 +6837,10 @@
}
function findSharedMarkers(doc) {
- return doc.findMarks(
- Pos(doc.first, 0),
- doc.clipPos(Pos(doc.lastLine())),
- function(m) {
- return m.parent;
- }
- );
+ return doc
+ .findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function(m) {
+ return m.parent;
+ });
}
function copySharedMarkers(doc, markers) {
@@ -7390,11 +7341,8 @@
changeLine(cm.doc, handle, "widget", function(line) {
var widgets = line.widgets || (line.widgets = []);
if (widget.insertAt == null) widgets.push(widget);
- else widgets.splice(
- Math.min(widgets.length - 1, Math.max(0, widget.insertAt)),
- 0,
- widget
- );
+ else widgets
+ .splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);
widget.line = line;
if (!lineIsHidden(cm.doc, line)) {
var aboveVisible = heightAtLine(line) < cm.doc.scrollTop;
@@ -7919,15 +7867,8 @@
var end = pos + text.length;
if (!collapsed) {
var tokenText = end > upto ? text.slice(0, upto - pos) : text;
- builder.addToken(
- builder,
- tokenText,
- style ? style + spanStyle : spanStyle,
- spanStartStyle,
- pos + tokenText.length == nextChange ? spanEndStyle : "",
- title,
- css
- );
+ builder
+ .addToken(builder, tokenText, style ? style + spanStyle : spanStyle, spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css);
}
if (end >= upto) {
text = text.slice(upto - pos);
@@ -7997,11 +7938,8 @@
);
} else {
var added = linesFor(1, text.length - 1);
- added.push(new Line(
- lastText + firstLine.text.slice(to.ch),
- lastSpans,
- estimateHeight
- ));
+ added
+ .push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
update(
firstLine,
firstLine.text.slice(0, from.ch) + text[0],
@@ -8356,10 +8294,8 @@
}),
addSelection: docMethodOp(function(anchor, head, options) {
var ranges = this.sel.ranges.slice(0);
- ranges.push(new Range(
- clipPos(this, anchor),
- clipPos(this, head || anchor)
- ));
+ ranges
+ .push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));
setSelection(
this,
normalizeSelection(ranges, ranges.length - 1),
@@ -8450,7 +8386,8 @@
},
changeGeneration: function(forceSplit) {
if (forceSplit)
- this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null;
+ this.history.lastOp = this.history.lastSelOp = this.history
+ .lastOrigin = null;
return this.history.generation;
},
isClean: function(gen) {
@@ -8982,16 +8919,13 @@
// Used to store marked span information in the history.
function attachLocalSpans(doc, change, from, to) {
var existing = change["spans_" + doc.id], n = 0;
- doc.iter(
- Math.max(doc.first, from),
- Math.min(doc.first + doc.size, to),
- function(line) {
- if (line.markedSpans)
- (existing ||
- (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
- ++n;
- }
- );
+ doc
+ .iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {
+ if (line.markedSpans)
+ (existing || (existing = change["spans_" + doc.id] = {}))[n] = line
+ .markedSpans;
+ ++n;
+ });
}
// When un/re-doing restores text containing marked spans, those
@@ -9024,20 +8958,16 @@
for (var i = 0, copy = []; i < events.length; ++i) {
var event = events[i];
if (event.ranges) {
- copy.push(
- instantiateSel ? Selection.prototype.deepCopy.call(event) : event
- );
+ copy
+ .push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
continue;
}
var changes = event.changes, newChanges = [];
copy.push({ changes: newChanges });
for (var j = 0; j < changes.length; ++j) {
var change = changes[j], m;
- newChanges.push({
- from: change.from,
- to: change.to,
- text: change.text
- });
+ newChanges
+ .push({ from: change.from, to: change.to, text: change.text });
if (newGroup)
for (var prop in change)
if (m = prop.match(/^spans_(\d+)$/)) {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/comment.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/comment.js
index 1b6ccca..e58b515 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/comment.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/comment.js
@@ -67,11 +67,8 @@
var line = self.getLine(i), cut = baseString.length;
if (!blankLines && !nonWS.test(line)) continue;
if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
- self.replaceRange(
- baseString + commentString + pad,
- Pos(i, 0),
- Pos(i, cut)
- );
+ self
+ .replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));
}
} else {
for (var i = from.line; i < end; ++i) {
@@ -203,17 +200,8 @@
if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;
self.operation(function() {
- self.replaceRange(
- "",
- Pos(
- end,
- close -
- (pad && endLine.slice(close - pad.length, close) == pad
- ? pad.length
- : 0)
- ),
- Pos(end, close + endString.length)
- );
+ self
+ .replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)), Pos(end, close + endString.length));
var openEnd = open + startString.length;
if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad)
openEnd += pad.length;
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlembedded.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlembedded.js
index 767e27b..7602b4e 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlembedded.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlembedded.js
@@ -75,20 +75,12 @@
"htmlmixed"
);
- CodeMirror.defineMIME("application/x-ejs", {
- name: "htmlembedded",
- scriptingModeSpec: "javascript"
- });
- CodeMirror.defineMIME("application/x-aspx", {
- name: "htmlembedded",
- scriptingModeSpec: "text/x-csharp"
- });
- CodeMirror.defineMIME("application/x-jsp", {
- name: "htmlembedded",
- scriptingModeSpec: "text/x-java"
- });
- CodeMirror.defineMIME("application/x-erb", {
- name: "htmlembedded",
- scriptingModeSpec: "ruby"
- });
+ CodeMirror
+ .defineMIME("application/x-ejs", { name: "htmlembedded", scriptingModeSpec: "javascript" });
+ CodeMirror
+ .defineMIME("application/x-aspx", { name: "htmlembedded", scriptingModeSpec: "text/x-csharp" });
+ CodeMirror
+ .defineMIME("application/x-jsp", { name: "htmlembedded", scriptingModeSpec: "text/x-java" });
+ CodeMirror
+ .defineMIME("application/x-erb", { name: "htmlembedded", scriptingModeSpec: "ruby" });
});
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlmixed.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlmixed.js
index 9653b00..963a775 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlmixed.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlmixed.js
@@ -42,10 +42,8 @@
});
if (scriptTypesConf) for (var i = 0; i < scriptTypesConf.length; ++i) {
var conf = scriptTypesConf[i];
- scriptTypes.push({
- matches: conf.matches,
- mode: conf.mode && CodeMirror.getMode(config, conf.mode)
- });
+ scriptTypes
+ .push({ matches: conf.matches, mode: conf.mode && CodeMirror.getMode(config, conf.mode) });
}
scriptTypes.push({
matches: /./,
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/javascript.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/javascript.js
index 77aa3aa..a660978 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/javascript.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/javascript.js
@@ -868,20 +868,12 @@
CodeMirror.defineMIME("application/x-javascript", "javascript");
CodeMirror.defineMIME("application/ecmascript", "javascript");
CodeMirror.defineMIME("application/json", { name: "javascript", json: true });
- CodeMirror.defineMIME("application/x-json", {
- name: "javascript",
- json: true
- });
- CodeMirror.defineMIME("application/ld+json", {
- name: "javascript",
- jsonld: true
- });
- CodeMirror.defineMIME("text/typescript", {
- name: "javascript",
- typescript: true
- });
- CodeMirror.defineMIME("application/typescript", {
- name: "javascript",
- typescript: true
- });
+ CodeMirror
+ .defineMIME("application/x-json", { name: "javascript", json: true });
+ CodeMirror
+ .defineMIME("application/ld+json", { name: "javascript", jsonld: true });
+ CodeMirror
+ .defineMIME("text/typescript", { name: "javascript", typescript: true });
+ CodeMirror
+ .defineMIME("application/typescript", { name: "javascript", typescript: true });
});
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/matchbrackets.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/matchbrackets.js
index 66aac5c..74b05f4 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/matchbrackets.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/matchbrackets.js
@@ -100,11 +100,8 @@
var style = match.match
? "CodeMirror-matchingbracket"
: "CodeMirror-nonmatchingbracket";
- marks.push(
- cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {
- className: style
- })
- );
+ marks
+ .push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), { className: style }));
if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)
marks.push(
cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {
@@ -152,19 +149,12 @@
CodeMirror.defineExtension("matchBrackets", function() {
matchBrackets(this, true);
});
- CodeMirror.defineExtension("findMatchingBracket", function(
- pos,
- strict,
- config
- ) {
+ CodeMirror
+ .defineExtension("findMatchingBracket", function(pos, strict, config) {
return findMatchingBracket(this, pos, strict, config);
});
- CodeMirror.defineExtension("scanForBracket", function(
- pos,
- dir,
- style,
- config
- ) {
+ CodeMirror
+ .defineExtension("scanForBracket", function(pos, dir, style, config) {
return scanForBracket(this, pos, dir, style, config);
});
});
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/php.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/php.js
index 837206f..61f80e1 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/php.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/php.js
@@ -108,11 +108,8 @@
"print unset __halt_compiler self static parent yield insteadof finally";
var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";
var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once";
- CodeMirror.registerHelper(
- "hintWords",
- "php",
- [ phpKeywords, phpAtoms, phpBuiltin ].join(" ").split(" ")
- );
+ CodeMirror
+ .registerHelper("hintWords", "php", [ phpKeywords, phpAtoms, phpBuiltin ].join(" ").split(" "));
CodeMirror.registerHelper("wordChars", "php", /[\\w$]/);
var phpConfig = {
@@ -269,9 +266,7 @@
);
CodeMirror.defineMIME("application/x-httpd-php", "php");
- CodeMirror.defineMIME("application/x-httpd-php-open", {
- name: "php",
- startOpen: true
- });
+ CodeMirror
+ .defineMIME("application/x-httpd-php-open", { name: "php", startOpen: true });
CodeMirror.defineMIME("text/x-php", phpConfig);
});
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/python.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/python.js
index 25eb199..4b8c64f 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/python.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/python.js
@@ -138,11 +138,8 @@
keywords: [ "nonlocal", "False", "True", "None" ]
};
- CodeMirror.registerHelper(
- "hintWords",
- "python",
- commonKeywords.concat(commonBuiltins)
- );
+ CodeMirror
+ .registerHelper("hintWords", "python", commonKeywords.concat(commonBuiltins));
function top(state) {
return state.scopes[state.scopes.length - 1];
@@ -447,12 +444,6 @@
return str.split(" ");
};
- CodeMirror.defineMIME("text/x-cython", {
- name: "python",
- extra_keywords: words(
- "by cdef cimport cpdef ctypedef enum except" +
- "extern gil include nogil property public" +
- "readonly struct union DEF IF ELIF ELSE"
- )
- });
+ CodeMirror
+ .defineMIME("text/x-cython", { name: "python", extra_keywords: words("by cdef cimport cpdef ctypedef enum except" + "extern gil include nogil property public" + "readonly struct union DEF IF ELIF ELSE") });
});
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Color.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Color.js
index a1ed0dc..afe4953 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Color.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Color.js
@@ -81,11 +81,8 @@ WebInspector.Color.parse = function(text) {
var r = parseInt(hex.substring(0, 2), 16);
var g = parseInt(hex.substring(2, 4), 16);
var b = parseInt(hex.substring(4, 6), 16);
- return new WebInspector.Color(
- [ r / 255, g / 255, b / 255, 1 ],
- format,
- text
- );
+ return new WebInspector
+ .Color([ r / 255, g / 255, b / 255, 1 ], format, text);
}
if (match[2]) {
@@ -167,10 +164,8 @@ WebInspector.Color.parse = function(text) {
* @return {!WebInspector.Color}
*/
WebInspector.Color.fromRGBA = function(rgba) {
- return new WebInspector.Color(
- [ rgba[0] / 255, rgba[1] / 255, rgba[2] / 255, rgba[3] ],
- WebInspector.Color.Format.RGBA
- );
+ return new WebInspector
+ .Color([ rgba[0] / 255, rgba[1] / 255, rgba[2] / 255, rgba[3] ], WebInspector.Color.Format.RGBA);
};
/**
@@ -187,10 +182,8 @@ WebInspector.Color.fromHSVA = function(hsva) {
else s *= v / (t < 1 ? t : 2 - t);
var hsla = [ h, s, t / 2, hsva[3] ];
- return new WebInspector.Color(
- WebInspector.Color._hsl2rgb(hsla),
- WebInspector.Color.Format.HSLA
- );
+ return new WebInspector
+ .Color(WebInspector.Color._hsl2rgb(hsla), WebInspector.Color.Format.HSLA);
};
WebInspector.Color.prototype = {
@@ -293,57 +286,31 @@ WebInspector.Color.prototype = {
return this._originalText;
case WebInspector.Color.Format.RGB:
if (this.hasAlpha()) return null;
- return String.sprintf(
- "rgb(%d, %d, %d)",
- toRgbValue(this._rgba[0]),
- toRgbValue(this._rgba[1]),
- toRgbValue(this._rgba[2])
- );
+ return String
+ .sprintf("rgb(%d, %d, %d)", toRgbValue(this._rgba[0]), toRgbValue(this._rgba[1]), toRgbValue(this._rgba[2]));
case WebInspector.Color.Format.RGBA:
- return String.sprintf(
- "rgba(%d, %d, %d, %f)",
- toRgbValue(this._rgba[0]),
- toRgbValue(this._rgba[1]),
- toRgbValue(this._rgba[2]),
- this._rgba[3]
- );
+ return String
+ .sprintf("rgba(%d, %d, %d, %f)", toRgbValue(this._rgba[0]), toRgbValue(this._rgba[1]), toRgbValue(this._rgba[2]), this._rgba[3]);
case WebInspector.Color.Format.HSL:
if (this.hasAlpha()) return null;
var hsl = this.hsla();
- return String.sprintf(
- "hsl(%d, %d%, %d%)",
- Math.round(hsl[0] * 360),
- Math.round(hsl[1] * 100),
- Math.round(hsl[2] * 100)
- );
+ return String
+ .sprintf("hsl(%d, %d%, %d%)", Math.round(hsl[0] * 360), Math.round(hsl[1] * 100), Math.round(hsl[2] * 100));
case WebInspector.Color.Format.HSLA:
var hsla = this.hsla();
- return String.sprintf(
- "hsla(%d, %d%, %d%, %f)",
- Math.round(hsla[0] * 360),
- Math.round(hsla[1] * 100),
- Math.round(hsla[2] * 100),
- hsla[3]
- );
+ return String
+ .sprintf("hsla(%d, %d%, %d%, %f)", Math.round(hsla[0] * 360), Math.round(hsla[1] * 100), Math.round(hsla[2] * 100), hsla[3]);
case WebInspector.Color.Format.HEX:
if (this.hasAlpha()) return null;
return String
- .sprintf(
- "#%s%s%s",
- toHexValue(this._rgba[0]),
- toHexValue(this._rgba[1]),
- toHexValue(this._rgba[2])
- )
+
+ .sprintf("#%s%s%s", toHexValue(this._rgba[0]), toHexValue(this._rgba[1]), toHexValue(this._rgba[2]))
.toUpperCase();
case WebInspector.Color.Format.ShortHEX:
if (!this.canBeShortHex()) return null;
return String
- .sprintf(
- "#%s%s%s",
- toShortHexValue(this._rgba[0]),
- toShortHexValue(this._rgba[1]),
- toShortHexValue(this._rgba[2])
- )
+
+ .sprintf("#%s%s%s", toShortHexValue(this._rgba[0]), toShortHexValue(this._rgba[1]), toShortHexValue(this._rgba[2]))
.toUpperCase();
case WebInspector.Color.Format.Nickname:
return this.nickname();
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Progress.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Progress.js
index 9b89405..4ed62aa 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Progress.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Progress.js
@@ -81,10 +81,8 @@ WebInspector.CompositeProgress = function(parent) {
this._parent.setTotalWork(1);
this._parent.setWorked(0);
// FIXME: there should be no "progress events"
- parent.addEventListener(
- WebInspector.Progress.Events.Canceled,
- this._parentCanceled.bind(this)
- );
+ parent
+ .addEventListener(WebInspector.Progress.Events.Canceled, this._parentCanceled.bind(this));
};
WebInspector.CompositeProgress.prototype = {
@@ -97,9 +95,8 @@ WebInspector.CompositeProgress.prototype = {
// FIXME: there should be no "progress events"
this.dispatchEventToListeners(WebInspector.Progress.Events.Canceled);
for (var i = 0; i < this._children.length; ++i) {
- this._children[i].dispatchEventToListeners(
- WebInspector.Progress.Events.Canceled
- );
+ this
+ ._children[i].dispatchEventToListeners(WebInspector.Progress.Events.Canceled);
}
},
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/ResourceType.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/ResourceType.js
index 5a51399..aa7c8ae 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/ResourceType.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/ResourceType.js
@@ -139,13 +139,8 @@ WebInspector.resourceTypes = {
false
),
// FIXME: Decide the color.
- Font: new WebInspector.ResourceType(
- "font",
- "Font",
- "Fonts",
- "rgb(255,82,62)",
- false
- ),
+ Font: new WebInspector
+ .ResourceType("font", "Font", "Fonts", "rgb(255,82,62)", false),
Document: new WebInspector.ResourceType(
"document",
"Document",
@@ -161,21 +156,11 @@ WebInspector.resourceTypes = {
true
),
// FIXME: Decide the color.
- WebSocket: new WebInspector.ResourceType(
- "websocket",
- "WebSocket",
- "WebSockets",
- "rgb(186,186,186)",
- false
- ),
+ WebSocket: new WebInspector
+ .ResourceType("websocket", "WebSocket", "WebSockets", "rgb(186,186,186)", false),
// FIXME: Decide the color.
- Other: new WebInspector.ResourceType(
- "other",
- "Other",
- "Other",
- "rgb(186,186,186)",
- false
- )
+ Other: new WebInspector
+ .ResourceType("other", "Other", "Other", "rgb(186,186,186)", false)
};
WebInspector.ResourceType.mimeTypesForExtensions = {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Settings.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Settings.js
index 3310b35..a83557e 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Settings.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Settings.js
@@ -57,10 +57,8 @@ WebInspector.Settings = function() {
);
this.watchExpressions = this.createSetting("watchExpressions", []);
this.breakpoints = this.createSetting("breakpoints", []);
- this.eventListenerBreakpoints = this.createSetting(
- "eventListenerBreakpoints",
- []
- );
+ this.eventListenerBreakpoints = this
+ .createSetting("eventListenerBreakpoints", []);
this.domBreakpoints = this.createSetting("domBreakpoints", []);
this.xhrBreakpoints = this.createSetting("xhrBreakpoints", []);
this.jsSourceMapsEnabled = this.createSetting("sourceMapsEnabled", true);
@@ -110,10 +108,8 @@ WebInspector.Settings = function() {
true
);
this.networkHideDataURL = this.createSetting("networkHideDataURL", false);
- this.networkResourceTypeFilters = this.createSetting(
- "networkResourceTypeFilters",
- {}
- );
+ this.networkResourceTypeFilters = this
+ .createSetting("networkResourceTypeFilters", {});
this.networkShowPrimaryLoadWaterfall = this.createSetting(
"networkShowPrimaryLoadWaterfall",
false
@@ -281,10 +277,8 @@ WebInspector.Setting.prototype = {
this._printSettingsSavingError(e.message, this._name, settingString);
}
} catch (e) {
- WebInspector.console.error(
- "Cannot stringify setting with name: " + this._name + ", error: " +
- e.message
- );
+ WebInspector
+ .console.error("Cannot stringify setting with name: " + this._name + ", error: " + e.message);
}
}
this._eventSupport.dispatchEventToListeners(this._name, value);
@@ -434,23 +428,17 @@ WebInspector.VersionController.prototype = {
return result;
},
_updateVersionFrom0To1: function() {
- this._clearBreakpointsWhenTooMany(
- WebInspector.settings.breakpoints,
- 500000
- );
+ this
+ ._clearBreakpointsWhenTooMany(WebInspector.settings.breakpoints, 500000);
},
_updateVersionFrom1To2: function() {
- var versionSetting = WebInspector.settings.createSetting(
- "previouslyViewedFiles",
- []
- );
+ var versionSetting = WebInspector.settings
+ .createSetting("previouslyViewedFiles", []);
versionSetting.set([]);
},
_updateVersionFrom2To3: function() {
- var fileSystemMappingSetting = WebInspector.settings.createSetting(
- "fileSystemMapping",
- {}
- );
+ var fileSystemMappingSetting = WebInspector.settings
+ .createSetting("fileSystemMapping", {});
fileSystemMappingSetting.set({});
if (window.localStorage) delete window.localStorage["fileMappingEntries"];
},
@@ -680,14 +668,10 @@ WebInspector.settings;
* @constructor
*/
WebInspector.PauseOnExceptionStateSetting = function() {
- WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(
- this._enabledChanged,
- this
- );
- WebInspector.settings.pauseOnCaughtException.addChangeListener(
- this._pauseOnCaughtChanged,
- this
- );
+ WebInspector
+ .settings.pauseOnExceptionEnabled.addChangeListener(this._enabledChanged, this);
+ WebInspector
+ .settings.pauseOnCaughtException.addChangeListener(this._pauseOnCaughtChanged, this);
this._name = "pauseOnExceptionStateString";
this._eventSupport = new WebInspector.Object();
this._value = this._calculateValue();
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Streams.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Streams.js
index 5bf9744..10d9c49 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Streams.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Streams.js
@@ -13,7 +13,8 @@ WebInspector.Streams._boundStreams = {};
* @return {number}
*/
WebInspector.Streams.bindOutputStream = function(stream) {
- WebInspector.Streams._boundStreams[++WebInspector.Streams._lastStreamId] = stream;
+ WebInspector.Streams._boundStreams[++WebInspector.Streams
+ ._lastStreamId] = stream;
return WebInspector.Streams._lastStreamId;
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextRange.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextRange.js
index 74c1a48..8fa28b9 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextRange.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextRange.js
@@ -56,12 +56,8 @@ WebInspector.TextRange.createFromLocation = function(line, column) {
* @return {!WebInspector.TextRange}
*/
WebInspector.TextRange.fromObject = function(serializedTextRange) {
- return new WebInspector.TextRange(
- serializedTextRange.startLine,
- serializedTextRange.startColumn,
- serializedTextRange.endLine,
- serializedTextRange.endColumn
- );
+ return new WebInspector
+ .TextRange(serializedTextRange.startLine, serializedTextRange.startColumn, serializedTextRange.endLine, serializedTextRange.endColumn);
};
/**
@@ -117,23 +113,15 @@ WebInspector.TextRange.prototype = {
* @return {!WebInspector.TextRange}
*/
collapseToEnd: function() {
- return new WebInspector.TextRange(
- this.endLine,
- this.endColumn,
- this.endLine,
- this.endColumn
- );
+ return new WebInspector
+ .TextRange(this.endLine, this.endColumn, this.endLine, this.endColumn);
},
/**
* @return {!WebInspector.TextRange}
*/
collapseToStart: function() {
- return new WebInspector.TextRange(
- this.startLine,
- this.startColumn,
- this.startLine,
- this.startColumn
- );
+ return new WebInspector
+ .TextRange(this.startLine, this.startColumn, this.startLine, this.startColumn);
},
/**
* @return {!WebInspector.TextRange}
@@ -156,12 +144,8 @@ WebInspector.TextRange.prototype = {
* @return {!WebInspector.TextRange}
*/
clone: function() {
- return new WebInspector.TextRange(
- this.startLine,
- this.startColumn,
- this.endLine,
- this.endColumn
- );
+ return new WebInspector
+ .TextRange(this.startLine, this.startColumn, this.endLine, this.endColumn);
},
/**
* @return {!Object}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/UIString.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/UIString.js
index 031446c..1c2fdc4 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/UIString.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/UIString.js
@@ -35,10 +35,8 @@
* @return {string}
*/
WebInspector.UIString = function(string, vararg) {
- return String.vsprintf(
- WebInspector.localize(string),
- Array.prototype.slice.call(arguments, 1)
- );
+ return String
+ .vsprintf(WebInspector.localize(string), Array.prototype.slice.call(arguments, 1));
};
/**
@@ -105,13 +103,7 @@ WebInspector.UIStringFormat.prototype = {
* @return {string}
*/
format: function(vararg) {
- return String.format(
- this._localizedFormat,
- arguments,
- String.standardFormatters,
- "",
- WebInspector.UIStringFormat._append,
- this._tokenizedFormat
- ).formattedResult;
+ return String
+ .format(this._localizedFormat, arguments, String.standardFormatters, "", WebInspector.UIStringFormat._append, this._tokenizedFormat).formattedResult;
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMBreakpointsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMBreakpointsSidebarPane.js
index ea7edd4..32de5be 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMBreakpointsSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMBreakpointsSidebarPane.js
@@ -33,10 +33,8 @@
* @extends {WebInspector.BreakpointsSidebarPaneBase}
*/
WebInspector.DOMBreakpointsSidebarPane = function() {
- WebInspector.BreakpointsSidebarPaneBase.call(
- this,
- WebInspector.UIString("DOM Breakpoints")
- );
+ WebInspector
+ .BreakpointsSidebarPaneBase.call(this, WebInspector.UIString("DOM Breakpoints"));
this._breakpointElements = {};
@@ -46,38 +44,27 @@ WebInspector.DOMBreakpointsSidebarPane = function() {
NodeRemoved: "node-removed"
};
this._breakpointTypeLabels = {};
- this._breakpointTypeLabels[this._breakpointTypes.SubtreeModified] = WebInspector.UIString(
- "Subtree Modified"
- );
- this._breakpointTypeLabels[this._breakpointTypes.AttributeModified] = WebInspector.UIString(
- "Attribute Modified"
- );
- this._breakpointTypeLabels[this._breakpointTypes.NodeRemoved] = WebInspector.UIString(
- "Node Removed"
- );
+ this._breakpointTypeLabels[this._breakpointTypes
+ .SubtreeModified] = WebInspector.UIString("Subtree Modified");
+ this._breakpointTypeLabels[this._breakpointTypes
+ .AttributeModified] = WebInspector.UIString("Attribute Modified");
+ this._breakpointTypeLabels[this._breakpointTypes.NodeRemoved] = WebInspector
+ .UIString("Node Removed");
this._contextMenuLabels = {};
- this._contextMenuLabels[this._breakpointTypes.SubtreeModified] = WebInspector.UIString.capitalize(
- "Subtree ^modifications"
- );
- this._contextMenuLabels[this._breakpointTypes.AttributeModified] = WebInspector.UIString.capitalize(
+ this._contextMenuLabels[this._breakpointTypes.SubtreeModified] = WebInspector
+ .UIString.capitalize("Subtree ^modifications");
+ this._contextMenuLabels[this._breakpointTypes
+ .AttributeModified] = WebInspector.UIString.capitalize(
"Attributes ^modifications"
);
- this._contextMenuLabels[this._breakpointTypes.NodeRemoved] = WebInspector.UIString.capitalize(
- "Node ^removal"
- );
+ this._contextMenuLabels[this._breakpointTypes.NodeRemoved] = WebInspector
+ .UIString.capitalize("Node ^removal");
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.InspectedURLChanged,
- this._inspectedURLChanged,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DOMModel,
- WebInspector.DOMModel.Events.NodeRemoved,
- this._nodeRemoved,
- this
- );
+ WebInspector
+ .targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.NodeRemoved, this._nodeRemoved, this);
};
WebInspector.DOMBreakpointsSidebarPane.prototype = {
@@ -135,17 +122,11 @@ WebInspector.DOMBreakpointsSidebarPane.prototype = {
var targetNodeObject = details.target().runtimeModel.createRemoteObject(
auxData["targetNode"]
);
- domModel.pushObjectAsNodeToFrontend(
- targetNodeObject,
- didPushNodeToFrontend.bind(this)
- );
+ domModel
+ .pushObjectAsNodeToFrontend(targetNodeObject, didPushNodeToFrontend.bind(this));
} else {
- this._doCreateBreakpointHitStatusMessage(
- auxData,
- domModel.nodeForId(auxData.nodeId),
- null,
- callback
- );
+ this
+ ._doCreateBreakpointHitStatusMessage(auxData, domModel.nodeForId(auxData.nodeId), null, callback);
}
/**
@@ -396,12 +377,8 @@ WebInspector.DOMBreakpointsSidebarPane.prototype = {
}
for (var id in this._breakpointElements) {
var element = this._breakpointElements[id];
- breakpoints.push({
- url: this._inspectedURL,
- path: element._node.path(),
- type: element._type,
- enabled: element._checkboxElement.checked
- });
+ breakpoints
+ .push({ url: this._inspectedURL, path: element._node.path(), type: element._type, enabled: element._checkboxElement.checked });
}
WebInspector.settings.domBreakpoints.set(breakpoints);
},
@@ -435,10 +412,8 @@ WebInspector.DOMBreakpointsSidebarPane.prototype = {
var path = breakpoint.path;
if (!pathToBreakpoints[path]) {
pathToBreakpoints[path] = [];
- target.domModel.pushNodeByPathToFrontend(
- path,
- didPushNodeByPathToFrontend.bind(this, path)
- );
+ target
+ .domModel.pushNodeByPathToFrontend(path, didPushNodeByPathToFrontend.bind(this, path));
}
pathToBreakpoints[path].push(breakpoint);
}
@@ -470,10 +445,8 @@ WebInspector.DOMBreakpointsSidebarPane.prototype = {
* @param {!WebInspector.Panel} panel
*/
WebInspector.DOMBreakpointsSidebarPane.Proxy = function(pane, panel) {
- WebInspector.View.__assert(
- !pane.titleElement.firstChild,
- "Cannot create proxy for a sidebar pane with a toolbar"
- );
+ WebInspector
+ .View.__assert(!pane.titleElement.firstChild, "Cannot create proxy for a sidebar pane with a toolbar");
WebInspector.SidebarPane.call(this, pane.title());
this.registerRequiredCSS("components/breakpointsList.css");
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMPresentationUtils.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMPresentationUtils.js
index 7b57136..9f6d8a5 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMPresentationUtils.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMPresentationUtils.js
@@ -89,15 +89,11 @@ WebInspector.DOMPresentationUtils.createSpansForNodeTitle = function(
var match = nodeTitle.match(/([^#.]+)(#[^.]+)?(\..*)?/);
container.createChild("span", "webkit-html-tag-name").textContent = match[1];
if (match[2])
- container.createChild(
- "span",
- "webkit-html-attribute-value"
- ).textContent = match[2];
+ container.createChild("span", "webkit-html-attribute-value")
+ .textContent = match[2];
if (match[3])
- container.createChild(
- "span",
- "webkit-html-attribute-name"
- ).textContent = match[3];
+ container.createChild("span", "webkit-html-attribute-name")
+ .textContent = match[3];
};
/**
@@ -109,28 +105,18 @@ WebInspector.DOMPresentationUtils.linkifyNodeReference = function(node) {
var root = createElement("span");
var shadowRoot = root.createShadowRoot();
- shadowRoot.appendChild(
- WebInspector.View.createStyleElement("components/nodeLink.css")
- );
+ shadowRoot
+ .appendChild(WebInspector.View.createStyleElement("components/nodeLink.css"));
var link = shadowRoot.createChild("div", "node-link");
WebInspector.DOMPresentationUtils.decorateNodeLabel(node, link);
- link.addEventListener(
- "click",
- WebInspector.Revealer.reveal.bind(WebInspector.Revealer, node, undefined),
- false
- );
- link.addEventListener(
- "mouseover",
- node.highlight.bind(node, undefined, undefined),
- false
- );
- link.addEventListener(
- "mouseleave",
- node.domModel().hideDOMNodeHighlight.bind(node.domModel()),
- false
- );
+ link
+ .addEventListener("click", WebInspector.Revealer.reveal.bind(WebInspector.Revealer, node, undefined), false);
+ link
+ .addEventListener("mouseover", node.highlight.bind(node, undefined, undefined), false);
+ link
+ .addEventListener("mouseleave", node.domModel().hideDOMNodeHighlight.bind(node.domModel()), false);
return root;
};
@@ -305,10 +291,8 @@ WebInspector.DOMPresentationUtils.buildStackTracePreviewContents = function(
var callFrames = asyncStackTrace.callFrames;
if (!callFrames || !callFrames.length) break;
var row = element.createChild("tr");
- row.createChild(
- "td",
- "stack-preview-async-description"
- ).textContent = WebInspector.asyncStackTraceLabel(
+ row.createChild("td", "stack-preview-async-description")
+ .textContent = WebInspector.asyncStackTraceLabel(
asyncStackTrace.description
);
row.createChild("td");
@@ -615,10 +599,8 @@ WebInspector.DOMPresentationUtils._xPathValue = function(node, optimized) {
if (ownIndex > 0) ownValue += "[" + ownIndex + "]";
- return new WebInspector.DOMNodePathStep(
- ownValue,
- node.nodeType() === Node.DOCUMENT_NODE
- );
+ return new WebInspector
+ .DOMNodePathStep(ownValue, node.nodeType() === Node.DOCUMENT_NODE);
};
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DockController.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DockController.js
index e3c0c23..686bd50 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DockController.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DockController.js
@@ -115,30 +115,22 @@ WebInspector.DockController.prototype = {
if (this._dockToggleButton) this._dockToggleButton.setEnabled(false);
var eventData = { from: this._dockSide, to: dockSide };
- this.dispatchEventToListeners(
- WebInspector.DockController.Events.BeforeDockSideChanged,
- eventData
- );
+ this
+ .dispatchEventToListeners(WebInspector.DockController.Events.BeforeDockSideChanged, eventData);
console.timeStamp("DockController.setIsDocked");
- InspectorFrontendHost.setIsDocked(
- dockSide !== WebInspector.DockController.State.Undocked,
- this._setIsDockedResponse.bind(this, eventData)
- );
+ InspectorFrontendHost
+ .setIsDocked(dockSide !== WebInspector.DockController.State.Undocked, this._setIsDockedResponse.bind(this, eventData));
this._dockSide = dockSide;
this._updateUI();
- this.dispatchEventToListeners(
- WebInspector.DockController.Events.DockSideChanged,
- eventData
- );
+ this
+ .dispatchEventToListeners(WebInspector.DockController.Events.DockSideChanged, eventData);
},
/**
* @param {{from: string, to: string}} eventData
*/
_setIsDockedResponse: function(eventData) {
- this.dispatchEventToListeners(
- WebInspector.DockController.Events.AfterDockSideChanged,
- eventData
- );
+ this
+ .dispatchEventToListeners(WebInspector.DockController.Events.AfterDockSideChanged, eventData);
if (this._dockToggleButton) this._dockToggleButton.setEnabled(true);
},
/**
@@ -183,7 +175,8 @@ WebInspector.DockController.ButtonProvider.prototype = {
if (!WebInspector.dockController.canDock()) return null;
if (!WebInspector.dockController._dockToggleButton) {
- WebInspector.dockController._dockToggleButton = new WebInspector.StatusBarStatesSettingButton(
+ WebInspector.dockController._dockToggleButton = new WebInspector
+ .StatusBarStatesSettingButton(
"dock-status-bar-item",
WebInspector.dockController._states,
WebInspector.dockController._titles,
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/Drawer.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/Drawer.js
index e54551d..95a97e8 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/Drawer.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/Drawer.js
@@ -49,15 +49,10 @@ WebInspector.Drawer = function(splitView) {
this._tabbedPane = new WebInspector.TabbedPane();
this._tabbedPane.element.id = "drawer-tabbed-pane";
this._tabbedPane.setCloseableTabs(false);
- this._tabbedPane.addEventListener(
- WebInspector.TabbedPane.EventTypes.TabSelected,
- this._tabSelected,
- this
- );
- new WebInspector.ExtensibleTabbedPaneController(
- this._tabbedPane,
- "drawer-view"
- );
+ this
+ ._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, this._tabSelected, this);
+ new WebInspector
+ .ExtensibleTabbedPaneController(this._tabbedPane, "drawer-view");
splitView.installResizer(this._tabbedPane.headerElement());
this._lastSelectedViewSetting = WebInspector.settings.createSetting(
@@ -206,7 +201,8 @@ WebInspector.Drawer.SingletonViewFactory.prototype = {
*/
createView: function() {
if (!this._instance)
- this._instance /** @type {!WebInspector.View} */ = new this._constructor();
+ this._instance /** @type {!WebInspector.View} */ = new this
+ ._constructor();
return this._instance;
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ExecutionContextSelector.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ExecutionContextSelector.js
index c59955a..c19acf8 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ExecutionContextSelector.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ExecutionContextSelector.js
@@ -8,29 +8,15 @@
*/
WebInspector.ExecutionContextSelector = function() {
WebInspector.targetManager.observeTargets(this);
- WebInspector.context.addFlavorChangeListener(
- WebInspector.ExecutionContext,
- this._executionContextChanged,
- this
- );
- WebInspector.context.addFlavorChangeListener(
- WebInspector.Target,
- this._targetChanged,
- this
- );
+ WebInspector
+ .context.addFlavorChangeListener(WebInspector.ExecutionContext, this._executionContextChanged, this);
+ WebInspector
+ .context.addFlavorChangeListener(WebInspector.Target, this._targetChanged, this);
- WebInspector.targetManager.addModelListener(
- WebInspector.RuntimeModel,
- WebInspector.RuntimeModel.Events.ExecutionContextCreated,
- this._onExecutionContextCreated,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.RuntimeModel,
- WebInspector.RuntimeModel.Events.ExecutionContextDestroyed,
- this._onExecutionContextDestroyed,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.RuntimeModel, WebInspector.RuntimeModel.Events.ExecutionContextCreated, this._onExecutionContextCreated, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.RuntimeModel, WebInspector.RuntimeModel.Events.ExecutionContextDestroyed, this._onExecutionContextDestroyed, this);
};
WebInspector.ExecutionContextSelector.prototype = {
@@ -101,7 +87,8 @@ WebInspector.ExecutionContextSelector.prototype = {
* @param {!WebInspector.Event} event
*/
_onExecutionContextCreated: function(event) {
- var executionContext /** @type {!WebInspector.ExecutionContext} */ = event.data;
+ var executionContext /** @type {!WebInspector.ExecutionContext} */ = event
+ .data;
if (!WebInspector.context.flavor(WebInspector.ExecutionContext))
WebInspector.context.setFlavor(
@@ -113,7 +100,8 @@ WebInspector.ExecutionContextSelector.prototype = {
* @param {!WebInspector.Event} event
*/
_onExecutionContextDestroyed: function(event) {
- var executionContext /** @type {!WebInspector.ExecutionContext}*/ = event.data;
+ var executionContext /** @type {!WebInspector.ExecutionContext}*/ = event
+ .data;
if (
WebInspector.context.flavor(WebInspector.ExecutionContext) ===
executionContext
@@ -141,7 +129,8 @@ WebInspector.ExecutionContextSelector.prototype = {
* @param {boolean} force
* @param {function(!Array.<string>, number=)} completionsReadyCallback
*/
-WebInspector.ExecutionContextSelector.completionsForTextPromptInCurrentContext = function(
+WebInspector.ExecutionContextSelector
+ .completionsForTextPromptInCurrentContext = function(
proxyElement,
wordRange,
force,
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/HandlerRegistry.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/HandlerRegistry.js
index f1dd501..7cf180a 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/HandlerRegistry.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/HandlerRegistry.js
@@ -69,15 +69,13 @@ WebInspector.HandlerRegistry.prototype = {
},
registerHandler: function(name, handler) {
this._handlers[name] = handler;
- this.dispatchEventToListeners(
- WebInspector.HandlerRegistry.EventTypes.HandlersUpdated
- );
+ this
+ .dispatchEventToListeners(WebInspector.HandlerRegistry.EventTypes.HandlersUpdated);
},
unregisterHandler: function(name) {
delete this._handlers[name];
- this.dispatchEventToListeners(
- WebInspector.HandlerRegistry.EventTypes.HandlersUpdated
- );
+ this
+ .dispatchEventToListeners(WebInspector.HandlerRegistry.EventTypes.HandlersUpdated);
},
/**
* @param {string} url
@@ -193,9 +191,8 @@ WebInspector.HandlerRegistry.prototype = {
var resourceURL = anchorElement.href;
if (!resourceURL) return;
- var uiSourceCode = WebInspector.networkMapping.uiSourceCodeForURLForAnyTarget(
- resourceURL
- );
+ var uiSourceCode = WebInspector.networkMapping
+ .uiSourceCodeForURLForAnyTarget(resourceURL);
function open() {
WebInspector.Revealer.reveal(uiSourceCode);
}
@@ -241,10 +238,8 @@ WebInspector.HandlerSelector = function(handlerRegistry) {
this.element = createElementWithClass("select", "chrome-select");
this.element.addEventListener("change", this._onChange.bind(this), false);
this._update();
- this._handlerRegistry.addEventListener(
- WebInspector.HandlerRegistry.EventTypes.HandlersUpdated,
- this._update.bind(this)
- );
+ this
+ ._handlerRegistry.addEventListener(WebInspector.HandlerRegistry.EventTypes.HandlersUpdated, this._update.bind(this));
};
WebInspector.HandlerSelector.prototype = {
@@ -333,10 +328,8 @@ WebInspector.HandlerRegistry.OpenAnchorLocationSettingDelegate.prototype = {
var handlerSelector = new WebInspector.HandlerSelector(
WebInspector.openAnchorLocationRegistry
);
- return WebInspector.SettingsUI.createCustomSetting(
- WebInspector.UIString("Open links in"),
- handlerSelector.element
- );
+ return WebInspector
+ .SettingsUI.createCustomSetting(WebInspector.UIString("Open links in"), handlerSelector.element);
},
__proto__: WebInspector.UISettingDelegate.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectElementModeController.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectElementModeController.js
index 3346591..e799b30 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectElementModeController.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectElementModeController.js
@@ -35,17 +35,10 @@ WebInspector.InspectElementModeController = function() {
WebInspector.UIString("Select an element in the page to inspect it."),
"node-search-status-bar-item"
);
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.EnterInspectElementMode,
- this._toggleSearch,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DOMModel,
- WebInspector.DOMModel.Events.ModelSuspended,
- this._onModelSuspended,
- this
- );
+ InspectorFrontendHost
+ .events.addEventListener(InspectorFrontendHostAPI.Events.EnterInspectElementMode, this._toggleSearch, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.ModelSuspended, this._onModelSuspended, this);
WebInspector.targetManager.observeTargets(this);
};
@@ -53,11 +46,8 @@ WebInspector.InspectElementModeController = function() {
* @return {!WebInspector.KeyboardShortcut.Descriptor}
*/
WebInspector.InspectElementModeController.createShortcut = function() {
- return WebInspector.KeyboardShortcut.makeDescriptor(
- "c",
- WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta |
- WebInspector.KeyboardShortcut.Modifiers.Shift
- );
+ return WebInspector
+ .KeyboardShortcut.makeDescriptor("c", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.KeyboardShortcut.Modifiers.Shift);
};
WebInspector.InspectElementModeController.prototype = {
@@ -108,9 +98,11 @@ WebInspector.InspectElementModeController.prototype = {
* @constructor
* @implements {WebInspector.ActionDelegate}
*/
-WebInspector.InspectElementModeController.ToggleSearchActionDelegate = function() {};
+WebInspector.InspectElementModeController
+ .ToggleSearchActionDelegate = function() {};
-WebInspector.InspectElementModeController.ToggleSearchActionDelegate.prototype = {
+WebInspector.InspectElementModeController.ToggleSearchActionDelegate
+ .prototype = {
/**
* @override
* @return {boolean}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectorView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectorView.js
index 205cbbf..053d746 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectorView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectorView.js
@@ -57,10 +57,8 @@ WebInspector.InspectorView = function() {
this._drawer = new WebInspector.Drawer(this._drawerSplitView);
this._leftToolbar = new WebInspector.StatusBar();
- this._leftToolbar.element.classList.add(
- "inspector-view-toolbar",
- "inspector-view-toolbar-left"
- );
+ this
+ ._leftToolbar.element.classList.add("inspector-view-toolbar", "inspector-view-toolbar-left");
this._leftToolbar.makeNarrow();
this._tabbedPane.insertBeforeTabStrip(this._leftToolbar.element);
@@ -76,11 +74,8 @@ WebInspector.InspectorView = function() {
"div",
"close-button"
);
- closeButtonElement.addEventListener(
- "click",
- InspectorFrontendHost.closeWindow.bind(InspectorFrontendHost),
- true
- );
+ closeButtonElement
+ .addEventListener("click", InspectorFrontendHost.closeWindow.bind(InspectorFrontendHost), true);
this._rightToolbar.element.appendChild(this._closeButtonToolbarItem);
this._panels = {};
@@ -104,10 +99,8 @@ WebInspector.InspectorView = function() {
"elements"
);
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.ShowConsole,
- showConsole.bind(this)
- );
+ InspectorFrontendHost
+ .events.addEventListener(InspectorFrontendHostAPI.Events.ShowConsole, showConsole.bind(this));
this._loadPanelDesciptors();
/**
@@ -117,36 +110,22 @@ WebInspector.InspectorView = function() {
this.showPanel("console");
}
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.SuspendStateChanged,
- this._onSuspendStateChanged.bind(this)
- );
+ WebInspector
+ .targetManager.addEventListener(WebInspector.TargetManager.Events.SuspendStateChanged, this._onSuspendStateChanged.bind(this));
};
WebInspector.InspectorView.prototype = {
wasShown: function() {
- this.element.ownerDocument.addEventListener(
- "keydown",
- this._keyDownBound,
- false
- );
- this.element.ownerDocument.addEventListener(
- "keypress",
- this._keyPressBound,
- false
- );
+ this
+ .element.ownerDocument.addEventListener("keydown", this._keyDownBound, false);
+ this
+ .element.ownerDocument.addEventListener("keypress", this._keyPressBound, false);
},
willHide: function() {
- this.element.ownerDocument.removeEventListener(
- "keydown",
- this._keyDownBound,
- false
- );
- this.element.ownerDocument.removeEventListener(
- "keypress",
- this._keyPressBound,
- false
- );
+ this
+ .element.ownerDocument.removeEventListener("keydown", this._keyDownBound, false);
+ this
+ .element.ownerDocument.removeEventListener("keypress", this._keyPressBound, false);
},
_loadPanelDesciptors: function() {
WebInspector.startBatchUpdate();
@@ -158,9 +137,8 @@ WebInspector.InspectorView.prototype = {
* @this {!WebInspector.InspectorView}
*/
function processPanelExtensions(extension) {
- this.addPanel(new WebInspector.RuntimeExtensionPanelDescriptor(
- extension
- ));
+ this
+ .addPanel(new WebInspector.RuntimeExtensionPanelDescriptor(extension));
}
WebInspector.endBatchUpdate();
},
@@ -182,11 +160,8 @@ WebInspector.InspectorView.prototype = {
addPanel: function(panelDescriptor) {
var panelName = panelDescriptor.name();
this._panelDescriptors[panelName] = panelDescriptor;
- this._tabbedPane.appendTab(
- panelName,
- panelDescriptor.title(),
- new WebInspector.View()
- );
+ this
+ ._tabbedPane.appendTab(panelName, panelDescriptor.title(), new WebInspector.View());
if (this._lastActivePanelSetting.get() === panelName)
this._tabbedPane.selectTab(panelName);
},
@@ -280,11 +255,8 @@ WebInspector.InspectorView.prototype = {
this._showInitialPanel();
},
_showInitialPanel: function() {
- this._tabbedPane.addEventListener(
- WebInspector.TabbedPane.EventTypes.TabSelected,
- this._tabSelected,
- this
- );
+ this
+ ._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, this._tabSelected, this);
this._tabSelected();
this._drawer.initialPanelShown();
},
@@ -292,11 +264,8 @@ WebInspector.InspectorView.prototype = {
* @param {string} panelName
*/
showInitialPanelForTest: function(panelName) {
- this._tabbedPane.addEventListener(
- WebInspector.TabbedPane.EventTypes.TabSelected,
- this._tabSelected,
- this
- );
+ this
+ ._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, this._tabSelected, this);
this.setCurrentPanel(this._panels[panelName]);
this._drawer.initialPanelShown();
},
@@ -486,10 +455,8 @@ WebInspector.InspectorView.prototype = {
_pushToHistory: function(panelName) {
if (this._inHistory) return;
- this._history.splice(
- this._historyIterator + 1,
- this._history.length - this._historyIterator - 1
- );
+ this
+ ._history.splice(this._historyIterator + 1, this._history.length - this._historyIterator - 1);
if (
!this._history.length ||
this._history[this._history.length - 1] !== panelName
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPopoverHelper.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPopoverHelper.js
index 57e240b..3024d51 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPopoverHelper.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPopoverHelper.js
@@ -74,9 +74,8 @@ WebInspector.ObjectPopoverHelper.prototype = {
var description = this._remoteObjectFormatter &&
this._remoteObjectFormatter(object) ||
object.description;
- return description.trimEnd(
- WebInspector.ObjectPopoverHelper.MaxPopoverTextLength
- );
+ return description
+ .trimEnd(WebInspector.ObjectPopoverHelper.MaxPopoverTextLength);
},
/**
* @param {!Element} element
@@ -182,9 +181,8 @@ WebInspector.ObjectPopoverHelper.prototype = {
var popoverContentElement = null;
if (result.type !== "object") {
popoverContentElement = createElement("span");
- popoverContentElement.appendChild(
- WebInspector.View.createStyleElement("components/objectValue.css")
- );
+ popoverContentElement
+ .appendChild(WebInspector.View.createStyleElement("components/objectValue.css"));
var valueElement = popoverContentElement.createChild(
"span",
"monospace object-value-" + result.type
@@ -197,14 +195,8 @@ WebInspector.ObjectPopoverHelper.prototype = {
valueElement.textContent = description;
if (result.type === "function") {
- result.getOwnProperties(
- didGetFunctionProperties.bind(
- this,
- result,
- popoverContentElement,
- anchorElement
- )
- );
+ result
+ .getOwnProperties(didGetFunctionProperties.bind(this, result, popoverContentElement, anchorElement));
return;
}
popover.showForAnchor(popoverContentElement, anchorElement);
@@ -219,10 +211,8 @@ WebInspector.ObjectPopoverHelper.prototype = {
"div",
"monospace"
);
- this._titleElement.createChild(
- "span",
- "source-frame-popover-title"
- ).textContent = description;
+ this._titleElement.createChild("span", "source-frame-popover-title")
+ .textContent = description;
var section = new WebInspector.ObjectPropertiesSection(result);
@@ -238,12 +228,8 @@ WebInspector.ObjectPopoverHelper.prototype = {
var popoverWidth = 300;
var popoverHeight = 250;
- popover.showForAnchor(
- popoverContentElement,
- anchorElement,
- popoverWidth,
- popoverHeight
- );
+ popover
+ .showForAnchor(popoverContentElement, anchorElement, popoverWidth, popoverHeight);
}
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPropertiesSection.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPropertiesSection.js
index 4147f88..fad11f1 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPropertiesSection.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPropertiesSection.js
@@ -60,11 +60,8 @@ WebInspector.ObjectPropertiesSection.prototype = {
this._skipProto = true;
},
enableContextMenu: function() {
- this.element.addEventListener(
- "contextmenu",
- this._contextMenuEventFired.bind(this),
- false
- );
+ this
+ .element.addEventListener("contextmenu", this._contextMenuEventFired.bind(this), false);
},
_contextMenuEventFired: function(event) {
var contextMenu = new WebInspector.ContextMenu(event);
@@ -99,11 +96,8 @@ WebInspector.ObjectPropertiesSection.prototype = {
this.updateProperties(properties, internalProperties);
}
- WebInspector.RemoteObject.loadFromObject(
- this.object,
- !!this.ignoreHasOwnProperty,
- callback.bind(this)
- );
+ WebInspector
+ .RemoteObject.loadFromObject(this.object, !!this.ignoreHasOwnProperty, callback.bind(this));
},
updateProperties: function(properties, internalProperties) {
if (this.extraProperties) {
@@ -116,14 +110,8 @@ WebInspector.ObjectPropertiesSection.prototype = {
this.propertiesTreeOutline.removeChildren();
- WebInspector.ObjectPropertyTreeElement.populateWithProperties(
- this.propertiesTreeOutline.rootElement(),
- properties,
- internalProperties,
- this._skipProto,
- this.object,
- this._emptyPlaceholder
- );
+ WebInspector
+ .ObjectPropertyTreeElement.populateWithProperties(this.propertiesTreeOutline.rootElement(), properties, internalProperties, this._skipProto, this.object, this._emptyPlaceholder);
this.propertiesForTest = properties;
},
@@ -164,15 +152,13 @@ WebInspector.ObjectPropertyTreeElement = function(property) {
WebInspector.ObjectPropertyTreeElement.prototype = {
onpopulate: function() {
- var propertyValue /** @type {!WebInspector.RemoteObject} */ = this.property.value;
+ var propertyValue /** @type {!WebInspector.RemoteObject} */ = this.property
+ .value;
console.assert(propertyValue);
var section = this.treeOutline ? this.treeOutline.section : null;
var skipProto = section ? section._skipProto : true;
- WebInspector.ObjectPropertyTreeElement._populate(
- this,
- propertyValue,
- skipProto
- );
+ WebInspector
+ .ObjectPropertyTreeElement._populate(this, propertyValue, skipProto);
},
/**
* @override
@@ -212,18 +198,17 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
);
if (this.property.value) {
- this.valueElement = WebInspector.ObjectPropertiesSection.createValueElement(
+ this.valueElement = WebInspector.ObjectPropertiesSection
+ .createValueElement(
this.property.value,
this.property.wasThrown,
this.listItemElement
);
- this.valueElement.addEventListener(
- "contextmenu",
- this._contextMenuFired.bind(this, this.property.value),
- false
- );
+ this
+ .valueElement.addEventListener("contextmenu", this._contextMenuFired.bind(this, this.property.value), false);
} else if (this.property.getter) {
- this.valueElement = WebInspector.ObjectPropertyTreeElement.createRemoteObjectAccessorPropertySpan(
+ this.valueElement = WebInspector.ObjectPropertyTreeElement
+ .createRemoteObjectAccessorPropertySpan(
this.property.parentObject,
[ this.property.name ],
this._onInvokeGetterClick.bind(this)
@@ -241,11 +226,8 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
separatorElement.textContent = ": ";
this.listItemElement.removeChildren();
- this.listItemElement.appendChildren(
- this.nameElement,
- separatorElement,
- this.valueElement
- );
+ this
+ .listItemElement.appendChildren(this.nameElement, separatorElement, this.valueElement);
},
_contextMenuFired: function(value, event) {
var contextMenu = new WebInspector.ContextMenu(event);
@@ -266,10 +248,8 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
if (this.property.value.type === "string" && typeof text === "string")
text = '"' + text + '"';
- this._editableDiv.setTextContentTruncatedIfNeeded(
- text,
- WebInspector.UIString("<string is too large to edit>")
- );
+ this
+ ._editableDiv.setTextContentTruncatedIfNeeded(text, WebInspector.UIString("<string is too large to edit>"));
var originalContent = this._editableDiv.textContent;
this.valueElement.classList.add("hidden");
@@ -287,19 +267,15 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
this.listItemElement
.getComponentSelection()
.setBaseAndExtent(this._editableDiv, 0, this._editableDiv, 1);
- proxyElement.addEventListener(
- "keydown",
- this._promptKeyDown.bind(this, originalContent),
- false
- );
+ proxyElement
+ .addEventListener("keydown", this._promptKeyDown.bind(this, originalContent), false);
},
_editingEnded: function() {
this._prompt.detach();
delete this._prompt;
this._editableDiv.remove();
- this.setExpandable(
- this.property.value.hasChildren && !this.property.wasThrown
- );
+ this
+ .setExpandable(this.property.value.hasChildren && !this.property.wasThrown);
this.listItemElement.scrollLeft = 0;
this.listItemElement.classList.remove("editing-sub-part");
},
@@ -373,7 +349,6 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
this.updateSiblings();
}
}
-
},
/**
* @return {string|undefined}
@@ -480,9 +455,8 @@ WebInspector.ObjectPropertyTreeElement.populateWithProperties = function(
if (property.isAccessorProperty()) {
if (property.name !== "__proto__" && property.getter) {
property.parentObject = value;
- treeNode.appendChild(new WebInspector.ObjectPropertyTreeElement(
- property
- ));
+ treeNode
+ .appendChild(new WebInspector.ObjectPropertyTreeElement(property));
}
if (property.isOwn) {
if (property.getter) {
@@ -491,9 +465,8 @@ WebInspector.ObjectPropertyTreeElement.populateWithProperties = function(
property.getter
);
getterProperty.parentObject = value;
- treeNode.appendChild(new WebInspector.ObjectPropertyTreeElement(
- getterProperty
- ));
+ treeNode
+ .appendChild(new WebInspector.ObjectPropertyTreeElement(getterProperty));
}
if (property.setter) {
var setterProperty = new WebInspector.RemoteObjectProperty(
@@ -501,24 +474,21 @@ WebInspector.ObjectPropertyTreeElement.populateWithProperties = function(
property.setter
);
setterProperty.parentObject = value;
- treeNode.appendChild(new WebInspector.ObjectPropertyTreeElement(
- setterProperty
- ));
+ treeNode
+ .appendChild(new WebInspector.ObjectPropertyTreeElement(setterProperty));
}
}
} else {
property.parentObject = value;
- treeNode.appendChild(new WebInspector.ObjectPropertyTreeElement(
- property
- ));
+ treeNode
+ .appendChild(new WebInspector.ObjectPropertyTreeElement(property));
}
}
if (internalProperties) {
for (var i = 0; i < internalProperties.length; i++) {
internalProperties[i].parentObject = value;
- treeNode.appendChild(new WebInspector.ObjectPropertyTreeElement(
- internalProperties[i]
- ));
+ treeNode
+ .appendChild(new WebInspector.ObjectPropertyTreeElement(internalProperties[i]));
}
}
if (value && value.type === "function") {
@@ -559,10 +529,8 @@ WebInspector.ObjectPropertyTreeElement.populateWithProperties = function(
* @param {!TreeElement} treeNode
* @param {?string=} emptyPlaceholder
*/
-WebInspector.ObjectPropertyTreeElement._appendEmptyPlaceholderIfNeeded = function(
- treeNode,
- emptyPlaceholder
-) {
+WebInspector.ObjectPropertyTreeElement
+ ._appendEmptyPlaceholderIfNeeded = function(treeNode, emptyPlaceholder) {
if (treeNode.childCount()) return;
var title = createElementWithClass("div", "info");
title.textContent = emptyPlaceholder ||
@@ -577,7 +545,8 @@ WebInspector.ObjectPropertyTreeElement._appendEmptyPlaceholderIfNeeded = functio
* @param {function(?WebInspector.RemoteObject, boolean=)} callback
* @return {!Element}
*/
-WebInspector.ObjectPropertyTreeElement.createRemoteObjectAccessorPropertySpan = function(
+WebInspector.ObjectPropertyTreeElement
+ .createRemoteObjectAccessorPropertySpan = function(
object,
propertyPath,
callback
@@ -665,9 +634,8 @@ WebInspector.FunctionScopeMainTreeElement.prototype = {
);
property.writable = false;
property.parentObject = null;
- this.appendChild(new WebInspector.ObjectPropertyTreeElement(
- property
- ));
+ this
+ .appendChild(new WebInspector.ObjectPropertyTreeElement(property));
} else {
var scopeRef = new WebInspector.ScopeRef(
i,
@@ -686,10 +654,8 @@ WebInspector.FunctionScopeMainTreeElement.prototype = {
}
}
- WebInspector.ObjectPropertyTreeElement._appendEmptyPlaceholderIfNeeded(
- this,
- WebInspector.UIString("No Scopes")
- );
+ WebInspector
+ .ObjectPropertyTreeElement._appendEmptyPlaceholderIfNeeded(this, WebInspector.UIString("No Scopes"));
}
this._remoteObject.functionDetails(didGetDetails.bind(this));
@@ -725,20 +691,14 @@ WebInspector.CollectionEntriesMainTreeElement.prototype = {
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (entry.key) {
- entriesLocalObject.push(new WebInspector.MapEntryLocalJSONObject({
- key: runtimeModel.createRemoteObject(entry.key),
- value: runtimeModel.createRemoteObject(entry.value)
- }));
+ entriesLocalObject
+ .push(new WebInspector.MapEntryLocalJSONObject({ key: runtimeModel.createRemoteObject(entry.key), value: runtimeModel.createRemoteObject(entry.value) }));
} else {
entriesLocalObject.push(runtimeModel.createRemoteObject(entry.value));
}
}
- WebInspector.ObjectPropertyTreeElement._populate(
- this,
- WebInspector.RemoteObject.fromLocalObject(entriesLocalObject),
- true,
- WebInspector.UIString("No Entries")
- );
+ WebInspector
+ .ObjectPropertyTreeElement._populate(this, WebInspector.RemoteObject.fromLocalObject(entriesLocalObject), true, WebInspector.UIString("No Entries"));
this.title = "<entries>[" + entriesLocalObject.length + "]";
}
@@ -762,11 +722,8 @@ WebInspector.ScopeTreeElement = function(title, remoteObject) {
WebInspector.ScopeTreeElement.prototype = {
onpopulate: function() {
- WebInspector.ObjectPropertyTreeElement._populate(
- this,
- this._remoteObject,
- false
- );
+ WebInspector
+ .ObjectPropertyTreeElement._populate(this, this._remoteObject, false);
},
__proto__: TreeElement.prototype
};
@@ -845,7 +802,8 @@ WebInspector.ArrayGroupingTreeElement._populateRanges = function(
value: WebInspector.ArrayGroupingTreeElement._sparseIterationThreshold
},
{
- value: WebInspector.ArrayGroupingTreeElement._getOwnPropertyNamesThreshold
+ value: WebInspector.ArrayGroupingTreeElement
+ ._getOwnPropertyNamesThreshold
}
],
callback
@@ -936,12 +894,8 @@ WebInspector.ArrayGroupingTreeElement._populateRanges = function(
if (!result) return;
var ranges /** @type {!Array.<!Array.<number>>} */ = result.ranges;
if (ranges.length == 1) {
- WebInspector.ArrayGroupingTreeElement._populateAsFragment(
- treeNode,
- object,
- ranges[0][0],
- ranges[0][1]
- );
+ WebInspector
+ .ArrayGroupingTreeElement._populateAsFragment(treeNode, object, ranges[0][0], ranges[0][1]);
} else {
for (var i = 0; i < ranges.length; ++i) {
var fromIndex = ranges[i][0];
@@ -1126,12 +1080,8 @@ WebInspector.ArrayGroupingTreeElement.prototype = {
);
return;
}
- WebInspector.ArrayGroupingTreeElement._populateAsFragment(
- this,
- this._object,
- this._fromIndex,
- this._toIndex
- );
+ WebInspector
+ .ArrayGroupingTreeElement._populateAsFragment(this, this._object, this._fromIndex, this._toIndex);
},
onattach: function() {
this.listItemElement.classList.add("name");
@@ -1144,10 +1094,8 @@ WebInspector.ArrayGroupingTreeElement.prototype = {
* @extends {WebInspector.TextPrompt}
*/
WebInspector.ObjectPropertyPrompt = function() {
- WebInspector.TextPrompt.call(
- this,
- WebInspector.ExecutionContextSelector.completionsForTextPromptInCurrentContext
- );
+ WebInspector
+ .TextPrompt.call(this, WebInspector.ExecutionContextSelector.completionsForTextPromptInCurrentContext);
this.setSuggestBoxEnabled(true);
};
@@ -1231,10 +1179,8 @@ WebInspector.ObjectPropertiesSection.createValueElement = function(
valueElement.classList.add("object-value-" + (subtype || type));
if (type === "object" && subtype === "node" && description) {
- WebInspector.DOMPresentationUtils.createSpansForNodeTitle(
- valueElement,
- description
- );
+ WebInspector
+ .DOMPresentationUtils.createSpansForNodeTitle(valueElement, description);
valueElement.addEventListener("mousemove", mouseMove, false);
valueElement.addEventListener("mouseleave", mouseLeave, false);
} else {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/RemoteObjectPreviewFormatter.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/RemoteObjectPreviewFormatter.js
index 0fa5311..967623a 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/RemoteObjectPreviewFormatter.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/RemoteObjectPreviewFormatter.js
@@ -17,9 +17,8 @@ WebInspector.RemoteObjectPreviewFormatter.prototype = {
appendObjectPreview: function(parentElement, preview, object) {
var description = preview.description;
if (preview.type !== "object" || preview.subtype === "null") {
- parentElement.appendChild(
- this.renderPropertyPreview(preview.type, preview.subtype, description)
- );
+ parentElement
+ .appendChild(this.renderPropertyPreview(preview.type, preview.subtype, description));
return true;
}
if (description && preview.subtype !== "array")
@@ -145,10 +144,8 @@ WebInspector.RemoteObjectPreviewFormatter.prototype = {
if (type === "object" && subtype === "node" && description) {
span.classList.add("object-value-preview-node");
- WebInspector.DOMPresentationUtils.createSpansForNodeTitle(
- span,
- description
- );
+ WebInspector
+ .DOMPresentationUtils.createSpansForNodeTitle(span, description);
return span;
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ShortcutsScreen.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ShortcutsScreen.js
index 97b3b58..5b6e76f 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ShortcutsScreen.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ShortcutsScreen.js
@@ -76,12 +76,8 @@ WebInspector.ShortcutsScreen.prototype = {
) orderedSections[i].renderSection(container);
var note = scrollPane.createChild("p", "help-footnote");
- note.appendChild(
- WebInspector.linkifyDocumentationURLAsNode(
- "shortcuts",
- WebInspector.UIString("Full list of keyboard shortcuts and gestures")
- )
- );
+ note
+ .appendChild(WebInspector.linkifyDocumentationURLAsNode("shortcuts", WebInspector.UIString("Full list of keyboard shortcuts and gestures")));
return view;
}
@@ -145,10 +141,8 @@ WebInspector.ShortcutsSection.prototype = {
var headLine = parent.createChild("div", "help-line");
headLine.createChild("div", "help-key-cell");
- headLine.createChild(
- "div",
- "help-section-title help-cell"
- ).textContent = this.name;
+ headLine.createChild("div", "help-section-title help-cell")
+ .textContent = this.name;
for (var i = 0; i < this._lines.length; ++i) {
var line = parent.createChild("div", "help-line");
@@ -214,112 +208,69 @@ WebInspector.ShortcutsScreen.registerShortcuts = function() {
WebInspector.UIString("Elements Panel")
);
- var navigate = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateUp.concat(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown
- );
- elementsSection.addRelatedKeys(
- navigate,
- WebInspector.UIString("Navigate elements")
- );
+ var navigate = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateUp
+ .concat(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown);
+ elementsSection
+ .addRelatedKeys(navigate, WebInspector.UIString("Navigate elements"));
- var expandCollapse = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.Expand.concat(
+ var expandCollapse = WebInspector.ShortcutsScreen.ElementsPanelShortcuts
+ .Expand.concat(
WebInspector.ShortcutsScreen.ElementsPanelShortcuts.Collapse
);
- elementsSection.addRelatedKeys(
- expandCollapse,
- WebInspector.UIString("Expand/collapse")
- );
+ elementsSection
+ .addRelatedKeys(expandCollapse, WebInspector.UIString("Expand/collapse"));
- elementsSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute,
- WebInspector.UIString("Edit attribute")
- );
- elementsSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.HideElement,
- WebInspector.UIString("Hide element")
- );
- elementsSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML,
- WebInspector.UIString("Toggle edit as HTML")
- );
+ elementsSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute, WebInspector.UIString("Edit attribute"));
+ elementsSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.HideElement, WebInspector.UIString("Hide element"));
+ elementsSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML, WebInspector.UIString("Toggle edit as HTML"));
var stylesPaneSection = WebInspector.shortcutsScreen.section(
WebInspector.UIString("Styles Pane")
);
- var nextPreviousProperty = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NextProperty.concat(
+ var nextPreviousProperty = WebInspector.ShortcutsScreen.ElementsPanelShortcuts
+ .NextProperty.concat(
WebInspector.ShortcutsScreen.ElementsPanelShortcuts.PreviousProperty
);
- stylesPaneSection.addRelatedKeys(
- nextPreviousProperty,
- WebInspector.UIString("Next/previous property")
- );
+ stylesPaneSection
+ .addRelatedKeys(nextPreviousProperty, WebInspector.UIString("Next/previous property"));
- stylesPaneSection.addRelatedKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue,
- WebInspector.UIString("Increment value")
- );
- stylesPaneSection.addRelatedKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue,
- WebInspector.UIString("Decrement value")
- );
+ stylesPaneSection
+ .addRelatedKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue, WebInspector.UIString("Increment value"));
+ stylesPaneSection
+ .addRelatedKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue, WebInspector.UIString("Decrement value"));
- stylesPaneSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10,
- WebInspector.UIString("Increment by %f", 10)
- );
- stylesPaneSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10,
- WebInspector.UIString("Decrement by %f", 10)
- );
+ stylesPaneSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10, WebInspector.UIString("Increment by %f", 10));
+ stylesPaneSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10, WebInspector.UIString("Decrement by %f", 10));
- stylesPaneSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100,
- WebInspector.UIString("Increment by %f", 100)
- );
- stylesPaneSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100,
- WebInspector.UIString("Decrement by %f", 100)
- );
+ stylesPaneSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100, WebInspector.UIString("Increment by %f", 100));
+ stylesPaneSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100, WebInspector.UIString("Decrement by %f", 100));
- stylesPaneSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01,
- WebInspector.UIString("Increment by %f", 0.1)
- );
- stylesPaneSection.addAlternateKeys(
- WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01,
- WebInspector.UIString("Decrement by %f", 0.1)
- );
+ stylesPaneSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01, WebInspector.UIString("Increment by %f", 0.1));
+ stylesPaneSection
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01, WebInspector.UIString("Decrement by %f", 0.1));
// Debugger
var section = WebInspector.shortcutsScreen.section(
WebInspector.UIString("Debugger")
);
- section.addAlternateKeys(
- WebInspector.shortcutRegistry.shortcutDescriptorsForAction(
- "debugger.toggle-pause"
- ),
- WebInspector.UIString("Pause/ Continue")
- );
- section.addAlternateKeys(
- WebInspector.shortcutRegistry.shortcutDescriptorsForAction(
- "debugger.step-over"
- ),
- WebInspector.UIString("Step over")
- );
- section.addAlternateKeys(
- WebInspector.shortcutRegistry.shortcutDescriptorsForAction(
- "debugger.step-into"
- ),
- WebInspector.UIString("Step into")
- );
- section.addAlternateKeys(
- WebInspector.shortcutRegistry.shortcutDescriptorsForAction(
- "debugger.step-out"
- ),
- WebInspector.UIString("Step out")
- );
+ section
+ .addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.toggle-pause"), WebInspector.UIString("Pause/ Continue"));
+ section
+ .addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-over"), WebInspector.UIString("Step over"));
+ section
+ .addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-into"), WebInspector.UIString("Step into"));
+ section
+ .addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-out"), WebInspector.UIString("Step out"));
if (Runtime.experiments.isEnabled("stepIntoAsync"))
section.addAlternateKeys(
WebInspector.shortcutRegistry.shortcutDescriptorsForAction(
@@ -328,169 +279,96 @@ WebInspector.ShortcutsScreen.registerShortcuts = function() {
WebInspector.UIString("Step into")
);
- var nextAndPrevFrameKeys = WebInspector.ShortcutsScreen.SourcesPanelShortcuts.NextCallFrame.concat(
+ var nextAndPrevFrameKeys = WebInspector.ShortcutsScreen.SourcesPanelShortcuts
+ .NextCallFrame.concat(
WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame
);
- section.addRelatedKeys(
- nextAndPrevFrameKeys,
- WebInspector.UIString("Next/previous call frame")
- );
+ section
+ .addRelatedKeys(nextAndPrevFrameKeys, WebInspector.UIString("Next/previous call frame"));
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInConsole,
- WebInspector.UIString("Evaluate selection in console")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch,
- WebInspector.UIString("Add selection to watch")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint,
- WebInspector.UIString("Toggle breakpoint")
- );
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInConsole, WebInspector.UIString("Evaluate selection in console"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch, WebInspector.UIString("Add selection to watch"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint, WebInspector.UIString("Toggle breakpoint"));
// Editing
section = WebInspector.shortcutsScreen.section(
WebInspector.UIString("Text Editor")
);
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToMember,
- WebInspector.UIString("Go to member")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleAutocompletion,
- WebInspector.UIString("Autocompletion")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToLine,
- WebInspector.UIString("Go to line")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation,
- WebInspector.UIString("Jump to previous editing location")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation,
- WebInspector.UIString("Jump to next editing location")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment,
- WebInspector.UIString("Toggle comment")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne,
- WebInspector.UIString("Increment CSS unit by 1")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne,
- WebInspector.UIString("Decrement CSS unit by 1")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen,
- WebInspector.UIString("Increment CSS unit by 10")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen,
- WebInspector.UIString("Decrement CSS unit by 10")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.SelectNextOccurrence,
- WebInspector.UIString("Select next occurrence")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.SoftUndo,
- WebInspector.UIString("Soft undo")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GotoMatchingBracket,
- WebInspector.UIString("Go to matching bracket")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab,
- WebInspector.UIString("Close editor tab")
- );
- section.addAlternateKeys(
- WebInspector.shortcutRegistry.shortcutDescriptorsForAction(
- "sources.switch-file"
- ),
- WebInspector.UIString(
- "Switch between files with the same name and different extensions."
- )
- );
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToMember, WebInspector.UIString("Go to member"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleAutocompletion, WebInspector.UIString("Autocompletion"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToLine, WebInspector.UIString("Go to line"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation, WebInspector.UIString("Jump to previous editing location"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation, WebInspector.UIString("Jump to next editing location"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment, WebInspector.UIString("Toggle comment"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne, WebInspector.UIString("Increment CSS unit by 1"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne, WebInspector.UIString("Decrement CSS unit by 1"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen, WebInspector.UIString("Increment CSS unit by 10"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen, WebInspector.UIString("Decrement CSS unit by 10"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.SelectNextOccurrence, WebInspector.UIString("Select next occurrence"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.SoftUndo, WebInspector.UIString("Soft undo"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GotoMatchingBracket, WebInspector.UIString("Go to matching bracket"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab, WebInspector.UIString("Close editor tab"));
+ section
+ .addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("sources.switch-file"), WebInspector.UIString("Switch between files with the same name and different extensions."));
// Timeline panel
section = WebInspector.shortcutsScreen.section(
WebInspector.UIString("Timeline Panel")
);
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.TimelinePanelShortcuts.StartStopRecording,
- WebInspector.UIString("Start/stop recording")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.TimelinePanelShortcuts.SaveToFile,
- WebInspector.UIString("Save timeline data")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.TimelinePanelShortcuts.LoadFromFile,
- WebInspector.UIString("Load timeline data")
- );
- section.addRelatedKeys(
- WebInspector.ShortcutsScreen.TimelinePanelShortcuts.JumpToPreviousFrame.concat(
- WebInspector.ShortcutsScreen.TimelinePanelShortcuts.JumpToNextFrame
- ),
- WebInspector.UIString("Jump to previous/next frame")
- );
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.StartStopRecording, WebInspector.UIString("Start/stop recording"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.SaveToFile, WebInspector.UIString("Save timeline data"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.LoadFromFile, WebInspector.UIString("Load timeline data"));
+ section
+ .addRelatedKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.JumpToPreviousFrame.concat(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.JumpToNextFrame), WebInspector.UIString("Jump to previous/next frame"));
// Profiles panel
section = WebInspector.shortcutsScreen.section(
WebInspector.UIString("Profiles Panel")
);
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.ProfilesPanelShortcuts.StartStopRecording,
- WebInspector.UIString("Start/stop recording")
- );
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.ProfilesPanelShortcuts.StartStopRecording, WebInspector.UIString("Start/stop recording"));
// Layers panel
if (Runtime.experiments.isEnabled("layersPanel")) {
section = WebInspector.shortcutsScreen.section(
WebInspector.UIString("Layers Panel")
);
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.ResetView,
- WebInspector.UIString("Reset view")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.PanMode,
- WebInspector.UIString("Switch to pan mode")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.RotateMode,
- WebInspector.UIString("Switch to rotate mode")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.TogglePanRotate,
- WebInspector.UIString("Temporarily toggle pan/rotate mode while held")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomIn,
- WebInspector.UIString("Zoom in")
- );
- section.addAlternateKeys(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomOut,
- WebInspector.UIString("Zoom out")
- );
- section.addRelatedKeys(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.Up.concat(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.Down
- ),
- WebInspector.UIString("Pan or rotate up/down")
- );
- section.addRelatedKeys(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.Left.concat(
- WebInspector.ShortcutsScreen.LayersPanelShortcuts.Right
- ),
- WebInspector.UIString("Pan or rotate left/right")
- );
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ResetView, WebInspector.UIString("Reset view"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.PanMode, WebInspector.UIString("Switch to pan mode"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.RotateMode, WebInspector.UIString("Switch to rotate mode"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.TogglePanRotate, WebInspector.UIString("Temporarily toggle pan/rotate mode while held"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomIn, WebInspector.UIString("Zoom in"));
+ section
+ .addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomOut, WebInspector.UIString("Zoom out"));
+ section
+ .addRelatedKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.Up.concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.Down), WebInspector.UIString("Pan or rotate up/down"));
+ section
+ .addRelatedKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.Left.concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.Right), WebInspector.UIString("Pan or rotate left/right"));
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsolePanel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsolePanel.js
index 8c3818f..00859b2 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsolePanel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsolePanel.js
@@ -139,9 +139,8 @@ WebInspector.ConsolePanel.ConsoleRevealer.prototype = {
};
WebInspector.ConsolePanel.show = function() {
- WebInspector.inspectorView.setCurrentPanel(
- WebInspector.ConsolePanel._instance()
- );
+ WebInspector
+ .inspectorView.setCurrentPanel(WebInspector.ConsolePanel._instance());
};
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleView.js
index 0e6ae8e..5b57c01 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleView.js
@@ -58,11 +58,8 @@ WebInspector.ConsoleView = function() {
WebInspector.UIString("Clear console log."),
"clear-status-bar-item"
);
- this._clearConsoleButton.addEventListener(
- "click",
- this._requestClearMessages,
- this
- );
+ this
+ ._clearConsoleButton.addEventListener("click", this._requestClearMessages, this);
this._executionContextSelector = new WebInspector.StatusBarComboBox(
this._executionContextChanged.bind(this),
@@ -75,10 +72,8 @@ WebInspector.ConsoleView = function() {
this._optionByExecutionContext = new Map();
this._filter = new WebInspector.ConsoleViewFilter(this);
- this._filter.addEventListener(
- WebInspector.ConsoleViewFilter.Events.FilterChanged,
- this._updateMessageList.bind(this)
- );
+ this
+ ._filter.addEventListener(WebInspector.ConsoleViewFilter.Events.FilterChanged, this._updateMessageList.bind(this));
this._filterBar = new WebInspector.FilterBar();
@@ -103,29 +98,21 @@ WebInspector.ConsoleView = function() {
"console-filters-header hidden"
);
this._filtersContainer.appendChild(this._filterBar.filtersElement());
- this._filterBar.addEventListener(
- WebInspector.FilterBar.Events.FiltersToggled,
- this._onFiltersToggled,
- this
- );
+ this
+ ._filterBar.addEventListener(WebInspector.FilterBar.Events.FiltersToggled, this._onFiltersToggled, this);
this._filterBar.setName("consoleView");
this._filter.addFilters(this._filterBar);
this._viewport = new WebInspector.ViewportControl(this);
this._viewport.setStickToBottom(true);
- this._viewport.contentElement().classList.add(
- "console-group",
- "console-group-messages"
- );
+ this
+ ._viewport.contentElement().classList.add("console-group", "console-group-messages");
this._contentsElement.appendChild(this._viewport.element);
this._messagesElement = this._viewport.element;
this._messagesElement.id = "console-messages";
this._messagesElement.classList.add("monospace");
- this._messagesElement.addEventListener(
- "click",
- this._messagesClicked.bind(this),
- true
- );
+ this
+ ._messagesElement.addEventListener("click", this._messagesClicked.bind(this), true);
this._viewportThrottler = new WebInspector.Throttler(50);
@@ -133,10 +120,8 @@ WebInspector.ConsoleView = function() {
"div",
"console-message"
);
- this._messagesElement.insertBefore(
- this._filterStatusMessageElement,
- this._messagesElement.firstChild
- );
+ this
+ ._messagesElement.insertBefore(this._filterStatusMessageElement, this._messagesElement.firstChild);
this._filterStatusTextElement = this._filterStatusMessageElement.createChild(
"span",
"console-info"
@@ -147,11 +132,8 @@ WebInspector.ConsoleView = function() {
"console-info link"
);
resetFiltersLink.textContent = WebInspector.UIString("Show all messages.");
- resetFiltersLink.addEventListener(
- "click",
- this._filter.reset.bind(this._filter),
- true
- );
+ resetFiltersLink
+ .addEventListener("click", this._filter.reset.bind(this._filter), true);
this._topGroup = WebInspector.ConsoleGroup.createTopGroup();
this._currentGroup = this._topGroup;
@@ -173,11 +155,8 @@ WebInspector.ConsoleView = function() {
WebInspector.UIString("Show all messages")
);
this._showAllMessagesCheckbox.inputElement.checked = true;
- this._showAllMessagesCheckbox.inputElement.addEventListener(
- "change",
- this._updateMessageList.bind(this),
- false
- );
+ this
+ ._showAllMessagesCheckbox.inputElement.addEventListener("change", this._updateMessageList.bind(this), false);
this._showAllMessagesCheckbox.element.classList.add("hidden");
@@ -185,15 +164,10 @@ WebInspector.ConsoleView = function() {
this._registerShortcuts();
- this._messagesElement.addEventListener(
- "contextmenu",
- this._handleContextMenuEvent.bind(this),
- false
- );
- WebInspector.settings.monitoringXHREnabled.addChangeListener(
- this._monitoringXHREnabledSettingChanged,
- this
- );
+ this
+ ._messagesElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), false);
+ WebInspector
+ .settings.monitoringXHREnabled.addChangeListener(this._monitoringXHREnabledSettingChanged, this);
this._linkifier = new WebInspector.Linkifier();
@@ -201,54 +175,36 @@ WebInspector.ConsoleView = function() {
this._consoleMessages = [];
this._prompt = new WebInspector.TextPromptWithHistory(
- WebInspector.ExecutionContextSelector.completionsForTextPromptInCurrentContext
+ WebInspector.ExecutionContextSelector
+ .completionsForTextPromptInCurrentContext
);
this._prompt.setSuggestBoxEnabled(true);
this._prompt.setAutocompletionTimeout(0);
this._prompt.renderAsBlock();
var proxyElement = this._prompt.attach(this._promptElement);
- proxyElement.addEventListener(
- "keydown",
- this._promptKeyDown.bind(this),
- false
- );
+ proxyElement
+ .addEventListener("keydown", this._promptKeyDown.bind(this), false);
this._prompt.setHistoryData(WebInspector.settings.consoleHistory.get());
var historyData = WebInspector.settings.consoleHistory.get();
this._prompt.setHistoryData(historyData);
this._updateFilterStatus();
- WebInspector.settings.consoleTimestampsEnabled.addChangeListener(
- this._consoleTimestampsSettingChanged,
- this
- );
+ WebInspector
+ .settings.consoleTimestampsEnabled.addChangeListener(this._consoleTimestampsSettingChanged, this);
this._registerWithMessageSink();
WebInspector.targetManager.observeTargets(this);
- WebInspector.targetManager.addModelListener(
- WebInspector.RuntimeModel,
- WebInspector.RuntimeModel.Events.ExecutionContextCreated,
- this._onExecutionContextCreated,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.RuntimeModel,
- WebInspector.RuntimeModel.Events.ExecutionContextDestroyed,
- this._onExecutionContextDestroyed,
- this
- );
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.MainFrameNavigated,
- this._onMainFrameNavigated,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.RuntimeModel, WebInspector.RuntimeModel.Events.ExecutionContextCreated, this._onExecutionContextCreated, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.RuntimeModel, WebInspector.RuntimeModel.Events.ExecutionContextDestroyed, this._onExecutionContextDestroyed, this);
+ WebInspector
+ .targetManager.addEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._onMainFrameNavigated, this);
this._initConsoleMessages();
- WebInspector.context.addFlavorChangeListener(
- WebInspector.ExecutionContext,
- this._executionContextChangedExternally,
- this
- );
+ WebInspector
+ .context.addFlavorChangeListener(WebInspector.ExecutionContext, this._executionContextChangedExternally, this);
};
WebInspector.ConsoleView.prototype = {
@@ -263,19 +219,14 @@ WebInspector.ConsoleView.prototype = {
*/
_onMainFrameNavigated: function(event) {
var frame /** @type {!WebInspector.ResourceTreeFrame} */ = event.data;
- WebInspector.console.addMessage(
- WebInspector.UIString("Navigated to %s", frame.url)
- );
+ WebInspector
+ .console.addMessage(WebInspector.UIString("Navigated to %s", frame.url));
},
_initConsoleMessages: function() {
var mainTarget = WebInspector.targetManager.mainTarget();
if (!mainTarget || !mainTarget.resourceTreeModel.cachedResourcesLoaded()) {
- WebInspector.targetManager.addModelListener(
- WebInspector.ResourceTreeModel,
- WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded,
- this._onResourceTreeModelLoaded,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._onResourceTreeModelLoaded, this);
return;
}
this._fetchMultitargetMessages();
@@ -287,30 +238,17 @@ WebInspector.ConsoleView.prototype = {
var resourceTreeModel = event.target;
if (resourceTreeModel.target() !== WebInspector.targetManager.mainTarget())
return;
- WebInspector.targetManager.removeModelListener(
- WebInspector.ResourceTreeModel,
- WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded,
- this._onResourceTreeModelLoaded,
- this
- );
+ WebInspector
+ .targetManager.removeModelListener(WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._onResourceTreeModelLoaded, this);
this._fetchMultitargetMessages();
},
_fetchMultitargetMessages: function() {
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.ConsoleCleared,
- this._consoleCleared,
- this
- );
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.MessageAdded,
- this._onConsoleMessageAdded,
- this
- );
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.CommandEvaluated,
- this._commandEvaluated,
- this
- );
+ WebInspector
+ .multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
+ WebInspector
+ .multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._onConsoleMessageAdded, this);
+ WebInspector
+ .multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.CommandEvaluated, this._commandEvaluated, this);
WebInspector.multitargetConsoleModel
.messages()
.forEach(this._addConsoleMessage, this);
@@ -369,20 +307,16 @@ WebInspector.ConsoleView.prototype = {
},
_registerWithMessageSink: function() {
WebInspector.console.messages().forEach(this._addSinkMessage, this);
- WebInspector.console.addEventListener(
- WebInspector.Console.Events.MessageAdded,
- messageAdded,
- this
- );
+ WebInspector
+ .console.addEventListener(WebInspector.Console.Events.MessageAdded, messageAdded, this);
/**
* @param {!WebInspector.Event} event
* @this {WebInspector.ConsoleView}
*/
function messageAdded(event) {
- this._addSinkMessage /** @type {!WebInspector.Console.Message} */(
- event.data
- );
+ this
+ ._addSinkMessage /** @type {!WebInspector.Console.Message} */(event.data);
}
},
/**
@@ -468,7 +402,8 @@ WebInspector.ConsoleView.prototype = {
* @param {!WebInspector.Event} event
*/
_onExecutionContextCreated: function(event) {
- var executionContext /** @type {!WebInspector.ExecutionContext} */ = event.data;
+ var executionContext /** @type {!WebInspector.ExecutionContext} */ = event
+ .data;
this._executionContextCreated(executionContext);
},
/**
@@ -512,7 +447,8 @@ WebInspector.ConsoleView.prototype = {
* @param {!WebInspector.Event} event
*/
_onExecutionContextDestroyed: function(event) {
- var executionContext /** @type {!WebInspector.ExecutionContext} */ = event.data;
+ var executionContext /** @type {!WebInspector.ExecutionContext} */ = event
+ .data;
this._executionContextDestroyed(executionContext);
},
/**
@@ -542,7 +478,8 @@ WebInspector.ConsoleView.prototype = {
* @param {!WebInspector.Event} event
*/
_executionContextChangedExternally: function(event) {
- var executionContext /** @type {?WebInspector.ExecutionContext} */ = event.data;
+ var executionContext /** @type {?WebInspector.ExecutionContext} */ = event
+ .data;
if (!executionContext) return;
var options = this._executionContextSelector.selectElement().options;
@@ -632,10 +569,8 @@ WebInspector.ConsoleView.prototype = {
* @return {number}
*/
function compareTimestamps(viewMessage1, viewMessage2) {
- return WebInspector.ConsoleMessage.timestampComparator(
- viewMessage1.consoleMessage(),
- viewMessage2.consoleMessage()
- );
+ return WebInspector
+ .ConsoleMessage.timestampComparator(viewMessage1.consoleMessage(), viewMessage2.consoleMessage());
}
if (
@@ -784,15 +719,11 @@ WebInspector.ConsoleView.prototype = {
}
function monitoringXHRItemAction() {
- WebInspector.settings.monitoringXHREnabled.set(
- !WebInspector.settings.monitoringXHREnabled.get()
- );
+ WebInspector
+ .settings.monitoringXHREnabled.set(!WebInspector.settings.monitoringXHREnabled.get());
}
- contextMenu.appendCheckboxItem(
- WebInspector.UIString("Log XMLHttpRequests"),
- monitoringXHRItemAction,
- WebInspector.settings.monitoringXHREnabled.get()
- );
+ contextMenu
+ .appendCheckboxItem(WebInspector.UIString("Log XMLHttpRequests"), monitoringXHRItemAction, WebInspector.settings.monitoringXHREnabled.get());
var sourceElement = event.target.enclosingNodeOrSelfWithClass(
"console-message-wrapper"
@@ -810,10 +741,8 @@ WebInspector.ConsoleView.prototype = {
"Hide ^messages from %s",
new WebInspector.ParsedURL(consoleMessage.url).displayName
);
- filterSubMenu.appendItem(
- menuTitle,
- this._filter.addMessageURLFilter.bind(this._filter, consoleMessage.url)
- );
+ filterSubMenu
+ .appendItem(menuTitle, this._filter.addMessageURLFilter.bind(this._filter, consoleMessage.url));
}
filterSubMenu.appendSeparator();
@@ -826,40 +755,26 @@ WebInspector.ConsoleView.prototype = {
var hasFilters = false;
for (var url in this._filter.messageURLFilters) {
- filterSubMenu.appendCheckboxItem(
- String.sprintf(
- "%s (%d)",
- new WebInspector.ParsedURL(url).displayName,
- this._urlToMessageCount[url]
- ),
- this._filter.removeMessageURLFilter.bind(this._filter, url),
- true
- );
+ filterSubMenu
+ .appendCheckboxItem(String.sprintf("%s (%d)", new WebInspector.ParsedURL(url).displayName, this._urlToMessageCount[url]), this._filter.removeMessageURLFilter.bind(this._filter, url), true);
hasFilters = true;
}
- filterSubMenu.setEnabled(
- hasFilters || consoleMessage && consoleMessage.url
- );
+ filterSubMenu
+ .setEnabled(hasFilters || consoleMessage && consoleMessage.url);
unhideAll.setEnabled(hasFilters);
contextMenu.appendSeparator();
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Clear ^console"),
- this._requestClearMessages.bind(this)
- );
- contextMenu.appendItem(
- WebInspector.UIString("Save as..."),
- this._saveConsole.bind(this)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Clear ^console"), this._requestClearMessages.bind(this));
+ contextMenu
+ .appendItem(WebInspector.UIString("Save as..."), this._saveConsole.bind(this));
var request = consoleMessage ? consoleMessage.request : null;
if (request && request.resourceType() === WebInspector.resourceTypes.XHR) {
contextMenu.appendSeparator();
- contextMenu.appendItem(
- WebInspector.UIString("Replay XHR"),
- request.replayXHR.bind(request)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString("Replay XHR"), request.replayXHR.bind(request));
}
contextMenu.show();
@@ -888,9 +803,8 @@ WebInspector.ConsoleView.prototype = {
*/
function openCallback(accepted) {
if (!accepted) return;
- this._progressStatusBarItem.element.appendChild(
- progressIndicator.element
- );
+ this
+ ._progressStatusBarItem.element.appendChild(progressIndicator.element);
writeNextChunk.call(this, stream);
}
@@ -1006,24 +920,18 @@ WebInspector.ConsoleView.prototype = {
}
section.addAlternateKeys(keys, WebInspector.UIString("Clear console"));
- section.addKey(
- shortcut.makeDescriptor(shortcut.Keys.Tab),
- WebInspector.UIString("Autocomplete common prefix")
- );
- section.addKey(
- shortcut.makeDescriptor(shortcut.Keys.Right),
- WebInspector.UIString("Accept suggestion")
- );
+ section
+ .addKey(shortcut.makeDescriptor(shortcut.Keys.Tab), WebInspector.UIString("Autocomplete common prefix"));
+ section
+ .addKey(shortcut.makeDescriptor(shortcut.Keys.Right), WebInspector.UIString("Accept suggestion"));
var shortcutU = shortcut.makeDescriptor(
"u",
WebInspector.KeyboardShortcut.Modifiers.Ctrl
);
this._shortcuts[shortcutU.key] = this._clearPromptBackwards.bind(this);
- section.addAlternateKeys(
- [ shortcutU ],
- WebInspector.UIString("Clear console prompt")
- );
+ section
+ .addAlternateKeys([ shortcutU ], WebInspector.UIString("Clear console prompt"));
keys = [
shortcut.makeDescriptor(shortcut.Keys.Down),
@@ -1036,16 +944,12 @@ WebInspector.ConsoleView.prototype = {
shortcut.makeDescriptor("N", shortcut.Modifiers.Alt),
shortcut.makeDescriptor("P", shortcut.Modifiers.Alt)
];
- section.addRelatedKeys(
- keys,
- WebInspector.UIString("Next/previous command")
- );
+ section
+ .addRelatedKeys(keys, WebInspector.UIString("Next/previous command"));
}
- section.addKey(
- shortcut.makeDescriptor(shortcut.Keys.Enter),
- WebInspector.UIString("Execute command")
- );
+ section
+ .addKey(shortcut.makeDescriptor(shortcut.Keys.Enter), WebInspector.UIString("Execute command"));
},
_clearPromptBackwards: function() {
this._prompt.setText("");
@@ -1154,17 +1058,13 @@ WebInspector.ConsoleView.prototype = {
* @param {!WebInspector.Event} event
*/
_commandEvaluated: function(event) {
- var data /**{{result: ?WebInspector.RemoteObject, wasThrown: boolean, text: string, commandMessage: !WebInspector.ConsoleMessage}} */ = event.data;
+ var data /**{{result: ?WebInspector.RemoteObject, wasThrown: boolean, text: string, commandMessage: !WebInspector.ConsoleMessage}} */ = event
+ .data;
this._prompt.pushHistoryItem(data.text);
- WebInspector.settings.consoleHistory.set(
- this._prompt.historyData().slice(-30)
- );
- this._printResult(
- data.result,
- data.wasThrown,
- data.commandMessage,
- data.exceptionDetails
- );
+ WebInspector
+ .settings.consoleHistory.set(this._prompt.historyData().slice(-30));
+ this
+ ._printResult(data.result, data.wasThrown, data.commandMessage, data.exceptionDetails);
},
/**
* @override
@@ -1219,10 +1119,8 @@ WebInspector.ConsoleView.prototype = {
var sourceRanges = [];
while ((match = this._searchRegex.exec(text)) && match[0]) {
matchRanges.push({ messageIndex: index, highlightNode: null });
- sourceRanges.push(new WebInspector.SourceRange(
- match.index,
- match[0].length
- ));
+ sourceRanges
+ .push(new WebInspector.SourceRange(match.index, match[0].length));
}
var matchRange;
@@ -1317,11 +1215,8 @@ WebInspector.ConsoleViewFilter.Events = { FilterChanged: "FilterChanged" };
WebInspector.ConsoleViewFilter.prototype = {
addFilters: function(filterBar) {
this._textFilterUI = new WebInspector.TextFilterUI(true);
- this._textFilterUI.addEventListener(
- WebInspector.FilterUI.Events.FilterChanged,
- this._textFilterChanged,
- this
- );
+ this
+ ._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._textFilterChanged, this);
filterBar.addFilter(this._textFilterUI);
var levels = [
@@ -1335,11 +1230,8 @@ WebInspector.ConsoleViewFilter.prototype = {
levels,
WebInspector.settings.messageLevelFilters
);
- this._levelFilterUI.addEventListener(
- WebInspector.FilterUI.Events.FilterChanged,
- this._filterChanged,
- this
- );
+ this
+ ._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._filterChanged, this);
filterBar.addFilter(this._levelFilterUI);
this._hideNetworkMessagesCheckbox = new WebInspector.CheckboxFilterUI(
"hide-network-messages",
@@ -1347,11 +1239,8 @@ WebInspector.ConsoleViewFilter.prototype = {
true,
WebInspector.settings.hideNetworkMessages
);
- this._hideNetworkMessagesCheckbox.addEventListener(
- WebInspector.FilterUI.Events.FilterChanged,
- this._filterChanged.bind(this),
- this
- );
+ this
+ ._hideNetworkMessagesCheckbox.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._filterChanged.bind(this), this);
filterBar.addFilter(this._hideNetworkMessagesCheckbox);
},
_textFilterChanged: function(event) {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleViewMessage.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleViewMessage.js
index d36fc23..b0babe5 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleViewMessage.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleViewMessage.js
@@ -130,9 +130,8 @@ WebInspector.ConsoleViewMessage.prototype = {
},
_formatMessage: function() {
this._formattedMessage = createElement("span");
- this._formattedMessage.appendChild(
- WebInspector.View.createStyleElement("components/objectValue.css")
- );
+ this
+ ._formattedMessage.appendChild(WebInspector.View.createStyleElement("components/objectValue.css"));
this._formattedMessage.className = "console-message-text source-code";
/**
@@ -141,11 +140,8 @@ WebInspector.ConsoleViewMessage.prototype = {
* @this {WebInspector.ConsoleMessage}
*/
function linkifyRequest(title) {
- return WebInspector.Linkifier.linkifyUsingRevealer /** @type {!WebInspector.NetworkRequest} */(
- this.request,
- title,
- this.request.url
- );
+ return WebInspector
+ .Linkifier.linkifyUsingRevealer /** @type {!WebInspector.NetworkRequest} */(this.request, title, this.request.url);
}
var consoleMessage = this._message;
@@ -189,7 +185,8 @@ WebInspector.ConsoleViewMessage.prototype = {
consoleMessage.parameters.length === 1 &&
consoleMessage.parameters[0].type === "string"
)
- this._messageElement = this._tryFormatAsError /**@type {string} */(
+ this._messageElement = this
+ ._tryFormatAsError /**@type {string} */(
consoleMessage.parameters[0].value
);
@@ -232,7 +229,8 @@ WebInspector.ConsoleViewMessage.prototype = {
")"
);
} else {
- var fragment = WebInspector.linkifyStringAsFragmentWithCustomLinkifier(
+ var fragment = WebInspector
+ .linkifyStringAsFragmentWithCustomLinkifier(
consoleMessage.messageText,
linkifyRequest.bind(consoleMessage)
);
@@ -273,7 +271,8 @@ WebInspector.ConsoleViewMessage.prototype = {
} else {
var showBlackboxed = consoleMessage.source !==
WebInspector.ConsoleMessage.MessageSource.ConsoleAPI;
- var callFrame = WebInspector.DebuggerPresentationUtils.callFrameAnchorFromStackTrace(
+ var callFrame = WebInspector.DebuggerPresentationUtils
+ .callFrameAnchorFromStackTrace(
this._target(),
consoleMessage.stackTrace,
consoleMessage.asyncStackTrace,
@@ -294,10 +293,8 @@ WebInspector.ConsoleViewMessage.prototype = {
if (this._anchorElement) {
// Append a space to prevent the anchor text from being glued to the console message when the user selects and copies the console messages.
this._anchorElement.appendChild(createTextNode(" "));
- this._formattedMessage.insertBefore(
- this._anchorElement,
- this._formattedMessage.firstChild
- );
+ this
+ ._formattedMessage.insertBefore(this._anchorElement, this._formattedMessage.firstChild);
}
var dumpStackTrace = !!consoleMessage.stackTrace &&
@@ -309,10 +306,8 @@ WebInspector.ConsoleViewMessage.prototype = {
consoleMessage.type === WebInspector.ConsoleMessage.MessageType.Trace);
if (dumpStackTrace) {
var treeOutline = new TreeOutline();
- treeOutline.element.classList.add(
- "outline-disclosure",
- "outline-disclosure-no-padding"
- );
+ treeOutline
+ .element.classList.add("outline-disclosure", "outline-disclosure-no-padding");
var content = this._formattedMessage;
var root = new TreeElement(content);
root.toggleOnClick = true;
@@ -440,9 +435,8 @@ WebInspector.ConsoleViewMessage.prototype = {
if (typeof parameters[i] === "object")
parameters[i] = target.runtimeModel.createRemoteObject(parameters[i]);
else
- parameters[i] = target.runtimeModel.createRemoteObjectFromPrimitiveValue(
- parameters[i]
- );
+ parameters[i] = target.runtimeModel
+ .createRemoteObjectFromPrimitiveValue(parameters[i]);
}
// There can be string log and string eval result. We distinguish between them based on message type.
@@ -540,11 +534,8 @@ WebInspector.ConsoleViewMessage.prototype = {
);
if (lossless) {
elem.appendChild(titleElement);
- titleElement.addEventListener(
- "contextmenu",
- this._contextMenuEventFired.bind(this, obj),
- false
- );
+ titleElement
+ .addEventListener("contextmenu", this._contextMenuEventFired.bind(this, obj), false);
return;
}
} else {
@@ -838,7 +829,8 @@ WebInspector.ConsoleViewMessage.prototype = {
* @return {!Element}
*/
_formatAsAccessorProperty: function(object, propertyPath, isArrayEntry) {
- var rootElement = WebInspector.ObjectPropertyTreeElement.createRemoteObjectAccessorPropertySpan(
+ var rootElement = WebInspector.ObjectPropertyTreeElement
+ .createRemoteObjectAccessorPropertySpan(
object,
propertyPath,
onInvokeGetterClick.bind(this)
@@ -870,13 +862,8 @@ WebInspector.ConsoleViewMessage.prototype = {
else
description = result.description.trimEnd(maxLength);
}
- rootElement.appendChild(
- this._previewFormatter.renderPropertyPreview(
- type,
- subtype,
- description
- )
- );
+ rootElement
+ .appendChild(this._previewFormatter.renderPropertyPreview(type, subtype, description));
}
}
@@ -1019,16 +1006,13 @@ WebInspector.ConsoleViewMessage.prototype = {
"span",
"console-timestamp"
);
- this.timestampElement.textContent = new Date(
- this._message.timestamp
- ).toConsoleTime() +
+ this.timestampElement.textContent = new Date(this._message.timestamp)
+ .toConsoleTime() +
" ";
var afterRepeatCountChild = this._repeatCountElement &&
this._repeatCountElement.nextSibling;
- this._formattedMessage.insertBefore(
- this.timestampElement,
- this._formattedMessage.firstChild
- );
+ this
+ ._formattedMessage.insertBefore(this.timestampElement, this._formattedMessage.firstChild);
return;
}
@@ -1056,10 +1040,8 @@ WebInspector.ConsoleViewMessage.prototype = {
if (!this._nestingLevelMarkers) return;
for (var i = 0, n = this._nestingLevelMarkers.length; i < n; ++i) {
var marker = this._nestingLevelMarkers[i];
- marker.classList.toggle(
- "group-closed",
- n - i <= this._closeGroupDecorationCount
- );
+ marker
+ .classList.toggle("group-closed", n - i <= this._closeGroupDecorationCount);
}
},
/**
@@ -1133,7 +1115,8 @@ WebInspector.ConsoleViewMessage.prototype = {
_populateStackTraceTreeElement: function(parentTreeElement) {
var target = this._target();
if (!target) return;
- var content = WebInspector.DOMPresentationUtils.buildStackTracePreviewContents(
+ var content = WebInspector.DOMPresentationUtils
+ .buildStackTracePreviewContents(
target,
this._linkifier,
this._message.stackTrace,
@@ -1161,10 +1144,8 @@ WebInspector.ConsoleViewMessage.prototype = {
this._repeatCountElement = createElement("span");
this._repeatCountElement.className = "bubble-repeat-count";
- this._element.insertBefore(
- this._repeatCountElement,
- this._element.firstChild
- );
+ this
+ ._element.insertBefore(this._repeatCountElement, this._element.firstChild);
this._element.classList.add("repeated-message");
}
this._repeatCountElement.textContent = this._repeatCount;
@@ -1353,13 +1334,8 @@ WebInspector.ConsoleViewMessage.prototype = {
else if (splitResult.url === "<anonymous>") continue;
else return null;
- links.push({
- url: url,
- positionLeft: position + left,
- positionRight: position + right,
- lineNumber: splitResult.lineNumber,
- columnNumber: splitResult.columnNumber
- });
+ links
+ .push({ url: url, positionLeft: position + left, positionRight: position + right, lineNumber: splitResult.lineNumber, columnNumber: splitResult.columnNumber });
}
if (!links.length) return null;
@@ -1367,20 +1343,10 @@ WebInspector.ConsoleViewMessage.prototype = {
var formattedResult = createElement("span");
var start = 0;
for (var i = 0; i < links.length; ++i) {
- formattedResult.appendChild(
- WebInspector.linkifyStringAsFragment(
- string.substring(start, links[i].positionLeft)
- )
- );
- formattedResult.appendChild(
- this._linkifier.linkifyScriptLocation(
- target,
- null,
- links[i].url,
- links[i].lineNumber,
- links[i].columnNumber
- )
- );
+ formattedResult
+ .appendChild(WebInspector.linkifyStringAsFragment(string.substring(start, links[i].positionLeft)));
+ formattedResult
+ .appendChild(this._linkifier.linkifyScriptLocation(target, null, links[i].url, links[i].lineNumber, links[i].columnNumber));
start = links[i].positionRight;
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/CustomPreviewSection.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/CustomPreviewSection.js
index 8fc855f..ee292d1 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/CustomPreviewSection.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/CustomPreviewSection.js
@@ -15,11 +15,8 @@ WebInspector.CustomPreviewSection = function(object, prefixML) {
var customPreview = object.customPreview();
if (customPreview.hasBody) {
this._sectionElement.classList.add("custom-expandable-section");
- this._sectionElement.addEventListener(
- "click",
- this._onClick.bind(this),
- false
- );
+ this
+ ._sectionElement.addEventListener("click", this._onClick.bind(this), false);
}
if (prefixML) this._appendJsonMLTags(this._sectionElement, prefixML);
@@ -91,15 +88,13 @@ WebInspector.CustomPreviewSection.prototype = {
var key = pair[0].trim();
var value = pair[1];
if (!WebInspector.CustomPreviewSection._attributesWhiteList.has(key)) {
- WebInspector.console.error(
- "Broken formatter: style attribute " + key + " is not allowed!"
- );
+ WebInspector
+ .console.error("Broken formatter: style attribute " + key + " is not allowed!");
return false;
}
if (!value.match(valueRegEx)) {
- WebInspector.console.error(
- "Broken formatter: style attribute value" + value + " is not allowed!"
- );
+ WebInspector
+ .console.error("Broken formatter: style attribute value" + value + " is not allowed!");
return false;
}
}
@@ -124,9 +119,8 @@ WebInspector.CustomPreviewSection.prototype = {
_renderElement: function(object) {
var tagName = object.shift();
if (!WebInspector.CustomPreviewSection._tagsWhiteList.has(tagName)) {
- WebInspector.console.error(
- "Broken formatter: element " + tagName + " is not allowed!"
- );
+ WebInspector
+ .console.error("Broken formatter: element " + tagName + " is not allowed!");
return createElement("span");
}
var element = createElement /** @type {string} */(tagName);
@@ -154,9 +148,8 @@ WebInspector.CustomPreviewSection.prototype = {
_layoutObjectTag: function(objectTag) {
objectTag.shift();
var attributes = objectTag.shift();
- var remoteObject = this._object.target().runtimeModel.createRemoteObject /** @type {!RuntimeAgent.RemoteObject} */(
- attributes
- );
+ var remoteObject = this._object.target().runtimeModel
+ .createRemoteObject /** @type {!RuntimeAgent.RemoteObject} */(attributes);
if (!remoteObject.customPreview()) {
var header = createElement("span");
this._appendJsonMLTags(header, objectTag);
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionAPI.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionAPI.js
index 216af91..fd25fe8 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionAPI.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionAPI.js
@@ -126,10 +126,8 @@ function injectedExtensionAPI(injectedScriptId) {
type: this._type
});
this._listeners.push(callback);
- extensionServer.registerHandler(
- "notify-" + this._type,
- this._dispatch.bind(this)
- );
+ extensionServer
+ .registerHandler("notify-" + this._type, this._dispatch.bind(this));
},
removeListener: function(callback) {
var listeners = this._listeners;
@@ -209,17 +207,12 @@ function injectedExtensionAPI(injectedScriptId) {
}
callback(result);
}
- extensionServer.sendRequest(
- { command: commands.GetHAR },
- callback && callbackWrapper
- );
+ extensionServer
+ .sendRequest({ command: commands.GetHAR }, callback && callbackWrapper);
},
addRequestHeaders: function(headers) {
- extensionServer.sendRequest({
- command: commands.AddRequestHeaders,
- headers: headers,
- extensionId: window.location.hostname
- });
+ extensionServer
+ .sendRequest({ command: commands.AddRequestHeaders, headers: headers, extensionId: window.location.hostname });
}
};
@@ -235,10 +228,8 @@ function injectedExtensionAPI(injectedScriptId) {
function callbackWrapper(response) {
callback(response.content, response.encoding);
}
- extensionServer.sendRequest(
- { command: commands.GetRequestContent, id: this._id },
- callback && callbackWrapper
- );
+ extensionServer
+ .sendRequest({ command: commands.GetRequestContent, id: this._id }, callback && callbackWrapper);
}
};
@@ -254,10 +245,8 @@ function injectedExtensionAPI(injectedScriptId) {
for (var panel in panels)
this.__defineGetter__(panel, panelGetter.bind(null, panel));
this.applyStyleSheet = function(styleSheet) {
- extensionServer.sendRequest({
- command: commands.ApplyStyleSheet,
- styleSheet: styleSheet
- });
+ extensionServer
+ .sendRequest({ command: commands.ApplyStyleSheet, styleSheet: styleSheet });
};
}
@@ -271,10 +260,8 @@ function injectedExtensionAPI(injectedScriptId) {
icon: icon,
page: page
};
- extensionServer.sendRequest(
- request,
- callback && callback.bind(this, new ExtensionPanel(id))
- );
+ extensionServer
+ .sendRequest(request, callback && callback.bind(this, new ExtensionPanel(id)));
},
setOpenResourceHandler: function(callback) {
var hadHandler = extensionServer.hasHandler(events.OpenResource);
@@ -283,21 +270,16 @@ function injectedExtensionAPI(injectedScriptId) {
// Allow the panel to show itself when handling the event.
userAction = true;
try {
- callback.call(
- null,
- new Resource(message.resource),
- message.lineNumber
- );
+ callback
+ .call(null, new Resource(message.resource), message.lineNumber);
} finally {
userAction = false;
}
}
if (!callback) extensionServer.unregisterHandler(events.OpenResource);
- else extensionServer.registerHandler(
- events.OpenResource,
- callbackWrapper
- );
+ else extensionServer
+ .registerHandler(events.OpenResource, callbackWrapper);
// Only send command if we either removed an existing handler or added handler and had none before.
if (hadHandler === !callback)
@@ -307,10 +289,8 @@ function injectedExtensionAPI(injectedScriptId) {
});
},
openResource: function(url, lineNumber, callback) {
- extensionServer.sendRequest(
- { command: commands.OpenResource, url: url, lineNumber: lineNumber },
- callback
- );
+ extensionServer
+ .sendRequest({ command: commands.OpenResource, url: url, lineNumber: lineNumber }, callback);
},
get SearchAction() {
return apiPrivate.panels.SearchAction;
@@ -382,11 +362,8 @@ function injectedExtensionAPI(injectedScriptId) {
var warningGiven = false;
function getter() {
if (!warningGiven) {
- console.warn(
- className + "." + oldName + " is deprecated. Use " + className + "." +
- newName +
- " instead"
- );
+ console
+ .warn(className + "." + oldName + " is deprecated. Use " + className + "." + newName + " instead");
warningGiven = true;
}
return object[newName];
@@ -474,11 +451,8 @@ function injectedExtensionAPI(injectedScriptId) {
ExtensionSidebarPaneImpl.prototype = {
setHeight: function(height) {
- extensionServer.sendRequest({
- command: commands.SetSidebarHeight,
- id: this._id,
- height: height
- });
+ extensionServer
+ .sendRequest({ command: commands.SetSidebarHeight, id: this._id, height: height });
},
setExpression: function(expression, rootTitle, evaluateOptions) {
var request = {
@@ -493,22 +467,12 @@ function injectedExtensionAPI(injectedScriptId) {
extensionServer.sendRequest(request, extractCallbackArgument(arguments));
},
setObject: function(jsonObject, rootTitle, callback) {
- extensionServer.sendRequest(
- {
- command: commands.SetSidebarContent,
- id: this._id,
- expression: jsonObject,
- rootTitle: rootTitle
- },
- callback
- );
+ extensionServer
+ .sendRequest({ command: commands.SetSidebarContent, id: this._id, expression: jsonObject, rootTitle: rootTitle }, callback);
},
setPage: function(page) {
- extensionServer.sendRequest({
- command: commands.SetSidebarPage,
- id: this._id,
- page: page
- });
+ extensionServer
+ .sendRequest({ command: commands.SetSidebarPage, id: this._id, page: page });
},
__proto__: ExtensionViewImpl.prototype
};
@@ -549,12 +513,8 @@ function injectedExtensionAPI(injectedScriptId) {
console.warn(
"Passing resultCount to audits.addCategory() is deprecated. Use AuditResult.updateProgress() instead."
);
- extensionServer.sendRequest({
- command: commands.AddAuditCategory,
- id: id,
- displayName: displayName,
- resultCount: resultCount
- });
+ extensionServer
+ .sendRequest({ command: commands.AddAuditCategory, id: id, displayName: displayName, resultCount: resultCount });
return new AuditCategory(id);
}
};
@@ -622,17 +582,12 @@ function injectedExtensionAPI(injectedScriptId) {
return new AuditResultNode(Array.prototype.slice.call(arguments));
},
updateProgress: function(worked, totalWork) {
- extensionServer.sendRequest({
- command: commands.UpdateAuditProgress,
- resultId: this._id,
- progress: worked / totalWork
- });
+ extensionServer
+ .sendRequest({ command: commands.UpdateAuditProgress, resultId: this._id, progress: worked / totalWork });
},
done: function() {
- extensionServer.sendRequest({
- command: commands.StopAuditCategoryRun,
- resultId: this._id
- });
+ extensionServer
+ .sendRequest({ command: commands.StopAuditCategoryRun, resultId: this._id });
},
/**
* @type {!Object.<string, string>}
@@ -715,15 +670,11 @@ function injectedExtensionAPI(injectedScriptId) {
options = optionsOrUserAgent;
} else if (typeof optionsOrUserAgent === "string") {
options = { userAgent: optionsOrUserAgent };
- console.warn(
- "Passing userAgent as string parameter to inspectedWindow.reload() is deprecated. " +
- "Use inspectedWindow.reload({ userAgent: value}) instead."
- );
+ console
+ .warn("Passing userAgent as string parameter to inspectedWindow.reload() is deprecated. " + "Use inspectedWindow.reload({ userAgent: value}) instead.");
}
- extensionServer.sendRequest({
- command: commands.Reload,
- options: options
- });
+ extensionServer
+ .sendRequest({ command: commands.Reload, options: options });
},
/**
* @return {?Object}
@@ -750,10 +701,8 @@ function injectedExtensionAPI(injectedScriptId) {
function callbackWrapper(resources) {
callback(resources.map(wrapResource));
}
- extensionServer.sendRequest(
- { command: commands.GetPageResources },
- callback && callbackWrapper
- );
+ extensionServer
+ .sendRequest({ command: commands.GetPageResources }, callback && callbackWrapper);
}
};
@@ -777,21 +726,12 @@ function injectedExtensionAPI(injectedScriptId) {
callback(response.content, response.encoding);
}
- extensionServer.sendRequest(
- { command: commands.GetResourceContent, url: this._url },
- callback && callbackWrapper
- );
+ extensionServer
+ .sendRequest({ command: commands.GetResourceContent, url: this._url }, callback && callbackWrapper);
},
setContent: function(content, commit, callback) {
- extensionServer.sendRequest(
- {
- command: commands.SetResourceContent,
- url: this._url,
- content: content,
- commit: commit
- },
- callback
- );
+ extensionServer
+ .sendRequest({ command: commands.SetResourceContent, url: this._url, content: content, commit: commit }, callback);
}
};
@@ -955,13 +895,11 @@ function platformExtensionAPI(coreAPI) {
var properties = Object.getOwnPropertyNames(coreAPI);
for (var i = 0; i < properties.length; ++i) {
var descriptor = Object.getOwnPropertyDescriptor(coreAPI, properties[i]);
- Object.defineProperty(
- chrome.experimental.devtools,
- properties[i],
- descriptor
- );
+ Object
+ .defineProperty(chrome.experimental.devtools, properties[i], descriptor);
}
- chrome.experimental.devtools.inspectedWindow = chrome.devtools.inspectedWindow;
+ chrome.experimental.devtools.inspectedWindow = chrome.devtools
+ .inspectedWindow;
}
if (extensionInfo.exposeWebInspectorNamespace) window.webInspector = coreAPI;
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionPanel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionPanel.js
index a364f92..e5e52b6 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionPanel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionPanel.js
@@ -75,10 +75,8 @@ WebInspector.ExtensionPanel.prototype = {
* @override
*/
searchCanceled: function() {
- this._server.notifySearchAction(
- this.name,
- WebInspector.extensionAPI.panels.SearchAction.CancelSearch
- );
+ this
+ ._server.notifySearchAction(this.name, WebInspector.extensionAPI.panels.SearchAction.CancelSearch);
this._searchableView.updateSearchMatchesCount(0);
},
/**
@@ -106,19 +104,15 @@ WebInspector.ExtensionPanel.prototype = {
* @override
*/
jumpToNextSearchResult: function() {
- this._server.notifySearchAction(
- this.name,
- WebInspector.extensionAPI.panels.SearchAction.NextSearchResult
- );
+ this
+ ._server.notifySearchAction(this.name, WebInspector.extensionAPI.panels.SearchAction.NextSearchResult);
},
/**
* @override
*/
jumpToPreviousSearchResult: function() {
- this._server.notifySearchAction(
- this.name,
- WebInspector.extensionAPI.panels.SearchAction.PreviousSearchResult
- );
+ this
+ ._server.notifySearchAction(this.name, WebInspector.extensionAPI.panels.SearchAction.PreviousSearchResult);
},
/**
* @override
@@ -284,11 +278,8 @@ WebInspector.ExtensionSidebarPane.prototype = {
*/
_onEvaluate: function(title, callback, error, result, wasThrown) {
if (error) callback(error.toString());
- else this._setObject /** @type {!WebInspector.RemoteObject} */(
- result,
- title,
- callback
- );
+ else this
+ ._setObject /** @type {!WebInspector.RemoteObject} */(result, title, callback);
},
_createObjectPropertiesView: function() {
if (this._objectPropertiesView) return;
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionRegistryStub.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionRegistryStub.js
index 0f53543..daa4af1 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionRegistryStub.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionRegistryStub.js
@@ -38,5 +38,6 @@ if (!window.InspectorExtensionRegistry) {
getExtensionsAsync: function() {}
};
- var InspectorExtensionRegistry = new WebInspector.InspectorExtensionRegistryStub();
+ var InspectorExtensionRegistry = new WebInspector
+ .InspectorExtensionRegistryStub();
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionServer.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionServer.js
index f367bd9..a8589b0 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionServer.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionServer.js
@@ -51,98 +51,56 @@ WebInspector.ExtensionServer = function() {
var commands = WebInspector.extensionAPI.Commands;
- this._registerHandler(
- commands.AddAuditCategory,
- this._onAddAuditCategory.bind(this)
- );
- this._registerHandler(
- commands.AddAuditResult,
- this._onAddAuditResult.bind(this)
- );
- this._registerHandler(
- commands.AddRequestHeaders,
- this._onAddRequestHeaders.bind(this)
- );
- this._registerHandler(
- commands.ApplyStyleSheet,
- this._onApplyStyleSheet.bind(this)
- );
+ this
+ ._registerHandler(commands.AddAuditCategory, this._onAddAuditCategory.bind(this));
+ this
+ ._registerHandler(commands.AddAuditResult, this._onAddAuditResult.bind(this));
+ this
+ ._registerHandler(commands.AddRequestHeaders, this._onAddRequestHeaders.bind(this));
+ this
+ ._registerHandler(commands.ApplyStyleSheet, this._onApplyStyleSheet.bind(this));
this._registerHandler(commands.CreatePanel, this._onCreatePanel.bind(this));
- this._registerHandler(
- commands.CreateSidebarPane,
- this._onCreateSidebarPane.bind(this)
- );
- this._registerHandler(
- commands.CreateStatusBarButton,
- this._onCreateStatusBarButton.bind(this)
- );
- this._registerHandler(
- commands.EvaluateOnInspectedPage,
- this._onEvaluateOnInspectedPage.bind(this)
- );
- this._registerHandler(
- commands.ForwardKeyboardEvent,
- this._onForwardKeyboardEvent.bind(this)
- );
+ this
+ ._registerHandler(commands.CreateSidebarPane, this._onCreateSidebarPane.bind(this));
+ this
+ ._registerHandler(commands.CreateStatusBarButton, this._onCreateStatusBarButton.bind(this));
+ this
+ ._registerHandler(commands.EvaluateOnInspectedPage, this._onEvaluateOnInspectedPage.bind(this));
+ this
+ ._registerHandler(commands.ForwardKeyboardEvent, this._onForwardKeyboardEvent.bind(this));
this._registerHandler(commands.GetHAR, this._onGetHAR.bind(this));
- this._registerHandler(
- commands.GetPageResources,
- this._onGetPageResources.bind(this)
- );
- this._registerHandler(
- commands.GetRequestContent,
- this._onGetRequestContent.bind(this)
- );
- this._registerHandler(
- commands.GetResourceContent,
- this._onGetResourceContent.bind(this)
- );
+ this
+ ._registerHandler(commands.GetPageResources, this._onGetPageResources.bind(this));
+ this
+ ._registerHandler(commands.GetRequestContent, this._onGetRequestContent.bind(this));
+ this
+ ._registerHandler(commands.GetResourceContent, this._onGetResourceContent.bind(this));
this._registerHandler(commands.Reload, this._onReload.bind(this));
- this._registerHandler(
- commands.SetOpenResourceHandler,
- this._onSetOpenResourceHandler.bind(this)
- );
- this._registerHandler(
- commands.SetResourceContent,
- this._onSetResourceContent.bind(this)
- );
- this._registerHandler(
- commands.SetSidebarHeight,
- this._onSetSidebarHeight.bind(this)
- );
- this._registerHandler(
- commands.SetSidebarContent,
- this._onSetSidebarContent.bind(this)
- );
- this._registerHandler(
- commands.SetSidebarPage,
- this._onSetSidebarPage.bind(this)
- );
+ this
+ ._registerHandler(commands.SetOpenResourceHandler, this._onSetOpenResourceHandler.bind(this));
+ this
+ ._registerHandler(commands.SetResourceContent, this._onSetResourceContent.bind(this));
+ this
+ ._registerHandler(commands.SetSidebarHeight, this._onSetSidebarHeight.bind(this));
+ this
+ ._registerHandler(commands.SetSidebarContent, this._onSetSidebarContent.bind(this));
+ this
+ ._registerHandler(commands.SetSidebarPage, this._onSetSidebarPage.bind(this));
this._registerHandler(commands.ShowPanel, this._onShowPanel.bind(this));
- this._registerHandler(
- commands.StopAuditCategoryRun,
- this._onStopAuditCategoryRun.bind(this)
- );
+ this
+ ._registerHandler(commands.StopAuditCategoryRun, this._onStopAuditCategoryRun.bind(this));
this._registerHandler(commands.Subscribe, this._onSubscribe.bind(this));
this._registerHandler(commands.OpenResource, this._onOpenResource.bind(this));
this._registerHandler(commands.Unsubscribe, this._onUnsubscribe.bind(this));
this._registerHandler(commands.UpdateButton, this._onUpdateButton.bind(this));
- this._registerHandler(
- commands.UpdateAuditProgress,
- this._onUpdateAuditProgress.bind(this)
- );
+ this
+ ._registerHandler(commands.UpdateAuditProgress, this._onUpdateAuditProgress.bind(this));
window.addEventListener("message", this._onWindowMessage.bind(this), false);
// Only for main window.
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.AddExtensions,
- this._addExtensions,
- this
- );
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.SetInspectedTabId,
- this._setInspectedTabId,
- this
- );
+ InspectorFrontendHost
+ .events.addEventListener(InspectorFrontendHostAPI.Events.AddExtensions, this._addExtensions, this);
+ InspectorFrontendHost
+ .events.addEventListener(InspectorFrontendHostAPI.Events.SetInspectedTabId, this._setInspectedTabId, this);
this._initExtensions();
};
@@ -192,25 +150,21 @@ WebInspector.ExtensionServer.prototype = {
* @param {string} identifier
*/
notifyViewHidden: function(identifier) {
- this._postNotification(
- WebInspector.extensionAPI.Events.ViewHidden + identifier
- );
+ this
+ ._postNotification(WebInspector.extensionAPI.Events.ViewHidden + identifier);
},
/**
* @param {string} identifier
*/
notifyButtonClicked: function(identifier) {
- this._postNotification(
- WebInspector.extensionAPI.Events.ButtonClicked + identifier
- );
+ this
+ ._postNotification(WebInspector.extensionAPI.Events.ButtonClicked + identifier);
},
_inspectedURLChanged: function(event) {
this._requests = {};
var url = event.data;
- this._postNotification(
- WebInspector.extensionAPI.Events.InspectedURLChanged,
- url
- );
+ this
+ ._postNotification(WebInspector.extensionAPI.Events.InspectedURLChanged, url);
},
/**
* @param {string} categoryId
@@ -307,11 +261,9 @@ WebInspector.ExtensionServer.prototype = {
return this._status.E_EXISTS(id);
var page = this._expandResourcePath(port._extensionOrigin, message.page);
- var panelDescriptor = new WebInspector.ExtensionServerPanelDescriptor(
- id,
- message.title,
- new WebInspector.ExtensionPanel(this, id, page)
- );
+ var panelDescriptor = new WebInspector
+ .ExtensionServerPanelDescriptor(id, message.title, new WebInspector
+ .ExtensionPanel(this, id, page));
this._clientObjects[id] = panelDescriptor;
WebInspector.inspectorView.addPanel(panelDescriptor);
return this._status.OK();
@@ -352,11 +304,8 @@ WebInspector.ExtensionServer.prototype = {
var button = this._clientObjects[message.id];
if (!button || !(button instanceof WebInspector.ExtensionButton))
return this._status.E_NOTFOUND(message.id);
- button.update(
- this._expandResourcePath(port._extensionOrigin, message.icon),
- message.tooltip,
- message.disabled
- );
+ button
+ .update(this._expandResourcePath(port._extensionOrigin, message.icon), message.tooltip, message.disabled);
return this._status.OK();
},
_onCreateSidebarPane: function(message) {
@@ -371,10 +320,8 @@ WebInspector.ExtensionServer.prototype = {
);
this._sidebarPanes.push(sidebar);
this._clientObjects[id] = sidebar;
- this.dispatchEventToListeners(
- WebInspector.ExtensionServer.Events.SidebarPaneAdded,
- sidebar
- );
+ this
+ .dispatchEventToListeners(WebInspector.ExtensionServer.Events.SidebarPaneAdded, sidebar);
return this._status.OK();
},
@@ -409,27 +356,21 @@ WebInspector.ExtensionServer.prototype = {
port._extensionOrigin,
callback.bind(this)
);
- sidebar.setObject(
- message.expression,
- message.rootTitle,
- callback.bind(this)
- );
+ sidebar
+ .setObject(message.expression, message.rootTitle, callback.bind(this));
},
_onSetSidebarPage: function(message, port) {
var sidebar = this._clientObjects[message.id];
if (!sidebar) return this._status.E_NOTFOUND(message.id);
- sidebar.setPage(
- this._expandResourcePath(port._extensionOrigin, message.page)
- );
+ sidebar
+ .setPage(this._expandResourcePath(port._extensionOrigin, message.page));
},
_onOpenResource: function(message) {
- var uiSourceCode = WebInspector.networkMapping.uiSourceCodeForURLForAnyTarget(
- message.url
- );
+ var uiSourceCode = WebInspector.networkMapping
+ .uiSourceCodeForURLForAnyTarget(message.url);
if (uiSourceCode) {
- WebInspector.Revealer.reveal(
- uiSourceCode.uiLocation(message.lineNumber, 0)
- );
+ WebInspector
+ .Revealer.reveal(uiSourceCode.uiLocation(message.lineNumber, 0));
return this._status.OK();
}
@@ -468,19 +409,15 @@ WebInspector.ExtensionServer.prototype = {
var lineNumber = details.lineNumber;
if (typeof lineNumber === "number") lineNumber += 1;
- port.postMessage({
- command: "open-resource",
- resource: this._makeResource(contentProvider),
- lineNumber: lineNumber
- });
+ port
+ .postMessage({ command: "open-resource", resource: this._makeResource(contentProvider), lineNumber: lineNumber });
return true;
},
_onReload: function(message) {
var options /** @type {!ExtensionReloadOptions} */ = message.options || {};
- WebInspector.multitargetNetworkManager.setUserAgentOverride(
- typeof options.userAgent === "string" ? options.userAgent : ""
- );
+ WebInspector
+ .multitargetNetworkManager.setUserAgentOverride(typeof options.userAgent === "string" ? options.userAgent : "");
var injectedScript;
if (options.injectedScript)
injectedScript = "(function(){" + options.injectedScript + "})()";
@@ -507,14 +444,8 @@ WebInspector.ExtensionServer.prototype = {
this._dispatchCallback(message.requestId, port, result);
}
- return this.evaluate(
- message.expression,
- true,
- true,
- message.evaluateOptions,
- port._extensionOrigin,
- callback.bind(this)
- );
+ return this
+ .evaluate(message.expression, true, true, message.evaluateOptions, port._extensionOrigin, callback.bind(this));
},
_onGetHAR: function() {
var requests = WebInspector.NetworkLog.requests();
@@ -641,10 +572,8 @@ WebInspector.ExtensionServer.prototype = {
);
this._clientObjects[message.id] = category;
this._auditCategories.push(category);
- this.dispatchEventToListeners(
- WebInspector.ExtensionServer.Events.AuditCategoryAdded,
- category
- );
+ this
+ .dispatchEventToListeners(WebInspector.ExtensionServer.Events.AuditCategoryAdded, category);
},
/**
* @return {!Array.<!WebInspector.ExtensionAuditCategory>}
@@ -653,27 +582,26 @@ WebInspector.ExtensionServer.prototype = {
return this._auditCategories;
},
_onAddAuditResult: function(message) {
- var auditResult /** {!WebInspector.ExtensionAuditCategoryResults} */ = this._clientObjects[message.resultId];
+ var auditResult /** {!WebInspector.ExtensionAuditCategoryResults} */ = this
+ ._clientObjects[message.resultId];
if (!auditResult) return this._status.E_NOTFOUND(message.resultId);
try {
- auditResult.addResult(
- message.displayName,
- message.description,
- message.severity,
- message.details
- );
+ auditResult
+ .addResult(message.displayName, message.description, message.severity, message.details);
} catch (e) {
return e;
}
return this._status.OK();
},
_onUpdateAuditProgress: function(message) {
- var auditResult /** {!WebInspector.ExtensionAuditCategoryResults} */ = this._clientObjects[message.resultId];
+ var auditResult /** {!WebInspector.ExtensionAuditCategoryResults} */ = this
+ ._clientObjects[message.resultId];
if (!auditResult) return this._status.E_NOTFOUND(message.resultId);
auditResult.updateProgress(Math.min(Math.max(0, message.progress), 1));
},
_onStopAuditCategoryRun: function(message) {
- var auditRun /** {!WebInspector.ExtensionAuditCategoryResults} */ = this._clientObjects[message.resultId];
+ var auditRun /** {!WebInspector.ExtensionAuditCategoryResults} */ = this
+ ._clientObjects[message.resultId];
if (!auditRun) return this._status.E_NOTFOUND(message.resultId);
auditRun.done();
},
@@ -725,95 +653,68 @@ WebInspector.ExtensionServer.prototype = {
});
},
_initExtensions: function() {
- this._registerAutosubscriptionHandler(
- WebInspector.extensionAPI.Events.ResourceAdded,
- WebInspector.workspace,
- WebInspector.Workspace.Events.UISourceCodeAdded,
- this._notifyResourceAdded
- );
- this._registerAutosubscriptionTargetManagerHandler(
- WebInspector.extensionAPI.Events.NetworkRequestFinished,
- WebInspector.NetworkManager,
- WebInspector.NetworkManager.EventTypes.RequestFinished,
- this._notifyRequestFinished
- );
+ this
+ ._registerAutosubscriptionHandler(WebInspector.extensionAPI.Events.ResourceAdded, WebInspector.workspace, WebInspector.Workspace.Events.UISourceCodeAdded, this._notifyResourceAdded);
+ this
+ ._registerAutosubscriptionTargetManagerHandler(WebInspector.extensionAPI.Events.NetworkRequestFinished, WebInspector.NetworkManager, WebInspector.NetworkManager.EventTypes.RequestFinished, this._notifyRequestFinished);
/**
* @this {WebInspector.ExtensionServer}
*/
function onElementsSubscriptionStarted() {
- WebInspector.notifications.addEventListener(
- WebInspector.NotificationService.Events.SelectedNodeChanged,
- this._notifyElementsSelectionChanged,
- this
- );
+ WebInspector
+ .notifications.addEventListener(WebInspector.NotificationService.Events.SelectedNodeChanged, this._notifyElementsSelectionChanged, this);
}
/**
* @this {WebInspector.ExtensionServer}
*/
function onElementsSubscriptionStopped() {
- WebInspector.notifications.removeEventListener(
- WebInspector.NotificationService.Events.SelectedNodeChanged,
- this._notifyElementsSelectionChanged,
- this
- );
+ WebInspector
+ .notifications.removeEventListener(WebInspector.NotificationService.Events.SelectedNodeChanged, this._notifyElementsSelectionChanged, this);
}
- this._registerSubscriptionHandler(
- WebInspector.extensionAPI.Events.PanelObjectSelected + "elements",
- onElementsSubscriptionStarted.bind(this),
- onElementsSubscriptionStopped.bind(this)
- );
- this._registerResourceContentCommittedHandler(
- this._notifyUISourceCodeContentCommitted
- );
+ this
+ ._registerSubscriptionHandler(WebInspector.extensionAPI.Events.PanelObjectSelected + "elements", onElementsSubscriptionStarted.bind(this), onElementsSubscriptionStopped.bind(this));
+ this
+ ._registerResourceContentCommittedHandler(this._notifyUISourceCodeContentCommitted);
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.InspectedURLChanged,
- this._inspectedURLChanged,
- this
- );
+ WebInspector
+ .targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
InspectorExtensionRegistry.getExtensionsAsync();
},
_notifyResourceAdded: function(event) {
var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data;
- this._postNotification(
- WebInspector.extensionAPI.Events.ResourceAdded,
- this._makeResource(uiSourceCode)
- );
+ this
+ ._postNotification(WebInspector.extensionAPI.Events.ResourceAdded, this._makeResource(uiSourceCode));
},
_notifyUISourceCodeContentCommitted: function(event) {
- var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data.uiSourceCode;
+ var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data
+ .uiSourceCode;
var content /** @type {string} */ = event.data.content;
- this._postNotification(
- WebInspector.extensionAPI.Events.ResourceContentCommitted,
- this._makeResource(uiSourceCode),
- content
- );
+ this
+ ._postNotification(WebInspector.extensionAPI.Events.ResourceContentCommitted, this._makeResource(uiSourceCode), content);
},
_notifyRequestFinished: function(event) {
var request /** @type {!WebInspector.NetworkRequest} */ = event.data;
- this._postNotification(
- WebInspector.extensionAPI.Events.NetworkRequestFinished,
- this._requestId(request),
- new WebInspector.HAREntry(request).build()
- );
+ this
+ ._postNotification(WebInspector.extensionAPI.Events.NetworkRequestFinished, this._requestId(request), new WebInspector.HAREntry(request).build());
},
_notifyElementsSelectionChanged: function() {
- this._postNotification(
- WebInspector.extensionAPI.Events.PanelObjectSelected + "elements"
- );
+ this
+ ._postNotification(WebInspector.extensionAPI.Events.PanelObjectSelected + "elements");
},
/**
* @param {!WebInspector.Event} event
*/
_addExtensions: function(event) {
if (WebInspector.extensionServer._overridePlatformExtensionAPIForTest)
- window.buildPlatformExtensionAPI = WebInspector.extensionServer._overridePlatformExtensionAPIForTest;
+ window.buildPlatformExtensionAPI = WebInspector.extensionServer
+ ._overridePlatformExtensionAPIForTest;
- var extensionInfos /** @type {!Array.<!ExtensionDescriptor>} */ = event.data;
+ var extensionInfos /** @type {!Array.<!ExtensionDescriptor>} */ = event
+ .data;
if (this._initializeCommandIssued)
extensionInfos.forEach(this._addExtension, this);
else
@@ -844,10 +745,8 @@ WebInspector.ExtensionServer.prototype = {
var extensionOrigin = originMatch[1];
if (!this._registeredExtensions[extensionOrigin]) {
// See ExtensionAPI.js for details.
- InspectorFrontendHost.setInjectedScriptForOrigin(
- extensionOrigin,
- buildExtensionAPIInjectedScript(extensionInfo, this._inspectedTabId)
- );
+ InspectorFrontendHost
+ .setInjectedScriptForOrigin(extensionOrigin, buildExtensionAPIInjectedScript(extensionInfo, this._inspectedTabId));
this._registeredExtensions[extensionOrigin] = { name: name };
}
var iframe = createElement("iframe");
@@ -961,11 +860,8 @@ WebInspector.ExtensionServer.prototype = {
* @this {WebInspector.ExtensionServer}
*/
function addFirstEventListener() {
- WebInspector.workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeContentCommitted,
- handler,
- this
- );
+ WebInspector
+ .workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeContentCommitted, handler, this);
WebInspector.workspace.setHasResourceContentTrackingExtensions(true);
}
@@ -974,18 +870,12 @@ WebInspector.ExtensionServer.prototype = {
*/
function removeLastEventListener() {
WebInspector.workspace.setHasResourceContentTrackingExtensions(false);
- WebInspector.workspace.removeEventListener(
- WebInspector.Workspace.Events.UISourceCodeContentCommitted,
- handler,
- this
- );
+ WebInspector
+ .workspace.removeEventListener(WebInspector.Workspace.Events.UISourceCodeContentCommitted, handler, this);
}
- this._registerSubscriptionHandler(
- WebInspector.extensionAPI.Events.ResourceContentCommitted,
- addFirstEventListener.bind(this),
- removeLastEventListener.bind(this)
- );
+ this
+ ._registerSubscriptionHandler(WebInspector.extensionAPI.Events.ResourceContentCommitted, addFirstEventListener.bind(this), removeLastEventListener.bind(this));
},
_expandResourcePath: function(extensionPath, resourcePath) {
if (!resourcePath) return;
@@ -1070,11 +960,8 @@ WebInspector.ExtensionServer.prototype = {
context = executionContext;
}
if (!context) {
- console.warn(
- "The JavaScript context " + contextSecurityOrigin +
- " was not found in the frame " +
- frame.url
- );
+ console
+ .warn("The JavaScript context " + contextSecurityOrigin + " was not found in the frame " + frame.url);
return this._status.E_NOTFOUND(contextSecurityOrigin);
}
} else {
@@ -1097,16 +984,8 @@ WebInspector.ExtensionServer.prototype = {
target
.runtimeAgent()
- .evaluate(
- expression,
- "extension",
- exposeCommandLineAPI,
- true,
- contextId,
- returnByValue,
- false,
- onEvalute
- );
+
+ .evaluate(expression, "extension", exposeCommandLineAPI, true, contextId, returnByValue, false, onEvalute);
/**
* @param {?Protocol.Error} error
@@ -1179,9 +1058,8 @@ WebInspector.ExtensionStatus = function() {
var status = { code: code, description: description, details: details };
if (code !== "OK") {
status.isError = true;
- console.log(
- "Extension server error: " + String.vsprintf(description, details)
- );
+ console
+ .log("Extension server error: " + String.vsprintf(description, details));
}
return status;
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/InspectorFrontendHost.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/InspectorFrontendHost.js
index 4d199a5..c3673ad 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/InspectorFrontendHost.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/InspectorFrontendHost.js
@@ -363,9 +363,8 @@ WebInspector.InspectorFrontendHostStub.prototype = {
* @param {string} text
*/
copyText: function(text) {
- WebInspector.console.error(
- "Clipboard is not enabled in hosted mode. Please inspect using chrome://inspect"
- );
+ WebInspector
+ .console.error("Clipboard is not enabled in hosted mode. Please inspect using chrome://inspect");
},
/**
* @override
@@ -595,10 +594,8 @@ var InspectorFrontendHost = window.InspectorFrontendHost || null;
// Single argument methods get dispatched with the param.
if (signature.length < 2) {
try {
- InspectorFrontendHost.events.dispatchEventToListeners(
- name,
- params[0]
- );
+ InspectorFrontendHost
+ .events.dispatchEventToListeners(name, params[0]);
} catch (e) {
console.error(e + " " + e.stack);
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/UserMetrics.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/UserMetrics.js
index 66d5626..0e52308 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/UserMetrics.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/UserMetrics.js
@@ -85,9 +85,8 @@ WebInspector.UserMetrics.UserActionNames = {
WebInspector.UserMetrics.prototype = {
panelShown: function(panelName) {
- InspectorFrontendHost.recordPanelShown(
- WebInspector.UserMetrics._PanelCodes[panelName] || 0
- );
+ InspectorFrontendHost
+ .recordPanelShown(WebInspector.UserMetrics._PanelCodes[panelName] || 0);
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/AdvancedApp.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/AdvancedApp.js
index eb6b981..ca8c7b2 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/AdvancedApp.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/AdvancedApp.js
@@ -12,30 +12,17 @@ WebInspector.AdvancedApp = function() {
WebInspector.UIString("Toggle device mode."),
"emulation-status-bar-item"
);
- this._toggleEmulationButton.setToggled(
- WebInspector.overridesSupport.emulationEnabled()
- );
- this._toggleEmulationButton.addEventListener(
- "click",
- this._toggleEmulationEnabled,
- this
- );
- WebInspector.overridesSupport.addEventListener(
- WebInspector.OverridesSupport.Events.EmulationStateChanged,
- this._emulationEnabledChanged,
- this
- );
- WebInspector.overridesSupport.addEventListener(
- WebInspector.OverridesSupport.Events.OverridesWarningUpdated,
- this._overridesWarningUpdated,
- this
- );
- }
- WebInspector.dockController.addEventListener(
- WebInspector.DockController.Events.BeforeDockSideChanged,
- this._openToolboxWindow,
this
- );
+ ._toggleEmulationButton.setToggled(WebInspector.overridesSupport.emulationEnabled());
+ this
+ ._toggleEmulationButton.addEventListener("click", this._toggleEmulationEnabled, this);
+ WebInspector
+ .overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.EmulationStateChanged, this._emulationEnabledChanged, this);
+ WebInspector
+ .overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this);
+ }
+ WebInspector
+ .dockController.addEventListener(WebInspector.DockController.Events.BeforeDockSideChanged, this._openToolboxWindow, this);
};
WebInspector.AdvancedApp.prototype = {
@@ -44,9 +31,8 @@ WebInspector.AdvancedApp.prototype = {
WebInspector.overridesSupport.setEmulationEnabled(enabled);
},
_emulationEnabledChanged: function() {
- this._toggleEmulationButton.setToggled(
- WebInspector.overridesSupport.emulationEnabled()
- );
+ this
+ ._toggleEmulationButton.setToggled(WebInspector.overridesSupport.emulationEnabled());
if (
!WebInspector.overridesSupport.responsiveDesignAvailable() &&
WebInspector.overridesSupport.emulationEnabled()
@@ -56,9 +42,8 @@ WebInspector.AdvancedApp.prototype = {
_overridesWarningUpdated: function() {
if (!this._toggleEmulationButton) return;
var message = WebInspector.overridesSupport.warningMessage();
- this._toggleEmulationButton.setTitle(
- message || WebInspector.UIString("Toggle device mode.")
- );
+ this
+ ._toggleEmulationButton.setTitle(message || WebInspector.UIString("Toggle device mode."));
this._toggleEmulationButton.element.classList.toggle("warning", !!message);
},
/**
@@ -80,32 +65,21 @@ WebInspector.AdvancedApp.prototype = {
this._rootSplitView.setSidebarView(WebInspector.inspectorView);
- this._inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder();
- this._inspectedPagePlaceholder.addEventListener(
- WebInspector.InspectedPagePlaceholder.Events.Update,
- this._onSetInspectedPageBounds.bind(this, false),
- this
- );
+ this._inspectedPagePlaceholder = new WebInspector
+ .InspectedPagePlaceholder();
+ this
+ ._inspectedPagePlaceholder.addEventListener(WebInspector.InspectedPagePlaceholder.Events.Update, this._onSetInspectedPageBounds.bind(this, false), this);
this._responsiveDesignView = new WebInspector.ResponsiveDesignView(
this._inspectedPagePlaceholder
);
this._rootSplitView.setMainView(this._responsiveDesignView);
- WebInspector.dockController.addEventListener(
- WebInspector.DockController.Events.BeforeDockSideChanged,
- this._onBeforeDockSideChange,
- this
- );
- WebInspector.dockController.addEventListener(
- WebInspector.DockController.Events.DockSideChanged,
- this._onDockSideChange,
- this
- );
- WebInspector.dockController.addEventListener(
- WebInspector.DockController.Events.AfterDockSideChanged,
- this._onAfterDockSideChange,
- this
- );
+ WebInspector
+ .dockController.addEventListener(WebInspector.DockController.Events.BeforeDockSideChanged, this._onBeforeDockSideChange, this);
+ WebInspector
+ .dockController.addEventListener(WebInspector.DockController.Events.DockSideChanged, this._onDockSideChange, this);
+ WebInspector
+ .dockController.addEventListener(WebInspector.DockController.Events.AfterDockSideChanged, this._onAfterDockSideChange, this);
this._onDockSideChange();
this._overridesWarningUpdated();
@@ -132,17 +106,14 @@ WebInspector.AdvancedApp.prototype = {
*/
toolboxLoaded: function(toolboxDocument) {
WebInspector.initializeUIUtils(toolboxDocument.defaultView);
- WebInspector.installComponentRootStyles /** @type {!Element} */(
- toolboxDocument.body
- );
+ WebInspector
+ .installComponentRootStyles /** @type {!Element} */(toolboxDocument.body);
WebInspector.ContextMenu.installHandler(toolboxDocument);
var rootView = new WebInspector.RootView();
var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder();
- inspectedPagePlaceholder.addEventListener(
- WebInspector.InspectedPagePlaceholder.Events.Update,
- this._onSetInspectedPageBounds.bind(this, true)
- );
+ inspectedPagePlaceholder
+ .addEventListener(WebInspector.InspectedPagePlaceholder.Events.Update, this._onSetInspectedPageBounds.bind(this, true));
this._toolboxResponsiveDesignView = new WebInspector.ResponsiveDesignView(
inspectedPagePlaceholder
);
@@ -215,32 +186,21 @@ WebInspector.AdvancedApp.prototype = {
* @param {string} dockSide
*/
_updateForDocked: function(dockSide) {
- this._rootSplitView.setVertical(
- dockSide === WebInspector.DockController.State.DockedToRight
- );
- this._rootSplitView.setSecondIsSidebar(
- dockSide === WebInspector.DockController.State.DockedToRight ||
- dockSide === WebInspector.DockController.State.DockedToBottom
- );
- this._rootSplitView.toggleResizer(
- this._rootSplitView.resizerElement(),
- true
- );
- this._rootSplitView.toggleResizer(
- WebInspector.inspectorView.topResizerElement(),
- dockSide === WebInspector.DockController.State.DockedToBottom
- );
+ this
+ ._rootSplitView.setVertical(dockSide === WebInspector.DockController.State.DockedToRight);
+ this
+ ._rootSplitView.setSecondIsSidebar(dockSide === WebInspector.DockController.State.DockedToRight || dockSide === WebInspector.DockController.State.DockedToBottom);
+ this
+ ._rootSplitView.toggleResizer(this._rootSplitView.resizerElement(), true);
+ this
+ ._rootSplitView.toggleResizer(WebInspector.inspectorView.topResizerElement(), dockSide === WebInspector.DockController.State.DockedToBottom);
this._rootSplitView.showBoth();
},
_updateForUndocked: function() {
- this._rootSplitView.toggleResizer(
- this._rootSplitView.resizerElement(),
- false
- );
- this._rootSplitView.toggleResizer(
- WebInspector.inspectorView.topResizerElement(),
- false
- );
+ this
+ ._rootSplitView.toggleResizer(this._rootSplitView.resizerElement(), false);
+ this
+ ._rootSplitView.toggleResizer(WebInspector.inspectorView.topResizerElement(), false);
this._rootSplitView.hideMain();
},
_isDocked: function() {
@@ -254,7 +214,8 @@ WebInspector.AdvancedApp.prototype = {
_onSetInspectedPageBounds: function(toolbox, event) {
if (this._changingDockSide || this._isDocked() === toolbox) return;
if (!window.innerWidth || !window.innerHeight) return;
- var bounds /** @type {{x: number, y: number, width: number, height: number}} */ = event.data;
+ var bounds /** @type {{x: number, y: number, width: number, height: number}} */ = event
+ .data;
console.timeStamp("AdvancedApp.setInspectedPageBounds");
InspectorFrontendHost.setInspectedPageBounds(bounds);
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/HelpScreenUntilReload.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/HelpScreenUntilReload.js
index e533248..b56fbf2 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/HelpScreenUntilReload.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/HelpScreenUntilReload.js
@@ -41,11 +41,8 @@ WebInspector.HelpScreenUntilReload = function(target, title, message) {
var p = this.helpContentElement.createChild("p");
p.classList.add("help-section");
p.textContent = message;
- target.debuggerModel.addEventListener(
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this.hide,
- this
- );
+ target
+ .debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this.hide, this);
};
WebInspector.HelpScreenUntilReload.prototype = {
@@ -53,11 +50,8 @@ WebInspector.HelpScreenUntilReload.prototype = {
* @override
*/
willHide: function() {
- this._target.debuggerModel.removeEventListener(
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this.hide,
- this
- );
+ this
+ ._target.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this.hide, this);
WebInspector.HelpScreen.prototype.willHide.call(this);
},
__proto__: WebInspector.HelpScreen.prototype
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js
index 42c7de4..3ff1d8e 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js
@@ -67,10 +67,8 @@ WebInspector.Main.prototype = {
var descriptor = extension.descriptor();
if (!descriptor.className)
return Promise
- .resolve(new WebInspector.StatusBarButton(
- WebInspector.UIString(descriptor["title"]),
- descriptor["elementClass"]
- ))
+
+ .resolve(new WebInspector.StatusBarButton(WebInspector.UIString(descriptor["title"]), descriptor["elementClass"]))
.then(attachHandler);
return extension
.instancePromise()
@@ -81,7 +79,8 @@ WebInspector.Main.prototype = {
* @param {!Object} provider
*/
function fetchItemFromProvider(provider) {
- return /** @type {!WebInspector.StatusBarItem.Provider} */
+ return;
+ /** @type {!WebInspector.StatusBarItem.Provider} */
provider.item();
}
@@ -126,94 +125,50 @@ WebInspector.Main.prototype = {
this._initializeExperiments();
// This setting is needed for backwards compatibility with Devtools CodeSchool extension. DO NOT REMOVE
- WebInspector.settings.pauseOnExceptionStateString = new WebInspector.PauseOnExceptionStateSetting();
+ WebInspector.settings.pauseOnExceptionStateString = new WebInspector
+ .PauseOnExceptionStateSetting();
new WebInspector.VersionController().updateVersion();
},
_initializeExperiments: function() {
- Runtime.experiments.register(
- "accessibilityInspection",
- "Accessibility Inspection",
- true
- );
- Runtime.experiments.register(
- "animationInspection",
- "Animation Inspection",
- true
- );
- Runtime.experiments.register(
- "applyCustomStylesheet",
- "Allow custom UI themes"
- );
+ Runtime
+ .experiments.register("accessibilityInspection", "Accessibility Inspection", true);
+ Runtime
+ .experiments.register("animationInspection", "Animation Inspection", true);
+ Runtime
+ .experiments.register("applyCustomStylesheet", "Allow custom UI themes");
Runtime.experiments.register("canvasInspection", "Canvas inspection");
- Runtime.experiments.register(
- "timelineDetailsChart",
- "Costly functions view in Timeline details",
- true
- );
- Runtime.experiments.register(
- "customObjectFormatters",
- "Custom object formatters",
- true
- );
- Runtime.experiments.register(
- "externalDeviceList",
- "External device list",
- true
- );
- Runtime.experiments.register(
- "fileSystemInspection",
- "FileSystem inspection"
- );
+ Runtime
+ .experiments.register("timelineDetailsChart", "Costly functions view in Timeline details", true);
+ Runtime
+ .experiments.register("customObjectFormatters", "Custom object formatters", true);
+ Runtime
+ .experiments.register("externalDeviceList", "External device list", true);
+ Runtime
+ .experiments.register("fileSystemInspection", "FileSystem inspection");
Runtime.experiments.register("gpuTimeline", "GPU data on timeline", true);
- Runtime.experiments.register(
- "inputEventsOnTimelineOverview",
- "Input events on Timeline overview",
- true
- );
+ Runtime
+ .experiments.register("inputEventsOnTimelineOverview", "Input events on Timeline overview", true);
Runtime.experiments.register("layersPanel", "Layers panel");
- Runtime.experiments.register(
- "networkRequestHeadersFilterInDetailsView",
- "Network request headers filter in details view",
- true
- );
- Runtime.experiments.register(
- "networkRequestsOnTimeline",
- "Network requests on Timeline"
- );
- Runtime.experiments.register(
- "privateScriptInspection",
- "Private script inspection"
- );
+ Runtime
+ .experiments.register("networkRequestHeadersFilterInDetailsView", "Network request headers filter in details view", true);
+ Runtime
+ .experiments.register("networkRequestsOnTimeline", "Network requests on Timeline");
+ Runtime
+ .experiments.register("privateScriptInspection", "Private script inspection");
Runtime.experiments.register("promiseTracker", "Promise inspector");
- Runtime.experiments.register(
- "serviceWorkersInPageFrontend",
- "Service workers in DevTools for page"
- );
- Runtime.experiments.register(
- "serviceWorkersInResources",
- "Service workers in Resources panel",
- true
- );
- Runtime.experiments.register(
- "showPrimaryLoadWaterfallInNetworkTimeline",
- "Show primary load waterfall in Network timeline",
- true
- );
+ Runtime
+ .experiments.register("serviceWorkersInPageFrontend", "Service workers in DevTools for page");
+ Runtime
+ .experiments.register("serviceWorkersInResources", "Service workers in Resources panel", true);
+ Runtime
+ .experiments.register("showPrimaryLoadWaterfallInNetworkTimeline", "Show primary load waterfall in Network timeline", true);
Runtime.experiments.register("stepIntoAsync", "Step into async");
- Runtime.experiments.register(
- "timelineInvalidationTracking",
- "Timeline invalidation tracking",
- true
- );
- Runtime.experiments.register(
- "timelineFlowEvents",
- "Timeline flow events",
- true
- );
- Runtime.experiments.register(
- "inlineVariableValues",
- "Display variable values inline while debugging"
- );
+ Runtime
+ .experiments.register("timelineInvalidationTracking", "Timeline invalidation tracking", true);
+ Runtime
+ .experiments.register("timelineFlowEvents", "Timeline flow events", true);
+ Runtime
+ .experiments.register("inlineVariableValues", "Display variable values inline while debugging");
Runtime.experiments.cleanUpStaleExperiments();
@@ -235,10 +190,8 @@ WebInspector.Main.prototype = {
Runtime.experiments.enableForTest("layersPanel");
}
- Runtime.experiments.setDefaultExperiments([
- "inlineVariableValues",
- "serviceWorkersInPageFrontend"
- ]);
+ Runtime
+ .experiments.setDefaultExperiments([ "inlineVariableValues", "serviceWorkersInPageFrontend" ]);
},
/**
* @suppressGlobalPropertiesCheck
@@ -247,9 +200,8 @@ WebInspector.Main.prototype = {
console.timeStamp("Main._createApp");
WebInspector.initializeUIUtils(window);
- WebInspector.installComponentRootStyles /** @type {!Element} */(
- document.body
- );
+ WebInspector
+ .installComponentRootStyles /** @type {!Element} */(document.body);
if (Runtime.queryParam("toolbarColor") && Runtime.queryParam("textColor"))
WebInspector.setToolbarColors(
@@ -257,20 +209,15 @@ WebInspector.Main.prototype = {
Runtime.queryParam("toolbarColor") /** @type {string} */,
Runtime.queryParam("textColor")
);
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.SetToolbarColors,
- updateToolbarColors
- );
+ InspectorFrontendHost
+ .events.addEventListener(InspectorFrontendHostAPI.Events.SetToolbarColors, updateToolbarColors);
/**
* @param {!WebInspector.Event} event
* @suppressGlobalPropertiesCheck
*/
function updateToolbarColors(event) {
- WebInspector.setToolbarColors(
- document /** @type {string} */,
- event.data["backgroundColor"] /** @type {string} */,
- event.data["color"]
- );
+ WebInspector
+ .setToolbarColors(document /** @type {string} */, event.data["backgroundColor"] /** @type {string} */, event.data["color"]);
}
this._addMainEventListeners(document);
@@ -286,17 +233,19 @@ WebInspector.Main.prototype = {
WebInspector.dockController = new WebInspector.DockController(canDock);
WebInspector.overridesSupport = new WebInspector.OverridesSupport(canDock);
WebInspector.emulatedDevicesList = new WebInspector.EmulatedDevicesList();
- WebInspector.multitargetConsoleModel = new WebInspector.MultitargetConsoleModel();
- WebInspector.multitargetNetworkManager = new WebInspector.MultitargetNetworkManager();
+ WebInspector.multitargetConsoleModel = new WebInspector
+ .MultitargetConsoleModel();
+ WebInspector.multitargetNetworkManager = new WebInspector
+ .MultitargetNetworkManager();
WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen();
// set order of some sections explicitly
WebInspector.shortcutsScreen.section(WebInspector.UIString("Console"));
- WebInspector.shortcutsScreen.section(
- WebInspector.UIString("Elements Panel")
- );
+ WebInspector
+ .shortcutsScreen.section(WebInspector.UIString("Elements Panel"));
- WebInspector.isolatedFileSystemManager = new WebInspector.IsolatedFileSystemManager();
+ WebInspector.isolatedFileSystemManager = new WebInspector
+ .IsolatedFileSystemManager();
WebInspector.workspace = new WebInspector.Workspace(
WebInspector.isolatedFileSystemManager.mapping()
);
@@ -309,20 +258,21 @@ WebInspector.Main.prototype = {
WebInspector.workspace,
WebInspector.networkMapping
);
- WebInspector.presentationConsoleMessageHelper = new WebInspector.PresentationConsoleMessageHelper(
- WebInspector.workspace
- );
+ WebInspector.presentationConsoleMessageHelper = new WebInspector
+ .PresentationConsoleMessageHelper(WebInspector.workspace);
WebInspector.cssWorkspaceBinding = new WebInspector.CSSWorkspaceBinding(
WebInspector.targetManager,
WebInspector.workspace,
WebInspector.networkMapping
);
- WebInspector.debuggerWorkspaceBinding = new WebInspector.DebuggerWorkspaceBinding(
+ WebInspector.debuggerWorkspaceBinding = new WebInspector
+ .DebuggerWorkspaceBinding(
WebInspector.targetManager,
WebInspector.workspace,
WebInspector.networkMapping
);
- WebInspector.fileSystemWorkspaceBinding = new WebInspector.FileSystemWorkspaceBinding(
+ WebInspector.fileSystemWorkspaceBinding = new WebInspector
+ .FileSystemWorkspaceBinding(
WebInspector.isolatedFileSystemManager,
WebInspector.workspace,
WebInspector.networkMapping
@@ -348,22 +298,20 @@ WebInspector.Main.prototype = {
WebInspector.openAnchorLocationRegistry = new WebInspector.HandlerRegistry(
openAnchorLocationSetting
);
- WebInspector.openAnchorLocationRegistry.registerHandler(
- autoselectPanel,
- function() {
- return false;
- }
- );
- WebInspector.Linkifier.setLinkHandler(
- new WebInspector.HandlerRegistry.LinkHandler()
- );
+ WebInspector
+ .openAnchorLocationRegistry.registerHandler(autoselectPanel, function() {
+ return false;
+ });
+ WebInspector
+ .Linkifier.setLinkHandler(new WebInspector.HandlerRegistry.LinkHandler());
new WebInspector.WorkspaceController(WebInspector.workspace);
new WebInspector.RenderingOptions();
new WebInspector.DisableJavaScriptObserver();
new WebInspector.Main.PauseListener();
new WebInspector.Main.InspectedNodeRevealer();
- WebInspector.domBreakpointsSidebarPane = new WebInspector.DOMBreakpointsSidebarPane();
+ WebInspector.domBreakpointsSidebarPane = new WebInspector
+ .DOMBreakpointsSidebarPane();
WebInspector.actionRegistry = new WebInspector.ActionRegistry();
WebInspector.shortcutRegistry = new WebInspector.ShortcutRegistry(
@@ -390,7 +338,8 @@ WebInspector.Main.prototype = {
app.presentUI(document);
if (!Runtime.queryParam("isSharedWorker"))
- WebInspector.inspectElementModeController = new WebInspector.InspectElementModeController();
+ WebInspector.inspectElementModeController = new WebInspector
+ .InspectElementModeController();
this._createGlobalStatusBarItems();
InspectorFrontendHost.loadCompleted();
@@ -418,10 +367,8 @@ WebInspector.Main.prototype = {
if (Runtime.queryParam("ws")) {
var ws = "ws://" + Runtime.queryParam("ws");
- InspectorBackendClass.WebSocketConnection.Create(
- ws,
- this._connectionEstablished.bind(this)
- );
+ InspectorBackendClass
+ .WebSocketConnection.Create(ws, this._connectionEstablished.bind(this));
return;
}
@@ -437,32 +384,24 @@ WebInspector.Main.prototype = {
*/
_connectionEstablished: function(connection) {
console.timeStamp("Main._connectionEstablished");
- connection.addEventListener(
- InspectorBackendClass.Connection.Events.Disconnected,
- onDisconnected
- );
+ connection
+ .addEventListener(InspectorBackendClass.Connection.Events.Disconnected, onDisconnected);
/**
* @param {!WebInspector.Event} event
*/
function onDisconnected(event) {
if (WebInspector._disconnectedScreenWithReasonWasShown) return;
- new WebInspector.RemoteDebuggingTerminatedScreen(
- event.data.reason
- ).showModal();
+ new WebInspector
+ .RemoteDebuggingTerminatedScreen(event.data.reason).showModal();
}
InspectorBackend.setConnection(connection);
var targetType = Runtime.queryParam("isSharedWorker")
? WebInspector.Target.Type.ServiceWorker
: WebInspector.Target.Type.Page;
- WebInspector.targetManager.createTarget(
- WebInspector.UIString("Main"),
- targetType,
- connection,
- null,
- this._mainTargetCreated.bind(this)
- );
+ WebInspector
+ .targetManager.createTarget(WebInspector.UIString("Main"), targetType, connection, null, this._mainTargetCreated.bind(this));
},
/**
* @param {?WebInspector.Target} target
@@ -481,9 +420,8 @@ WebInspector.Main.prototype = {
function inspectorAgentEnableCallback() {
console.timeStamp("Main.inspectorAgentEnableCallback");
- WebInspector.notifications.dispatchEventToListeners(
- WebInspector.NotificationService.Events.InspectorAgentEnabledForTests
- );
+ WebInspector
+ .notifications.dispatchEventToListeners(WebInspector.NotificationService.Events.InspectorAgentEnabledForTests);
// Asynchronously run the extensions.
setTimeout(
function() {
@@ -515,10 +453,8 @@ WebInspector.Main.prototype = {
InspectorFrontendHost.setWhitelistedShortcuts(JSON.stringify(actionKeys));
},
_registerMessageSinkListener: function() {
- WebInspector.console.addEventListener(
- WebInspector.Console.Events.MessageAdded,
- messageAdded
- );
+ WebInspector
+ .console.addEventListener(WebInspector.Console.Events.MessageAdded, messageAdded);
/**
* @param {!WebInspector.Event} event
@@ -551,16 +487,11 @@ WebInspector.Main.prototype = {
)
return;
- var uiSourceCode = WebInspector.networkMapping.uiSourceCodeForURLForAnyTarget(
- anchor.href
- );
+ var uiSourceCode = WebInspector.networkMapping
+ .uiSourceCodeForURLForAnyTarget(anchor.href);
if (uiSourceCode) {
- WebInspector.Revealer.reveal(
- uiSourceCode.uiLocation(
- anchor.lineNumber || 0,
- anchor.columnNumber || 0
- )
- );
+ WebInspector
+ .Revealer.reveal(uiSourceCode.uiLocation(anchor.lineNumber || 0, anchor.columnNumber || 0));
return;
}
@@ -601,10 +532,8 @@ WebInspector.Main.prototype = {
shortcut.makeDescriptor("[", shortcut.Modifiers.CtrlOrMeta),
shortcut.makeDescriptor("]", shortcut.Modifiers.CtrlOrMeta)
];
- section.addRelatedKeys(
- keys,
- WebInspector.UIString("Go to the panel to the left/right")
- );
+ section
+ .addRelatedKeys(keys, WebInspector.UIString("Go to the panel to the left/right"));
keys = [
shortcut.makeDescriptor(
@@ -616,20 +545,14 @@ WebInspector.Main.prototype = {
shortcut.Modifiers.CtrlOrMeta | shortcut.Modifiers.Alt
)
];
- section.addRelatedKeys(
- keys,
- WebInspector.UIString("Go back/forward in panel history")
- );
+ section
+ .addRelatedKeys(keys, WebInspector.UIString("Go back/forward in panel history"));
var toggleConsoleLabel = WebInspector.UIString("Show console");
- section.addKey(
- shortcut.makeDescriptor(shortcut.Keys.Tilde, shortcut.Modifiers.Ctrl),
- toggleConsoleLabel
- );
- section.addKey(
- shortcut.makeDescriptor(shortcut.Keys.Esc),
- WebInspector.UIString("Toggle drawer")
- );
+ section
+ .addKey(shortcut.makeDescriptor(shortcut.Keys.Tilde, shortcut.Modifiers.Ctrl), toggleConsoleLabel);
+ section
+ .addKey(shortcut.makeDescriptor(shortcut.Keys.Esc), WebInspector.UIString("Toggle drawer"));
if (WebInspector.overridesSupport.responsiveDesignAvailable())
section.addKey(
shortcut.makeDescriptor(
@@ -646,10 +569,8 @@ WebInspector.Main.prototype = {
),
WebInspector.UIString("Toggle dock side")
);
- section.addKey(
- shortcut.makeDescriptor("f", shortcut.Modifiers.CtrlOrMeta),
- WebInspector.UIString("Search")
- );
+ section
+ .addKey(shortcut.makeDescriptor("f", shortcut.Modifiers.CtrlOrMeta), WebInspector.UIString("Search"));
var advancedSearchShortcutModifier = WebInspector.isMac()
? WebInspector.KeyboardShortcut.Modifiers.Meta |
@@ -660,16 +581,13 @@ WebInspector.Main.prototype = {
"f",
advancedSearchShortcutModifier
);
- section.addKey(
- advancedSearchShortcut,
- WebInspector.UIString("Search across all sources")
- );
+ section
+ .addKey(advancedSearchShortcut, WebInspector.UIString("Search across all sources"));
- var inspectElementModeShortcut = WebInspector.InspectElementModeController.createShortcut();
- section.addKey(
- inspectElementModeShortcut,
- WebInspector.UIString("Select node to inspect")
- );
+ var inspectElementModeShortcut = WebInspector.InspectElementModeController
+ .createShortcut();
+ section
+ .addKey(inspectElementModeShortcut, WebInspector.UIString("Select node to inspect"));
var openResourceShortcut = WebInspector.KeyboardShortcut.makeDescriptor(
"p",
@@ -728,24 +646,15 @@ WebInspector.Main.prototype = {
* @param {!Document} document
*/
_addMainEventListeners: function(document) {
- document.addEventListener(
- "keydown",
- this._postDocumentKeyDown.bind(this),
- false
- );
- document.addEventListener(
- "beforecopy",
- this._documentCanCopy.bind(this),
- true
- );
+ document
+ .addEventListener("keydown", this._postDocumentKeyDown.bind(this), false);
+ document
+ .addEventListener("beforecopy", this._documentCanCopy.bind(this), true);
document.addEventListener("copy", this._documentCopy.bind(this), false);
document.addEventListener("cut", this._documentCut.bind(this), false);
document.addEventListener("paste", this._documentPaste.bind(this), false);
- document.addEventListener(
- "contextmenu",
- this._contextMenuEventFired.bind(this),
- true
- );
+ document
+ .addEventListener("contextmenu", this._contextMenuEventFired.bind(this), true);
document.addEventListener("click", this._documentClick.bind(this), false);
},
/**
@@ -797,13 +706,8 @@ WebInspector.Main.prototype = {
* @override
*/
targetCrashed: function() {
- new WebInspector.HelpScreenUntilReload(
- this._mainTarget,
- WebInspector.UIString("Inspected target disconnected"),
- WebInspector.UIString(
- "Inspected target disconnected. Once it reloads we will attach to it automatically."
- )
- ).showModal();
+ new WebInspector
+ .HelpScreenUntilReload(this._mainTarget, WebInspector.UIString("Inspected target disconnected"), WebInspector.UIString("Inspected target disconnected. Once it reloads we will attach to it automatically.")).showModal();
},
/**
* @override
@@ -946,13 +850,8 @@ WebInspector.Main.ShortcutPanelSwitchSettingDelegate.prototype = {
*/
settingElement: function() {
var modifier = WebInspector.platform() === "mac" ? "Cmd" : "Ctrl";
- return WebInspector.SettingsUI.createSettingCheckbox(
- WebInspector.UIString(
- "Enable %s + 1-9 shortcut to switch panels",
- modifier
- ),
- WebInspector.settings.shortcutPanelSwitch
- );
+ return WebInspector
+ .SettingsUI.createSettingCheckbox(WebInspector.UIString("Enable %s + 1-9 shortcut to switch panels", modifier), WebInspector.settings.shortcutPanelSwitch);
},
__proto__: WebInspector.UISettingDelegate.prototype
};
@@ -976,12 +875,8 @@ WebInspector.Main._addWebSocketTarget = function(ws) {
* @param {!InspectorBackendClass.Connection} connection
*/
function callback(connection) {
- WebInspector.targetManager.createTarget(
- ws,
- WebInspector.Target.Type.Page,
- connection,
- null
- );
+ WebInspector
+ .targetManager.createTarget(ws, WebInspector.Target.Type.Page, connection, null);
}
new InspectorBackendClass.WebSocketConnection(ws, callback);
};
@@ -1007,16 +902,10 @@ WebInspector.Main.WarningErrorCounter = function() {
WebInspector.console.show();
}
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.ConsoleCleared,
- this._updateErrorAndWarningCounts,
- this
- );
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.MessageAdded,
- this._updateErrorAndWarningCounts,
- this
- );
+ WebInspector
+ .multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._updateErrorAndWarningCounts, this);
+ WebInspector
+ .multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._updateErrorAndWarningCounts, this);
};
WebInspector.Main.WarningErrorCounter.prototype = {
@@ -1028,19 +917,10 @@ WebInspector.Main.WarningErrorCounter.prototype = {
errors = errors + targets[i].consoleModel.errors;
warnings = warnings + targets[i].consoleModel.warnings;
}
- this._counter.setCounter(
- "error-icon",
- errors,
- WebInspector.UIString(errors > 1 ? "%d errors" : "%d error", errors)
- );
- this._counter.setCounter(
- "warning-icon",
- warnings,
- WebInspector.UIString(
- warnings > 1 ? "%d warnings" : "%d warning",
- warnings
- )
- );
+ this
+ ._counter.setCounter("error-icon", errors, WebInspector.UIString(errors > 1 ? "%d errors" : "%d error", errors));
+ this
+ ._counter.setCounter("warning-icon", warnings, WebInspector.UIString(warnings > 1 ? "%d warnings" : "%d warning", warnings));
WebInspector.inspectorView.toolbarItemResized();
},
/**
@@ -1056,12 +936,8 @@ WebInspector.Main.WarningErrorCounter.prototype = {
* @constructor
*/
WebInspector.Main.PauseListener = function() {
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerPaused,
- this._debuggerPaused,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPaused, this);
};
WebInspector.Main.PauseListener.prototype = {
@@ -1069,13 +945,10 @@ WebInspector.Main.PauseListener.prototype = {
* @param {!WebInspector.Event} event
*/
_debuggerPaused: function(event) {
- WebInspector.targetManager.removeModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerPaused,
- this._debuggerPaused,
- this
- );
- var debuggerPausedDetails /** @type {!WebInspector.DebuggerPausedDetails} */ = event.data;
+ WebInspector
+ .targetManager.removeModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPaused, this);
+ var debuggerPausedDetails /** @type {!WebInspector.DebuggerPausedDetails} */ = event
+ .data;
var debuggerModel /** @type {!WebInspector.DebuggerModel} */ = event.target;
WebInspector.context.setFlavor(WebInspector.Target, debuggerModel.target());
WebInspector.Revealer.reveal(debuggerPausedDetails);
@@ -1086,12 +959,8 @@ WebInspector.Main.PauseListener.prototype = {
* @constructor
*/
WebInspector.Main.InspectedNodeRevealer = function() {
- WebInspector.targetManager.addModelListener(
- WebInspector.DOMModel,
- WebInspector.DOMModel.Events.NodeInspected,
- this._inspectNode,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.NodeInspected, this._inspectNode, this);
};
WebInspector.Main.InspectedNodeRevealer.prototype = {
@@ -1109,10 +978,8 @@ WebInspector.Main.InspectedNodeRevealer.prototype = {
* @extends {WebInspector.HelpScreen}
*/
WebInspector.RemoteDebuggingTerminatedScreen = function(reason) {
- WebInspector.HelpScreen.call(
- this,
- WebInspector.UIString("Detached from the target")
- );
+ WebInspector
+ .HelpScreen.call(this, WebInspector.UIString("Detached from the target"));
var p = this.helpContentElement.createChild("p");
p.classList.add("help-section");
p.createChild("span").textContent = WebInspector.UIString(
@@ -1134,10 +1001,8 @@ WebInspector.RemoteDebuggingTerminatedScreen.prototype = {
* @extends {WebInspector.HelpScreen}
*/
WebInspector.WorkerTerminatedScreen = function() {
- WebInspector.HelpScreen.call(
- this,
- WebInspector.UIString("Inspected worker terminated")
- );
+ WebInspector
+ .HelpScreen.call(this, WebInspector.UIString("Inspected worker terminated"));
var p = this.helpContentElement.createChild("p");
p.classList.add("help-section");
p.textContent = WebInspector.UIString(
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverlayController.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverlayController.js
index 19487aa..487d02e 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverlayController.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverlayController.js
@@ -6,28 +6,14 @@
* @constructor
*/
WebInspector.OverlayController = function() {
- WebInspector.settings.disablePausedStateOverlay.addChangeListener(
- this._updateOverlayMessage,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerPaused,
- this._updateOverlayMessage,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerResumed,
- this._updateOverlayMessage,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this._updateOverlayMessage,
- this
- );
+ WebInspector
+ .settings.disablePausedStateOverlay.addChangeListener(this._updateOverlayMessage, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerPaused, this._updateOverlayMessage, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerResumed, this._updateOverlayMessage, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._updateOverlayMessage, this);
};
WebInspector.OverlayController.prototype = {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverridesView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverridesView.js
index c3616b6..080c225 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverridesView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverridesView.js
@@ -51,11 +51,8 @@ WebInspector.OverridesView = function() {
"device"
);
this._tabbedPane.selectTab(this._lastSelectedTabSetting.get());
- this._tabbedPane.addEventListener(
- WebInspector.TabbedPane.EventTypes.TabSelected,
- this._tabSelected,
- this
- );
+ this
+ ._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, this._tabSelected, this);
this._tabbedPane.show(this.element);
var resetButtonElement = createTextButton(
@@ -83,51 +80,34 @@ WebInspector.OverridesView = function() {
"div",
"overrides-splash-screen"
);
- this._unavailableSplashScreenElement.createTextChild(
- WebInspector.UIString("Emulation is not available.")
- );
+ this
+ ._unavailableSplashScreenElement.createTextChild(WebInspector.UIString("Emulation is not available."));
if (WebInspector.overridesSupport.responsiveDesignAvailable()) {
- this._splashScreenElement.createTextChild(
- WebInspector.UIString("Emulation is currently disabled. Toggle ")
- );
+ this
+ ._splashScreenElement.createTextChild(WebInspector.UIString("Emulation is currently disabled. Toggle "));
var statusBar = new WebInspector.StatusBar(this._splashScreenElement);
var toggleEmulationButton = new WebInspector.StatusBarButton(
"",
"emulation-status-bar-item"
);
- toggleEmulationButton.addEventListener(
- "click",
- this._toggleEmulationEnabled,
- this
- );
+ toggleEmulationButton
+ .addEventListener("click", this._toggleEmulationEnabled, this);
statusBar.appendStatusBarItem(toggleEmulationButton);
- this._splashScreenElement.createTextChild(
- WebInspector.UIString("in the main toolbar to enable it.")
- );
+ this
+ ._splashScreenElement.createTextChild(WebInspector.UIString("in the main toolbar to enable it."));
} else {
- this._splashScreenElement.appendChild(
- createTextButton(
- WebInspector.UIString("Enable emulation"),
- this._toggleEmulationEnabled.bind(this),
- "overrides-enable-button"
- )
- );
+ this
+ ._splashScreenElement.appendChild(createTextButton(WebInspector.UIString("Enable emulation"), this._toggleEmulationEnabled.bind(this), "overrides-enable-button"));
}
this._warningFooter = this.element.createChild("div", "overrides-footer");
this._overridesWarningUpdated();
- WebInspector.overridesSupport.addEventListener(
- WebInspector.OverridesSupport.Events.OverridesWarningUpdated,
- this._overridesWarningUpdated,
- this
- );
- WebInspector.overridesSupport.addEventListener(
- WebInspector.OverridesSupport.Events.EmulationStateChanged,
- this._emulationStateChanged,
- this
- );
+ WebInspector
+ .overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this);
+ WebInspector
+ .overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.EmulationStateChanged, this._emulationStateChanged, this);
this._emulationStateChanged();
};
@@ -144,24 +124,16 @@ WebInspector.OverridesView.prototype = {
this._warningFooter.textContent = message;
},
_toggleEmulationEnabled: function() {
- WebInspector.overridesSupport.setEmulationEnabled(
- !WebInspector.overridesSupport.emulationEnabled()
- );
+ WebInspector
+ .overridesSupport.setEmulationEnabled(!WebInspector.overridesSupport.emulationEnabled());
},
_emulationStateChanged: function() {
- this._unavailableSplashScreenElement.classList.toggle(
- "hidden",
- WebInspector.overridesSupport.canEmulate()
- );
- this._tabbedPane.element.classList.toggle(
- "hidden",
- !WebInspector.overridesSupport.emulationEnabled()
- );
- this._splashScreenElement.classList.toggle(
- "hidden",
- WebInspector.overridesSupport.emulationEnabled() ||
- !WebInspector.overridesSupport.canEmulate()
- );
+ this
+ ._unavailableSplashScreenElement.classList.toggle("hidden", WebInspector.overridesSupport.canEmulate());
+ this
+ ._tabbedPane.element.classList.toggle("hidden", !WebInspector.overridesSupport.emulationEnabled());
+ this
+ ._splashScreenElement.classList.toggle("hidden", WebInspector.overridesSupport.emulationEnabled() || !WebInspector.overridesSupport.canEmulate());
},
__proto__: WebInspector.VBox.prototype
};
@@ -239,27 +211,15 @@ WebInspector.OverridesView.Tab.prototype = {
* @extends {WebInspector.OverridesView.Tab}
*/
WebInspector.OverridesView.DeviceTab = function() {
- WebInspector.OverridesView.Tab.call(
- this,
- "device",
- WebInspector.UIString("Device"),
- [
- WebInspector.overridesSupport.settings.emulateResolution,
- WebInspector.overridesSupport.settings.deviceScaleFactor,
- WebInspector.overridesSupport.settings.emulateMobile
- ]
- );
+ WebInspector
+ .OverridesView.Tab.call(this, "device", WebInspector.UIString("Device"), [ WebInspector.overridesSupport.settings.emulateResolution, WebInspector.overridesSupport.settings.deviceScaleFactor, WebInspector.overridesSupport.settings.emulateMobile ]);
this.element.classList.add("overrides-device");
this.element.appendChild(this._createDeviceElement());
var footnote = this.element.createChild("p", "help-footnote");
- footnote.appendChild(
- WebInspector.linkifyDocumentationURLAsNode(
- "device-mode",
- WebInspector.UIString("More information about screen emulation")
- )
- );
+ footnote
+ .appendChild(WebInspector.linkifyDocumentationURLAsNode("device-mode", WebInspector.UIString("More information about screen emulation")));
};
WebInspector.OverridesView.DeviceTab.prototype = {
@@ -275,11 +235,11 @@ WebInspector.OverridesView.DeviceTab.prototype = {
"Model:"
);
- deviceModelElement.appendChild(
- WebInspector.OverridesUI.createDeviceSelect()
- );
+ deviceModelElement
+ .appendChild(WebInspector.OverridesUI.createDeviceSelect());
- var emulateResolutionCheckbox = WebInspector.SettingsUI.createSettingCheckbox(
+ var emulateResolutionCheckbox = WebInspector.SettingsUI
+ .createSettingCheckbox(
WebInspector.UIString("Emulate screen resolution"),
WebInspector.overridesSupport.settings.emulateResolution,
true
@@ -317,13 +277,8 @@ WebInspector.OverridesView.DeviceTab.prototype = {
this._swapDimensionsElement.title = WebInspector.UIString(
"Swap dimensions"
);
- this._swapDimensionsElement.addEventListener(
- "click",
- WebInspector.overridesSupport.swapDimensions.bind(
- WebInspector.overridesSupport
- ),
- false
- );
+ this
+ ._swapDimensionsElement.addEventListener("click", WebInspector.overridesSupport.swapDimensions.bind(WebInspector.overridesSupport), false);
this._swapDimensionsElement.tabIndex = -1;
var heightOverrideInput = WebInspector.SettingsUI.createSettingInputField(
"",
@@ -351,19 +306,8 @@ WebInspector.OverridesView.DeviceTab.prototype = {
.createTextChild(WebInspector.UIString("Device pixel ratio:"));
rowElement
.createChild("td")
- .appendChild(
- WebInspector.SettingsUI.createSettingInputField(
- "",
- WebInspector.overridesSupport.settings.deviceScaleFactor,
- true,
- 4,
- "80px",
- WebInspector.OverridesSupport.deviceScaleFactorValidator,
- true,
- true,
- WebInspector.UIString("–")
- )
- );
+
+ .appendChild(WebInspector.SettingsUI.createSettingInputField("", WebInspector.overridesSupport.settings.deviceScaleFactor, true, 4, "80px", WebInspector.OverridesSupport.deviceScaleFactorValidator, true, true, WebInspector.UIString("–")));
var mobileCheckbox = this._createSettingCheckbox(
WebInspector.UIString("Emulate mobile"),
@@ -374,12 +318,8 @@ WebInspector.OverridesView.DeviceTab.prototype = {
);
fieldsetElement.appendChild(mobileCheckbox);
- fieldsetElement.appendChild(
- this._createSettingCheckbox(
- WebInspector.UIString("Shrink to fit"),
- WebInspector.overridesSupport.settings.deviceFitWindow
- )
- );
+ fieldsetElement
+ .appendChild(this._createSettingCheckbox(WebInspector.UIString("Shrink to fit"), WebInspector.overridesSupport.settings.deviceFitWindow));
return fieldsetElement;
},
@@ -392,12 +332,8 @@ WebInspector.OverridesView.DeviceTab.prototype = {
*/
WebInspector.OverridesView.MediaTab = function() {
var settings = [ WebInspector.overridesSupport.settings.overrideCSSMedia ];
- WebInspector.OverridesView.Tab.call(
- this,
- "media",
- WebInspector.UIString("Media"),
- settings
- );
+ WebInspector
+ .OverridesView.Tab.call(this, "media", WebInspector.UIString("Media"), settings);
this.element.classList.add("overrides-media");
this._createMediaEmulationFragment();
@@ -415,7 +351,8 @@ WebInspector.OverridesView.MediaTab.prototype = {
);
var mediaSelectElement = fieldsetElement.createChild("select");
var mediaTypes = WebInspector.CSSStyleModel.MediaTypes;
- var defaultMedia = WebInspector.overridesSupport.settings.emulatedCSSMedia.get();
+ var defaultMedia = WebInspector.overridesSupport.settings.emulatedCSSMedia
+ .get();
for (var i = 0; i < mediaTypes.length; ++i) {
var mediaType = mediaTypes[i];
if (mediaType === "all") {
@@ -431,11 +368,8 @@ WebInspector.OverridesView.MediaTab.prototype = {
1;
}
- mediaSelectElement.addEventListener(
- "change",
- this._emulateMediaChanged.bind(this, mediaSelectElement),
- false
- );
+ mediaSelectElement
+ .addEventListener("change", this._emulateMediaChanged.bind(this, mediaSelectElement), false);
var fragment = createDocumentFragment();
fragment.appendChild(checkbox);
fragment.appendChild(fieldsetElement);
@@ -453,16 +387,8 @@ WebInspector.OverridesView.MediaTab.prototype = {
* @extends {WebInspector.OverridesView.Tab}
*/
WebInspector.OverridesView.NetworkTab = function() {
- WebInspector.OverridesView.Tab.call(
- this,
- "network",
- WebInspector.UIString("Network"),
- [],
- [
- this._userAgentOverrideEnabled.bind(this),
- this._networkThroughputIsLimited.bind(this)
- ]
- );
+ WebInspector
+ .OverridesView.Tab.call(this, "network", WebInspector.UIString("Network"), [], [ this._userAgentOverrideEnabled.bind(this), this._networkThroughputIsLimited.bind(this) ]);
this.element.classList.add("overrides-network");
this._createNetworkConditionsElement();
this._createUserAgentSection();
@@ -481,14 +407,11 @@ WebInspector.OverridesView.NetworkTab.prototype = {
"Limit network throughput:"
);
fieldsetElement.createChild("br");
- fieldsetElement.appendChild(
- WebInspector.OverridesUI.createNetworkConditionsSelect()
- );
+ fieldsetElement
+ .appendChild(WebInspector.OverridesUI.createNetworkConditionsSelect());
- WebInspector.overridesSupport.settings.networkConditions.addChangeListener(
- this.updateActiveState,
- this
- );
+ WebInspector
+ .overridesSupport.settings.networkConditions.addChangeListener(this.updateActiveState, this);
},
/**
* @return {boolean}
@@ -501,14 +424,13 @@ WebInspector.OverridesView.NetworkTab.prototype = {
fieldsetElement.createChild("label").textContent = WebInspector.UIString(
"Spoof user agent:"
);
- var selectAndInput = WebInspector.OverridesUI.createUserAgentSelectAndInput();
+ var selectAndInput = WebInspector.OverridesUI
+ .createUserAgentSelectAndInput();
fieldsetElement.appendChild(selectAndInput.select);
fieldsetElement.appendChild(selectAndInput.input);
- WebInspector.overridesSupport.settings.userAgent.addChangeListener(
- this.updateActiveState,
- this
- );
+ WebInspector
+ .overridesSupport.settings.userAgent.addChangeListener(this.updateActiveState, this);
},
__proto__: WebInspector.OverridesView.Tab.prototype
};
@@ -518,49 +440,29 @@ WebInspector.OverridesView.NetworkTab.prototype = {
* @extends {WebInspector.OverridesView.Tab}
*/
WebInspector.OverridesView.SensorsTab = function() {
- WebInspector.OverridesView.Tab.call(
- this,
- "sensors",
- WebInspector.UIString("Sensors"),
- [
- WebInspector.overridesSupport.settings.overrideGeolocation,
- WebInspector.overridesSupport.settings.overrideDeviceOrientation,
- WebInspector.overridesSupport.settings.emulateTouch
- ]
- );
+ WebInspector
+ .OverridesView.Tab.call(this, "sensors", WebInspector.UIString("Sensors"), [ WebInspector.overridesSupport.settings.overrideGeolocation, WebInspector.overridesSupport.settings.overrideDeviceOrientation, WebInspector.overridesSupport.settings.emulateTouch ]);
this.element.classList.add("overrides-sensors");
this.registerRequiredCSS("main/accelerometer.css");
- this.element.appendChild(
- this._createSettingCheckbox(
- WebInspector.UIString("Emulate touch screen"),
- WebInspector.overridesSupport.settings.emulateTouch,
- undefined
- )
- );
+ this
+ .element.appendChild(this._createSettingCheckbox(WebInspector.UIString("Emulate touch screen"), WebInspector.overridesSupport.settings.emulateTouch, undefined));
this._appendGeolocationOverrideControl();
this._apendDeviceOrientationOverrideControl();
};
WebInspector.OverridesView.SensorsTab.prototype = {
_appendGeolocationOverrideControl: function() {
- const geolocationSetting = WebInspector.overridesSupport.settings.geolocationOverride.get();
- var geolocation = WebInspector.OverridesSupport.GeolocationPosition.parseSetting(
- geolocationSetting
- );
- this.element.appendChild(
- this._createSettingCheckbox(
- WebInspector.UIString("Emulate geolocation coordinates"),
- WebInspector.overridesSupport.settings.overrideGeolocation,
- this._geolocationOverrideCheckboxClicked.bind(this)
- )
- );
- this.element.appendChild(
- this._createGeolocationOverrideElement(geolocation)
- );
- this._geolocationOverrideCheckboxClicked(
- WebInspector.overridesSupport.settings.overrideGeolocation.get()
- );
+ const geolocationSetting = WebInspector.overridesSupport.settings
+ .geolocationOverride.get();
+ var geolocation = WebInspector.OverridesSupport.GeolocationPosition
+ .parseSetting(geolocationSetting);
+ this
+ .element.appendChild(this._createSettingCheckbox(WebInspector.UIString("Emulate geolocation coordinates"), WebInspector.overridesSupport.settings.overrideGeolocation, this._geolocationOverrideCheckboxClicked.bind(this)));
+ this
+ .element.appendChild(this._createGeolocationOverrideElement(geolocation));
+ this
+ ._geolocationOverrideCheckboxClicked(WebInspector.overridesSupport.settings.overrideGeolocation.get());
},
/**
* @param {boolean} enabled
@@ -569,14 +471,8 @@ WebInspector.OverridesView.SensorsTab.prototype = {
if (enabled && !this._latitudeElement.value) this._latitudeElement.focus();
},
_applyGeolocationUserInput: function() {
- this._setGeolocationPosition(
- WebInspector.OverridesSupport.GeolocationPosition.parseUserInput(
- this._latitudeElement.value.trim(),
- this._longitudeElement.value.trim(),
- this._geolocationErrorElement.checked
- ),
- true
- );
+ this
+ ._setGeolocationPosition(WebInspector.OverridesSupport.GeolocationPosition.parseUserInput(this._latitudeElement.value.trim(), this._longitudeElement.value.trim(), this._geolocationErrorElement.checked), true);
},
/**
* @param {?WebInspector.OverridesSupport.GeolocationPosition} geolocation
@@ -631,7 +527,8 @@ WebInspector.OverridesView.SensorsTab.prototype = {
WebInspector.UIString("Emulate position unavailable"),
!geolocation || !!geolocation.error
);
- var geolocationErrorCheckboxElement = geolocationErrorLabelElement.checkboxElement;
+ var geolocationErrorCheckboxElement = geolocationErrorLabelElement
+ .checkboxElement;
geolocationErrorCheckboxElement.id = "geolocation-error";
geolocationErrorCheckboxElement.addEventListener(
"click",
@@ -644,23 +541,16 @@ WebInspector.OverridesView.SensorsTab.prototype = {
return fieldsetElement;
},
_apendDeviceOrientationOverrideControl: function() {
- const deviceOrientationSetting = WebInspector.overridesSupport.settings.deviceOrientationOverride.get();
- var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation.parseSetting(
- deviceOrientationSetting
- );
- this.element.appendChild(
- this._createSettingCheckbox(
- WebInspector.UIString("Accelerometer"),
- WebInspector.overridesSupport.settings.overrideDeviceOrientation,
- this._deviceOrientationOverrideCheckboxClicked.bind(this)
- )
- );
- this.element.appendChild(
- this._createDeviceOrientationOverrideElement(deviceOrientation)
- );
- this._deviceOrientationOverrideCheckboxClicked(
- WebInspector.overridesSupport.settings.overrideDeviceOrientation.get()
- );
+ const deviceOrientationSetting = WebInspector.overridesSupport.settings
+ .deviceOrientationOverride.get();
+ var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation
+ .parseSetting(deviceOrientationSetting);
+ this
+ .element.appendChild(this._createSettingCheckbox(WebInspector.UIString("Accelerometer"), WebInspector.overridesSupport.settings.overrideDeviceOrientation, this._deviceOrientationOverrideCheckboxClicked.bind(this)));
+ this
+ .element.appendChild(this._createDeviceOrientationOverrideElement(deviceOrientation));
+ this
+ ._deviceOrientationOverrideCheckboxClicked(WebInspector.overridesSupport.settings.overrideDeviceOrientation.get());
},
/**
* @param {boolean} enabled
@@ -669,20 +559,12 @@ WebInspector.OverridesView.SensorsTab.prototype = {
if (enabled && !this._alphaElement.value) this._alphaElement.focus();
},
_applyDeviceOrientationUserInput: function() {
- this._setDeviceOrientation(
- WebInspector.OverridesSupport.DeviceOrientation.parseUserInput(
- this._alphaElement.value.trim(),
- this._betaElement.value.trim(),
- this._gammaElement.value.trim()
- ),
- WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource.UserInput
- );
+ this
+ ._setDeviceOrientation(WebInspector.OverridesSupport.DeviceOrientation.parseUserInput(this._alphaElement.value.trim(), this._betaElement.value.trim(), this._gammaElement.value.trim()), WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource.UserInput);
},
_resetDeviceOrientation: function() {
- this._setDeviceOrientation(
- new WebInspector.OverridesSupport.DeviceOrientation(0, 0, 0),
- WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource.ResetButton
- );
+ this
+ ._setDeviceOrientation(new WebInspector.OverridesSupport.DeviceOrientation(0, 0, 0), WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource.ResetButton);
},
/**
* @param {?WebInspector.OverridesSupport.DeviceOrientation} deviceOrientation
@@ -693,7 +575,8 @@ WebInspector.OverridesView.SensorsTab.prototype = {
if (
modificationSource !=
- WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource.UserInput
+ WebInspector.OverridesView.SensorsTab
+ .DeviceOrientationModificationSource.UserInput
) {
this._alphaElement.value = deviceOrientation.alpha;
this._betaElement.value = deviceOrientation.beta;
@@ -702,7 +585,8 @@ WebInspector.OverridesView.SensorsTab.prototype = {
if (
modificationSource !=
- WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource.UserDrag
+ WebInspector.OverridesView.SensorsTab
+ .DeviceOrientationModificationSource.UserDrag
)
this._setBoxOrientation(deviceOrientation);
@@ -834,10 +718,8 @@ WebInspector.OverridesView.SensorsTab.prototype = {
-eulerAngles.beta,
eulerAngles.gamma
);
- this._setDeviceOrientation(
- newOrientation,
- WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource.UserDrag
- );
+ this
+ ._setDeviceOrientation(newOrientation, WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource.UserDrag);
return false;
},
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/RenderingOptions.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/RenderingOptions.js
index 67e3cfe..2088db9 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/RenderingOptions.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/RenderingOptions.js
@@ -37,26 +37,16 @@ WebInspector.RenderingOptions = function() {
* @type {!Map.<!WebInspector.Setting, string>}
*/
this._setterNames = new Map();
- this._mapSettingToSetter(
- WebInspector.settings.showPaintRects,
- "setShowPaintRects"
- );
- this._mapSettingToSetter(
- WebInspector.settings.showDebugBorders,
- "setShowDebugBorders"
- );
- this._mapSettingToSetter(
- WebInspector.settings.showFPSCounter,
- "setShowFPSCounter"
- );
- this._mapSettingToSetter(
- WebInspector.settings.continuousPainting,
- "setContinuousPaintingEnabled"
- );
- this._mapSettingToSetter(
- WebInspector.settings.showScrollBottleneckRects,
- "setShowScrollBottleneckRects"
- );
+ this
+ ._mapSettingToSetter(WebInspector.settings.showPaintRects, "setShowPaintRects");
+ this
+ ._mapSettingToSetter(WebInspector.settings.showDebugBorders, "setShowDebugBorders");
+ this
+ ._mapSettingToSetter(WebInspector.settings.showFPSCounter, "setShowFPSCounter");
+ this
+ ._mapSettingToSetter(WebInspector.settings.continuousPainting, "setContinuousPaintingEnabled");
+ this
+ ._mapSettingToSetter(WebInspector.settings.showScrollBottleneckRects, "setShowScrollBottleneckRects");
WebInspector.targetManager.observeTargets(this);
};
@@ -110,30 +100,14 @@ WebInspector.RenderingOptions.View = function() {
"div",
"settings-tab help-content help-container help-no-columns"
);
- div.appendChild(
- WebInspector.SettingsUI.createSettingCheckbox(
- WebInspector.UIString("Show paint rectangles"),
- WebInspector.settings.showPaintRects
- )
- );
- div.appendChild(
- WebInspector.SettingsUI.createSettingCheckbox(
- WebInspector.UIString("Show composited layer borders"),
- WebInspector.settings.showDebugBorders
- )
- );
- div.appendChild(
- WebInspector.SettingsUI.createSettingCheckbox(
- WebInspector.UIString("Show FPS meter"),
- WebInspector.settings.showFPSCounter
- )
- );
- div.appendChild(
- WebInspector.SettingsUI.createSettingCheckbox(
- WebInspector.UIString("Enable continuous page repainting"),
- WebInspector.settings.continuousPainting
- )
- );
+ div
+ .appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Show paint rectangles"), WebInspector.settings.showPaintRects));
+ div
+ .appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Show composited layer borders"), WebInspector.settings.showDebugBorders));
+ div
+ .appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Show FPS meter"), WebInspector.settings.showFPSCounter));
+ div
+ .appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Enable continuous page repainting"), WebInspector.settings.continuousPainting));
var child = WebInspector.SettingsUI.createSettingCheckbox(
WebInspector.UIString("Show potential scroll bottlenecks"),
WebInspector.settings.showScrollBottleneckRects
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Tests.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Tests.js
index 4a8ee27..342e163 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Tests.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Tests.js
@@ -80,7 +80,8 @@ function createTestSuite(domAutomationController) {
* hadn't been shown by the moment inspected paged refreshed.
* @see http://crbug.com/26312
*/
- TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function() {
+ TestSuite.prototype
+ .testScriptsTabIsPopulatedOnInspectedPageRefresh = function() {
var test = this;
var debuggerModel = WebInspector.targetManager.mainTarget().debuggerModel;
debuggerModel.addEventListener(
@@ -90,9 +91,8 @@ function createTestSuite(domAutomationController) {
this.showPanel("elements").then(function() {
// Reload inspected page. It will reset the debugger agent.
- test.evaluateInConsole_("window.location.reload(true);", function(
- resultText
- ) {});
+ test
+ .evaluateInConsole_("window.location.reload(true);", function(resultText) {});
});
function waitUntilScriptIsParsed() {
@@ -101,12 +101,10 @@ function createTestSuite(domAutomationController) {
waitUntilScriptIsParsed
);
test.showPanel("sources").then(function() {
- test._waitUntilScriptsAreParsed(
- [ "debugger_test_page.html" ],
- function() {
- test.releaseControl();
- }
- );
+ test
+ ._waitUntilScriptsAreParsed([ "debugger_test_page.html" ], function() {
+ test.releaseControl();
+ });
});
}
@@ -120,12 +118,10 @@ function createTestSuite(domAutomationController) {
TestSuite.prototype.testContentScriptIsPresent = function() {
var test = this;
this.showPanel("sources").then(function() {
- test._waitUntilScriptsAreParsed(
- [ "page_with_content_script.html", "simple_content_script.js" ],
- function() {
- test.releaseControl();
- }
- );
+ test
+ ._waitUntilScriptsAreParsed([ "page_with_content_script.html", "simple_content_script.js" ], function() {
+ test.releaseControl();
+ });
});
// Wait until all scripts are added to the debugger.
@@ -157,10 +153,8 @@ function createTestSuite(domAutomationController) {
}
function checkScriptsPanel() {
- test.assertTrue(
- test._scriptsAreParsed([ "debugger_test_page.html" ]),
- "Some scripts are missing."
- );
+ test
+ .assertTrue(test._scriptsAreParsed([ "debugger_test_page.html" ]), "Some scripts are missing.");
checkNoDuplicates();
test.releaseControl();
}
@@ -180,13 +174,11 @@ function createTestSuite(domAutomationController) {
}
this.showPanel("sources").then(function() {
- test._waitUntilScriptsAreParsed(
- [ "debugger_test_page.html" ],
- function() {
- checkNoDuplicates();
- setTimeout(switchToElementsTab, 0);
- }
- );
+ test
+ ._waitUntilScriptsAreParsed([ "debugger_test_page.html" ], function() {
+ checkNoDuplicates();
+ setTimeout(switchToElementsTab, 0);
+ });
});
// Wait until all scripts are added to the debugger.
@@ -222,10 +214,8 @@ function createTestSuite(domAutomationController) {
);
function didEvaluateInConsole(resultText) {
- this.assertTrue(
- !isNaN(resultText),
- "Failed to get timer id: " + resultText
- );
+ this
+ .assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
// Wait for some time to make sure that inspected page is running the
// infinite loop.
setTimeout(testScriptPause.bind(this), 300);
@@ -249,29 +239,19 @@ function createTestSuite(domAutomationController) {
var test = this;
function finishResource(resource, finishTime) {
- test.assertEquals(
- 219,
- resource.transferSize,
- "Incorrect total encoded data length"
- );
- test.assertEquals(
- 25,
- resource.resourceSize,
- "Incorrect total data length"
- );
+ test
+ .assertEquals(219, resource.transferSize, "Incorrect total encoded data length");
+ test
+ .assertEquals(25, resource.resourceSize, "Incorrect total data length");
test.releaseControl();
}
- this.addSniffer(
- WebInspector.NetworkDispatcher.prototype,
- "_finishNetworkRequest",
- finishResource
- );
+ this
+ .addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
// Reload inspected page to sniff network events
- test.evaluateInConsole_("window.location.reload(true);", function(
- resultText
- ) {});
+ test
+ .evaluateInConsole_("window.location.reload(true);", function(resultText) {});
this.takeControl();
};
@@ -283,30 +263,19 @@ function createTestSuite(domAutomationController) {
var test = this;
function finishResource(resource, finishTime) {
- test.assertEquals(
- 219,
- resource.transferSize,
- "Incorrect total encoded data length"
- );
- test.assertEquals(
- 25,
- resource.resourceSize,
- "Incorrect total data length"
- );
+ test
+ .assertEquals(219, resource.transferSize, "Incorrect total encoded data length");
+ test
+ .assertEquals(25, resource.resourceSize, "Incorrect total data length");
test.releaseControl();
}
- this.addSniffer(
- WebInspector.NetworkDispatcher.prototype,
- "_finishNetworkRequest",
- finishResource
- );
+ this
+ .addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
// Send synchronous XHR to sniff network events
- test.evaluateInConsole_(
- 'var xhr = new XMLHttpRequest(); xhr.open("GET", "chunked", false); xhr.send(null);',
- function() {}
- );
+ test
+ .evaluateInConsole_('var xhr = new XMLHttpRequest(); xhr.open("GET", "chunked", false); xhr.send(null);', function() {});
this.takeControl();
};
@@ -320,24 +289,17 @@ function createTestSuite(domAutomationController) {
function finishResource(resource, finishTime) {
if (!resource.responseHeadersText)
test.fail("Failure: resource does not have response headers text");
- test.assertEquals(
- 164,
- resource.responseHeadersText.length,
- "Incorrect response headers text length"
- );
+ test
+ .assertEquals(164, resource.responseHeadersText.length, "Incorrect response headers text length");
test.releaseControl();
}
- this.addSniffer(
- WebInspector.NetworkDispatcher.prototype,
- "_finishNetworkRequest",
- finishResource
- );
+ this
+ .addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
// Reload inspected page to sniff network events
- test.evaluateInConsole_("window.location.reload(true);", function(
- resultText
- ) {});
+ test
+ .evaluateInConsole_("window.location.reload(true);", function(resultText) {});
this.takeControl();
};
@@ -352,47 +314,22 @@ function createTestSuite(domAutomationController) {
// Setting relaxed expectations to reduce flakiness.
// Server sends headers after 100ms, then sends data during another 100ms.
// We expect these times to be measured at least as 70ms.
- test.assertTrue(
- resource.timing.receiveHeadersEnd - resource.timing.connectStart >= 70,
- "Time between receiveHeadersEnd and connectStart should be >=70ms, but was " +
- "receiveHeadersEnd=" +
- resource.timing.receiveHeadersEnd +
- ", connectStart=" +
- resource.timing.connectStart +
- "."
- );
- test.assertTrue(
- resource.responseReceivedTime - resource.startTime >= 0.07,
- "Time between responseReceivedTime and startTime should be >=0.07s, but was " +
- "responseReceivedTime=" +
- resource.responseReceivedTime +
- ", startTime=" +
- resource.startTime +
- "."
- );
- test.assertTrue(
- resource.endTime - resource.startTime >= 0.14,
- "Time between endTime and startTime should be >=0.14s, but was " +
- "endtime=" +
- resource.endTime +
- ", startTime=" +
- resource.startTime +
- "."
- );
+ test
+ .assertTrue(resource.timing.receiveHeadersEnd - resource.timing.connectStart >= 70, "Time between receiveHeadersEnd and connectStart should be >=70ms, but was " + "receiveHeadersEnd=" + resource.timing.receiveHeadersEnd + ", connectStart=" + resource.timing.connectStart + ".");
+ test
+ .assertTrue(resource.responseReceivedTime - resource.startTime >= 0.07, "Time between responseReceivedTime and startTime should be >=0.07s, but was " + "responseReceivedTime=" + resource.responseReceivedTime + ", startTime=" + resource.startTime + ".");
+ test
+ .assertTrue(resource.endTime - resource.startTime >= 0.14, "Time between endTime and startTime should be >=0.14s, but was " + "endtime=" + resource.endTime + ", startTime=" + resource.startTime + ".");
test.releaseControl();
}
- this.addSniffer(
- WebInspector.NetworkDispatcher.prototype,
- "_finishNetworkRequest",
- finishResource
- );
+ this
+ .addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
// Reload inspected page to sniff network events
- test.evaluateInConsole_("window.location.reload(true);", function(
- resultText
- ) {});
+ test
+ .evaluateInConsole_("window.location.reload(true);", function(resultText) {});
this.takeControl();
};
@@ -408,20 +345,15 @@ function createTestSuite(domAutomationController) {
);
function firstConsoleMessageReceived() {
- WebInspector.multitargetConsoleModel.removeEventListener(
- WebInspector.ConsoleModel.Events.MessageAdded,
- firstConsoleMessageReceived,
- this
- );
+ WebInspector
+ .multitargetConsoleModel.removeEventListener(WebInspector.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this);
this.evaluateInConsole_("clickLink();", didClickLink.bind(this));
}
function didClickLink() {
// Check that there are no new messages(command is not a message).
- this.assertEquals(
- 3,
- WebInspector.multitargetConsoleModel.messages().length
- );
+ this
+ .assertEquals(3, WebInspector.multitargetConsoleModel.messages().length);
this.evaluateInConsole_("history.back();", didNavigateBack.bind(this));
}
@@ -431,10 +363,8 @@ function createTestSuite(domAutomationController) {
}
function didCompleteNavigation() {
- this.assertEquals(
- 7,
- WebInspector.multitargetConsoleModel.messages().length
- );
+ this
+ .assertEquals(7, WebInspector.multitargetConsoleModel.messages().length);
this.releaseControl();
}
@@ -445,11 +375,8 @@ function createTestSuite(domAutomationController) {
var target = WebInspector.targetManager.mainTarget();
target.pageAgent().navigate("about:crash");
target.pageAgent().navigate("about:blank");
- target.runtimeModel.addEventListener(
- WebInspector.RuntimeModel.Events.ExecutionContextCreated,
- this.releaseControl,
- this
- );
+ target
+ .runtimeModel.addEventListener(WebInspector.RuntimeModel.Events.ExecutionContextCreated, this.releaseControl, this);
};
TestSuite.prototype.testSharedWorker = function() {
@@ -469,22 +396,16 @@ function createTestSuite(domAutomationController) {
if (isReady()) return;
this.takeControl();
- this.addSniffer(
- WebInspector.TargetManager.prototype,
- "addTarget",
- targetAdded.bind(this)
- );
+ this
+ .addSniffer(WebInspector.TargetManager.prototype, "addTarget", targetAdded.bind(this));
function targetAdded() {
if (isReady()) {
this.releaseControl();
return;
}
- this.addSniffer(
- WebInspector.TargetManager.prototype,
- "addTarget",
- targetAdded.bind(this)
- );
+ this
+ .addSniffer(WebInspector.TargetManager.prototype, "addTarget", targetAdded.bind(this));
}
};
@@ -496,10 +417,8 @@ function createTestSuite(domAutomationController) {
};
TestSuite.prototype.enableTouchEmulation = function() {
- WebInspector.targetManager.mainTarget().domModel.emulateTouchEventObjects(
- true,
- "mobile"
- );
+ WebInspector
+ .targetManager.mainTarget().domModel.emulateTouchEventObjects(true, "mobile");
};
// Regression test for crbug.com/370035.
@@ -521,18 +440,13 @@ function createTestSuite(domAutomationController) {
.invoke_setDeviceMetricsOverride(params, getMetrics);
function getMetrics() {
- test.evaluateInConsole_(
- "(" + dumpPageMetrics.toString() + ")()",
- checkMetrics
- );
+ test
+ .evaluateInConsole_("(" + dumpPageMetrics.toString() + ")()", checkMetrics);
}
function checkMetrics(consoleResult) {
- test.assertEquals(
- '"' + JSON.stringify(metrics) + '"',
- consoleResult,
- "Wrong metrics for params: " + JSON.stringify(params)
- );
+ test
+ .assertEquals('"' + JSON.stringify(metrics) + '"', consoleResult, "Wrong metrics for params: " + JSON.stringify(params));
callback();
}
}
@@ -599,10 +513,8 @@ function createTestSuite(domAutomationController) {
WebInspector.overridesSupport._deviceMetricsChangedListenerMuted = true;
test.takeControl();
- this.waitForThrottler(
- WebInspector.overridesSupport._deviceMetricsThrottler,
- step1
- );
+ this
+ .waitForThrottler(WebInspector.overridesSupport._deviceMetricsThrottler, step1);
};
TestSuite.prototype.waitForTestResultsInConsole = function() {
@@ -619,11 +531,8 @@ function createTestSuite(domAutomationController) {
else if (/^FAIL/.test(text)) this.fail(text);
}
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.MessageAdded,
- onConsoleMessage,
- this
- );
+ WebInspector
+ .multitargetConsoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
this.takeControl();
};
@@ -668,16 +577,12 @@ function createTestSuite(domAutomationController) {
*/
TestSuite.prototype.evaluateInConsole_ = function(code, callback) {
function innerEvaluate() {
- WebInspector.context.removeFlavorChangeListener(
- WebInspector.ExecutionContext,
- showConsoleAndEvaluate,
- this
- );
+ WebInspector
+ .context.removeFlavorChangeListener(WebInspector.ExecutionContext, showConsoleAndEvaluate, this);
var consoleView = WebInspector.ConsolePanel._view();
consoleView._prompt.setText(code);
- consoleView._promptElement.dispatchEvent(
- TestSuite.createKeyEvent("Enter")
- );
+ consoleView
+ ._promptElement.dispatchEvent(TestSuite.createKeyEvent("Enter"));
this.addSniffer(
WebInspector.ConsoleView.prototype,
@@ -693,11 +598,8 @@ function createTestSuite(domAutomationController) {
}
if (!WebInspector.context.flavor(WebInspector.ExecutionContext)) {
- WebInspector.context.addFlavorChangeListener(
- WebInspector.ExecutionContext,
- showConsoleAndEvaluate,
- this
- );
+ WebInspector
+ .context.addFlavorChangeListener(WebInspector.ExecutionContext, showConsoleAndEvaluate, this);
return;
}
showConsoleAndEvaluate.call(this);
@@ -731,11 +633,8 @@ function createTestSuite(domAutomationController) {
* @param {function():void} callback
*/
TestSuite.prototype._waitForScriptPause = function(callback) {
- this.addSniffer(
- WebInspector.DebuggerModel.prototype,
- "_pausedScript",
- callback
- );
+ this
+ .addSniffer(WebInspector.DebuggerModel.prototype, "_pausedScript", callback);
};
/**
@@ -749,11 +648,8 @@ function createTestSuite(domAutomationController) {
function waitForAllScripts() {
if (test._scriptsAreParsed(expectedScripts)) callback();
- else test.addSniffer(
- WebInspector.panels.sources.sourcesView(),
- "_addUISourceCode",
- waitForAllScripts
- );
+ else test
+ .addSniffer(WebInspector.panels.sources.sourcesView(), "_addUISourceCode", waitForAllScripts);
}
waitForAllScripts();
@@ -764,14 +660,8 @@ function createTestSuite(domAutomationController) {
*/
TestSuite.createKeyEvent = function(keyIdentifier) {
var evt = document.createEvent("KeyboardEvent");
- evt.initKeyboardEvent(
- "keydown",
- true /* can bubble */,
- true /* can cancel */,
- null /* view */,
- keyIdentifier,
- ""
- );
+ evt
+ .initKeyboardEvent("keydown", true /* can bubble */, true /* can cancel */, null /* view */, keyIdentifier, "");
return evt;
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/DOMExtension.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/DOMExtension.js
index 5d946a4..b119bc1 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/DOMExtension.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/DOMExtension.js
@@ -135,7 +135,8 @@ Node.prototype.traverseNextTextNode = function(stayWithin) {
var nonTextTags = { STYLE: 1, SCRIPT: 1 };
while (node &&
(node.nodeType !== Node.TEXT_NODE ||
- nonTextTags[node.parentElement.nodeName])) node = node.traverseNextNode(stayWithin);
+ nonTextTags[node.parentElement
+ .nodeName])) node = node.traverseNextNode(stayWithin);
return node;
};
@@ -229,8 +230,9 @@ Node.prototype.enclosingNodeOrSelfWithClass = function(className, stayWithin) {
if (
node.nodeType === Node.ELEMENT_NODE && node.classList.contains(className)
)
- return /** @type {!Element} */
- node;
+ return;
+ /** @type {!Element} */
+ node;
}
return null;
};
@@ -241,11 +243,12 @@ Node.prototype.enclosingNodeOrSelfWithClass = function(className, stayWithin) {
Node.prototype.parentElementOrShadowHost = function() {
var node = this.parentNode;
if (!node) return null;
- if (node.nodeType === Node.ELEMENT_NODE) return /** @type {!Element} */
- node;
- if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE)
- return /** @type {!Element} */
- node.host;
+ if (node.nodeType === Node.ELEMENT_NODE) return;
+ /** @type {!Element} */
+ node;
+ if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) return;
+ /** @type {!Element} */
+ node.host;
return null;
};
@@ -305,13 +308,8 @@ Node.prototype.window = function() {
* @return {?Node}
*/
Element.prototype.query = function(query) {
- return this.ownerDocument.evaluate(
- query,
- this,
- null,
- XPathResult.FIRST_ORDERED_NODE_TYPE,
- null
- ).singleNodeValue;
+ return this
+ .ownerDocument.evaluate(query, this, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
};
Element.prototype.removeChildren = function() {
@@ -465,7 +463,8 @@ Element.prototype.createTextChildren = function(var_args) {
) this.createTextChild(arguments[i]);
};
-DocumentFragment.prototype.createTextChildren = Element.prototype.createTextChildren;
+DocumentFragment.prototype.createTextChildren = Element.prototype
+ .createTextChildren;
/**
* @param {...!Element} var_args
@@ -551,9 +550,8 @@ AnchorBox.prototype.relativeTo = function(box) {
* @return {!AnchorBox}
*/
AnchorBox.prototype.relativeToElement = function(element) {
- return this.relativeTo(
- element.boxInWindow(element.ownerDocument.defaultView)
- );
+ return this
+ .relativeTo(element.boxInWindow(element.ownerDocument.defaultView));
};
/**
@@ -848,7 +846,8 @@ Event.prototype.deepElementFromPoint = function() {
// 2. Find deepest node by coordinates.
node = node.elementFromPoint(this.pageX, this.pageY);
while (node &&
- node.shadowRoot) node = node.shadowRoot.elementFromPoint(this.pageX, this.pageY);
+ node
+ .shadowRoot) node = node.shadowRoot.elementFromPoint(this.pageX, this.pageY);
return node;
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/utilities.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/utilities.js
index 969e9cf..9a8568a 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/utilities.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/utilities.js
@@ -989,12 +989,8 @@ String.tokenizeFormatString = function(format, formatters) {
}
function addSpecifierToken(specifier, precision, substitutionIndex) {
- tokens.push({
- type: "specifier",
- specifier: specifier,
- precision: precision,
- substitutionIndex: substitutionIndex
- });
+ tokens
+ .push({ type: "specifier", specifier: specifier, precision: precision, substitutionIndex: substitutionIndex });
}
var index = 0;
@@ -1085,15 +1081,10 @@ String.standardFormatters = {
* @return {string}
*/
String.vsprintf = function(format, substitutions) {
- return String.format(
- format,
- substitutions,
- String.standardFormatters,
- "",
- function(a, b) {
- return a + b;
- }
- ).formattedResult;
+ return String
+ .format(format, substitutions, String.standardFormatters, "", function(a, b) {
+ return a + b;
+ }).formattedResult;
};
/**
@@ -1440,10 +1431,8 @@ CallbackBarrier.prototype = {
* @param {function()} callback
*/
callWhenDone: function(callback) {
- console.assert(
- !this._outgoingCallback,
- "CallbackBarrier.callWhenDone() is called multiple times"
- );
+ console
+ .assert(!this._outgoingCallback, "CallbackBarrier.callWhenDone() is called multiple times");
this._outgoingCallback = callback;
if (!this._pendingIncomingCallbacksCount) this._outgoingCallback();
},
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/AnimationModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/AnimationModel.js
index 8a21964..0d9cf9f 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/AnimationModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/AnimationModel.js
@@ -10,9 +10,8 @@
WebInspector.AnimationModel = function(target) {
WebInspector.SDKModel.call(this, WebInspector.AnimationModel, target);
this._agent = target.animationAgent();
- target.registerAnimationDispatcher(new WebInspector.AnimationDispatcher(
- this
- ));
+ target
+ .registerAnimationDispatcher(new WebInspector.AnimationDispatcher(this));
};
WebInspector.AnimationModel.Events = {
@@ -71,10 +70,8 @@ WebInspector.AnimationModel.prototype = {
* @param {string} playerId
*/
animationPlayerCanceled: function(playerId) {
- this.dispatchEventToListeners(
- WebInspector.AnimationModel.Events.AnimationPlayerCanceled,
- { playerId: playerId }
- );
+ this
+ .dispatchEventToListeners(WebInspector.AnimationModel.Events.AnimationPlayerCanceled, { playerId: playerId });
},
ensureEnabled: function() {
if (this._enabled) return;
@@ -291,10 +288,8 @@ WebInspector.AnimationModel.AnimationNode.prototype = {
* @return {!WebInspector.DeferredDOMNode}
*/
deferredNode: function() {
- return new WebInspector.DeferredDOMNode(
- this.target(),
- this.backendNodeId()
- );
+ return new WebInspector
+ .DeferredDOMNode(this.target(), this.backendNodeId());
},
/**
* @return {number}
@@ -337,10 +332,8 @@ WebInspector.AnimationModel.KeyframesRule.prototype = {
*/
_setKeyframesPayload: function(payload) {
this._keyframes = payload.map(function(keyframeStyle) {
- return new WebInspector.AnimationModel.KeyframeStyle(
- this._target,
- keyframeStyle
- );
+ return new WebInspector
+ .AnimationModel.KeyframeStyle(this._target, keyframeStyle);
});
},
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ApplicationCacheModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ApplicationCacheModel.js
index 7914047..14fcee5 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ApplicationCacheModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ApplicationCacheModel.js
@@ -34,22 +34,15 @@
WebInspector.ApplicationCacheModel = function(target) {
WebInspector.SDKObject.call(this, target);
- target.registerApplicationCacheDispatcher(
- new WebInspector.ApplicationCacheDispatcher(this)
- );
+ target
+ .registerApplicationCacheDispatcher(new WebInspector.ApplicationCacheDispatcher(this));
this._agent = target.applicationCacheAgent();
this._agent.enable();
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.FrameNavigated,
- this._frameNavigated,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.FrameDetached,
- this._frameDetached,
- this
- );
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, this._frameNavigated, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameDetached, this._frameDetached, this);
this._statuses = {};
this._manifestURLsByFrame = {};
@@ -74,10 +67,8 @@ WebInspector.ApplicationCacheModel.prototype = {
return;
}
- this._agent.getManifestForFrame(
- frame.id,
- this._manifestForFrameLoaded.bind(this, frame.id)
- );
+ this
+ ._agent.getManifestForFrame(frame.id, this._manifestForFrameLoaded.bind(this, frame.id));
},
/**
* @param {!WebInspector.Event} event
@@ -87,9 +78,8 @@ WebInspector.ApplicationCacheModel.prototype = {
this._frameManifestRemoved(frame.id);
},
_mainFrameNavigated: function() {
- this._agent.getFramesWithManifests(
- this._framesWithManifestsLoaded.bind(this)
- );
+ this
+ ._agent.getFramesWithManifests(this._framesWithManifestsLoaded.bind(this));
},
/**
* @param {string} frameId
@@ -145,15 +135,14 @@ WebInspector.ApplicationCacheModel.prototype = {
if (!this._manifestURLsByFrame[frameId]) {
this._manifestURLsByFrame[frameId] = manifestURL;
- this.dispatchEventToListeners(
- WebInspector.ApplicationCacheModel.EventTypes.FrameManifestAdded,
- frameId
- );
+ this
+ .dispatchEventToListeners(WebInspector.ApplicationCacheModel.EventTypes.FrameManifestAdded, frameId);
}
if (statusChanged)
this.dispatchEventToListeners(
- WebInspector.ApplicationCacheModel.EventTypes.FrameManifestStatusUpdated,
+ WebInspector.ApplicationCacheModel.EventTypes
+ .FrameManifestStatusUpdated,
frameId
);
},
@@ -166,10 +155,8 @@ WebInspector.ApplicationCacheModel.prototype = {
delete this._manifestURLsByFrame[frameId];
delete this._statuses[frameId];
- this.dispatchEventToListeners(
- WebInspector.ApplicationCacheModel.EventTypes.FrameManifestRemoved,
- frameId
- );
+ this
+ .dispatchEventToListeners(WebInspector.ApplicationCacheModel.EventTypes.FrameManifestRemoved, frameId);
},
/**
* @param {string} frameId
@@ -225,10 +212,8 @@ WebInspector.ApplicationCacheModel.prototype = {
*/
_networkStateUpdated: function(isNowOnline) {
this._onLine = isNowOnline;
- this.dispatchEventToListeners(
- WebInspector.ApplicationCacheModel.EventTypes.NetworkStateChanged,
- isNowOnline
- );
+ this
+ .dispatchEventToListeners(WebInspector.ApplicationCacheModel.EventTypes.NetworkStateChanged, isNowOnline);
},
__proto__: WebInspector.SDKObject.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CPUProfilerModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CPUProfilerModel.js
index fa353aa..28a24e4 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CPUProfilerModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CPUProfilerModel.js
@@ -39,10 +39,8 @@ WebInspector.CPUProfilerModel = function(target) {
target.profilerAgent().enable();
this._configureCpuProfilerSamplingInterval();
- WebInspector.settings.highResolutionCpuProfiling.addChangeListener(
- this._configureCpuProfilerSamplingInterval,
- this
- );
+ WebInspector
+ .settings.highResolutionCpuProfiling.addChangeListener(this._configureCpuProfilerSamplingInterval, this);
};
WebInspector.CPUProfilerModel.EventTypes = {
@@ -120,9 +118,8 @@ WebInspector.CPUProfilerModel.prototype = {
startRecording: function() {
this._isRecording = true;
this.target().profilerAgent().start();
- this.dispatchEventToListeners(
- WebInspector.CPUProfilerModel.EventTypes.ProfileStarted
- );
+ this
+ .dispatchEventToListeners(WebInspector.CPUProfilerModel.EventTypes.ProfileStarted);
WebInspector.userMetrics.ProfilesCPUProfileTaken.record();
},
/**
@@ -137,16 +134,13 @@ WebInspector.CPUProfilerModel.prototype = {
return value.profile;
}
this._isRecording = false;
- this.dispatchEventToListeners(
- WebInspector.CPUProfilerModel.EventTypes.ProfileStopped
- );
+ this
+ .dispatchEventToListeners(WebInspector.CPUProfilerModel.EventTypes.ProfileStopped);
return this.target().profilerAgent().stop().then(extractProfile);
},
dispose: function() {
- WebInspector.settings.highResolutionCpuProfiling.removeChangeListener(
- this._configureCpuProfilerSamplingInterval,
- this
- );
+ WebInspector
+ .settings.highResolutionCpuProfiling.removeChangeListener(this._configureCpuProfilerSamplingInterval, this);
},
__proto__: WebInspector.SDKModel.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSMetadata.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSMetadata.js
index 3fa8921..c15a669 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSMetadata.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSMetadata.js
@@ -68,16 +68,16 @@ WebInspector.CSSMetadata = function(properties) {
/**
* @type {!WebInspector.CSSMetadata}
*/
-WebInspector.CSSMetadata.cssPropertiesMetainfo = new WebInspector.CSSMetadata(
- []
-);
+WebInspector.CSSMetadata.cssPropertiesMetainfo = new WebInspector
+ .CSSMetadata([]);
/**
* @param {string} propertyName
* @return {boolean}
*/
WebInspector.CSSMetadata.isColorAwareProperty = function(propertyName) {
- return !!WebInspector.CSSMetadata._colorAwareProperties[propertyName.toLowerCase()];
+ return !!WebInspector
+ .CSSMetadata._colorAwareProperties[propertyName.toLowerCase()];
};
/**
@@ -87,7 +87,8 @@ WebInspector.CSSMetadata.isColorAwareProperty = function(propertyName) {
WebInspector.CSSMetadata.isLengthProperty = function(propertyName) {
if (propertyName === "line-height") return false;
if (!WebInspector.CSSMetadata._distancePropertiesKeySet)
- WebInspector.CSSMetadata._distancePropertiesKeySet = WebInspector.CSSMetadata._distanceProperties.keySet();
+ WebInspector.CSSMetadata._distancePropertiesKeySet = WebInspector
+ .CSSMetadata._distanceProperties.keySet();
return WebInspector.CSSMetadata._distancePropertiesKeySet[propertyName] ||
propertyName.startsWith("margin") ||
propertyName.startsWith("padding") ||
@@ -100,7 +101,8 @@ WebInspector.CSSMetadata.isLengthProperty = function(propertyName) {
* @return {boolean}
*/
WebInspector.CSSMetadata.isBezierAwareProperty = function(propertyName) {
- return !!WebInspector.CSSMetadata._bezierAwareProperties[propertyName.toLowerCase()];
+ return !!WebInspector
+ .CSSMetadata._bezierAwareProperties[propertyName.toLowerCase()];
};
// Originally taken from http://www.w3.org/TR/CSS21/propidx.html and augmented.
@@ -168,7 +170,8 @@ WebInspector.CSSMetadata.canonicalPropertyName = function(name) {
return name.toLowerCase();
var match = name.match(/(?:-webkit-)(.+)/);
var propertiesSet = WebInspector.CSSMetadata.cssPropertiesMetainfoKeySet();
- var hasSupportedProperties = WebInspector.CSSMetadata.cssPropertiesMetainfo._values.length >
+ var hasSupportedProperties = WebInspector.CSSMetadata.cssPropertiesMetainfo
+ ._values.length >
0;
if (
!match ||
@@ -184,10 +187,10 @@ WebInspector.CSSMetadata.canonicalPropertyName = function(name) {
* @return {boolean}
*/
WebInspector.CSSMetadata.isPropertyInherited = function(propertyName) {
- return !!(WebInspector.CSSMetadata.InheritedProperties[WebInspector.CSSMetadata.canonicalPropertyName(
- propertyName
- )] ||
- WebInspector.CSSMetadata.NonStandardInheritedProperties[propertyName.toLowerCase()]);
+ return !!(WebInspector.CSSMetadata.InheritedProperties[WebInspector
+ .CSSMetadata.canonicalPropertyName(propertyName)] ||
+ WebInspector.CSSMetadata.NonStandardInheritedProperties[propertyName
+ .toLowerCase()]);
};
WebInspector.CSSMetadata._distanceProperties = [
@@ -1102,7 +1105,8 @@ WebInspector.CSSMetadata.initializeWithSupportedProperties = function(
*/
WebInspector.CSSMetadata.cssPropertiesMetainfoKeySet = function() {
if (!WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet)
- WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet = WebInspector.CSSMetadata.cssPropertiesMetainfo.keySet();
+ WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet = WebInspector
+ .CSSMetadata.cssPropertiesMetainfo.keySet();
return WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet;
};
@@ -1390,9 +1394,8 @@ WebInspector.CSSMetadata.prototype = {
for (var i = 0; i < properties.length; i++) {
var weight = WebInspector.CSSMetadata.Weight[properties[i]];
if (!weight)
- weight = WebInspector.CSSMetadata.Weight[WebInspector.CSSMetadata.canonicalPropertyName(
- properties[i]
- )];
+ weight = WebInspector.CSSMetadata.Weight[WebInspector.CSSMetadata
+ .canonicalPropertyName(properties[i])];
if (weight > maxWeight) {
maxWeight = weight;
index = i;
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSParser.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSParser.js
index bb36a00..083f03e 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSParser.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSParser.js
@@ -48,10 +48,8 @@ WebInspector.CSSParser.prototype = {
return this._rules;
},
_lock: function() {
- console.assert(
- !this._parsingStyleSheet,
- "Received request to parse stylesheet before previous was completed."
- );
+ console
+ .assert(!this._parsingStyleSheet, "Received request to parse stylesheet before previous was completed.");
this._parsingStyleSheet = true;
},
_unlock: function() {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSStyleModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSStyleModel.js
index d981504..bbb6ed1 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSStyleModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSStyleModel.js
@@ -39,21 +39,12 @@ WebInspector.CSSStyleModel = function(target) {
this._agent = target.cssAgent();
this._pendingCommandsMajorState = [];
this._styleLoader = new WebInspector.CSSStyleModel.ComputedStyleLoader(this);
- this._domModel.addEventListener(
- WebInspector.DOMModel.Events.UndoRedoRequested,
- this._undoRedoRequested,
- this
- );
- this._domModel.addEventListener(
- WebInspector.DOMModel.Events.UndoRedoCompleted,
- this._undoRedoCompleted,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
- this._mainFrameNavigated,
- this
- );
+ this
+ ._domModel.addEventListener(WebInspector.DOMModel.Events.UndoRedoRequested, this._undoRedoRequested, this);
+ this
+ ._domModel.addEventListener(WebInspector.DOMModel.Events.UndoRedoCompleted, this._undoRedoCompleted, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this);
target.registerCSSDispatcher(new WebInspector.CSSDispatcher(this));
this._agent.enable(this._wasEnabled.bind(this));
/** @type {!Map.<string, !WebInspector.CSSStyleSheetHeader>} */
@@ -143,9 +134,8 @@ WebInspector.CSSStyleModel.prototype = {
},
_wasEnabled: function() {
this._isEnabled = true;
- this.dispatchEventToListeners(
- WebInspector.CSSStyleModel.Events.ModelWasEnabled
- );
+ this
+ .dispatchEventToListeners(WebInspector.CSSStyleModel.Events.ModelWasEnabled);
},
/**
* @param {!DOMAgent.NodeId} nodeId
@@ -180,22 +170,15 @@ WebInspector.CSSStyleModel.prototype = {
}
var result = {};
- result.matchedCSSRules = WebInspector.CSSStyleModel.parseRuleMatchArrayPayload(
- this,
- matchedPayload
- );
+ result.matchedCSSRules = WebInspector.CSSStyleModel
+ .parseRuleMatchArrayPayload(this, matchedPayload);
result.pseudoElements = [];
if (pseudoPayload) {
for (var i = 0; i < pseudoPayload.length; ++i) {
var entryPayload = pseudoPayload[i];
- result.pseudoElements.push({
- pseudoId: entryPayload.pseudoId,
- rules: WebInspector.CSSStyleModel.parseRuleMatchArrayPayload(
- this,
- entryPayload.matches
- )
- });
+ result
+ .pseudoElements.push({ pseudoId: entryPayload.pseudoId, rules: WebInspector.CSSStyleModel.parseRuleMatchArrayPayload(this, entryPayload.matches) });
}
}
@@ -210,10 +193,8 @@ WebInspector.CSSStyleModel.prototype = {
entryPayload.inlineStyle
);
if (entryPayload.matchedCSSRules)
- entry.matchedCSSRules = WebInspector.CSSStyleModel.parseRuleMatchArrayPayload(
- this,
- entryPayload.matchedCSSRules
- );
+ entry.matchedCSSRules = WebInspector.CSSStyleModel
+ .parseRuleMatchArrayPayload(this, entryPayload.matchedCSSRules);
result.inherited.push(entry);
}
}
@@ -314,10 +295,8 @@ WebInspector.CSSStyleModel.prototype = {
if (enable) {
if (pseudoClasses.indexOf(pseudoClass) >= 0) return false;
pseudoClasses.push(pseudoClass);
- node.setUserProperty(
- WebInspector.CSSStyleModel.PseudoStatePropertyName,
- pseudoClasses
- );
+ node
+ .setUserProperty(WebInspector.CSSStyleModel.PseudoStatePropertyName, pseudoClasses);
} else {
if (pseudoClasses.indexOf(pseudoClass) < 0) return false;
pseudoClasses.remove(pseudoClass);
@@ -514,12 +493,8 @@ WebInspector.CSSStyleModel.prototype = {
failureCallback();
} else {
this._domModel.markUndoableState();
- this._computeMatchingSelectors(
- rulePayload,
- node.id,
- successCallback,
- failureCallback
- );
+ this
+ ._computeMatchingSelectors(rulePayload, node.id, successCallback, failureCallback);
}
}
},
@@ -559,9 +534,8 @@ WebInspector.CSSStyleModel.prototype = {
this._agent.createStyleSheet(frameId, innerCallback.bind(this));
},
mediaQueryResultChanged: function() {
- this.dispatchEventToListeners(
- WebInspector.CSSStyleModel.Events.MediaQueryResultChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.CSSStyleModel.Events.MediaQueryResultChanged);
},
/**
* @param {!CSSAgent.StyleSheetId} id
@@ -591,7 +565,8 @@ WebInspector.CSSStyleModel.prototype = {
_fireStyleSheetChanged: function(styleSheetId) {
if (!this._pendingCommandsMajorState.length) return;
- var majorChange = this._pendingCommandsMajorState[this._pendingCommandsMajorState.length -
+ var majorChange = this._pendingCommandsMajorState[this
+ ._pendingCommandsMajorState.length -
1];
if (
@@ -602,10 +577,8 @@ WebInspector.CSSStyleModel.prototype = {
)
return;
- this.dispatchEventToListeners(
- WebInspector.CSSStyleModel.Events.StyleSheetChanged,
- { styleSheetId: styleSheetId, majorChange: majorChange }
- );
+ this
+ .dispatchEventToListeners(WebInspector.CSSStyleModel.Events.StyleSheetChanged, { styleSheetId: styleSheetId, majorChange: majorChange });
},
/**
* @param {!CSSAgent.CSSStyleSheetHeader} header
@@ -624,10 +597,8 @@ WebInspector.CSSStyleModel.prototype = {
frameIdToStyleSheetIds[styleSheetHeader.frameId] = styleSheetIds;
}
styleSheetIds.push(styleSheetHeader.id);
- this.dispatchEventToListeners(
- WebInspector.CSSStyleModel.Events.StyleSheetAdded,
- styleSheetHeader
- );
+ this
+ .dispatchEventToListeners(WebInspector.CSSStyleModel.Events.StyleSheetAdded, styleSheetHeader);
},
/**
* @param {!CSSAgent.StyleSheetId} id
@@ -638,23 +609,18 @@ WebInspector.CSSStyleModel.prototype = {
if (!header) return;
this._styleSheetIdToHeader.remove(id);
var url = header.resourceURL();
- var frameIdToStyleSheetIds /** @type {!Object.<!PageAgent.FrameId, !Array.<!CSSAgent.StyleSheetId>>} */ = this._styleSheetIdsForURL.get(
- url
- );
- console.assert(
- frameIdToStyleSheetIds,
- "No frameId to styleSheetId map is available for given style sheet URL."
- );
+ var frameIdToStyleSheetIds /** @type {!Object.<!PageAgent.FrameId, !Array.<!CSSAgent.StyleSheetId>>} */ = this
+ ._styleSheetIdsForURL.get(url);
+ console
+ .assert(frameIdToStyleSheetIds, "No frameId to styleSheetId map is available for given style sheet URL.");
frameIdToStyleSheetIds[header.frameId].remove(id);
if (!frameIdToStyleSheetIds[header.frameId].length) {
delete frameIdToStyleSheetIds[header.frameId];
if (!Object.keys(frameIdToStyleSheetIds).length)
this._styleSheetIdsForURL.remove(url);
}
- this.dispatchEventToListeners(
- WebInspector.CSSStyleModel.Events.StyleSheetRemoved,
- header
- );
+ this
+ .dispatchEventToListeners(WebInspector.CSSStyleModel.Events.StyleSheetRemoved, header);
},
/**
* @param {string} url
@@ -766,9 +732,8 @@ WebInspector.CSSStyleDeclaration = function(cssModel, payload) {
this.range = payload.range
? WebInspector.TextRange.fromObject(payload.range)
: null;
- this._shorthandValues = WebInspector.CSSStyleDeclaration.buildShorthandValueMap(
- payload.shorthandEntries
- );
+ this._shorthandValues = WebInspector.CSSStyleDeclaration
+ .buildShorthandValueMap(payload.shorthandEntries);
this._livePropertyMap = {};
// LIVE properties (source-based or style-based) : { name -> CSSProperty }
this._allProperties = [];
@@ -849,7 +814,8 @@ WebInspector.CSSStyleDeclaration.parseComputedStylePayload = function(
height: ""
};
if (payload)
- newPayload.cssProperties /** @type {!Array.<!CSSAgent.CSSProperty>} */ = payload;
+ newPayload
+ .cssProperties /** @type {!Array.<!CSSAgent.CSSProperty>} */ = payload;
return new WebInspector.CSSStyleDeclaration(cssModel, newPayload);
};
@@ -1081,9 +1047,8 @@ WebInspector.CSSRule = function(cssModel, payload, matchingSelectors) {
this.selectors = [];
for (var i = 0; i < payload.selectorList.selectors.length; ++i) {
var selectorPayload = payload.selectorList.selectors[i];
- this.selectors.push(
- WebInspector.CSSRuleSelector.parsePayload(selectorPayload)
- );
+ this
+ .selectors.push(WebInspector.CSSRuleSelector.parsePayload(selectorPayload));
}
this.selectorText = this.selectors.select("value").join(", ");
@@ -1175,11 +1140,8 @@ WebInspector.CSSRule.prototype = {
if (oldMedia && newMedia && oldMedia.equal(this.media[i])) {
this.media[i] = newMedia;
} else {
- this.media[i].sourceStyleSheetEdited(
- styleSheetId,
- oldRange,
- newRange
- );
+ this
+ .media[i].sourceStyleSheetEdited(styleSheetId, oldRange, newRange);
}
}
}
@@ -1647,10 +1609,8 @@ WebInspector.CSSMedia.prototype = {
if (!this.range) return undefined;
var header = this.header();
if (!header) return undefined;
- return header.columnNumberInSource(
- this.range.startLine,
- this.range.startColumn
- );
+ return header
+ .columnNumberInSource(this.range.startLine, this.range.startColumn);
},
/**
* @return {?WebInspector.CSSStyleSheetHeader}
@@ -1666,13 +1626,8 @@ WebInspector.CSSMedia.prototype = {
rawLocation: function() {
if (!this.header() || this.lineNumberInSource() === undefined) return null;
var lineNumber = Number(this.lineNumberInSource());
- return new WebInspector.CSSLocation(
- this._cssModel.target(),
- this.header().id,
- this.sourceURL,
- lineNumber,
- this.columnNumberInSource()
- );
+ return new WebInspector
+ .CSSLocation(this._cssModel.target(), this.header().id, this.sourceURL, lineNumber, this.columnNumberInSource());
}
};
@@ -1785,9 +1740,8 @@ WebInspector.CSSStyleSheetHeader.prototype = {
*/
function textCallback(error, text) {
if (error) {
- WebInspector.console.error(
- "Failed to get text for stylesheet " + this.id + ": " + error
- );
+ WebInspector
+ .console.error("Failed to get text for stylesheet " + this.id + ": " + error);
text = "";
// Fall through.
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ConsoleModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ConsoleModel.js
index 27d640e..372dbf4 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ConsoleModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ConsoleModel.js
@@ -71,10 +71,8 @@ WebInspector.ConsoleModel.prototype = {
this._messages.push(msg);
this._incrementErrorWarningCount(msg);
- this.dispatchEventToListeners(
- WebInspector.ConsoleModel.Events.MessageAdded,
- msg
- );
+ this
+ .dispatchEventToListeners(WebInspector.ConsoleModel.Events.MessageAdded, msg);
},
/**
* @param {!WebInspector.ConsoleMessage} msg
@@ -103,9 +101,8 @@ WebInspector.ConsoleModel.prototype = {
this._messages = [];
this.errors = 0;
this.warnings = 0;
- this.dispatchEventToListeners(
- WebInspector.ConsoleModel.Events.ConsoleCleared
- );
+ this
+ .dispatchEventToListeners(WebInspector.ConsoleModel.Events.ConsoleCleared);
},
__proto__: WebInspector.SDKModel.prototype
};
@@ -292,23 +289,8 @@ WebInspector.ConsoleMessage.prototype = {
* @return {!WebInspector.ConsoleMessage}
*/
clone: function() {
- return new WebInspector.ConsoleMessage(
- this.target(),
- this.source,
- this.level,
- this.messageText,
- this.type,
- this.url,
- this.line,
- this.column,
- this.request ? this.request.requestId : undefined,
- this.parameters,
- this.stackTrace,
- this.timestamp,
- this.executionContextId,
- this.asyncStackTrace,
- this.scriptId
- );
+ return new WebInspector
+ .ConsoleMessage(this.target(), this.source, this.level, this.messageText, this.type, this.url, this.line, this.column, this.request ? this.request.requestId : undefined, this.parameters, this.stackTrace, this.timestamp, this.executionContextId, this.asyncStackTrace, this.scriptId);
},
/**
* @param {?WebInspector.ConsoleMessage} msg
@@ -497,18 +479,10 @@ WebInspector.ConsoleDispatcher.prototype = {
*/
WebInspector.MultitargetConsoleModel = function() {
WebInspector.targetManager.observeTargets(this);
- WebInspector.targetManager.addModelListener(
- WebInspector.ConsoleModel,
- WebInspector.ConsoleModel.Events.MessageAdded,
- this._consoleMessageAdded,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.ConsoleModel,
- WebInspector.ConsoleModel.Events.CommandEvaluated,
- this._commandEvaluated,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.ConsoleModel, WebInspector.ConsoleModel.Events.MessageAdded, this._consoleMessageAdded, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.ConsoleModel, WebInspector.ConsoleModel.Events.CommandEvaluated, this._commandEvaluated, this);
};
WebInspector.MultitargetConsoleModel.prototype = {
@@ -519,11 +493,8 @@ WebInspector.MultitargetConsoleModel.prototype = {
targetAdded: function(target) {
if (!this._mainTarget) {
this._mainTarget = target;
- target.consoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.ConsoleCleared,
- this._consoleCleared,
- this
- );
+ target
+ .consoleModel.addEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
}
},
/**
@@ -533,11 +504,8 @@ WebInspector.MultitargetConsoleModel.prototype = {
targetRemoved: function(target) {
if (this._mainTarget === target) {
delete this._mainTarget;
- target.consoleModel.removeEventListener(
- WebInspector.ConsoleModel.Events.ConsoleCleared,
- this._consoleCleared,
- this
- );
+ target
+ .consoleModel.removeEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
}
},
/**
@@ -554,27 +522,22 @@ WebInspector.MultitargetConsoleModel.prototype = {
return result;
},
_consoleCleared: function() {
- this.dispatchEventToListeners(
- WebInspector.ConsoleModel.Events.ConsoleCleared
- );
+ this
+ .dispatchEventToListeners(WebInspector.ConsoleModel.Events.ConsoleCleared);
},
/**
* @param {!WebInspector.Event} event
*/
_consoleMessageAdded: function(event) {
- this.dispatchEventToListeners(
- WebInspector.ConsoleModel.Events.MessageAdded,
- event.data
- );
+ this
+ .dispatchEventToListeners(WebInspector.ConsoleModel.Events.MessageAdded, event.data);
},
/**
* @param {!WebInspector.Event} event
*/
_commandEvaluated: function(event) {
- this.dispatchEventToListeners(
- WebInspector.ConsoleModel.Events.CommandEvaluated,
- event.data
- );
+ this
+ .dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvaluated, event.data);
},
__proto__: WebInspector.Object.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ContentProviders.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ContentProviders.js
index 97db128..febe621 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ContentProviders.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ContentProviders.js
@@ -54,12 +54,15 @@ WebInspector.ConcatenatedScriptsContentProvider.prototype = {
return x.lineOffset - y.lineOffset || x.columnOffset - y.columnOffset;
});
- var scriptOpenTagLength = WebInspector.ConcatenatedScriptsContentProvider.scriptOpenTag.length;
- var scriptCloseTagLength = WebInspector.ConcatenatedScriptsContentProvider.scriptCloseTag.length;
+ var scriptOpenTagLength = WebInspector.ConcatenatedScriptsContentProvider
+ .scriptOpenTag.length;
+ var scriptCloseTagLength = WebInspector.ConcatenatedScriptsContentProvider
+ .scriptCloseTag.length;
this._sortedScriptsArray.push(scripts[0]);
for (var i = 1; i < scripts.length; ++i) {
- var previousScript = this._sortedScriptsArray[this._sortedScriptsArray.length -
+ var previousScript = this._sortedScriptsArray[this._sortedScriptsArray
+ .length -
1];
var lineNumber = previousScript.endLine;
@@ -167,8 +170,10 @@ WebInspector.ConcatenatedScriptsContentProvider.prototype = {
var lineNumber = 0;
var columnNumber = 0;
- var scriptOpenTag = WebInspector.ConcatenatedScriptsContentProvider.scriptOpenTag;
- var scriptCloseTag = WebInspector.ConcatenatedScriptsContentProvider.scriptCloseTag;
+ var scriptOpenTag = WebInspector.ConcatenatedScriptsContentProvider
+ .scriptOpenTag;
+ var scriptCloseTag = WebInspector.ConcatenatedScriptsContentProvider
+ .scriptCloseTag;
for (var i = 0; i < scripts.length; ++i) {
// Fill the gap with whitespace characters.
for (
@@ -232,11 +237,8 @@ WebInspector.CompilerSourceMappingContentProvider.prototype = {
* @param {function(?string)} callback
*/
requestContent: function(callback) {
- WebInspector.NetworkManager.loadResourceForFrontend(
- this._sourceURL,
- {},
- contentLoaded.bind(this)
- );
+ WebInspector
+ .NetworkManager.loadResourceForFrontend(this._sourceURL, {}, contentLoaded.bind(this));
/**
* @param {number} statusCode
@@ -246,11 +248,8 @@ WebInspector.CompilerSourceMappingContentProvider.prototype = {
*/
function contentLoaded(statusCode, headers, content) {
if (statusCode >= 400) {
- console.error(
- "Could not load content for " + this._sourceURL + " : " +
- "HTTP status code: " +
- statusCode
- );
+ console
+ .error("Could not load content for " + this._sourceURL + " : " + "HTTP status code: " + statusCode);
callback(null);
return;
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CookieParser.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CookieParser.js
index 7a3cf9c..5581270 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CookieParser.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CookieParser.js
@@ -325,11 +325,8 @@ WebInspector.Cookie.prototype = {
remove: function(callback) {
this._target
.pageAgent()
- .deleteCookie(
- this.name(),
- (this.secure() ? "https://" : "http://") + this.domain() + this.path(),
- callback
- );
+
+ .deleteCookie(this.name(), (this.secure() ? "https://" : "http://") + this.domain() + this.path(), callback);
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMModel.js
index c0bb174..6be9d83 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMModel.js
@@ -241,18 +241,16 @@ WebInspector.DOMNode.prototype = {
*/
beforePseudoElement: function() {
if (!this._pseudoElements) return null;
- return this._pseudoElements.get(
- WebInspector.DOMNode.PseudoElementNames.Before
- );
+ return this
+ ._pseudoElements.get(WebInspector.DOMNode.PseudoElementNames.Before);
},
/**
* @return {?WebInspector.DOMNode}
*/
afterPseudoElement: function() {
if (!this._pseudoElements) return null;
- return this._pseudoElements.get(
- WebInspector.DOMNode.PseudoElementNames.After
- );
+ return this
+ ._pseudoElements.get(WebInspector.DOMNode.PseudoElementNames.After);
},
/**
* @return {boolean}
@@ -869,10 +867,8 @@ WebInspector.DOMNode.prototype = {
* @param {function(?DOMAgent.BoxModel)} callback
*/
boxModel: function(callback) {
- this._agent.getBoxModel(
- this.id,
- this._domModel._wrapClientCallback(callback)
- );
+ this
+ ._agent.getBoxModel(this.id, this._domModel._wrapClientCallback(callback));
},
setAsInspectedNode: function() {
var node = this;
@@ -904,10 +900,8 @@ WebInspector.DeferredDOMNode.prototype = {
* @param {function(?WebInspector.DOMNode)} callback
*/
resolve: function(callback) {
- this._domModel.pushNodesByBackendIdsToFrontend(
- new Set([ this._backendNodeId ]),
- onGotNode.bind(this)
- );
+ this
+ ._domModel.pushNodesByBackendIdsToFrontend(new Set([ this._backendNodeId ]), onGotNode.bind(this));
/**
* @param {?Map<number, ?WebInspector.DOMNode>} nodeIds
@@ -1217,10 +1211,8 @@ WebInspector.DOMModel.prototype = {
for (var nodeId in this._attributeLoadNodeIds) {
var nodeIdAsNumber = parseInt(nodeId, 10);
- this._agent.getAttributes(
- nodeIdAsNumber,
- callback.bind(this, nodeIdAsNumber)
- );
+ this
+ ._agent.getAttributes(nodeIdAsNumber, callback.bind(this, nodeIdAsNumber));
}
this._attributeLoadNodeIds = {};
},
@@ -1255,10 +1247,8 @@ WebInspector.DOMModel.prototype = {
this._document = new WebInspector.DOMDocument(this, payload);
else
this._document = null;
- this.dispatchEventToListeners(
- WebInspector.DOMModel.Events.DocumentUpdated,
- this._document
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMModel.Events.DocumentUpdated, this._document);
},
/**
* @param {!DOMAgent.Node} payload
@@ -1433,10 +1423,8 @@ WebInspector.DOMModel.prototype = {
this.target(),
backendNodeId
);
- this.dispatchEventToListeners(
- WebInspector.DOMModel.Events.NodeInspected,
- deferredNode
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMModel.Events.NodeInspected, deferredNode);
},
/**
* @param {string} query
@@ -1645,21 +1633,28 @@ WebInspector.DOMModel.prototype = {
showExtensionLines: WebInspector.overridesSupport.showExtensionLines()
};
if (mode === "all" || mode === "content")
- highlightConfig.contentColor = WebInspector.Color.PageHighlight.Content.toProtocolRGBA();
+ highlightConfig.contentColor = WebInspector.Color.PageHighlight.Content
+ .toProtocolRGBA();
if (mode === "all" || mode === "padding")
- highlightConfig.paddingColor = WebInspector.Color.PageHighlight.Padding.toProtocolRGBA();
+ highlightConfig.paddingColor = WebInspector.Color.PageHighlight.Padding
+ .toProtocolRGBA();
if (mode === "all" || mode === "border")
- highlightConfig.borderColor = WebInspector.Color.PageHighlight.Border.toProtocolRGBA();
+ highlightConfig.borderColor = WebInspector.Color.PageHighlight.Border
+ .toProtocolRGBA();
if (mode === "all" || mode === "margin")
- highlightConfig.marginColor = WebInspector.Color.PageHighlight.Margin.toProtocolRGBA();
+ highlightConfig.marginColor = WebInspector.Color.PageHighlight.Margin
+ .toProtocolRGBA();
if (mode === "all") {
- highlightConfig.eventTargetColor = WebInspector.Color.PageHighlight.EventTarget.toProtocolRGBA();
- highlightConfig.shapeColor = WebInspector.Color.PageHighlight.Shape.toProtocolRGBA();
- highlightConfig.shapeMarginColor = WebInspector.Color.PageHighlight.ShapeMargin.toProtocolRGBA();
+ highlightConfig.eventTargetColor = WebInspector.Color.PageHighlight
+ .EventTarget.toProtocolRGBA();
+ highlightConfig.shapeColor = WebInspector.Color.PageHighlight.Shape
+ .toProtocolRGBA();
+ highlightConfig.shapeMarginColor = WebInspector.Color.PageHighlight
+ .ShapeMargin.toProtocolRGBA();
}
return highlightConfig;
},
@@ -1715,10 +1710,8 @@ WebInspector.DOMModel.prototype = {
this
.target()
.pageAgent()
- .addScriptToEvaluateOnLoad(
- "(" + injectedFunction.toString() + ")()",
- scriptAddedCallback.bind(this)
- );
+
+ .addScriptToEvaluateOnLoad("(" + injectedFunction.toString() + ")()", scriptAddedCallback.bind(this));
} else {
if (typeof this._addTouchEventsScriptId !== "undefined") {
this
@@ -1757,15 +1750,13 @@ WebInspector.DOMModel.prototype = {
* @this {WebInspector.DOMModel}
*/
function mycallback(error) {
- this.dispatchEventToListeners(
- WebInspector.DOMModel.Events.UndoRedoCompleted
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMModel.Events.UndoRedoCompleted);
callback(error);
}
- this.dispatchEventToListeners(
- WebInspector.DOMModel.Events.UndoRedoRequested
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMModel.Events.UndoRedoRequested);
this._agent.undo(callback);
},
/**
@@ -1777,15 +1768,13 @@ WebInspector.DOMModel.prototype = {
* @this {WebInspector.DOMModel}
*/
function mycallback(error) {
- this.dispatchEventToListeners(
- WebInspector.DOMModel.Events.UndoRedoCompleted
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMModel.Events.UndoRedoCompleted);
callback(error);
}
- this.dispatchEventToListeners(
- WebInspector.DOMModel.Events.UndoRedoRequested
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMModel.Events.UndoRedoRequested);
this._agent.redo(callback);
},
/**
@@ -1993,10 +1982,8 @@ WebInspector.DOMModel.EventListener.prototype = {
* @return {!WebInspector.DebuggerModel.Location}
*/
location: function() {
- return WebInspector.DebuggerModel.Location.fromPayload(
- this.target(),
- this._payload.location
- );
+ return WebInspector
+ .DebuggerModel.Location.fromPayload(this.target(), this._payload.location);
},
/**
* @return {?WebInspector.RemoteObject}
@@ -2100,10 +2087,7 @@ WebInspector.DefaultDOMNodeHighlighter.prototype = {
* @param {!PageAgent.FrameId} frameId
*/
highlightFrame: function(frameId) {
- this._agent.highlightFrame(
- frameId,
- WebInspector.Color.PageHighlight.Content.toProtocolRGBA(),
- WebInspector.Color.PageHighlight.ContentOutline.toProtocolRGBA()
- );
+ this
+ ._agent.highlightFrame(frameId, WebInspector.Color.PageHighlight.Content.toProtocolRGBA(), WebInspector.Color.PageHighlight.ContentOutline.toProtocolRGBA());
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMStorage.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMStorage.js
index 1e7cca8..fa50ab3 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMStorage.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMStorage.js
@@ -59,10 +59,8 @@ WebInspector.DOMStorage.Events = {
WebInspector.DOMStorage.prototype = {
/** @return {!DOMStorageAgent.StorageId} */
get id() {
- return WebInspector.DOMStorage.storageId(
- this._securityOrigin,
- this._isLocalStorage
- );
+ return WebInspector
+ .DOMStorage.storageId(this._securityOrigin, this._isLocalStorage);
},
/** @return {string} */
get securityOrigin() {
@@ -118,19 +116,12 @@ WebInspector.DOMStorageModel.prototype = {
this
.target()
- .registerDOMStorageDispatcher(new WebInspector.DOMStorageDispatcher(
- this
- ));
- this.target().resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.SecurityOriginAdded,
- this._securityOriginAdded,
- this
- );
- this.target().resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.SecurityOriginRemoved,
- this._securityOriginRemoved,
- this
- );
+
+ .registerDOMStorageDispatcher(new WebInspector.DOMStorageDispatcher(this));
+ this
+ .target().resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.SecurityOriginAdded, this._securityOriginAdded, this);
+ this
+ .target().resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.SecurityOriginRemoved, this._securityOriginRemoved, this);
this._agent.enable();
var securityOrigins = this.target().resourceTreeModel.securityOrigins();
@@ -156,10 +147,8 @@ WebInspector.DOMStorageModel.prototype = {
console.assert(!this._storages[localStorageKey]);
var localStorage = new WebInspector.DOMStorage(this, securityOrigin, true);
this._storages[localStorageKey] = localStorage;
- this.dispatchEventToListeners(
- WebInspector.DOMStorageModel.Events.DOMStorageAdded,
- localStorage
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMStorageModel.Events.DOMStorageAdded, localStorage);
var sessionStorageKey = this._storageKey(securityOrigin, false);
console.assert(!this._storages[sessionStorageKey]);
@@ -169,10 +158,8 @@ WebInspector.DOMStorageModel.prototype = {
false
);
this._storages[sessionStorageKey] = sessionStorage;
- this.dispatchEventToListeners(
- WebInspector.DOMStorageModel.Events.DOMStorageAdded,
- sessionStorage
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMStorageModel.Events.DOMStorageAdded, sessionStorage);
},
/**
* @param {!WebInspector.Event} event
@@ -183,19 +170,15 @@ WebInspector.DOMStorageModel.prototype = {
var localStorage = this._storages[localStorageKey];
console.assert(localStorage);
delete this._storages[localStorageKey];
- this.dispatchEventToListeners(
- WebInspector.DOMStorageModel.Events.DOMStorageRemoved,
- localStorage
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMStorageModel.Events.DOMStorageRemoved, localStorage);
var sessionStorageKey = this._storageKey(securityOrigin, false);
var sessionStorage = this._storages[sessionStorageKey];
console.assert(sessionStorage);
delete this._storages[sessionStorageKey];
- this.dispatchEventToListeners(
- WebInspector.DOMStorageModel.Events.DOMStorageRemoved,
- sessionStorage
- );
+ this
+ .dispatchEventToListeners(WebInspector.DOMStorageModel.Events.DOMStorageRemoved, sessionStorage);
},
/**
* @param {string} securityOrigin
@@ -215,10 +198,8 @@ WebInspector.DOMStorageModel.prototype = {
if (!domStorage) return;
var eventData = {};
- domStorage.dispatchEventToListeners(
- WebInspector.DOMStorage.Events.DOMStorageItemsCleared,
- eventData
- );
+ domStorage
+ .dispatchEventToListeners(WebInspector.DOMStorage.Events.DOMStorageItemsCleared, eventData);
},
/**
* @param {!DOMStorageAgent.StorageId} storageId
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Database.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Database.js
index d7ab5fd..c167c20 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Database.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Database.js
@@ -158,10 +158,8 @@ WebInspector.DatabaseModel.prototype = {
*/
_addDatabase: function(database) {
this._databases.push(database);
- this.dispatchEventToListeners(
- WebInspector.DatabaseModel.Events.DatabaseAdded,
- database
- );
+ this
+ .dispatchEventToListeners(WebInspector.DatabaseModel.Events.DatabaseAdded, database);
},
__proto__: WebInspector.SDKModel.prototype
};
@@ -181,12 +179,7 @@ WebInspector.DatabaseDispatcher.prototype = {
* @param {!DatabaseAgent.Database} payload
*/
addDatabase: function(payload) {
- this._model._addDatabase(new WebInspector.Database(
- this._model,
- payload.id,
- payload.domain,
- payload.name,
- payload.version
- ));
+ this
+ ._model._addDatabase(new WebInspector.Database(this._model, payload.id, payload.domain, payload.name, payload.version));
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DebuggerModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DebuggerModel.js
index 81e0ce0..e7d3335 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DebuggerModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DebuggerModel.js
@@ -52,30 +52,18 @@ WebInspector.DebuggerModel = function(target) {
this.threadStore = new WebInspector.DebuggerModel.ThreadStore(this);
this._isPausing = false;
- WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(
- this._pauseOnExceptionStateChanged,
- this
- );
- WebInspector.settings.pauseOnCaughtException.addChangeListener(
- this._pauseOnExceptionStateChanged,
- this
- );
- WebInspector.settings.enableAsyncStackTraces.addChangeListener(
- this.asyncStackTracesStateChanged,
- this
- );
- WebInspector.settings.skipStackFramesPattern.addChangeListener(
- this._applySkipStackFrameSettings,
- this
- );
- WebInspector.settings.skipContentScripts.addChangeListener(
- this._applySkipStackFrameSettings,
- this
- );
- WebInspector.settings.singleThreadStepping.addChangeListener(
- this._singleThreadSteppingStateChanged,
- this
- );
+ WebInspector
+ .settings.pauseOnExceptionEnabled.addChangeListener(this._pauseOnExceptionStateChanged, this);
+ WebInspector
+ .settings.pauseOnCaughtException.addChangeListener(this._pauseOnExceptionStateChanged, this);
+ WebInspector
+ .settings.enableAsyncStackTraces.addChangeListener(this.asyncStackTracesStateChanged, this);
+ WebInspector
+ .settings.skipStackFramesPattern.addChangeListener(this._applySkipStackFrameSettings, this);
+ WebInspector
+ .settings.skipContentScripts.addChangeListener(this._applySkipStackFrameSettings, this);
+ WebInspector
+ .settings.singleThreadStepping.addChangeListener(this._singleThreadSteppingStateChanged, this);
this.enableDebugger();
@@ -152,9 +140,8 @@ WebInspector.DebuggerModel.prototype = {
this._singleThreadSteppingStateChanged();
this._pauseOnExceptionStateChanged();
this.asyncStackTracesStateChanged();
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.DebuggerWasEnabled
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.DebuggerWasEnabled);
},
disableDebugger: function() {
if (!this._debuggerEnabled) return;
@@ -164,9 +151,8 @@ WebInspector.DebuggerModel.prototype = {
this._debuggerEnabled = false;
this._isPausing = false;
this.asyncStackTracesStateChanged();
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.DebuggerWasDisabled
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.DebuggerWasDisabled);
},
/**
* @param {boolean} skip
@@ -193,11 +179,14 @@ WebInspector.DebuggerModel.prototype = {
_pauseOnExceptionStateChanged: function() {
var state;
if (!WebInspector.settings.pauseOnExceptionEnabled.get()) {
- state = WebInspector.DebuggerModel.PauseOnExceptionsState.DontPauseOnExceptions;
+ state = WebInspector.DebuggerModel.PauseOnExceptionsState
+ .DontPauseOnExceptions;
} else if (WebInspector.settings.pauseOnCaughtException.get()) {
- state = WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnAllExceptions;
+ state = WebInspector.DebuggerModel.PauseOnExceptionsState
+ .PauseOnAllExceptions;
} else {
- state = WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnUncaughtExceptions;
+ state = WebInspector.DebuggerModel.PauseOnExceptionsState
+ .PauseOnUncaughtExceptions;
}
this._agent.setPauseOnExceptions(state);
},
@@ -351,23 +340,18 @@ WebInspector.DebuggerModel.prototype = {
},
_threadsUpdated: function(eventData) {
this.threadStore.update(eventData);
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.ThreadsUpdateIPC,
- eventData
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.ThreadsUpdateIPC, eventData);
},
_threadUpdated: function(eventData) {
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.ThreadUpdateIPC,
- eventData
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.ThreadUpdateIPC, eventData);
},
_globalObjectCleared: function() {
this._setDebuggerPausedDetails(null);
this._reset();
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.GlobalObjectCleared
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalObjectCleared);
},
/**
* @param {string} eventType
@@ -383,19 +367,15 @@ WebInspector.DebuggerModel.prototype = {
* @param {!DebuggerAgent.AsyncOperation} operation
*/
_asyncOperationStarted: function(operation) {
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.AsyncOperationStarted,
- operation
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.AsyncOperationStarted, operation);
},
/**
* @param {number} operationId
*/
_asyncOperationCompleted: function(operationId) {
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.AsyncOperationCompleted,
- operationId
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.AsyncOperationCompleted, operationId);
},
_reset: function() {
this._scripts = {};
@@ -489,10 +469,8 @@ WebInspector.DebuggerModel.prototype = {
this._isPausing = false;
this._debuggerPausedDetails = debuggerPausedDetails;
if (this._debuggerPausedDetails) {
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.DebuggerPaused,
- this._debuggerPausedDetails
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPausedDetails);
this.selectFirstCallFrame(
this._debuggerPausedDetails.callFrames,
/*needSource*/
@@ -578,9 +556,8 @@ WebInspector.DebuggerModel.prototype = {
},
_resumedScript: function() {
this._setDebuggerPausedDetails(null);
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.DebuggerResumed
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.DebuggerResumed);
},
/**
* @param {!DebuggerAgent.ScriptId} scriptId
@@ -734,10 +711,8 @@ WebInspector.DebuggerModel.prototype = {
this._selectedCallFrame = callFrame;
if (!this._selectedCallFrame) return;
- this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.CallFrameSelected,
- callFrame
- );
+ this
+ .dispatchEventToListeners(WebInspector.DebuggerModel.Events.CallFrameSelected, callFrame);
},
/**
* @return {?WebInspector.DebuggerModel.CallFrame}
@@ -788,21 +763,15 @@ WebInspector.DebuggerModel.prototype = {
if (objectGroup === "console")
this.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.ConsoleCommandEvaluatedInSelectedCallFrame
+ WebInspector.DebuggerModel.Events
+ .ConsoleCommandEvaluatedInSelectedCallFrame
);
}
this
.selectedCallFrame()
- .evaluate(
- code,
- objectGroup,
- includeCommandLineAPI,
- doNotPauseOnExceptionsAndMuteConsole,
- returnByValue,
- generatePreview,
- didEvaluate.bind(this)
- );
+
+ .evaluate(code, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEvaluate.bind(this));
},
/**
* Handles notification from JavaScript VM about updated stack (liveedit or frame restart action).
@@ -823,15 +792,12 @@ WebInspector.DebuggerModel.prototype = {
);
},
_applySkipStackFrameSettings: function() {
- this._agent.skipStackFrames(
- WebInspector.settings.skipStackFramesPattern.get(),
- WebInspector.settings.skipContentScripts.get()
- );
+ this
+ ._agent.skipStackFrames(WebInspector.settings.skipStackFramesPattern.get(), WebInspector.settings.skipContentScripts.get());
},
_singleThreadSteppingStateChanged: function() {
- this._agent.setDebuggerSettings(
- WebInspector.settings.singleThreadStepping.get()
- );
+ this
+ ._agent.setDebuggerSettings(WebInspector.settings.singleThreadStepping.get());
},
/**
* @param {!WebInspector.RemoteObject} remoteObject
@@ -936,26 +902,16 @@ WebInspector.DebuggerModel.prototype = {
);
},
dispose: function() {
- WebInspector.settings.pauseOnExceptionEnabled.removeChangeListener(
- this._pauseOnExceptionStateChanged,
- this
- );
- WebInspector.settings.pauseOnCaughtException.removeChangeListener(
- this._pauseOnExceptionStateChanged,
- this
- );
- WebInspector.settings.skipStackFramesPattern.removeChangeListener(
- this._applySkipStackFrameSettings,
- this
- );
- WebInspector.settings.skipContentScripts.removeChangeListener(
- this._applySkipStackFrameSettings,
- this
- );
- WebInspector.settings.enableAsyncStackTraces.removeChangeListener(
- this.asyncStackTracesStateChanged,
- this
- );
+ WebInspector
+ .settings.pauseOnExceptionEnabled.removeChangeListener(this._pauseOnExceptionStateChanged, this);
+ WebInspector
+ .settings.pauseOnCaughtException.removeChangeListener(this._pauseOnExceptionStateChanged, this);
+ WebInspector
+ .settings.skipStackFramesPattern.removeChangeListener(this._applySkipStackFrameSettings, this);
+ WebInspector
+ .settings.skipContentScripts.removeChangeListener(this._applySkipStackFrameSettings, this);
+ WebInspector
+ .settings.enableAsyncStackTraces.removeChangeListener(this.asyncStackTracesStateChanged, this);
},
__proto__: WebInspector.SDKModel.prototype
};
@@ -1104,11 +1060,8 @@ WebInspector.DebuggerDispatcher.prototype = {
this._debuggerModel._breakpointResolved(breakpointId, location);
},
threadsUpdated: function(owningProcessId, stopThreadId, threads_payload) {
- this._debuggerModel._threadsUpdated({
- owningProcessId: owningProcessId,
- stopThreadId: stopThreadId,
- threads: threads_payload
- });
+ this
+ ._debuggerModel._threadsUpdated({ owningProcessId: owningProcessId, stopThreadId: stopThreadId, threads: threads_payload });
},
threadUpdated: function(thread) {
this._debuggerModel._threadUpdated(thread);
@@ -1164,12 +1117,8 @@ WebInspector.DebuggerModel.Location = function(
* @return {!WebInspector.DebuggerModel.Location}
*/
WebInspector.DebuggerModel.Location.fromPayload = function(target, payload) {
- return new WebInspector.DebuggerModel.Location(
- target,
- payload.scriptId,
- payload.lineNumber,
- payload.columnNumber
- );
+ return new WebInspector
+ .DebuggerModel.Location(target, payload.scriptId, payload.lineNumber, payload.columnNumber);
};
WebInspector.DebuggerModel.Location.prototype = {
@@ -1409,10 +1358,8 @@ WebInspector.DebuggerModel.CallFrame.prototype = {
);
if (callback) callback(error);
}
- this._debuggerAgent.restartFrame(
- this._payload.callFrameId,
- protocolCallback.bind(this)
- );
+ this
+ ._debuggerAgent.restartFrame(this._payload.callFrameId, protocolCallback.bind(this));
},
/**
* @param {function(!Object)} callback
@@ -1476,9 +1423,8 @@ WebInspector.DebuggerModel.Scope.prototype = {
else
this._object = runtimeModel.createRemoteObject(this._payload.object);
- return this._callFrame.target().runtimeModel.createRemoteObject(
- this._payload.object
- );
+ return this
+ ._callFrame.target().runtimeModel.createRemoteObject(this._payload.object);
},
/**
* @return {string}
@@ -1588,9 +1534,8 @@ WebInspector.DebuggerPausedDetails.prototype = {
this.reason !== WebInspector.DebuggerModel.BreakReason.PromiseRejection
)
return null;
- return this.target().runtimeModel.createRemoteObject /** @type {!RuntimeAgent.RemoteObject} */(
- this.auxData
- );
+ return this
+ .target().runtimeModel.createRemoteObject /** @type {!RuntimeAgent.RemoteObject} */(this.auxData);
},
__proto__: WebInspector.SDKObject.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/FileSystemModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/FileSystemModel.js
index 2964fe9..746bcff 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/FileSystemModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/FileSystemModel.js
@@ -38,16 +38,10 @@ WebInspector.FileSystemModel = function(target) {
this._fileSystemsForOrigin = {};
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.SecurityOriginAdded,
- this._securityOriginAdded,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.SecurityOriginRemoved,
- this._securityOriginRemoved,
- this
- );
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.SecurityOriginAdded, this._securityOriginAdded, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.SecurityOriginRemoved, this._securityOriginRemoved, this);
this._agent = target.fileSystemAgent();
this._agent.enable();
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/HeapProfilerModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/HeapProfilerModel.js
index 76f33a5..203fccd 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/HeapProfilerModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/HeapProfilerModel.js
@@ -5,9 +5,8 @@
*/
WebInspector.HeapProfilerModel = function(target) {
WebInspector.SDKModel.call(this, WebInspector.HeapProfilerModel, target);
- target.registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatcher(
- this
- ));
+ target
+ .registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatcher(this));
this._enabled = false;
this._heapProfilerAgent = target.heapProfilerAgent();
};
@@ -31,10 +30,8 @@ WebInspector.HeapProfilerModel.prototype = {
* @param {!Array.<number>} samples
*/
heapStatsUpdate: function(samples) {
- this.dispatchEventToListeners(
- WebInspector.HeapProfilerModel.Events.HeapStatsUpdate,
- samples
- );
+ this
+ .dispatchEventToListeners(WebInspector.HeapProfilerModel.Events.HeapStatsUpdate, samples);
},
/**
* @param {number} lastSeenObjectId
@@ -50,10 +47,8 @@ WebInspector.HeapProfilerModel.prototype = {
* @param {string} chunk
*/
addHeapSnapshotChunk: function(chunk) {
- this.dispatchEventToListeners(
- WebInspector.HeapProfilerModel.Events.AddHeapSnapshotChunk,
- chunk
- );
+ this
+ .dispatchEventToListeners(WebInspector.HeapProfilerModel.Events.AddHeapSnapshotChunk, chunk);
},
/**
* @param {number} done
@@ -67,9 +62,8 @@ WebInspector.HeapProfilerModel.prototype = {
);
},
resetProfiles: function() {
- this.dispatchEventToListeners(
- WebInspector.HeapProfilerModel.Events.ResetProfiles
- );
+ this
+ .dispatchEventToListeners(WebInspector.HeapProfilerModel.Events.ResetProfiles);
},
__proto__: WebInspector.SDKModel.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/IndexedDBModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/IndexedDBModel.js
index 64a460b..5d53393 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/IndexedDBModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/IndexedDBModel.js
@@ -149,16 +149,10 @@ WebInspector.IndexedDBModel.prototype = {
this._agent.enable();
- this.target().resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.SecurityOriginAdded,
- this._securityOriginAdded,
- this
- );
- this.target().resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.SecurityOriginRemoved,
- this._securityOriginRemoved,
- this
- );
+ this
+ .target().resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.SecurityOriginAdded, this._securityOriginAdded, this);
+ this
+ .target().resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.SecurityOriginRemoved, this._securityOriginRemoved, this);
var securityOrigins = this.target().resourceTreeModel.securityOrigins();
for (
@@ -231,7 +225,8 @@ WebInspector.IndexedDBModel.prototype = {
*/
_updateOriginDatabaseNames: function(securityOrigin, databaseNames) {
var newDatabaseNames = databaseNames.keySet();
- var oldDatabaseNames = this._databaseNamesBySecurityOrigin[securityOrigin].keySet();
+ var oldDatabaseNames = this._databaseNamesBySecurityOrigin[securityOrigin]
+ .keySet();
this._databaseNamesBySecurityOrigin[securityOrigin] = databaseNames;
@@ -252,10 +247,8 @@ WebInspector.IndexedDBModel.prototype = {
for (var securityOrigin in this._databaseNamesBySecurityOrigin) {
var databaseNames = this._databaseNamesBySecurityOrigin[securityOrigin];
for (var i = 0; i < databaseNames.length; ++i) {
- result.push(new WebInspector.IndexedDBModel.DatabaseId(
- securityOrigin,
- databaseNames[i]
- ));
+ result
+ .push(new WebInspector.IndexedDBModel.DatabaseId(securityOrigin, databaseNames[i]));
}
}
return result;
@@ -334,9 +327,8 @@ WebInspector.IndexedDBModel.prototype = {
this._databases.set(databaseId, databaseModel);
for (var i = 0; i < databaseWithObjectStores.objectStores.length; ++i) {
var objectStore = databaseWithObjectStores.objectStores[i];
- var objectStoreIDBKeyPath = WebInspector.IndexedDBModel.idbKeyPathFromKeyPath(
- objectStore.keyPath
- );
+ var objectStoreIDBKeyPath = WebInspector.IndexedDBModel
+ .idbKeyPathFromKeyPath(objectStore.keyPath);
var objectStoreModel = new WebInspector.IndexedDBModel.ObjectStore(
objectStore.name,
objectStoreIDBKeyPath,
@@ -344,9 +336,8 @@ WebInspector.IndexedDBModel.prototype = {
);
for (var j = 0; j < objectStore.indexes.length; ++j) {
var index = objectStore.indexes[j];
- var indexIDBKeyPath = WebInspector.IndexedDBModel.idbKeyPathFromKeyPath(
- index.keyPath
- );
+ var indexIDBKeyPath = WebInspector.IndexedDBModel
+ .idbKeyPathFromKeyPath(index.keyPath);
var indexModel = new WebInspector.IndexedDBModel.Index(
index.name,
indexIDBKeyPath,
@@ -358,17 +349,12 @@ WebInspector.IndexedDBModel.prototype = {
databaseModel.objectStores[objectStoreModel.name] = objectStoreModel;
}
- this.dispatchEventToListeners(
- WebInspector.IndexedDBModel.EventTypes.DatabaseLoaded,
- databaseModel
- );
+ this
+ .dispatchEventToListeners(WebInspector.IndexedDBModel.EventTypes.DatabaseLoaded, databaseModel);
}
- this._agent.requestDatabase(
- databaseId.securityOrigin,
- databaseId.name,
- callback.bind(this)
- );
+ this
+ ._agent.requestDatabase(databaseId.securityOrigin, databaseId.name, callback.bind(this));
},
/**
* @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId
@@ -568,9 +554,8 @@ WebInspector.IndexedDBModel.ObjectStore.prototype = {
* @type {string}
*/
get keyPathString() {
- return WebInspector.IndexedDBModel.keyPathStringFromIDBKeyPath(
- this.keyPath
- );
+ return WebInspector
+ .IndexedDBModel.keyPathStringFromIDBKeyPath(this.keyPath);
}
};
@@ -598,8 +583,7 @@ WebInspector.IndexedDBModel.Index.prototype = {
* @type {string}
*/
get keyPathString() {
- return WebInspector.IndexedDBModel.keyPathStringFromIDBKeyPath(
- this.keyPath
- );
+ return WebInspector
+ .IndexedDBModel.keyPathStringFromIDBKeyPath(this.keyPath);
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/InspectorBackend.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/InspectorBackend.js
index e7f167c..3aa39b6 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/InspectorBackend.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/InspectorBackend.js
@@ -110,8 +110,8 @@ InspectorBackendClass.prototype = {
this._connection.registerAgentsOn(window);
for (var type in this._enums) {
var domainAndMethod = type.split(".");
- window[domainAndMethod[0] +
- "Agent"][domainAndMethod[1]] = this._enums[type];
+ window[domainAndMethod[0] + "Agent"][domainAndMethod[1]] = this
+ ._enums[type];
}
},
/**
@@ -134,7 +134,8 @@ InspectorBackendClass.prototype = {
*/
_dispatcherPrototype: function(domain) {
if (!this._dispatcherPrototypes[domain])
- this._dispatcherPrototypes[domain] = new InspectorBackendClass.DispatcherPrototype();
+ this._dispatcherPrototypes[domain] = new InspectorBackendClass
+ .DispatcherPrototype();
return this._dispatcherPrototypes[domain];
},
/**
@@ -302,17 +303,8 @@ InspectorBackendClass._generateCommands = function(schema) {
returnsText.push('"' + parameter.name + '"');
}
var hasErrorData = String(Boolean(command.error));
- result.push(
- 'InspectorBackend.registerCommand("' + domain.domain + "." +
- command.name +
- '", [' +
- paramsText.join(", ") +
- "], [" +
- returnsText.join(", ") +
- "], " +
- hasErrorData +
- ");"
- );
+ result
+ .push('InspectorBackend.registerCommand("' + domain.domain + "." + command.name + '", [' + paramsText.join(", ") + "], [" + returnsText.join(", ") + "], " + hasErrorData + ");");
}
for (var j = 0; domain.events && j < domain.events.length; ++j) {
@@ -322,12 +314,8 @@ InspectorBackendClass._generateCommands = function(schema) {
var parameter = event.parameters[k];
paramsText.push('"' + parameter.name + '"');
}
- result.push(
- 'InspectorBackend.registerEvent("' + domain.domain + "." + event.name +
- '", [' +
- paramsText.join(", ") +
- "]);"
- );
+ result
+ .push('InspectorBackend.registerEvent("' + domain.domain + "." + event.name + '", [' + paramsText.join(", ") + "]);");
}
}
return result.join("\n");
@@ -343,10 +331,8 @@ InspectorBackendClass.Connection = function() {
this._agents = {};
this._dispatchers = {};
this._callbacks = {};
- this._initialize(
- InspectorBackend._agentPrototypes,
- InspectorBackend._dispatcherPrototypes
- );
+ this
+ ._initialize(InspectorBackend._agentPrototypes, InspectorBackend._dispatcherPrototypes);
this._isConnected = true;
};
@@ -465,10 +451,8 @@ InspectorBackendClass.Connection.prototype = {
// just a response for some request
var callback = this._callbacks[messageObject.id];
if (!callback) {
- InspectorBackendClass.reportProtocolError(
- "Protocol Error: the message with wrong id",
- messageObject
- );
+ InspectorBackendClass
+ .reportProtocolError("Protocol Error: the message with wrong id", messageObject);
return;
}
@@ -495,22 +479,15 @@ InspectorBackendClass.Connection.prototype = {
return;
} else {
if (messageObject.error) {
- InspectorBackendClass.reportProtocolError(
- "Generic message format error",
- messageObject
- );
+ InspectorBackendClass
+ .reportProtocolError("Generic message format error", messageObject);
return;
}
var method = messageObject.method.split(".");
var domainName = method[0];
if (!(domainName in this._dispatchers)) {
- InspectorBackendClass.reportProtocolError(
- "Protocol Error: the message " + messageObject.method +
- " is for non-existing domain '" +
- domainName +
- "'",
- messageObject
- );
+ InspectorBackendClass
+ .reportProtocolError("Protocol Error: the message " + messageObject.method + " is for non-existing domain '" + domainName + "'", messageObject);
return;
}
@@ -560,10 +537,8 @@ InspectorBackendClass.Connection.prototype = {
connectionClosed: function(reason) {
this._isConnected = false;
this._runPendingCallbacks();
- this.dispatchEventToListeners(
- InspectorBackendClass.Connection.Events.Disconnected,
- { reason: reason }
- );
+ this
+ .dispatchEventToListeners(InspectorBackendClass.Connection.Events.Disconnected, { reason: reason });
},
_runPendingCallbacks: function() {
var keys = Object.keys(this._callbacks).map(function(num) {
@@ -571,11 +546,8 @@ InspectorBackendClass.Connection.prototype = {
});
for (var i = 0; i < keys.length; ++i) {
var callback = this._callbacks[keys[i]];
- this._dispatchConnectionErrorResponse(
- callback.domain,
- callback.methodName,
- callback
- );
+ this
+ ._dispatchConnectionErrorResponse(callback.domain, callback.methodName, callback);
}
this._callbacks = {};
},
@@ -627,16 +599,10 @@ InspectorBackendClass.Connection.prototype = {
*/
InspectorBackendClass.MainConnection = function() {
InspectorBackendClass.Connection.call(this);
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.DispatchMessage,
- this._dispatchMessage,
- this
- );
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.DispatchMessageChunk,
- this._dispatchMessageChunk,
- this
- );
+ InspectorFrontendHost
+ .events.addEventListener(InspectorFrontendHostAPI.Events.DispatchMessage, this._dispatchMessage, this);
+ InspectorFrontendHost
+ .events.addEventListener(InspectorFrontendHostAPI.Events.DispatchMessageChunk, this._dispatchMessageChunk, this);
};
InspectorBackendClass.MainConnection.prototype = {
@@ -802,7 +768,8 @@ InspectorBackendClass.AgentPrototype.prototype = {
*/
function sendMessagePromise(vararg) {
var params = Array.prototype.slice.call(arguments);
- return InspectorBackendClass.AgentPrototype.prototype._sendMessageToBackendPromise.call(
+ return InspectorBackendClass.AgentPrototype.prototype
+ ._sendMessageToBackendPromise.call(
this,
domainAndMethod,
signature,
@@ -1089,22 +1056,14 @@ InspectorBackendClass.DispatcherPrototype.prototype = {
if (!this._dispatcher) return;
if (!(functionName in this._dispatcher)) {
- InspectorBackendClass.reportProtocolError(
- "Protocol Error: Attempted to dispatch an unimplemented method '" +
- messageObject.method +
- "'",
- messageObject
- );
+ InspectorBackendClass
+ .reportProtocolError("Protocol Error: Attempted to dispatch an unimplemented method '" + messageObject.method + "'", messageObject);
return;
}
if (!this._eventArgs[messageObject.method]) {
- InspectorBackendClass.reportProtocolError(
- "Protocol Error: Attempted to dispatch an unspecified method '" +
- messageObject.method +
- "'",
- messageObject
- );
+ InspectorBackendClass
+ .reportProtocolError("Protocol Error: Attempted to dispatch an unspecified method '" + messageObject.method + "'", messageObject);
return;
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/LayerTreeModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/LayerTreeModel.js
index 9ec7a78..27d6d51 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/LayerTreeModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/LayerTreeModel.js
@@ -59,14 +59,10 @@ WebInspector.TracingLayerTile;
*/
WebInspector.LayerTreeModel = function(target) {
WebInspector.SDKModel.call(this, WebInspector.LayerTreeModel, target);
- target.registerLayerTreeDispatcher(new WebInspector.LayerTreeDispatcher(
- this
- ));
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.MainFrameNavigated,
- this._onMainFrameNavigated,
- this
- );
+ target
+ .registerLayerTreeDispatcher(new WebInspector.LayerTreeDispatcher(this));
+ WebInspector
+ .targetManager.addEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._onMainFrameNavigated, this);
/** @type {?WebInspector.LayerTreeBase} */
this._layerTree = null;
};
@@ -118,9 +114,8 @@ WebInspector.LayerTreeModel.prototype = {
setLayerTree: function(layerTree) {
this.disable();
this._layerTree = layerTree;
- this.dispatchEventToListeners(
- WebInspector.LayerTreeModel.Events.LayerTreeChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.LayerTreeModel.Events.LayerTreeChanged);
},
/**
* @return {?WebInspector.LayerTreeBase}
@@ -147,9 +142,8 @@ WebInspector.LayerTreeModel.prototype = {
}
this._lastPaintRectByLayerId = {};
- this.dispatchEventToListeners(
- WebInspector.LayerTreeModel.Events.LayerTreeChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.LayerTreeModel.Events.LayerTreeChanged);
}
},
/**
@@ -332,7 +326,8 @@ WebInspector.TracingLayerTree.prototype = {
* @return {!WebInspector.TracingLayer}
*/
_innerSetLayers: function(oldLayersById, payload) {
- var layer /** @type {?WebInspector.TracingLayer} */ = oldLayersById[payload.layer_id];
+ var layer /** @type {?WebInspector.TracingLayer} */ = oldLayersById[payload
+ .layer_id];
if (layer) layer._reset(payload);
else layer = new WebInspector.TracingLayer(payload);
this._layersById[payload.layer_id] = layer;
@@ -706,7 +701,8 @@ WebInspector.AgentLayer.prototype = {
return;
}
- var wrappedCallback = InspectorBackend.wrapClientCallback(
+ var wrappedCallback = InspectorBackend
+ .wrapClientCallback(
callback,
"LayerTreeAgent.reasonsForCompositingLayer(): ",
undefined,
@@ -801,10 +797,8 @@ WebInspector.AgentLayer.prototype = {
this._layerPayload.height * this.anchorPoint()[1],
this.anchorPoint()[2]
);
- var anchorPoint = WebInspector.Geometry.multiplyVectorByMatrixAndNormalize(
- anchorVector,
- matrix
- );
+ var anchorPoint = WebInspector.Geometry
+ .multiplyVectorByMatrixAndNormalize(anchorVector, matrix);
var anchorMatrix = new WebKitCSSMatrix().translate(
-anchorPoint.x,
-anchorPoint.y,
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkLog.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkLog.js
index 8c195b0..ff5d357 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkLog.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkLog.js
@@ -38,26 +38,14 @@ WebInspector.NetworkLog = function(target) {
this._requests = [];
this._requestForId = {};
- target.networkManager.addEventListener(
- WebInspector.NetworkManager.EventTypes.RequestStarted,
- this._onRequestStarted,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
- this._onMainFrameNavigated,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.Load,
- this._onLoad,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded,
- this._onDOMContentLoaded,
- this
- );
+ target
+ .networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._onMainFrameNavigated, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.Load, this._onLoad, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded, this._onDOMContentLoaded, this);
};
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkManager.js
index 47d1549..8bcfdba 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkManager.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkManager.js
@@ -45,10 +45,8 @@ WebInspector.NetworkManager = function(target) {
this._networkAgent.setMonitoringXHREnabled(true);
this._networkAgent.enable();
- WebInspector.settings.cacheDisabled.addChangeListener(
- this._cacheDisabledSettingChanged,
- this
- );
+ WebInspector
+ .settings.cacheDisabled.addChangeListener(this._cacheDisabledSettingChanged, this);
};
WebInspector.NetworkManager.EventTypes = {
@@ -146,10 +144,8 @@ WebInspector.NetworkManager.prototype = {
this._networkAgent.setCacheDisabled(enabled);
},
dispose: function() {
- WebInspector.settings.cacheDisabled.removeChangeListener(
- this._cacheDisabledSettingChanged,
- this
- );
+ WebInspector
+ .settings.cacheDisabled.removeChangeListener(this._cacheDisabledSettingChanged, this);
},
clearBrowserCache: function() {
this._networkAgent.clearBrowserCache();
@@ -213,9 +209,8 @@ WebInspector.NetworkDispatcher.prototype = {
if (response.headersText)
networkRequest.responseHeadersText = response.headersText;
if (response.requestHeaders) {
- networkRequest.setRequestHeaders(
- this._headersMapToHeadersArray(response.requestHeaders)
- );
+ networkRequest
+ .setRequestHeaders(this._headersMapToHeadersArray(response.requestHeaders));
networkRequest.setRequestHeadersText(response.requestHeadersText || "");
}
@@ -237,22 +232,8 @@ WebInspector.NetworkDispatcher.prototype = {
if (!this._mimeTypeIsConsistentWithType(networkRequest)) {
var consoleModel = this._manager._target.consoleModel;
- consoleModel.addMessage(new WebInspector.ConsoleMessage(
- consoleModel.target(),
- WebInspector.ConsoleMessage.MessageSource.Network,
- WebInspector.ConsoleMessage.MessageLevel.Log,
- WebInspector.UIString(
- 'Resource interpreted as %s but transferred with MIME type %s: "%s".',
- networkRequest.resourceType().title(),
- networkRequest.mimeType,
- networkRequest.url
- ),
- WebInspector.ConsoleMessage.MessageType.Log,
- "",
- 0,
- 0,
- networkRequest.requestId
- ));
+ consoleModel
+ .addMessage(new WebInspector.ConsoleMessage(consoleModel.target(), WebInspector.ConsoleMessage.MessageSource.Network, WebInspector.ConsoleMessage.MessageLevel.Log, WebInspector.UIString('Resource interpreted as %s but transferred with MIME type %s: "%s".', networkRequest.resourceType().title(), networkRequest.mimeType, networkRequest.url), WebInspector.ConsoleMessage.MessageType.Log, "", 0, 0, networkRequest.requestId));
}
},
/**
@@ -319,14 +300,8 @@ WebInspector.NetworkDispatcher.prototype = {
if (networkRequest) {
// FIXME: move this check to the backend.
if (!redirectResponse) return;
- this.responseReceived(
- requestId,
- frameId,
- loaderId,
- time,
- PageAgent.ResourceType.Other,
- redirectResponse
- );
+ this
+ .responseReceived(requestId, frameId, loaderId, time, PageAgent.ResourceType.Other, redirectResponse);
networkRequest = this._appendRedirect(requestId, time, request.url);
} else networkRequest = this._createNetworkRequest(
requestId,
@@ -379,10 +354,8 @@ WebInspector.NetworkDispatcher.prototype = {
eventData.loaderId = loaderId;
eventData.resourceType = resourceType;
eventData.mimeType = response.mimeType;
- this._manager.dispatchEventToListeners(
- WebInspector.NetworkManager.EventTypes.RequestUpdateDropped,
- eventData
- );
+ this
+ ._manager.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.RequestUpdateDropped, eventData);
return;
}
@@ -603,8 +576,8 @@ WebInspector.NetworkDispatcher.prototype = {
previousRedirects.length;
delete originalNetworkRequest.redirects;
if (previousRedirects.length > 0)
- originalNetworkRequest.redirectSource = previousRedirects[previousRedirects.length -
- 1];
+ originalNetworkRequest
+ .redirectSource = previousRedirects[previousRedirects.length - 1];
this._finishNetworkRequest(originalNetworkRequest, time, -1);
var newNetworkRequest = this._createNetworkRequest(
requestId,
@@ -625,19 +598,15 @@ WebInspector.NetworkDispatcher.prototype = {
_startNetworkRequest: function(networkRequest) {
this._inflightRequestsById[networkRequest.requestId] = networkRequest;
this._inflightRequestsByURL[networkRequest.url] = networkRequest;
- this._dispatchEventToListeners(
- WebInspector.NetworkManager.EventTypes.RequestStarted,
- networkRequest
- );
+ this
+ ._dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.RequestStarted, networkRequest);
},
/**
* @param {!WebInspector.NetworkRequest} networkRequest
*/
_updateNetworkRequest: function(networkRequest) {
- this._dispatchEventToListeners(
- WebInspector.NetworkManager.EventTypes.RequestUpdated,
- networkRequest
- );
+ this
+ ._dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.RequestUpdated, networkRequest);
},
/**
* @param {!WebInspector.NetworkRequest} networkRequest
@@ -715,12 +684,8 @@ WebInspector.MultitargetNetworkManager.prototype = {
if (typeof this._userAgent !== "undefined")
networkAgent.setUserAgentOverride(this._userAgent);
if (this._networkConditions) {
- networkAgent.emulateNetworkConditions(
- this._networkConditions.offline,
- this._networkConditions.latency,
- this._networkConditions.throughput,
- this._networkConditions.throughput
- );
+ networkAgent
+ .emulateNetworkConditions(this._networkConditions.offline, this._networkConditions.latency, this._networkConditions.throughput, this._networkConditions.throughput);
}
},
/**
@@ -756,12 +721,8 @@ WebInspector.MultitargetNetworkManager.prototype = {
for (var target of WebInspector.targetManager.targets()) {
target
.networkAgent()
- .emulateNetworkConditions(
- this._networkConditions.offline,
- this._networkConditions.latency,
- this._networkConditions.throughput,
- this._networkConditions.throughput
- );
+
+ .emulateNetworkConditions(this._networkConditions.offline, this._networkConditions.latency, this._networkConditions.throughput, this._networkConditions.throughput);
}
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkRequest.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkRequest.js
index 8e8bcde..60dd9ae 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkRequest.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkRequest.js
@@ -182,10 +182,8 @@ WebInspector.NetworkRequest.prototype = {
setRemoteAddress: function(ip, port) {
if (ip.indexOf(":") !== -1) ip = "[" + ip + "]";
this._remoteAddress = ip + ":" + port;
- this.dispatchEventToListeners(
- WebInspector.NetworkRequest.Events.RemoteAddressChanged,
- this
- );
+ this
+ .dispatchEventToListeners(WebInspector.NetworkRequest.Events.RemoteAddressChanged, this);
},
/**
* @return {string}
@@ -247,10 +245,8 @@ WebInspector.NetworkRequest.prototype = {
this._endTime = x;
if (this._responseReceivedTime > x) this._responseReceivedTime = x;
}
- this.dispatchEventToListeners(
- WebInspector.NetworkRequest.Events.TimingChanged,
- this
- );
+ this
+ .dispatchEventToListeners(WebInspector.NetworkRequest.Events.TimingChanged, this);
},
/**
* @return {number}
@@ -305,10 +301,8 @@ WebInspector.NetworkRequest.prototype = {
this._finished = x;
if (x) {
- this.dispatchEventToListeners(
- WebInspector.NetworkRequest.Events.FinishedLoading,
- this
- );
+ this
+ .dispatchEventToListeners(WebInspector.NetworkRequest.Events.FinishedLoading, this);
if (this._pendingContentCallbacks.length) this._innerRequestContent();
}
},
@@ -367,10 +361,8 @@ WebInspector.NetworkRequest.prototype = {
this._responseReceivedTime = x.requestTime + x.receiveHeadersEnd / 1000;
this._timing = x;
- this.dispatchEventToListeners(
- WebInspector.NetworkRequest.Events.TimingChanged,
- this
- );
+ this
+ .dispatchEventToListeners(WebInspector.NetworkRequest.Events.TimingChanged, this);
}
},
/**
@@ -508,9 +500,8 @@ WebInspector.NetworkRequest.prototype = {
setRequestHeadersText: function(text) {
this._requestHeadersText = text;
- this.dispatchEventToListeners(
- WebInspector.NetworkRequest.Events.RequestHeadersChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.NetworkRequest.Events.RequestHeadersChanged);
},
/**
* @param {string} headerName
@@ -565,9 +556,8 @@ WebInspector.NetworkRequest.prototype = {
delete this._responseCookies;
this._responseHeaderValues = {};
- this.dispatchEventToListeners(
- WebInspector.NetworkRequest.Events.ResponseHeadersChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.NetworkRequest.Events.ResponseHeadersChanged);
},
/**
* @return {string}
@@ -578,9 +568,8 @@ WebInspector.NetworkRequest.prototype = {
set responseHeadersText(x) {
this._responseHeadersText = x;
- this.dispatchEventToListeners(
- WebInspector.NetworkRequest.Events.ResponseHeadersChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.NetworkRequest.Events.ResponseHeadersChanged);
},
/**
* @return {!Array.<!WebInspector.NetworkRequest.NameValue>}
@@ -794,12 +783,8 @@ WebInspector.NetworkRequest.prototype = {
* @param {!Element} image
*/
populateImageSource: function(image) {
- WebInspector.Resource.populateImageSource(
- this._url,
- this._mimeType,
- this,
- image
- );
+ WebInspector
+ .Resource.populateImageSource(this._url, this._mimeType, this, image);
},
/**
* @return {?string}
@@ -811,12 +796,8 @@ WebInspector.NetworkRequest.prototype = {
content = content.toBase64();
charset = "utf-8";
}
- return WebInspector.Resource.contentAsDataURL(
- content,
- this.mimeType,
- true,
- charset
- );
+ return WebInspector
+ .Resource.contentAsDataURL(content, this.mimeType, true, charset);
},
_innerRequestContent: function() {
if (this._contentRequested) return;
@@ -898,13 +879,8 @@ WebInspector.NetworkRequest.prototype = {
* @param {number} time
*/
addFrameError: function(errorMessage, time) {
- this._addFrame({
- type: WebInspector.NetworkRequest.WebSocketFrameType.Error,
- text: errorMessage,
- time: this.pseudoWallTime(time),
- opCode: -1,
- mask: false
- });
+ this
+ ._addFrame({ type: WebInspector.NetworkRequest.WebSocketFrameType.Error, text: errorMessage, time: this.pseudoWallTime(time), opCode: -1, mask: false });
},
/**
* @param {!NetworkAgent.WebSocketFrame} response
@@ -928,10 +904,8 @@ WebInspector.NetworkRequest.prototype = {
*/
_addFrame: function(frame) {
this._frames.push(frame);
- this.dispatchEventToListeners(
- WebInspector.NetworkRequest.Events.WebsocketFrameAdded,
- frame
- );
+ this
+ .dispatchEventToListeners(WebInspector.NetworkRequest.Events.WebsocketFrameAdded, frame);
},
/**
* @return {!Array.<!WebInspector.NetworkRequest.EventSourceMessage>}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/OverridesSupport.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/OverridesSupport.js
index b1c95fc..c33c1fa 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/OverridesSupport.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/OverridesSupport.js
@@ -113,13 +113,11 @@ WebInspector.OverridesSupport = function(responsiveDesignAvailable) {
"print"
);
- this.settings.networkConditions = WebInspector.settings.createSetting(
- "networkConditions",
- {
- throughput: WebInspector.OverridesSupport.NetworkThroughputUnlimitedValue,
- latency: 0
- }
- );
+ this.settings.networkConditions = WebInspector.settings
+ .createSetting("networkConditions", {
+ throughput: WebInspector.OverridesSupport.NetworkThroughputUnlimitedValue,
+ latency: 0
+ });
WebInspector.targetManager.observeTargets(this);
};
@@ -237,7 +235,8 @@ WebInspector.OverridesSupport.GeolocationPosition.parseUserInput = function(
);
};
-WebInspector.OverridesSupport.GeolocationPosition.clearGeolocationOverride = function() {
+WebInspector.OverridesSupport.GeolocationPosition
+ .clearGeolocationOverride = function() {
for (var target of WebInspector.targetManager.targets())
target.emulationAgent().clearGeolocationOverride();
};
@@ -269,11 +268,8 @@ WebInspector.OverridesSupport.DeviceOrientation.prototype = {
WebInspector.OverridesSupport.DeviceOrientation.parseSetting = function(value) {
if (value) {
var jsonObject = JSON.parse(value);
- return new WebInspector.OverridesSupport.DeviceOrientation(
- jsonObject.alpha,
- jsonObject.beta,
- jsonObject.gamma
- );
+ return new WebInspector
+ .OverridesSupport.DeviceOrientation(jsonObject.alpha, jsonObject.beta, jsonObject.gamma);
}
return new WebInspector.OverridesSupport.DeviceOrientation(0, 0, 0);
};
@@ -310,7 +306,8 @@ WebInspector.OverridesSupport.DeviceOrientation.parseUserInput = function(
);
};
-WebInspector.OverridesSupport.DeviceOrientation._clearDeviceOrientationOverride = function() {
+WebInspector.OverridesSupport.DeviceOrientation
+ ._clearDeviceOrientationOverride = function() {
for (var target of WebInspector.targetManager.targets())
target.pageAgent().clearDeviceOrientationOverride();
};
@@ -365,9 +362,8 @@ WebInspector.OverridesSupport.prototype = {
setEmulationEnabled: function(enabled) {
if (this.canEmulate()) {
this.settings._emulationEnabled.set(enabled);
- this.dispatchEventToListeners(
- WebInspector.OverridesSupport.Events.EmulationStateChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.OverridesSupport.Events.EmulationStateChanged);
if (enabled && this.settings.emulateResolution.get())
this._target.emulationAgent().resetScrollAndPageScaleFactor();
}
@@ -386,40 +382,22 @@ WebInspector.OverridesSupport.prototype = {
if (pageResizer === this._pageResizer) return;
if (this._pageResizer) {
- this._pageResizer.removeEventListener(
- WebInspector.OverridesSupport.PageResizer.Events.AvailableSizeChanged,
- this._onPageResizerAvailableSizeChanged,
- this
- );
- this._pageResizer.removeEventListener(
- WebInspector.OverridesSupport.PageResizer.Events.ResizeRequested,
- this._onPageResizerResizeRequested,
- this
- );
- this._pageResizer.removeEventListener(
- WebInspector.OverridesSupport.PageResizer.Events.FixedScaleRequested,
- this._onPageResizerFixedScaleRequested,
- this
- );
+ this
+ ._pageResizer.removeEventListener(WebInspector.OverridesSupport.PageResizer.Events.AvailableSizeChanged, this._onPageResizerAvailableSizeChanged, this);
+ this
+ ._pageResizer.removeEventListener(WebInspector.OverridesSupport.PageResizer.Events.ResizeRequested, this._onPageResizerResizeRequested, this);
+ this
+ ._pageResizer.removeEventListener(WebInspector.OverridesSupport.PageResizer.Events.FixedScaleRequested, this._onPageResizerFixedScaleRequested, this);
}
this._pageResizer = pageResizer;
this._pageResizerAvailableSize = availableSize;
if (this._pageResizer) {
- this._pageResizer.addEventListener(
- WebInspector.OverridesSupport.PageResizer.Events.AvailableSizeChanged,
- this._onPageResizerAvailableSizeChanged,
- this
- );
- this._pageResizer.addEventListener(
- WebInspector.OverridesSupport.PageResizer.Events.ResizeRequested,
- this._onPageResizerResizeRequested,
- this
- );
- this._pageResizer.addEventListener(
- WebInspector.OverridesSupport.PageResizer.Events.FixedScaleRequested,
- this._onPageResizerFixedScaleRequested,
- this
- );
+ this
+ ._pageResizer.addEventListener(WebInspector.OverridesSupport.PageResizer.Events.AvailableSizeChanged, this._onPageResizerAvailableSizeChanged, this);
+ this
+ ._pageResizer.addEventListener(WebInspector.OverridesSupport.PageResizer.Events.ResizeRequested, this._onPageResizerResizeRequested, this);
+ this
+ ._pageResizer.addEventListener(WebInspector.OverridesSupport.PageResizer.Events.FixedScaleRequested, this._onPageResizerFixedScaleRequested, this);
}
if (this._initialized) this._deviceMetricsChanged();
},
@@ -456,10 +434,8 @@ WebInspector.OverridesSupport.prototype = {
this.settings.overrideDeviceOrientation.set(false);
this.settings.overrideGeolocation.set(false);
this.settings.overrideCSSMedia.set(false);
- this.settings.networkConditions.set({
- throughput: WebInspector.OverridesSupport.NetworkThroughputUnlimitedValue,
- latency: 0
- });
+ this
+ .settings.networkConditions.set({ throughput: WebInspector.OverridesSupport.NetworkThroughputUnlimitedValue, latency: 0 });
delete this._deviceMetricsChangedListenerMuted;
delete this._userAgentChangedListenerMuted;
@@ -498,106 +474,60 @@ WebInspector.OverridesSupport.prototype = {
this._initialized = true;
- this.settings._emulationEnabled.addChangeListener(
- this._userAgentChanged,
- this
- );
+ this
+ .settings._emulationEnabled.addChangeListener(this._userAgentChanged, this);
this.settings.userAgent.addChangeListener(this._userAgentChanged, this);
- this.settings._emulationEnabled.addChangeListener(
- this._deviceMetricsChanged,
- this
- );
- this.settings.emulateResolution.addChangeListener(
- this._deviceMetricsChanged,
- this
- );
- this.settings.deviceWidth.addChangeListener(
- this._deviceMetricsChanged,
- this
- );
- this.settings.deviceHeight.addChangeListener(
- this._deviceMetricsChanged,
- this
- );
- this.settings.deviceScaleFactor.addChangeListener(
- this._deviceMetricsChanged,
- this
- );
- this.settings.emulateMobile.addChangeListener(
- this._deviceMetricsChanged,
- this
- );
- this.settings.deviceFitWindow.addChangeListener(
- this._deviceMetricsChanged,
- this
- );
-
- this.settings._emulationEnabled.addChangeListener(
- this._geolocationPositionChanged,
- this
- );
- this.settings.overrideGeolocation.addChangeListener(
- this._geolocationPositionChanged,
- this
- );
- this.settings.geolocationOverride.addChangeListener(
- this._geolocationPositionChanged,
- this
- );
-
- this.settings._emulationEnabled.addChangeListener(
- this._deviceOrientationChanged,
- this
- );
- this.settings.overrideDeviceOrientation.addChangeListener(
- this._deviceOrientationChanged,
- this
- );
- this.settings.deviceOrientationOverride.addChangeListener(
- this._deviceOrientationChanged,
- this
- );
-
- this.settings._emulationEnabled.addChangeListener(
- this._emulateTouchEventsChanged,
- this
- );
- this.settings.emulateTouch.addChangeListener(
- this._emulateTouchEventsChanged,
- this
- );
-
- this.settings._emulationEnabled.addChangeListener(
- this._cssMediaChanged,
- this
- );
- this.settings.overrideCSSMedia.addChangeListener(
- this._cssMediaChanged,
- this
- );
- this.settings.emulatedCSSMedia.addChangeListener(
- this._cssMediaChanged,
- this
- );
-
- this.settings._emulationEnabled.addChangeListener(
- this._networkConditionsChanged,
- this
- );
- this.settings.networkConditions.addChangeListener(
- this._networkConditionsChanged,
- this
- );
-
- this.settings._emulationEnabled.addChangeListener(
- this._showRulersChanged,
- this
- );
- WebInspector.settings.showMetricsRulers.addChangeListener(
- this._showRulersChanged,
- this
- );
+ this
+ .settings._emulationEnabled.addChangeListener(this._deviceMetricsChanged, this);
+ this
+ .settings.emulateResolution.addChangeListener(this._deviceMetricsChanged, this);
+ this
+ .settings.deviceWidth.addChangeListener(this._deviceMetricsChanged, this);
+ this
+ .settings.deviceHeight.addChangeListener(this._deviceMetricsChanged, this);
+ this
+ .settings.deviceScaleFactor.addChangeListener(this._deviceMetricsChanged, this);
+ this
+ .settings.emulateMobile.addChangeListener(this._deviceMetricsChanged, this);
+ this
+ .settings.deviceFitWindow.addChangeListener(this._deviceMetricsChanged, this);
+
+ this
+ .settings._emulationEnabled.addChangeListener(this._geolocationPositionChanged, this);
+ this
+ .settings.overrideGeolocation.addChangeListener(this._geolocationPositionChanged, this);
+ this
+ .settings.geolocationOverride.addChangeListener(this._geolocationPositionChanged, this);
+
+ this
+ .settings._emulationEnabled.addChangeListener(this._deviceOrientationChanged, this);
+ this
+ .settings.overrideDeviceOrientation.addChangeListener(this._deviceOrientationChanged, this);
+ this
+ .settings.deviceOrientationOverride.addChangeListener(this._deviceOrientationChanged, this);
+
+ this
+ .settings._emulationEnabled.addChangeListener(this._emulateTouchEventsChanged, this);
+ this
+ .settings.emulateTouch.addChangeListener(this._emulateTouchEventsChanged, this);
+
+ this
+ .settings._emulationEnabled.addChangeListener(this._cssMediaChanged, this);
+ this
+ .settings.overrideCSSMedia.addChangeListener(this._cssMediaChanged, this);
+ this
+ .settings.emulatedCSSMedia.addChangeListener(this._cssMediaChanged, this);
+
+ this
+ .settings._emulationEnabled.addChangeListener(this._networkConditionsChanged, this);
+ this
+ .settings.networkConditions.addChangeListener(this._networkConditionsChanged, this);
+
+ this
+ .settings._emulationEnabled.addChangeListener(this._showRulersChanged, this);
+ WebInspector
+ .settings.showMetricsRulers.addChangeListener(this._showRulersChanged, this);
this._showRulersChanged();
if (!this.emulationEnabled()) return;
@@ -669,9 +599,8 @@ WebInspector.OverridesSupport.prototype = {
if (this._deviceMetricsChangedListenerMuted) return;
if (!this.emulationEnabled()) {
- this._deviceMetricsThrottler.schedule(
- clearDeviceMetricsOverride.bind(this)
- );
+ this
+ ._deviceMetricsThrottler.schedule(clearDeviceMetricsOverride.bind(this));
if (this._pageResizer) this._pageResizer.update(0, 0, 1);
return;
}
@@ -698,11 +627,8 @@ WebInspector.OverridesSupport.prototype = {
}
}
- this._pageResizer.update(
- Math.min(dipWidth * scale, available.width),
- Math.min(dipHeight * scale, available.height),
- scale
- );
+ this
+ ._pageResizer.update(Math.min(dipWidth * scale, available.width), Math.min(dipHeight * scale, available.height), scale);
if (
scale === 1 && available.width >= dipWidth &&
available.height >= dipHeight
@@ -727,19 +653,8 @@ WebInspector.OverridesSupport.prototype = {
function setDeviceMetricsOverride(finishCallback) {
this._target
.emulationAgent()
- .setDeviceMetricsOverride(
- overrideWidth,
- overrideHeight,
- this.settings.emulateResolution.get()
- ? this.settings.deviceScaleFactor.get()
- : 0,
- this.settings.emulateMobile.get(),
- this._pageResizer ? false : this.settings.deviceFitWindow.get(),
- scale,
- 0,
- 0,
- apiCallback.bind(this, finishCallback)
- );
+
+ .setDeviceMetricsOverride(overrideWidth, overrideHeight, this.settings.emulateResolution.get() ? this.settings.deviceScaleFactor.get() : 0, this.settings.emulateMobile.get(), this._pageResizer ? false : this.settings.deviceFitWindow.get(), scale, 0, 0, apiCallback.bind(this, finishCallback));
}
/**
@@ -759,11 +674,8 @@ WebInspector.OverridesSupport.prototype = {
*/
function apiCallback(finishCallback, error) {
if (error) {
- this._updateDeviceMetricsWarningMessage(
- WebInspector.UIString(
- "Screen emulation is not available on this page."
- )
- );
+ this
+ ._updateDeviceMetricsWarningMessage(WebInspector.UIString("Screen emulation is not available on this page."));
this._deviceMetricsOverrideAppliedForTest();
finishCallback();
return;
@@ -788,31 +700,27 @@ WebInspector.OverridesSupport.prototype = {
for (var target of WebInspector.targetManager.targets()) target.emulationAgent().clearGeolocationOverride();
return;
}
- var geolocation = WebInspector.OverridesSupport.GeolocationPosition.parseSetting(
- this.settings.geolocationOverride.get()
- );
+ var geolocation = WebInspector.OverridesSupport.GeolocationPosition
+ .parseSetting(this.settings.geolocationOverride.get());
for (var target of WebInspector.targetManager.targets()) {
if (geolocation.error) target.emulationAgent().setGeolocationOverride();
else target
.emulationAgent()
- .setGeolocationOverride(
- geolocation.latitude,
- geolocation.longitude,
- 150
- );
+
+ .setGeolocationOverride(geolocation.latitude, geolocation.longitude, 150);
}
},
_deviceOrientationChanged: function() {
if (
!this.emulationEnabled() || !this.settings.overrideDeviceOrientation.get()
) {
- WebInspector.OverridesSupport.DeviceOrientation._clearDeviceOrientationOverride();
+ WebInspector.OverridesSupport.DeviceOrientation
+ ._clearDeviceOrientationOverride();
return;
}
- var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation.parseSetting(
- this.settings.deviceOrientationOverride.get()
- );
+ var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation
+ .parseSetting(this.settings.deviceOrientationOverride.get());
for (var target of WebInspector.targetManager.targets()) target.pageAgent().setDeviceOrientationOverride(deviceOrientation.alpha, deviceOrientation.beta, deviceOrientation.gamma);
},
_emulateTouchEventsChanged: function() {
@@ -840,21 +748,15 @@ WebInspector.OverridesSupport.prototype = {
},
_networkConditionsChanged: function() {
if (!this.emulationEnabled() || !this.networkThroughputIsLimited()) {
- WebInspector.multitargetNetworkManager.emulateNetworkConditions(
- false,
- 0,
- 0
- );
+ WebInspector
+ .multitargetNetworkManager.emulateNetworkConditions(false, 0, 0);
} else {
var conditions = this.settings.networkConditions.get();
var throughput = conditions.throughput;
var latency = conditions.latency;
var offline = !throughput && !latency;
- WebInspector.multitargetNetworkManager.emulateNetworkConditions(
- offline,
- latency,
- throughput
- );
+ WebInspector
+ .multitargetNetworkManager.emulateNetworkConditions(offline, latency, throughput);
}
},
_pageResizerActive: function() {
@@ -882,9 +784,8 @@ WebInspector.OverridesSupport.prototype = {
this._updateDeviceMetricsWarningMessage("");
},
_dispatchWarningChanged: function() {
- this.dispatchEventToListeners(
- WebInspector.OverridesSupport.Events.OverridesWarningUpdated
- );
+ this
+ .dispatchEventToListeners(WebInspector.OverridesSupport.Events.OverridesWarningUpdated);
},
/**
* @param {string} warningMessage
@@ -919,19 +820,15 @@ WebInspector.OverridesSupport.prototype = {
targetAdded: function(target) {
if (this._target || !target.supportsEmulation()) return;
this._target = target;
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
- this._onMainFrameNavigated,
- this
- );
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._onMainFrameNavigated, this);
if (this._applyInitialOverridesOnTargetAdded) {
delete this._applyInitialOverridesOnTargetAdded;
this.applyInitialOverrides();
}
- this.dispatchEventToListeners(
- WebInspector.OverridesSupport.Events.EmulationStateChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.OverridesSupport.Events.EmulationStateChanged);
},
swapDimensions: function() {
var width = WebInspector.overridesSupport.settings.deviceWidth.get();
@@ -945,15 +842,11 @@ WebInspector.OverridesSupport.prototype = {
*/
targetRemoved: function(target) {
if (target === this._target) {
- target.resourceTreeModel.removeEventListener(
- WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
- this._onMainFrameNavigated,
- this
- );
+ target
+ .resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._onMainFrameNavigated, this);
delete this._target;
- this.dispatchEventToListeners(
- WebInspector.OverridesSupport.Events.EmulationStateChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.OverridesSupport.Events.EmulationStateChanged);
}
},
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/PaintProfiler.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/PaintProfiler.js
index 07bb8b0..d6c7927 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/PaintProfiler.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/PaintProfiler.js
@@ -119,11 +119,8 @@ WebInspector.PaintProfilerSnapshot._processAnnotations = function(log) {
commentGroupStack.pop();
break;
default:
- result.push(new WebInspector.PaintProfilerLogItem(
- log[i],
- i,
- commentGroupStack.peekLast()
- ));
+ result
+ .push(new WebInspector.PaintProfilerLogItem(log[i], i, commentGroupStack.peekLast()));
}
}
return result;
@@ -152,13 +149,8 @@ WebInspector.PaintProfilerSnapshot.prototype = {
);
this._target
.layerTreeAgent()
- .replaySnapshot(
- this._id,
- firstStep || undefined,
- lastStep || undefined,
- scale || 1,
- wrappedCallback
- );
+
+ .replaySnapshot(this._id, firstStep || undefined, lastStep || undefined, scale || 1, wrappedCallback);
},
/**
* @param {?DOMAgent.Rect} clipRect
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RemoteObject.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RemoteObject.js
index d0bad4f..2eb0f0d 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RemoteObject.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RemoteObject.js
@@ -391,13 +391,11 @@ WebInspector.RemoteObjectImpl.prototype = {
if (typeof property.value === "undefined") {
if (property.get && property.get.type !== "undefined")
- remoteProperty.getter = this._target.runtimeModel.createRemoteObject(
- property.get
- );
+ remoteProperty.getter = this._target.runtimeModel
+ .createRemoteObject(property.get);
if (property.set && property.set.type !== "undefined")
- remoteProperty.setter = this._target.runtimeModel.createRemoteObject(
- property.set
- );
+ remoteProperty.setter = this._target.runtimeModel
+ .createRemoteObject(property.set);
}
result.push(remoteProperty);
@@ -411,12 +409,8 @@ WebInspector.RemoteObjectImpl.prototype = {
var propertyValue = this._target.runtimeModel.createRemoteObject(
property.value
);
- internalPropertiesResult.push(new WebInspector.RemoteObjectProperty(
- property.name,
- propertyValue,
- true,
- false
- ));
+ internalPropertiesResult
+ .push(new WebInspector.RemoteObjectProperty(property.name, propertyValue, true, false));
}
}
callback(result, internalPropertiesResult);
@@ -844,9 +838,8 @@ WebInspector.ScopeRemoteObject.prototype = {
if (this._savedScopeProperties) {
for (var i = 0; i < this._savedScopeProperties.length; i++) {
if (this._savedScopeProperties[i].name === name)
- this._savedScopeProperties[i].value = this._target.runtimeModel.createRemoteObject(
- result
- );
+ this._savedScopeProperties[i].value = this._target.runtimeModel
+ .createRemoteObject(result);
}
}
callback();
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Resource.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Resource.js
index a513083..1250662 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Resource.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Resource.js
@@ -199,10 +199,8 @@ WebInspector.Resource.prototype = {
if (!this._messages) this._messages = [];
this._messages.push(msg);
- this.dispatchEventToListeners(
- WebInspector.Resource.Events.MessageAdded,
- msg
- );
+ this
+ .dispatchEventToListeners(WebInspector.Resource.Events.MessageAdded, msg);
},
/**
* @return {number}
@@ -298,14 +296,8 @@ WebInspector.Resource.prototype = {
this
.target()
.pageAgent()
- .searchInResource(
- this.frameId,
- this.url,
- query,
- caseSensitive,
- isRegex,
- callbackWrapper
- );
+
+ .searchInResource(this.frameId, this.url, query, caseSensitive, isRegex, callbackWrapper);
else
callback([]);
},
@@ -313,19 +305,12 @@ WebInspector.Resource.prototype = {
* @param {!Element} image
*/
populateImageSource: function(image) {
- WebInspector.Resource.populateImageSource(
- this._url,
- this._mimeType,
- this,
- image
- );
+ WebInspector
+ .Resource.populateImageSource(this._url, this._mimeType, this, image);
},
_requestFinished: function() {
- this._request.removeEventListener(
- WebInspector.NetworkRequest.Events.FinishedLoading,
- this._requestFinished,
- this
- );
+ this
+ ._request.removeEventListener(WebInspector.NetworkRequest.Events.FinishedLoading, this._requestFinished, this);
if (this._pendingContentCallbacks.length) this._innerRequestContent();
},
_innerRequestContent: function() {
@@ -386,11 +371,8 @@ WebInspector.Resource.prototype = {
this
.target()
.pageAgent()
- .getResourceContent(
- this.frameId,
- this.url,
- resourceContentLoaded.bind(this)
- );
+
+ .getResourceContent(this.frameId, this.url, resourceContentLoaded.bind(this));
},
/**
* @return {boolean}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ResourceTreeModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ResourceTreeModel.js
index 89d8657..d163915 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ResourceTreeModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ResourceTreeModel.js
@@ -36,27 +36,15 @@
WebInspector.ResourceTreeModel = function(target) {
WebInspector.SDKModel.call(this, WebInspector.ResourceTreeModel, target);
- target.networkManager.addEventListener(
- WebInspector.NetworkManager.EventTypes.RequestFinished,
- this._onRequestFinished,
- this
- );
- target.networkManager.addEventListener(
- WebInspector.NetworkManager.EventTypes.RequestUpdateDropped,
- this._onRequestUpdateDropped,
- this
- );
+ target
+ .networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestFinished, this._onRequestFinished, this);
+ target
+ .networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestUpdateDropped, this._onRequestUpdateDropped, this);
- target.consoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.MessageAdded,
- this._consoleMessageAdded,
- this
- );
- target.consoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.ConsoleCleared,
- this._consoleCleared,
- this
- );
+ target
+ .consoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._consoleMessageAdded, this);
+ target
+ .consoleModel.addEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
this._agent = target.pageAgent();
this._agent.enable();
@@ -131,16 +119,14 @@ WebInspector.ResourceTreeModel.prototype = {
return;
}
- this.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.WillLoadCachedResources
- );
+ this
+ .dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.WillLoadCachedResources);
this._inspectedPageURL = mainFramePayload.frame.url;
this._addFramesRecursively(null, mainFramePayload);
this._dispatchInspectedURLChanged();
this._cachedResourcesProcessed = true;
- this.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded
- );
+ this
+ .dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded);
},
/**
* @return {string}
@@ -165,10 +151,8 @@ WebInspector.ResourceTreeModel.prototype = {
},
_dispatchInspectedURLChanged: function() {
InspectorFrontendHost.inspectedURLChanged(this._inspectedPageURL);
- this.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged,
- this._inspectedPageURL
- );
+ this
+ .dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged, this._inspectedPageURL);
},
/**
* @param {!WebInspector.ResourceTreeFrame} frame
@@ -189,10 +173,8 @@ WebInspector.ResourceTreeModel.prototype = {
_addSecurityOrigin: function(securityOrigin) {
if (!this._securityOriginFrameCount[securityOrigin]) {
this._securityOriginFrameCount[securityOrigin] = 1;
- this.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.SecurityOriginAdded,
- securityOrigin
- );
+ this
+ .dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.SecurityOriginAdded, securityOrigin);
return;
}
this._securityOriginFrameCount[securityOrigin] += 1;
@@ -204,10 +186,8 @@ WebInspector.ResourceTreeModel.prototype = {
if (typeof securityOrigin === "undefined") return;
if (this._securityOriginFrameCount[securityOrigin] === 1) {
delete this._securityOriginFrameCount[securityOrigin];
- this.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.SecurityOriginRemoved,
- securityOrigin
- );
+ this
+ .dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.SecurityOriginRemoved, securityOrigin);
return;
}
this._securityOriginFrameCount[securityOrigin] -= 1;
@@ -266,10 +246,8 @@ WebInspector.ResourceTreeModel.prototype = {
var frame = this._frames[framePayload.id];
if (!frame) {
// Simulate missed "frameAttached" for a main frame navigation to the new backend process.
- console.assert(
- !framePayload.parentId,
- "Main frame shouldn't have parent frame id."
- );
+ console
+ .assert(!framePayload.parentId, "Main frame shouldn't have parent frame id.");
frame = this._frameAttached(framePayload.id, framePayload.parentId || "");
console.assert(frame);
}
@@ -279,10 +257,8 @@ WebInspector.ResourceTreeModel.prototype = {
if (frame.isMainFrame()) this._inspectedPageURL = frame.url;
- this.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.FrameNavigated,
- frame
- );
+ this
+ .dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, frame);
if (frame.isMainFrame())
this.dispatchEventToListeners(
WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
@@ -646,10 +622,8 @@ WebInspector.ResourceTreeFrame.prototype = {
_remove: function() {
this._removeChildFrames();
delete this._model._frames[this.id];
- this._model.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.FrameDetached,
- this
- );
+ this
+ ._model.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.FrameDetached, this);
},
/**
* @param {!WebInspector.Resource} resource
@@ -660,10 +634,8 @@ WebInspector.ResourceTreeFrame.prototype = {
return;
}
this._resourcesMap[resource.url] = resource;
- this._model.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.ResourceAdded,
- resource
- );
+ this
+ ._model.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, resource);
},
/**
* @param {!WebInspector.NetworkRequest} request
@@ -757,20 +729,16 @@ WebInspector.PageDispatcher.prototype = {
* @param {number} time
*/
domContentEventFired: function(time) {
- this._resourceTreeModel.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded,
- time
- );
+ this
+ ._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded, time);
},
/**
* @override
* @param {number} time
*/
loadEventFired: function(time) {
- this._resourceTreeModel.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.Load,
- time
- );
+ this
+ ._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.Load, time);
},
/**
* @override
@@ -819,10 +787,8 @@ WebInspector.PageDispatcher.prototype = {
* @override
*/
frameResized: function() {
- this._resourceTreeModel.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.FrameResized,
- null
- );
+ this
+ ._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.FrameResized, null);
},
/**
* @override
@@ -850,20 +816,16 @@ WebInspector.PageDispatcher.prototype = {
* @param {boolean} visible
*/
screencastVisibilityChanged: function(visible) {
- this._resourceTreeModel.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.ScreencastVisibilityChanged,
- { visible: visible }
- );
+ this
+ ._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.ScreencastVisibilityChanged, { visible: visible });
},
/**
* @override
* @param {!DOMAgent.RGBA} color
*/
colorPicked: function(color) {
- this._resourceTreeModel.dispatchEventToListeners(
- WebInspector.ResourceTreeModel.EventTypes.ColorPicked,
- color
- );
+ this
+ ._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.ColorPicked, color);
},
/**
* @override
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RuntimeModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RuntimeModel.js
index 09d5d1e..1df1142 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RuntimeModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RuntimeModel.js
@@ -52,9 +52,8 @@ WebInspector.RuntimeModel = function(target) {
if (WebInspector.settings.enableCustomFormatters.get())
this._agent.setCustomObjectFormatterEnabled(true);
- WebInspector.settings.enableCustomFormatters.addChangeListener(
- this._enableCustomFormattersStateChanged.bind(this)
- );
+ WebInspector
+ .settings.enableCustomFormatters.addChangeListener(this._enableCustomFormattersStateChanged.bind(this));
};
WebInspector.RuntimeModel.Events = {
@@ -92,10 +91,8 @@ WebInspector.RuntimeModel.prototype = {
context.frameId
);
this._executionContextById[executionContext.id] = executionContext;
- this.dispatchEventToListeners(
- WebInspector.RuntimeModel.Events.ExecutionContextCreated,
- executionContext
- );
+ this
+ .dispatchEventToListeners(WebInspector.RuntimeModel.Events.ExecutionContextCreated, executionContext);
},
/**
* @param {number} executionContextId
@@ -104,10 +101,8 @@ WebInspector.RuntimeModel.prototype = {
var executionContext = this._executionContextById[executionContextId];
if (!executionContext) return;
delete this._executionContextById[executionContextId];
- this.dispatchEventToListeners(
- WebInspector.RuntimeModel.Events.ExecutionContextDestroyed,
- executionContext
- );
+ this
+ .dispatchEventToListeners(WebInspector.RuntimeModel.Events.ExecutionContextDestroyed, executionContext);
},
_executionContextsCleared: function() {
var contexts = this.executionContexts();
@@ -297,15 +292,8 @@ WebInspector.ExecutionContext.prototype = {
) {
// FIXME: It will be moved to separate ExecutionContext.
if (this._debuggerModel.selectedCallFrame()) {
- this._debuggerModel.evaluateOnSelectedCallFrame(
- expression,
- objectGroup,
- includeCommandLineAPI,
- doNotPauseOnExceptionsAndMuteConsole,
- returnByValue,
- generatePreview,
- callback
- );
+ this
+ ._debuggerModel.evaluateOnSelectedCallFrame(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callback);
return;
}
this._evaluateGlobal.apply(this, arguments);
@@ -386,16 +374,8 @@ WebInspector.ExecutionContext.prototype = {
this
.target()
.runtimeAgent()
- .evaluate(
- expression,
- objectGroup,
- includeCommandLineAPI,
- doNotPauseOnExceptionsAndMuteConsole,
- this.id,
- returnByValue,
- generatePreview,
- evalCallback.bind(this)
- );
+
+ .evaluate(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, this.id, returnByValue, generatePreview, evalCallback.bind(this));
},
/**
* @param {string} expressionString
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Script.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Script.js
index a28f208..b17fce5 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Script.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Script.js
@@ -70,7 +70,8 @@ WebInspector.Script.Events = {
SourceMapURLAdded: "SourceMapURLAdded"
};
-WebInspector.Script.sourceURLRegex = /\n[\040\t]*\/\/[@#]\ssourceURL=\s*(\S*?)\s*$/mg;
+WebInspector.Script
+ .sourceURLRegex = /\n[\040\t]*\/\/[@#]\ssourceURL=\s*(\S*?)\s*$/mg;
/**
* @param {string} source
@@ -170,13 +171,8 @@ WebInspector.Script.prototype = {
this
.target()
.debuggerAgent()
- .searchInContent(
- this.scriptId,
- query,
- caseSensitive,
- isRegex,
- innerCallback
- );
+
+ .searchInContent(this.scriptId, query, caseSensitive, isRegex, innerCallback);
} else {
callback([]);
}
@@ -229,12 +225,8 @@ WebInspector.Script.prototype = {
this
.target()
.debuggerAgent()
- .setScriptSource(
- this.scriptId,
- newSource,
- undefined,
- didEditScriptSource.bind(this)
- );
+
+ .setScriptSource(this.scriptId, newSource, undefined, didEditScriptSource.bind(this));
else
callback("Script failed to parse");
},
@@ -264,10 +256,8 @@ WebInspector.Script.prototype = {
addSourceMapURL: function(sourceMapURL) {
if (this.sourceMapURL) return;
this.sourceMapURL = sourceMapURL;
- this.dispatchEventToListeners(
- WebInspector.Script.Events.SourceMapURLAdded,
- this.sourceMapURL
- );
+ this
+ .dispatchEventToListeners(WebInspector.Script.Events.SourceMapURLAdded, this.sourceMapURL);
},
/**
* @return {boolean}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerCacheModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerCacheModel.js
index 55e68ba..6c8c529 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerCacheModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerCacheModel.js
@@ -8,11 +8,8 @@
* @extends {WebInspector.SDKModel}
*/
WebInspector.ServiceWorkerCacheModel = function(target) {
- WebInspector.SDKModel.call(
- this,
- WebInspector.ServiceWorkerCacheModel,
- target
- );
+ WebInspector
+ .SDKModel.call(this, WebInspector.ServiceWorkerCacheModel, target);
/** @type {!Set.<string>} */
this._cacheNames = new Set();
@@ -112,20 +109,16 @@ WebInspector.ServiceWorkerCacheModel.prototype = {
*/
_cacheAdded: function(cacheName) {
var cacheId = new WebInspector.ServiceWorkerCacheModel.CacheId(cacheName);
- this.dispatchEventToListeners(
- WebInspector.ServiceWorkerCacheModel.EventTypes.CacheAdded,
- cacheId
- );
+ this
+ .dispatchEventToListeners(WebInspector.ServiceWorkerCacheModel.EventTypes.CacheAdded, cacheId);
},
/**
* @param {string} cacheName
*/
_cacheRemoved: function(cacheName) {
var cacheId = new WebInspector.ServiceWorkerCacheModel.CacheId(cacheName);
- this.dispatchEventToListeners(
- WebInspector.ServiceWorkerCacheModel.EventTypes.CacheRemoved,
- cacheId
- );
+ this
+ .dispatchEventToListeners(WebInspector.ServiceWorkerCacheModel.EventTypes.CacheRemoved, cacheId);
},
/**
* @param {!WebInspector.ServiceWorkerCacheModel.CacheId} cacheId
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerManager.js
index cc0ec4c..714860a 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerManager.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerManager.js
@@ -35,9 +35,8 @@
*/
WebInspector.ServiceWorkerManager = function(target) {
WebInspector.SDKObject.call(this, target);
- target.registerServiceWorkerDispatcher(
- new WebInspector.ServiceWorkerDispatcher(this)
- );
+ target
+ .registerServiceWorkerDispatcher(new WebInspector.ServiceWorkerDispatcher(this));
this._lastAnonymousTargetId = 0;
this._agent = target.serviceWorkerAgent();
/** @type {!Map.<string, !WebInspector.ServiceWorker>} */
@@ -63,11 +62,8 @@ WebInspector.ServiceWorkerManager.prototype = {
this._enabled = true;
this._agent.enable();
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.MainFrameNavigated,
- this._mainFrameNavigated,
- this
- );
+ WebInspector
+ .targetManager.addEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._mainFrameNavigated, this);
},
disable: function() {
if (!this._enabled) return;
@@ -78,11 +74,8 @@ WebInspector.ServiceWorkerManager.prototype = {
this._registrations.clear();
this._versions.clear();
this._agent.disable();
- WebInspector.targetManager.removeEventListener(
- WebInspector.TargetManager.Events.MainFrameNavigated,
- this._mainFrameNavigated,
- this
- );
+ WebInspector
+ .targetManager.removeEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._mainFrameNavigated, this);
},
/**
* @return {!Iterable.<!WebInspector.ServiceWorker>}
@@ -149,9 +142,8 @@ WebInspector.ServiceWorkerManager.prototype = {
worker._closeConnection();
this._workers.delete(workerId);
- this.dispatchEventToListeners(
- WebInspector.ServiceWorkerManager.Events.WorkersUpdated
- );
+ this
+ .dispatchEventToListeners(WebInspector.ServiceWorkerManager.Events.WorkersUpdated);
},
/**
* @param {string} workerId
@@ -256,13 +248,8 @@ WebInspector.ServiceWorker = function(manager, workerId, url) {
var title = WebInspector.UIString("⚙ %s", this._name);
this._manager._workers.set(workerId, this);
- WebInspector.targetManager.createTarget(
- title,
- WebInspector.Target.Type.ServiceWorker,
- this._connection,
- manager.target(),
- targetCreated.bind(this)
- );
+ WebInspector
+ .targetManager.createTarget(title, WebInspector.Target.Type.ServiceWorker, this._connection, manager.target(), targetCreated.bind(this));
/**
* @param {?WebInspector.Target} target
@@ -273,9 +260,8 @@ WebInspector.ServiceWorker = function(manager, workerId, url) {
this._manager._workers.delete(workerId);
return;
}
- this._manager.dispatchEventToListeners(
- WebInspector.ServiceWorkerManager.Events.WorkersUpdated
- );
+ this
+ ._manager.dispatchEventToListeners(WebInspector.ServiceWorkerManager.Events.WorkersUpdated);
target.runtimeAgent().run();
}
};
@@ -366,17 +352,8 @@ WebInspector.ServiceWorkerDispatcher.prototype = {
WebInspector.ServiceWorkerConnection = function(agent, workerId) {
InspectorBackendClass.Connection.call(this);
//FIXME: remove resourceTreeModel and others from worker targets
- this.suppressErrorsForDomains([
- "Worker",
- "Page",
- "CSS",
- "DOM",
- "DOMStorage",
- "Database",
- "Network",
- "IndexedDB",
- "ServiceWorkerCache"
- ]);
+ this
+ .suppressErrorsForDomains([ "Worker", "Page", "CSS", "DOM", "DOMStorage", "Database", "Network", "IndexedDB", "ServiceWorkerCache" ]);
this._agent = agent;
this._workerId = workerId;
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/SourceMap.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/SourceMap.js
index b458d7d..c17c7a9 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/SourceMap.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/SourceMap.js
@@ -99,11 +99,8 @@ WebInspector.SourceMap = function(sourceMappingURL, payload) {
* @this {WebInspector.SourceMap}
*/
WebInspector.SourceMap.load = function(sourceMapURL, compiledURL, callback) {
- WebInspector.NetworkManager.loadResourceForFrontend(
- sourceMapURL,
- null,
- contentLoaded
- );
+ WebInspector
+ .NetworkManager.loadResourceForFrontend(sourceMapURL, null, contentLoaded);
/**
* @param {number} statusCode
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Target.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Target.js
index 0d56f9a..3f94634 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Target.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Target.js
@@ -19,11 +19,8 @@ WebInspector.Target = function(name, type, connection, parentTarget, callback) {
this._type = type;
this._connection = connection;
this._parentTarget = parentTarget;
- connection.addEventListener(
- InspectorBackendClass.Connection.Events.Disconnected,
- this._onDisconnect,
- this
- );
+ connection
+ .addEventListener(InspectorBackendClass.Connection.Events.Disconnected, this._onDisconnect, this);
this._id = WebInspector.Target._nextId++;
/** @type {!Map.<!Function, !WebInspector.SDKModel>} */
@@ -34,22 +31,12 @@ WebInspector.Target = function(name, type, connection, parentTarget, callback) {
if (this.supportsEmulation())
this
.emulationAgent()
- .canEmulate(
- this._initializeCapability.bind(
- this,
- WebInspector.Target.Capabilities.CanEmulate,
- null
- )
- );
+
+ .canEmulate(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.CanEmulate, null));
this
.pageAgent()
- .canScreencast(
- this._initializeCapability.bind(
- this,
- WebInspector.Target.Capabilities.CanScreencast,
- this._loadedWithCapabilities.bind(this, callback)
- )
- );
+
+ .canScreencast(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.CanScreencast, this._loadedWithCapabilities.bind(this, callback)));
};
/**
@@ -327,9 +314,8 @@ WebInspector.TargetManager.prototype = {
this._targets.forEach(function(target) {
target.suspend();
});
- this.dispatchEventToListeners(
- WebInspector.TargetManager.Events.SuspendStateChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.TargetManager.Events.SuspendStateChanged);
},
resumeAllTargets: function() {
console.assert(this._allTargetsSuspended);
@@ -338,9 +324,8 @@ WebInspector.TargetManager.prototype = {
this._targets.forEach(function(target) {
target.resume();
});
- this.dispatchEventToListeners(
- WebInspector.TargetManager.Events.SuspendStateChanged
- );
+ this
+ .dispatchEventToListeners(WebInspector.TargetManager.Events.SuspendStateChanged);
},
/**
* @return {boolean}
@@ -464,26 +449,14 @@ WebInspector.TargetManager.prototype = {
addTarget: function(target) {
this._targets.push(target);
if (this._targets.length === 1) {
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged,
- this._redispatchEvent,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
- this._redispatchEvent,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.Load,
- this._redispatchEvent,
- this
- );
- target.resourceTreeModel.addEventListener(
- WebInspector.ResourceTreeModel.EventTypes.WillReloadPage,
- this._redispatchEvent,
- this
- );
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged, this._redispatchEvent, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._redispatchEvent, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.Load, this._redispatchEvent, this);
+ target
+ .resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.WillReloadPage, this._redispatchEvent, this);
}
var copy = this._observers.slice();
for (var i = 0; i < copy.length; ++i) copy[i].targetAdded(target);
@@ -507,26 +480,14 @@ WebInspector.TargetManager.prototype = {
removeTarget: function(target) {
this._targets.remove(target);
if (this._targets.length === 0) {
- target.resourceTreeModel.removeEventListener(
- WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged,
- this._redispatchEvent,
- this
- );
- target.resourceTreeModel.removeEventListener(
- WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated,
- this._redispatchEvent,
- this
- );
- target.resourceTreeModel.removeEventListener(
- WebInspector.ResourceTreeModel.EventTypes.Load,
- this._redispatchEvent,
- this
- );
- target.resourceTreeModel.removeEventListener(
- WebInspector.ResourceTreeModel.EventTypes.WillReloadPage,
- this._redispatchEvent,
- this
- );
+ target
+ .resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged, this._redispatchEvent, this);
+ target
+ .resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._redispatchEvent, this);
+ target
+ .resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.Load, this._redispatchEvent, this);
+ target
+ .resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.WillReloadPage, this._redispatchEvent, this);
}
var copy = this._observers.slice();
for (var i = 0; i < copy.length; ++i) copy[i].targetRemoved(target);
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ThreadStore.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ThreadStore.js
index 3e8bb40..2dfd77e 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ThreadStore.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ThreadStore.js
@@ -45,26 +45,17 @@ WebInspector.DebuggerModel.ThreadStore.prototype = {
this._stopThreadId = eventData.stopThreadId;
this._selectedThreadId = eventData.stopThreadId;
for (var i = 0; i < eventData.threads.length; ++i) {
- this._threadMap.set(
- eventData.threads[i].id,
- new WebInspector.DebuggerModel.Thread(
- this._debuggerModel,
- eventData.threads[i]
- )
- );
+ this
+ ._threadMap.set(eventData.threads[i].id, new WebInspector.DebuggerModel.Thread(this._debuggerModel, eventData.threads[i]));
}
- this._debuggerModel.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.ThreadsUpdated,
- this
- );
+ this
+ ._debuggerModel.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ThreadsUpdated, this);
},
selectThread: function(threadId) {
this._selectedThreadId = threadId;
- this._debuggerModel.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.SelectedThreadChanged,
- this
- );
+ this
+ ._debuggerModel.dispatchEventToListeners(WebInspector.DebuggerModel.Events.SelectedThreadChanged, this);
},
getActiveThreadStack: function(callback) {
this._fetchThreadStackIfNeeded(this._selectedThreadId, callback);
@@ -73,10 +64,8 @@ WebInspector.DebuggerModel.ThreadStore.prototype = {
var thread = this._threadMap.get(threadId);
if (thread && !thread.isCallstackFetched) {
function onThreadStackFetched(error, callFrames) {
- var parsedFrames = WebInspector.DebuggerModel.CallFrame.fromPayloadArray(
- this._debuggerModel.target(),
- callFrames
- );
+ var parsedFrames = WebInspector.DebuggerModel.CallFrame
+ .fromPayloadArray(this._debuggerModel.target(), callFrames);
if (error) {
callback(error);
return;
@@ -85,10 +74,8 @@ WebInspector.DebuggerModel.ThreadStore.prototype = {
callback(parsedFrames);
thread.isCallstackFetched = true;
}
- this._debuggerModel.getThreadStack(
- threadId,
- onThreadStackFetched.bind(this)
- );
+ this
+ ._debuggerModel.getThreadStack(threadId, onThreadStackFetched.bind(this));
} else {
callback(thread.stackFrames);
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/TracingModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/TracingModel.js
index 70ff3d1..ce44ad4 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/TracingModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/TracingModel.js
@@ -46,10 +46,12 @@ WebInspector.TracingModel.MetadataEvent = {
ThreadName: "thread_name"
};
-WebInspector.TracingModel.DevToolsMetadataEventCategory = "disabled-by-default-devtools.timeline";
+WebInspector.TracingModel
+ .DevToolsMetadataEventCategory = "disabled-by-default-devtools.timeline";
WebInspector.TracingModel.ConsoleEventCategory = "blink.console";
-WebInspector.TracingModel.TopLevelEventCategory = "disabled-by-default-devtools.timeline.top-level-task";
+WebInspector.TracingModel
+ .TopLevelEventCategory = "disabled-by-default-devtools.timeline.top-level-task";
WebInspector.TracingModel.FrameLifecycleEventCategory = "cc,devtools";
@@ -58,16 +60,19 @@ WebInspector.TracingModel.DevToolsMetadataEvent = {
TracingSessionIdForWorker: "TracingSessionIdForWorker"
};
-WebInspector.TracingModel._nestableAsyncEventsString = WebInspector.TracingModel.Phase.NestableAsyncBegin +
+WebInspector.TracingModel._nestableAsyncEventsString = WebInspector.TracingModel
+ .Phase.NestableAsyncBegin +
WebInspector.TracingModel.Phase.NestableAsyncEnd +
WebInspector.TracingModel.Phase.NestableAsyncInstant;
-WebInspector.TracingModel._legacyAsyncEventsString = WebInspector.TracingModel.Phase.AsyncBegin +
+WebInspector.TracingModel._legacyAsyncEventsString = WebInspector.TracingModel
+ .Phase.AsyncBegin +
WebInspector.TracingModel.Phase.AsyncEnd +
WebInspector.TracingModel.Phase.AsyncStepInto +
WebInspector.TracingModel.Phase.AsyncStepPast;
-WebInspector.TracingModel._asyncEventsString = WebInspector.TracingModel._nestableAsyncEventsString +
+WebInspector.TracingModel._asyncEventsString = WebInspector.TracingModel
+ ._nestableAsyncEventsString +
WebInspector.TracingModel._legacyAsyncEventsString;
/**
@@ -219,7 +224,8 @@ WebInspector.TracingModel.prototype = {
event._setBackingStorage(backingStorage);
if (
event.name ===
- WebInspector.TracingModel.DevToolsMetadataEvent.TracingStartedInPage &&
+ WebInspector.TracingModel.DevToolsMetadataEvent
+ .TracingStartedInPage &&
event.category ===
WebInspector.TracingModel.DevToolsMetadataEventCategory
) {
@@ -227,7 +233,8 @@ WebInspector.TracingModel.prototype = {
}
if (
event.name ===
- WebInspector.TracingModel.DevToolsMetadataEvent.TracingSessionIdForWorker &&
+ WebInspector.TracingModel.DevToolsMetadataEvent
+ .TracingSessionIdForWorker &&
event.category ===
WebInspector.TracingModel.DevToolsMetadataEventCategory
) {
@@ -255,14 +262,11 @@ WebInspector.TracingModel.prototype = {
}
},
_processMetadataEvents: function() {
- this._devtoolsPageMetadataEvents.sort(
- WebInspector.TracingModel.Event.compareStartTime
- );
+ this
+ ._devtoolsPageMetadataEvents.sort(WebInspector.TracingModel.Event.compareStartTime);
if (!this._devtoolsPageMetadataEvents.length) {
- WebInspector.console.error(
- WebInspector.TracingModel.DevToolsMetadataEvent.TracingStartedInPage +
- " event not found."
- );
+ WebInspector
+ .console.error(WebInspector.TracingModel.DevToolsMetadataEvent.TracingStartedInPage + " event not found.");
return;
}
var sessionId = this._devtoolsPageMetadataEvents[0].args["sessionId"] ||
@@ -282,9 +286,8 @@ WebInspector.TracingModel.prototype = {
this._devtoolsPageMetadataEvents = this._devtoolsPageMetadataEvents.filter(
checkSessionId
);
- this._devtoolsWorkerMetadataEvents = this._devtoolsWorkerMetadataEvents.filter(
- checkSessionId
- );
+ this._devtoolsWorkerMetadataEvents = this._devtoolsWorkerMetadataEvents
+ .filter(checkSessionId);
var idList = Object.keys(mismatchingIds);
if (idList.length)
@@ -312,9 +315,8 @@ WebInspector.TracingModel.prototype = {
* @return {!Array.<!WebInspector.TracingModel.Process>}
*/
sortedProcesses: function() {
- return WebInspector.TracingModel.NamedObject._sort(
- Object.values(this._processById)
- );
+ return WebInspector
+ .TracingModel.NamedObject._sort(Object.values(this._processById));
},
/**
* @param {string} name
@@ -345,9 +347,8 @@ WebInspector.TracingModel.prototype = {
this._openAsyncEvents.clear();
for (var eventStack of this._openNestableAsyncEvents.values()) {
- while (eventStack.length) eventStack
- .pop()
- .setEndTime(this._maximumRecordTime);
+ while (eventStack
+ .length) eventStack.pop().setEndTime(this._maximumRecordTime);
}
this._openNestableAsyncEvents.clear();
},
@@ -379,11 +380,8 @@ WebInspector.TracingModel.prototype = {
if (!openEventsStack || !openEventsStack.length) break;
var top = openEventsStack.pop();
if (top.name !== event.name) {
- console.error(
- "Begin/end event mismatch for nestable async event, " + top.name +
- " vs. " +
- event.name
- );
+ console
+ .error("Begin/end event mismatch for nestable async event, " + top.name + " vs. " + event.name);
break;
}
top._addStep(event);
@@ -525,9 +523,8 @@ WebInspector.TracingModel.Event.fromPayload = function(payload, thread) {
thread
);
if (payload.args) event.addArgs(payload.args);
- else console.error(
- "Missing mandatory event argument 'args' at " + payload.ts / 1000
- );
+ else console
+ .error("Missing mandatory event argument 'args' at " + payload.ts / 1000);
if (typeof payload.dur === "number")
event.setEndTime((payload.ts + payload.dur) / 1000);
if (payload.id) event.id = payload.id;
@@ -566,9 +563,8 @@ WebInspector.TracingModel.Event.prototype = {
*/
_complete: function(payload) {
if (payload.args) this.addArgs(payload.args);
- else console.error(
- "Missing mandatory event argument 'args' at " + payload.ts / 1000
- );
+ else console
+ .error("Missing mandatory event argument 'args' at " + payload.ts / 1000);
this.setEndTime(payload.ts / 1000);
},
/**
@@ -639,9 +635,8 @@ WebInspector.TracingModel.ObjectSnapshot.fromPayload = function(
);
if (payload.id) snapshot.id = payload.id;
if (!payload.args || !payload.args["snapshot"]) {
- console.error(
- "Missing mandatory 'snapshot' argument at " + payload.ts / 1000
- );
+ console
+ .error("Missing mandatory 'snapshot' argument at " + payload.ts / 1000);
return snapshot;
}
if (payload.args) snapshot.addArgs(payload.args);
@@ -694,14 +689,8 @@ WebInspector.TracingModel.ObjectSnapshot.prototype = {
* @extends {WebInspector.TracingModel.Event}
*/
WebInspector.TracingModel.AsyncEvent = function(startEvent) {
- WebInspector.TracingModel.Event.call(
- this,
- startEvent.category,
- startEvent.name,
- startEvent.phase,
- startEvent.startTime,
- startEvent.thread
- );
+ WebInspector
+ .TracingModel.Event.call(this, startEvent.category, startEvent.name, startEvent.phase, startEvent.startTime, startEvent.thread);
this.addArgs(startEvent.args);
this.steps = [ startEvent ];
};
@@ -850,9 +839,8 @@ WebInspector.TracingModel.Process.prototype = {
* @return {!Array.<!WebInspector.TracingModel.Thread>}
*/
sortedThreads: function() {
- return WebInspector.TracingModel.NamedObject._sort(
- Object.values(this._threads)
- );
+ return WebInspector
+ .TracingModel.NamedObject._sort(Object.values(this._threads));
},
__proto__: WebInspector.TracingModel.NamedObject.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/WorkerManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/WorkerManager.js
index 2ff73b1..4d9532d 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/WorkerManager.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/WorkerManager.js
@@ -43,11 +43,8 @@ WebInspector.WorkerManager = function(target) {
/** @type {!Map.<string, !WebInspector.Target>} */
this._targetsByWorkerId = new Map();
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.SuspendStateChanged,
- this._onSuspendStateChanged,
- this
- );
+ WebInspector
+ .targetManager.addEventListener(WebInspector.TargetManager.Events.SuspendStateChanged, this._onSuspendStateChanged, this);
this._onSuspendStateChanged();
this.enable();
};
@@ -58,22 +55,16 @@ WebInspector.WorkerManager.prototype = {
this._enabled = true;
this.target().workerAgent().enable();
- this.target().resourceTreeModel.addEventListener(
- WebInspector.TargetManager.Events.MainFrameNavigated,
- this._mainFrameNavigated,
- this
- );
+ this
+ .target().resourceTreeModel.addEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._mainFrameNavigated, this);
},
disable: function() {
if (!this._enabled) return;
this._enabled = false;
this._reset();
this.target().workerAgent().disable();
- this.target().resourceTreeModel.removeEventListener(
- WebInspector.TargetManager.Events.MainFrameNavigated,
- this._mainFrameNavigated,
- this
- );
+ this
+ .target().resourceTreeModel.removeEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._mainFrameNavigated, this);
},
dispose: function() {
this._reset();
@@ -259,10 +250,8 @@ WebInspector.WorkerConnection.prototype = {
* @param {!Object} messageObject
*/
sendMessage: function(messageObject) {
- this._agent.sendMessageToWorker(
- this._workerId,
- JSON.stringify(messageObject)
- );
+ this
+ ._agent.sendMessageToWorker(this._workerId, JSON.stringify(messageObject));
},
_close: function() {
this.connectionClosed("worker_terminated");
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/ScriptSnippetModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/ScriptSnippetModel.js
index cd41af6..b1c9f65 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/ScriptSnippetModel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/ScriptSnippetModel.js
@@ -70,10 +70,8 @@ WebInspector.ScriptSnippetModel.prototype = {
* @param {!WebInspector.Target} target
*/
targetAdded: function(target) {
- this._mappingForTarget.set(target, new WebInspector.SnippetScriptMapping(
- target,
- this
- ));
+ this
+ ._mappingForTarget.set(target, new WebInspector.SnippetScriptMapping(target, this));
},
/**
* @override
@@ -117,10 +115,8 @@ WebInspector.ScriptSnippetModel.prototype = {
* @return {string}
*/
_addScriptSnippet: function(snippet) {
- var path = this._projectDelegate.addSnippet(
- snippet.name,
- new WebInspector.SnippetContentProvider(snippet)
- );
+ var path = this._projectDelegate.addSnippet(snippet.name, new WebInspector
+ .SnippetContentProvider(snippet));
var uiSourceCode = this._workspace.uiSourceCode(this._projectId, path);
if (!uiSourceCode) {
console.assert(uiSourceCode);
@@ -231,13 +227,8 @@ WebInspector.ScriptSnippetModel.prototype = {
WebInspector.console.show();
target
.debuggerAgent()
- .compileScript(
- expression,
- "",
- true,
- executionContext.id,
- compileCallback.bind(this)
- );
+
+ .compileScript(expression, "", true, executionContext.id, compileCallback.bind(this));
/**
* @param {?string} error
@@ -255,11 +246,8 @@ WebInspector.ScriptSnippetModel.prototype = {
}
if (!scriptId) {
- this._printRunOrCompileScriptResultFailure(
- target,
- exceptionDetails,
- evaluationUrl
- );
+ this
+ ._printRunOrCompileScriptResultFailure(target, exceptionDetails, evaluationUrl);
return;
}
@@ -282,13 +270,8 @@ WebInspector.ScriptSnippetModel.prototype = {
var target = executionContext.target();
target
.debuggerAgent()
- .runScript(
- scriptId,
- executionContext.id,
- "console",
- false,
- runCallback.bind(this, target)
- );
+
+ .runScript(scriptId, executionContext.id, "console", false, runCallback.bind(this, target));
/**
* @param {!WebInspector.Target} target
@@ -364,9 +347,8 @@ WebInspector.ScriptSnippetModel.prototype = {
* @return {!Array.<!{breakpoint: !WebInspector.BreakpointManager.Breakpoint, uiLocation: !WebInspector.UILocation}>}
*/
_removeBreakpoints: function(uiSourceCode) {
- var breakpointLocations = WebInspector.breakpointManager.breakpointLocationsForUISourceCode(
- uiSourceCode
- );
+ var breakpointLocations = WebInspector.breakpointManager
+ .breakpointLocationsForUISourceCode(uiSourceCode);
for (var i = 0; i < breakpointLocations.length; ++i)
breakpointLocations[i].breakpoint.remove();
return breakpointLocations;
@@ -425,11 +407,8 @@ WebInspector.SnippetScriptMapping = function(target, scriptSnippetModel) {
this._scriptForUISourceCode = new Map();
/** @type {!Map.<!WebInspector.UISourceCode, number>} */
this._evaluationIndexForUISourceCode = new Map();
- target.debuggerModel.addEventListener(
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this._reset,
- this
- );
+ target
+ .debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._reset, this);
};
WebInspector.SnippetScriptMapping.prototype = {
@@ -483,7 +462,8 @@ WebInspector.SnippetScriptMapping.prototype = {
*/
rawLocationToUILocation: function(rawLocation) {
var debuggerModelLocation /** @type {!WebInspector.DebuggerModel.Location} */ = rawLocation;
- var uiSourceCode = this._uiSourceCodeForScriptId[debuggerModelLocation.scriptId];
+ var uiSourceCode = this._uiSourceCodeForScriptId[debuggerModelLocation
+ .scriptId];
if (!uiSourceCode) return null;
return uiSourceCode.uiLocation(
@@ -531,14 +511,10 @@ WebInspector.SnippetScriptMapping.prototype = {
var script = this._scriptForUISourceCode.get(uiSourceCode);
if (!script) return;
- var rawLocation /** @type {!WebInspector.DebuggerModel.Location} */ = script.target().debuggerModel.createRawLocation(
- script,
- 0,
- 0
- );
- var scriptUISourceCode = WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(
- rawLocation
- ).uiSourceCode;
+ var rawLocation /** @type {!WebInspector.DebuggerModel.Location} */ = script
+ .target().debuggerModel.createRawLocation(script, 0, 0);
+ var scriptUISourceCode = WebInspector.debuggerWorkspaceBinding
+ .rawLocationToUILocation(rawLocation).uiSourceCode;
if (scriptUISourceCode)
this._scriptSnippetModel._restoreBreakpoints(
scriptUISourceCode,
@@ -629,12 +605,8 @@ WebInspector.SnippetContentProvider.prototype = {
* @param {string} id
*/
WebInspector.SnippetsProjectDelegate = function(workspace, model, id) {
- WebInspector.ContentProviderBasedProjectDelegate.call(
- this,
- workspace,
- id,
- WebInspector.projectTypes.Snippets
- );
+ WebInspector
+ .ContentProviderBasedProjectDelegate.call(this, workspace, id, WebInspector.projectTypes.Snippets);
this._model = model;
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/SnippetStorage.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/SnippetStorage.js
index da1977d..7c7e31d 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/SnippetStorage.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/SnippetStorage.js
@@ -142,12 +142,8 @@ WebInspector.Snippet = function(storage, id, name, content) {
* @return {!WebInspector.Snippet}
*/
WebInspector.Snippet.fromObject = function(storage, serializedSnippet) {
- return new WebInspector.Snippet(
- storage,
- serializedSnippet.id,
- serializedSnippet.name,
- serializedSnippet.content
- );
+ return new WebInspector
+ .Snippet(storage, serializedSnippet.id, serializedSnippet.name, serializedSnippet.content);
};
WebInspector.Snippet.prototype = {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorDictionary.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorDictionary.js
index 1867a6c..6db6c1b 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorDictionary.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorDictionary.js
@@ -69,11 +69,8 @@ WebInspector.CodeMirrorDictionary.prototype = {
* @param {string} text
*/
_addText: function(text) {
- WebInspector.TextUtils.textToWords(
- text,
- this.isWordChar.bind(this),
- addWord.bind(this)
- );
+ WebInspector
+ .TextUtils.textToWords(text, this.isWordChar.bind(this), addWord.bind(this));
/**
* @param {string} word
@@ -87,11 +84,8 @@ WebInspector.CodeMirrorDictionary.prototype = {
* @param {string} text
*/
_removeText: function(text) {
- WebInspector.TextUtils.textToWords(
- text,
- this.isWordChar.bind(this),
- removeWord.bind(this)
- );
+ WebInspector
+ .TextUtils.textToWords(text, this.isWordChar.bind(this), removeWord.bind(this));
/**
* @param {string} word
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorTextEditor.js
index b3c2890..3816720 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorTextEditor.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorTextEditor.js
@@ -120,111 +120,73 @@ WebInspector.CodeMirrorTextEditor = function(url, delegate) {
fallthrough: "devtools-common"
};
- WebInspector.settings.textEditorIndent.addChangeListener(
- this._onUpdateEditorIndentation,
- this
- );
- WebInspector.settings.textEditorAutoDetectIndent.addChangeListener(
- this._onUpdateEditorIndentation,
- this
- );
+ WebInspector
+ .settings.textEditorIndent.addChangeListener(this._onUpdateEditorIndentation, this);
+ WebInspector
+ .settings.textEditorAutoDetectIndent.addChangeListener(this._onUpdateEditorIndentation, this);
this._onUpdateEditorIndentation();
- WebInspector.settings.showWhitespacesInEditor.addChangeListener(
- this._updateCodeMirrorMode,
- this
- );
- WebInspector.settings.textEditorBracketMatching.addChangeListener(
- this._enableBracketMatchingIfNeeded,
- this
- );
+ WebInspector
+ .settings.showWhitespacesInEditor.addChangeListener(this._updateCodeMirrorMode, this);
+ WebInspector
+ .settings.textEditorBracketMatching.addChangeListener(this._enableBracketMatchingIfNeeded, this);
this._enableBracketMatchingIfNeeded();
- this._codeMirror.setOption(
- "keyMap",
- WebInspector.isMac() ? "devtools-mac" : "devtools-pc"
- );
+ this
+ ._codeMirror.setOption("keyMap", WebInspector.isMac() ? "devtools-mac" : "devtools-pc");
- CodeMirror.commands.maybeAvoidSmartSingleQuotes = this._maybeAvoidSmartQuotes.bind(
- this,
- "'"
- );
- CodeMirror.commands.maybeAvoidSmartDoubleQuotes = this._maybeAvoidSmartQuotes.bind(
- this,
- '"'
- );
- this._codeMirror.addKeyMap({
- "'": "maybeAvoidSmartSingleQuotes",
- "'\"'": "maybeAvoidSmartDoubleQuotes"
- });
+ CodeMirror.commands.maybeAvoidSmartSingleQuotes = this._maybeAvoidSmartQuotes
+ .bind(this, "'");
+ CodeMirror.commands.maybeAvoidSmartDoubleQuotes = this._maybeAvoidSmartQuotes
+ .bind(this, '"');
+ this
+ ._codeMirror.addKeyMap({ "'": "maybeAvoidSmartSingleQuotes", "'\"'": "maybeAvoidSmartDoubleQuotes" });
this._codeMirror.setOption("flattenSpans", false);
- this._codeMirror.setOption(
- "maxHighlightLength",
- WebInspector.CodeMirrorTextEditor.maxHighlightLength
- );
+ this
+ ._codeMirror.setOption("maxHighlightLength", WebInspector.CodeMirrorTextEditor.maxHighlightLength);
this._codeMirror.setOption("mode", null);
this._codeMirror.setOption("crudeMeasuringFrom", 1000);
this._shouldClearHistory = true;
this._lineSeparator = "\n";
- this._autocompleteController = new WebInspector.TextEditorAutocompleteController(
- this,
- this._codeMirror
- );
- this._tokenHighlighter = new WebInspector.CodeMirrorTextEditor.TokenHighlighter(
- this,
- this._codeMirror
- );
- this._blockIndentController = new WebInspector.CodeMirrorTextEditor.BlockIndentController(
- this._codeMirror
- );
+ this._autocompleteController = new WebInspector
+ .TextEditorAutocompleteController(this, this._codeMirror);
+ this._tokenHighlighter = new WebInspector.CodeMirrorTextEditor
+ .TokenHighlighter(this, this._codeMirror);
+ this._blockIndentController = new WebInspector.CodeMirrorTextEditor
+ .BlockIndentController(this._codeMirror);
this._fixWordMovement = new WebInspector.CodeMirrorTextEditor.FixWordMovement(
this._codeMirror
);
- this._selectNextOccurrenceController = new WebInspector.CodeMirrorTextEditor.SelectNextOccurrenceController(
- this,
- this._codeMirror
- );
+ this._selectNextOccurrenceController = new WebInspector.CodeMirrorTextEditor
+ .SelectNextOccurrenceController(this, this._codeMirror);
- WebInspector.settings.textEditorAutocompletion.addChangeListener(
- this._enableAutocompletionIfNeeded,
- this
- );
+ WebInspector
+ .settings.textEditorAutocompletion.addChangeListener(this._enableAutocompletionIfNeeded, this);
this._enableAutocompletionIfNeeded();
this._codeMirror.on("changes", this._changes.bind(this));
this._codeMirror.on("gutterClick", this._gutterClick.bind(this));
this._codeMirror.on("cursorActivity", this._cursorActivity.bind(this));
- this._codeMirror.on(
- "beforeSelectionChange",
- this._beforeSelectionChange.bind(this)
- );
+ this
+ ._codeMirror.on("beforeSelectionChange", this._beforeSelectionChange.bind(this));
this._codeMirror.on("scroll", this._scroll.bind(this));
this._codeMirror.on("focus", this._focus.bind(this));
this._codeMirror.on("keyHandled", this._onKeyHandled.bind(this));
- this.element.addEventListener(
- "contextmenu",
- this._contextMenu.bind(this),
- false
- );
+ this
+ .element.addEventListener("contextmenu", this._contextMenu.bind(this), false);
/**
* @this {WebInspector.CodeMirrorTextEditor}
*/
function updateAnticipateJumpFlag(value) {
this._isHandlingMouseDownEvent = value;
}
- this.element.addEventListener(
- "mousedown",
- updateAnticipateJumpFlag.bind(this, true),
- true
- );
- this.element.addEventListener(
- "mousedown",
- updateAnticipateJumpFlag.bind(this, false),
- false
- );
+ this
+ .element.addEventListener("mousedown", updateAnticipateJumpFlag.bind(this, true), true);
+ this
+ .element.addEventListener("mousedown", updateAnticipateJumpFlag.bind(this, false), false);
this.element.style.overflow = "hidden";
this._codeMirrorElement.classList.add("source-code");
@@ -232,21 +194,12 @@ WebInspector.CodeMirrorTextEditor = function(url, delegate) {
this._elementToWidget = new Map();
this._nestedUpdatesCounter = 0;
- this.element.addEventListener(
- "focus",
- this._handleElementFocus.bind(this),
- false
- );
- this.element.addEventListener(
- "keydown",
- this._handleKeyDown.bind(this),
- true
- );
- this.element.addEventListener(
- "keydown",
- this._handlePostKeyDown.bind(this),
- false
- );
+ this
+ .element.addEventListener("focus", this._handleElementFocus.bind(this), false);
+ this
+ .element.addEventListener("keydown", this._handleKeyDown.bind(this), true);
+ this
+ .element.addEventListener("keydown", this._handlePostKeyDown.bind(this), false);
this.element.tabIndex = 0;
this._setupWhitespaceHighlight();
@@ -260,7 +213,8 @@ WebInspector.CodeMirrorTextEditor.maxHighlightLength = 1000;
WebInspector.CodeMirrorTextEditor.autocompleteCommand = function(codeMirror) {
codeMirror._codeMirrorTextEditor._autocompleteController.autocomplete();
};
-CodeMirror.commands.autocomplete = WebInspector.CodeMirrorTextEditor.autocompleteCommand;
+CodeMirror.commands.autocomplete = WebInspector.CodeMirrorTextEditor
+ .autocompleteCommand;
/**
* @param {!CodeMirror} codeMirror
@@ -268,9 +222,11 @@ CodeMirror.commands.autocomplete = WebInspector.CodeMirrorTextEditor.autocomplet
WebInspector.CodeMirrorTextEditor.undoLastSelectionCommand = function(
codeMirror
) {
- codeMirror._codeMirrorTextEditor._selectNextOccurrenceController.undoLastSelection();
+ codeMirror._codeMirrorTextEditor._selectNextOccurrenceController
+ .undoLastSelection();
};
-CodeMirror.commands.undoLastSelection = WebInspector.CodeMirrorTextEditor.undoLastSelectionCommand;
+CodeMirror.commands.undoLastSelection = WebInspector.CodeMirrorTextEditor
+ .undoLastSelectionCommand;
/**
* @param {!CodeMirror} codeMirror
@@ -278,9 +234,11 @@ CodeMirror.commands.undoLastSelection = WebInspector.CodeMirrorTextEditor.undoLa
WebInspector.CodeMirrorTextEditor.selectNextOccurrenceCommand = function(
codeMirror
) {
- codeMirror._codeMirrorTextEditor._selectNextOccurrenceController.selectNextOccurrence();
+ codeMirror._codeMirrorTextEditor._selectNextOccurrenceController
+ .selectNextOccurrence();
};
-CodeMirror.commands.selectNextOccurrence = WebInspector.CodeMirrorTextEditor.selectNextOccurrenceCommand;
+CodeMirror.commands.selectNextOccurrence = WebInspector.CodeMirrorTextEditor
+ .selectNextOccurrenceCommand;
/**
* @param {boolean} shift
@@ -292,14 +250,10 @@ WebInspector.CodeMirrorTextEditor.moveCamelLeftCommand = function(
) {
codeMirror._codeMirrorTextEditor._doCamelCaseMovement(-1, shift);
};
-CodeMirror.commands.moveCamelLeft = WebInspector.CodeMirrorTextEditor.moveCamelLeftCommand.bind(
- null,
- false
-);
-CodeMirror.commands.selectCamelLeft = WebInspector.CodeMirrorTextEditor.moveCamelLeftCommand.bind(
- null,
- true
-);
+CodeMirror.commands.moveCamelLeft = WebInspector.CodeMirrorTextEditor
+ .moveCamelLeftCommand.bind(null, false);
+CodeMirror.commands.selectCamelLeft = WebInspector.CodeMirrorTextEditor
+ .moveCamelLeftCommand.bind(null, true);
/**
* @param {boolean} shift
@@ -311,14 +265,10 @@ WebInspector.CodeMirrorTextEditor.moveCamelRightCommand = function(
) {
codeMirror._codeMirrorTextEditor._doCamelCaseMovement(1, shift);
};
-CodeMirror.commands.moveCamelRight = WebInspector.CodeMirrorTextEditor.moveCamelRightCommand.bind(
- null,
- false
-);
-CodeMirror.commands.selectCamelRight = WebInspector.CodeMirrorTextEditor.moveCamelRightCommand.bind(
- null,
- true
-);
+CodeMirror.commands.moveCamelRight = WebInspector.CodeMirrorTextEditor
+ .moveCamelRightCommand.bind(null, false);
+CodeMirror.commands.selectCamelRight = WebInspector.CodeMirrorTextEditor
+ .moveCamelRightCommand.bind(null, true);
/**
* @param {!CodeMirror} codeMirror
@@ -336,9 +286,8 @@ CodeMirror.commands.smartNewlineAndIndent = function(codeMirror) {
: selection.anchor;
var line = codeMirror.getLine(cur.line);
var indent = WebInspector.TextUtils.lineIndent(line);
- replacements.push(
- "\n" + indent.substring(0, Math.min(cur.ch, indent.length))
- );
+ replacements
+ .push("\n" + indent.substring(0, Math.min(cur.ch, indent.length)));
}
codeMirror.replaceSelections(replacements);
codeMirror._codeMirrorTextEditor._onAutoAppendedSpaces();
@@ -410,9 +359,8 @@ CodeMirror.commands.dismissMultipleSelections = function(codemirror) {
.isEmpty()
)
return CodeMirror.Pass;
- codemirror.setSelection(selection.anchor, selection.anchor, {
- scroll: false
- });
+ codemirror
+ .setSelection(selection.anchor, selection.anchor, { scroll: false });
codemirror._codeMirrorTextEditor._revealLine(selection.anchor.line);
return;
}
@@ -475,9 +423,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
);
},
_enableAutocompletionIfNeeded: function() {
- this._autocompleteController.setEnabled(
- WebInspector.settings.textEditorAutocompletion.get()
- );
+ this
+ ._autocompleteController.setEnabled(WebInspector.settings.textEditorAutocompletion.get());
},
/**
* @param {string} quoteCharacter
@@ -529,12 +476,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
var selections = this.selections();
for (var i = 0; i < selections.length; ++i) {
var selection = selections[i];
- this._autoAppendedSpaces.push(
- this.textEditorPositionHandle(
- selection.startLine,
- selection.startColumn
- )
- );
+ this
+ ._autoAppendedSpaces.push(this.textEditorPositionHandle(selection.startLine, selection.startColumn));
}
},
/**
@@ -692,34 +635,20 @@ WebInspector.CodeMirrorTextEditor.prototype = {
this.setSelections(selections);
},
dispose: function() {
- WebInspector.settings.textEditorIndent.removeChangeListener(
- this._onUpdateEditorIndentation,
- this
- );
- WebInspector.settings.textEditorAutoDetectIndent.removeChangeListener(
- this._onUpdateEditorIndentation,
- this
- );
- WebInspector.settings.showWhitespacesInEditor.removeChangeListener(
- this._updateCodeMirrorMode,
- this
- );
- WebInspector.settings.textEditorBracketMatching.removeChangeListener(
- this._enableBracketMatchingIfNeeded,
- this
- );
- WebInspector.settings.textEditorAutocompletion.removeChangeListener(
- this._enableAutocompletionIfNeeded,
- this
- );
+ WebInspector
+ .settings.textEditorIndent.removeChangeListener(this._onUpdateEditorIndentation, this);
+ WebInspector
+ .settings.textEditorAutoDetectIndent.removeChangeListener(this._onUpdateEditorIndentation, this);
+ WebInspector
+ .settings.showWhitespacesInEditor.removeChangeListener(this._updateCodeMirrorMode, this);
+ WebInspector
+ .settings.textEditorBracketMatching.removeChangeListener(this._enableBracketMatchingIfNeeded, this);
+ WebInspector
+ .settings.textEditorAutocompletion.removeChangeListener(this._enableAutocompletionIfNeeded, this);
},
_enableBracketMatchingIfNeeded: function() {
- this._codeMirror.setOption(
- "autoCloseBrackets",
- WebInspector.settings.textEditorBracketMatching.get()
- ? { explode: false }
- : false
- );
+ this
+ ._codeMirror.setOption("autoCloseBrackets", WebInspector.settings.textEditorBracketMatching.get() ? { explode: false } : false);
},
/**
* @override
@@ -736,12 +665,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
delete this._editorSizeInSync;
},
_onUpdateEditorIndentation: function() {
- this._setEditorIndentation(
- WebInspector.CodeMirrorUtils.pullLines(
- this._codeMirror,
- WebInspector.CodeMirrorTextEditor.LinesToScanForIndentationGuessing
- )
- );
+ this
+ ._setEditorIndentation(WebInspector.CodeMirrorUtils.pullLines(this._codeMirror, WebInspector.CodeMirrorTextEditor.LinesToScanForIndentationGuessing));
},
/**
* @param {!Array.<string>} lines
@@ -760,10 +685,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
extraKeys.Tab = function(codeMirror) {
if (codeMirror.somethingSelected()) return CodeMirror.Pass;
var pos = codeMirror.getCursor("head");
- codeMirror.replaceRange(
- indent.substring(pos.ch % indent.length),
- codeMirror.getCursor()
- );
+ codeMirror
+ .replaceRange(indent.substring(pos.ch % indent.length), codeMirror.getCursor());
};
}
this._codeMirror.setOption("extraKeys", extraKeys);
@@ -811,11 +734,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
this._codeMirror.operation(innerHighlightRegex.bind(this));
},
cancelSearchResultsHighlight: function() {
- this._codeMirror.operation(
- this._tokenHighlighter.highlightSelectedTokens.bind(
- this._tokenHighlighter
- )
- );
+ this
+ ._codeMirror.operation(this._tokenHighlighter.highlightSelectedTokens.bind(this._tokenHighlighter));
if (this._selectionBeforeSearch) {
this._reportJump(this._selectionBeforeSearch, this.selection());
delete this._selectionBeforeSearch;
@@ -842,7 +762,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
for (
var i = 1;
i <=
- WebInspector.CodeMirrorTextEditor.MaximumNumberOfWhitespacesPerSingleSpan;
+ WebInspector.CodeMirrorTextEditor
+ .MaximumNumberOfWhitespacesPerSingleSpan;
++i
) {
spaceChars += spaceChar;
@@ -972,7 +893,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
if (stream.peek() === " ") {
var spaces = 0;
while (spaces <
- WebInspector.CodeMirrorTextEditor.MaximumNumberOfWhitespacesPerSingleSpan &&
+ WebInspector.CodeMirrorTextEditor
+ .MaximumNumberOfWhitespacesPerSingleSpan &&
stream.peek() === " ") {
++spaces;
stream.next();
@@ -983,11 +905,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
return null;
}
var whitespaceMode = { token: nextToken };
- return CodeMirror.overlayMode(
- CodeMirror.getMode(config, mimeType),
- whitespaceMode,
- false
- );
+ return CodeMirror
+ .overlayMode(CodeMirror.getMode(config, mimeType), whitespaceMode, false);
}
CodeMirror.defineMode(modeName, modeConstructor);
return modeName;
@@ -1002,12 +921,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
this._setupWhitespaceHighlight();
var showWhitespaces = WebInspector.settings.showWhitespacesInEditor.get();
this.element.classList.toggle("show-whitespaces", showWhitespaces);
- this._codeMirror.setOption(
- "mode",
- showWhitespaces
- ? this._whitespaceOverlayMode(this._mimeType)
- : this._mimeType
- );
+ this
+ ._codeMirror.setOption("mode", showWhitespaces ? this._whitespaceOverlayMode(this._mimeType) : this._mimeType);
},
/**
* @param {string} mimeType
@@ -1104,17 +1019,13 @@ WebInspector.CodeMirrorTextEditor.prototype = {
this.linesCount - 1
) |
0;
- this._codeMirror.scrollIntoView(new CodeMirror.Pos(
- bottomLineToReveal,
- 0
- ));
+ this
+ ._codeMirror.scrollIntoView(new CodeMirror.Pos(bottomLineToReveal, 0));
}
},
_gutterClick: function(instance, lineNumber, gutter, event) {
- this.dispatchEventToListeners(
- WebInspector.CodeMirrorTextEditor.Events.GutterClick,
- { lineNumber: lineNumber, event: event }
- );
+ this
+ .dispatchEventToListeners(WebInspector.CodeMirrorTextEditor.Events.GutterClick, { lineNumber: lineNumber, event: event });
},
_contextMenu: function(event) {
var contextMenu = new WebInspector.ContextMenu(event);
@@ -1163,11 +1074,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
this.clearPositionHighlight();
this._executionLine = this._codeMirror.getLineHandle(lineNumber);
if (!this._executionLine) return;
- this._codeMirror.addLineClass(
- this._executionLine,
- "wrap",
- "cm-execution-line"
- );
+ this
+ ._codeMirror.addLineClass(this._executionLine, "wrap", "cm-execution-line");
},
clearExecutionLine: function() {
this.clearPositionHighlight();
@@ -1241,11 +1149,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
if (!this._highlightedLine) return;
this._revealLine(lineNumber);
if (shouldHighlight) {
- this._codeMirror.addLineClass(
- this._highlightedLine,
- null,
- "cm-highlight"
- );
+ this
+ ._codeMirror.addLineClass(this._highlightedLine, null, "cm-highlight");
this._clearHighlightTimeout = setTimeout(
this.clearPositionHighlight.bind(this),
2000
@@ -1389,9 +1294,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
_cursorActivity: function() {
var start = this._codeMirror.getCursor("anchor");
var end = this._codeMirror.getCursor("head");
- this._delegate.selectionChanged(
- WebInspector.CodeMirrorUtils.toRange(start, end)
- );
+ this
+ ._delegate.selectionChanged(WebInspector.CodeMirrorUtils.toRange(start, end));
if (!this._isSearchActive())
this._codeMirror.operation(
this._tokenHighlighter.highlightSelectedTokens.bind(
@@ -1450,20 +1354,16 @@ WebInspector.CodeMirrorTextEditor.prototype = {
* @return {number}
*/
firstVisibleLine: function() {
- return this._codeMirror.lineAtHeight(
- this._codeMirror.getScrollInfo().top,
- "local"
- );
+ return this
+ ._codeMirror.lineAtHeight(this._codeMirror.getScrollInfo().top, "local");
},
/**
* @return {number}
*/
lastVisibleLine: function() {
var scrollInfo = this._codeMirror.getScrollInfo();
- return this._codeMirror.lineAtHeight(
- scrollInfo.top + scrollInfo.clientHeight,
- "local"
- );
+ return this
+ ._codeMirror.lineAtHeight(scrollInfo.top + scrollInfo.clientHeight, "local");
},
/**
* @return {!WebInspector.TextRange}
@@ -1482,9 +1382,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
var result = [];
for (var i = 0; i < selectionList.length; ++i) {
var selection = selectionList[i];
- result.push(
- WebInspector.CodeMirrorUtils.toRange(selection.anchor, selection.head)
- );
+ result
+ .push(WebInspector.CodeMirrorUtils.toRange(selection.anchor, selection.head));
}
return result;
},
@@ -1537,14 +1436,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
this.setReadOnly(true);
}
- this._setEditorIndentation(
- text
- .split("\n")
- .slice(
- 0,
- WebInspector.CodeMirrorTextEditor.LinesToScanForIndentationGuessing
- )
- );
+ this
+ ._setEditorIndentation(text.split("\n").slice(0, WebInspector.CodeMirrorTextEditor.LinesToScanForIndentationGuessing));
this._codeMirror.setValue(text);
if (this._shouldClearHistory) {
this._codeMirror.clearHistory();
@@ -1565,10 +1458,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
range: function() {
var lineCount = this.linesCount;
var lastLine = this._codeMirror.getLine(lineCount - 1);
- return WebInspector.CodeMirrorUtils.toRange(
- new CodeMirror.Pos(0, 0),
- new CodeMirror.Pos(lineCount - 1, lastLine.length)
- );
+ return WebInspector
+ .CodeMirrorUtils.toRange(new CodeMirror.Pos(0, 0), new CodeMirror.Pos(lineCount - 1, lastLine.length));
},
/**
* @param {number} lineNumber
@@ -1713,10 +1604,8 @@ WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype = {
this._highlightDescriptor.selectionStart = selectionStart;
} else {
this._removeHighlight();
- this._setHighlighter(
- this._searchHighlighter.bind(this, this._highlightRegex),
- selectionStart
- );
+ this
+ ._setHighlighter(this._searchHighlighter.bind(this, this._highlightRegex), selectionStart);
}
if (this._highlightRange) {
var pos = WebInspector.CodeMirrorUtils.toPos(this._highlightRange);
@@ -1934,10 +1823,8 @@ WebInspector.CodeMirrorTextEditor.BlockIndentController.prototype = {
var selection = selections[i];
var matchingBracket = codeMirror.findMatchingBracket(selection.head);
if (!matchingBracket || !matchingBracket.match) return;
- updatedSelections.push({
- head: selection.head,
- anchor: new CodeMirror.Pos(selection.head.line, 0)
- });
+ updatedSelections
+ .push({ head: selection.head, anchor: new CodeMirror.Pos(selection.head.line, 0) });
var line = codeMirror.getLine(matchingBracket.to.line);
var indent = WebInspector.TextUtils.lineIndent(line);
replacements.push(indent + "}");
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorUtils.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorUtils.js
index d615941..c56fe43 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorUtils.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorUtils.js
@@ -136,11 +136,8 @@ WebInspector.CodeMirrorUtils.prototype = {
editingContext.codeMirror = codeMirror;
},
closeEditor: function(editingContext) {
- editingContext.element.removeEventListener(
- "copy",
- this._consumeCopy,
- false
- );
+ editingContext
+ .element.removeEventListener("copy", this._consumeCopy, false);
editingContext.cssLoadView.detach();
},
cancelEditing: function(editingContext) {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/FontView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/FontView.js
index 58e50c6..787a951 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/FontView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/FontView.js
@@ -76,9 +76,8 @@ WebInspector.FontView.prototype = {
++WebInspector.FontView._fontId;
this.fontStyleElement = createElement("style");
- this._contentProvider.requestContent(
- this._onFontContentLoaded.bind(this, uniqueFontName)
- );
+ this
+ ._contentProvider.requestContent(this._onFontContentLoaded.bind(this, uniqueFontName));
this.element.appendChild(this.fontStyleElement);
var fontPreview = createElement("div");
@@ -96,10 +95,8 @@ WebInspector.FontView.prototype = {
this._dummyElement.style.display = "inline";
this._dummyElement.style.position = "absolute";
this._dummyElement.style.setProperty("font-family", uniqueFontName);
- this._dummyElement.style.setProperty(
- "font-size",
- WebInspector.FontView._measureFontSize + "px"
- );
+ this
+ ._dummyElement.style.setProperty("font-size", WebInspector.FontView._measureFontSize + "px");
this.element.appendChild(this.fontPreviewElement);
},
@@ -153,11 +150,8 @@ WebInspector.FontView.prototype = {
) -
2;
- this.fontPreviewElement.style.setProperty(
- "font-size",
- finalFontSize + "px",
- null
- );
+ this
+ .fontPreviewElement.style.setProperty("font-size", finalFontSize + "px", null);
},
__proto__: WebInspector.VBox.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/GoToLineDialog.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/GoToLineDialog.js
index 0fb449e..c332bdc 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/GoToLineDialog.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/GoToLineDialog.js
@@ -58,10 +58,8 @@ WebInspector.GoToLineDialog = function(sourceFrame) {
*/
WebInspector.GoToLineDialog.install = function(panel, sourceFrameGetter) {
var goToLineShortcut = WebInspector.GoToLineDialog.createShortcut();
- panel.registerShortcuts(
- [ goToLineShortcut ],
- WebInspector.GoToLineDialog._show.bind(null, sourceFrameGetter)
- );
+ panel
+ .registerShortcuts([ goToLineShortcut ], WebInspector.GoToLineDialog._show.bind(null, sourceFrameGetter));
};
/**
@@ -72,9 +70,8 @@ WebInspector.GoToLineDialog.install = function(panel, sourceFrameGetter) {
WebInspector.GoToLineDialog._show = function(sourceFrameGetter, event) {
var sourceFrame = sourceFrameGetter();
if (!sourceFrame) return false;
- WebInspector.Dialog.show(sourceFrame.element, new WebInspector.GoToLineDialog(
- sourceFrame
- ));
+ WebInspector
+ .Dialog.show(sourceFrame.element, new WebInspector.GoToLineDialog(sourceFrame));
return true;
};
@@ -82,10 +79,8 @@ WebInspector.GoToLineDialog._show = function(sourceFrameGetter, event) {
* @return {!WebInspector.KeyboardShortcut.Descriptor}
*/
WebInspector.GoToLineDialog.createShortcut = function() {
- return WebInspector.KeyboardShortcut.makeDescriptor(
- "g",
- WebInspector.KeyboardShortcut.Modifiers.Ctrl
- );
+ return WebInspector
+ .KeyboardShortcut.makeDescriptor("g", WebInspector.KeyboardShortcut.Modifiers.Ctrl);
};
WebInspector.GoToLineDialog.prototype = {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/ImageView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/ImageView.js
index 9138223..27d13dd 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/ImageView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/ImageView.js
@@ -55,26 +55,17 @@ WebInspector.ImageView.prototype = {
"img",
"resource-image-view"
);
- imagePreviewElement.addEventListener(
- "contextmenu",
- this._contextMenu.bind(this),
- true
- );
+ imagePreviewElement
+ .addEventListener("contextmenu", this._contextMenu.bind(this), true);
this._container = this.element.createChild("div", "info");
- this._container.createChild(
- "h1",
- "title"
- ).textContent = this._parsedURL.displayName;
+ this._container.createChild("h1", "title").textContent = this._parsedURL
+ .displayName;
var infoListElement = createElementWithClass("dl", "infoList");
- WebInspector.Resource.populateImageSource(
- this._url,
- this._mimeType,
- this._contentProvider,
- imagePreviewElement
- );
+ WebInspector
+ .Resource.populateImageSource(this._url, this._mimeType, this._contentProvider, imagePreviewElement);
this._contentProvider.requestContent(onContentAvailable.bind(this));
/**
@@ -103,18 +94,16 @@ WebInspector.ImageView.prototype = {
infoListElement.removeChildren();
for (var i = 0; i < imageProperties.length; ++i) {
infoListElement.createChild("dt").textContent = imageProperties[i].name;
- infoListElement.createChild(
- "dd"
- ).textContent = imageProperties[i].value;
+ infoListElement.createChild("dd").textContent = imageProperties[i]
+ .value;
}
infoListElement.createChild("dt").textContent = WebInspector.UIString(
"URL"
);
infoListElement
.createChild("dd")
- .appendChild(
- WebInspector.linkifyURLAsNode(this._url, undefined, undefined, true)
- );
+
+ .appendChild(WebInspector.linkifyURLAsNode(this._url, undefined, undefined, true));
this._container.appendChild(infoListElement);
}
this._imagePreviewElement = imagePreviewElement;
@@ -132,19 +121,15 @@ WebInspector.ImageView.prototype = {
},
_contextMenu: function(event) {
var contextMenu = new WebInspector.ContextMenu(event);
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Copy ^image URL"),
- this._copyImageURL.bind(this)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Copy ^image URL"), this._copyImageURL.bind(this));
if (this._imagePreviewElement.src)
contextMenu.appendItem(
WebInspector.UIString.capitalize("Copy ^image as Data URL"),
this._copyImageAsDataURL.bind(this)
);
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Open ^image in ^new ^tab"),
- this._openInNewTab.bind(this)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Open ^image in ^new ^tab"), this._openInNewTab.bind(this));
contextMenu.show();
},
_copyImageAsDataURL: function() {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/SourceFrame.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/SourceFrame.js
index 05fa0d2..1220c72 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/SourceFrame.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/SourceFrame.js
@@ -57,11 +57,8 @@ WebInspector.SourceFrame = function(contentProvider) {
this._textEditor.setReadOnly(!this.canEditSource());
this._shortcuts = {};
- this.element.addEventListener(
- "keydown",
- this._handleKeyDown.bind(this),
- false
- );
+ this
+ .element.addEventListener("keydown", this._handleKeyDown.bind(this), false);
this._sourcePosition = new WebInspector.StatusBarText(
"",
@@ -200,11 +197,8 @@ WebInspector.SourceFrame.prototype = {
if (!this.loaded || !this._isEditorShowing()) return;
- this._textEditor.revealPosition(
- this._positionToReveal.line,
- this._positionToReveal.column,
- this._positionToReveal.shouldHighlight
- );
+ this
+ ._textEditor.revealPosition(this._positionToReveal.line, this._positionToReveal.column, this._positionToReveal.shouldHighlight);
delete this._positionToReveal;
},
_clearPositionToReveal: function() {
@@ -290,9 +284,8 @@ WebInspector.SourceFrame.prototype = {
* @param {string} content
*/
_updateHighlighterType: function(content) {
- this._textEditor.setMimeType(
- this._simplifyMimeType(content, this._highlighterType)
- );
+ this
+ ._textEditor.setMimeType(this._simplifyMimeType(content, this._highlighterType));
},
/**
* @param {?string} content
@@ -456,10 +449,8 @@ WebInspector.SourceFrame.prototype = {
this._searchResults.length;
if (this._currentSearchMatchChangedCallback)
this._currentSearchMatchChangedCallback(this._currentSearchResultIndex);
- this._textEditor.highlightSearchResults(
- this._searchRegex,
- this._searchResults[this._currentSearchResultIndex]
- );
+ this
+ ._textEditor.highlightSearchResults(this._searchRegex, this._searchResults[this._currentSearchResultIndex]);
},
/**
* @override
@@ -562,11 +553,8 @@ WebInspector.SourceFrame.prototype = {
if (lineNumber < 0) lineNumber = 0;
if (!this._rowMessageBuckets[lineNumber])
- this._rowMessageBuckets[lineNumber] = new WebInspector.SourceFrame.RowMessageBucket(
- this,
- this._textEditor,
- lineNumber
- );
+ this._rowMessageBuckets[lineNumber] = new WebInspector.SourceFrame
+ .RowMessageBucket(this, this._textEditor, lineNumber);
var messageBucket = this._rowMessageBuckets[lineNumber];
messageBucket.addMessage(message);
},
@@ -610,33 +598,23 @@ WebInspector.SourceFrame.prototype = {
*/
selectionChanged: function(textRange) {
this._updateSourcePosition();
- this.dispatchEventToListeners(
- WebInspector.SourceFrame.Events.SelectionChanged,
- textRange
- );
- WebInspector.notifications.dispatchEventToListeners(
- WebInspector.SourceFrame.Events.SelectionChanged,
- textRange
- );
+ this
+ .dispatchEventToListeners(WebInspector.SourceFrame.Events.SelectionChanged, textRange);
+ WebInspector
+ .notifications.dispatchEventToListeners(WebInspector.SourceFrame.Events.SelectionChanged, textRange);
},
_updateSourcePosition: function() {
var selections = this._textEditor.selections();
if (!selections.length) return;
if (selections.length > 1) {
- this._sourcePosition.setText(
- WebInspector.UIString("%d selection regions", selections.length)
- );
+ this
+ ._sourcePosition.setText(WebInspector.UIString("%d selection regions", selections.length));
return;
}
var textRange = selections[0];
if (textRange.isEmpty()) {
- this._sourcePosition.setText(
- WebInspector.UIString(
- "Line %d, Column %d",
- textRange.endLine + 1,
- textRange.endColumn + 1
- )
- );
+ this
+ ._sourcePosition.setText(WebInspector.UIString("Line %d, Column %d", textRange.endLine + 1, textRange.endColumn + 1));
return;
}
textRange = textRange.normalize();
@@ -659,10 +637,8 @@ WebInspector.SourceFrame.prototype = {
* @param {number} lineNumber
*/
scrollChanged: function(lineNumber) {
- this.dispatchEventToListeners(
- WebInspector.SourceFrame.Events.ScrollChanged,
- lineNumber
- );
+ this
+ .dispatchEventToListeners(WebInspector.SourceFrame.Events.ScrollChanged, lineNumber);
},
_handleKeyDown: function(e) {
var shortcutKey = WebInspector.KeyboardShortcut.makeKeyFromEvent(e);
@@ -759,12 +735,16 @@ WebInspector.SourceFrameMessage.prototype = {
};
WebInspector.SourceFrame._iconClassPerLevel = {};
-WebInspector.SourceFrame._iconClassPerLevel[WebInspector.SourceFrameMessage.Level.Error] = "error-icon";
-WebInspector.SourceFrame._iconClassPerLevel[WebInspector.SourceFrameMessage.Level.Warning] = "warning-icon";
+WebInspector.SourceFrame._iconClassPerLevel[WebInspector.SourceFrameMessage
+ .Level.Error] = "error-icon";
+WebInspector.SourceFrame._iconClassPerLevel[WebInspector.SourceFrameMessage
+ .Level.Warning] = "warning-icon";
WebInspector.SourceFrame._lineClassPerLevel = {};
-WebInspector.SourceFrame._lineClassPerLevel[WebInspector.SourceFrameMessage.Level.Error] = "text-editor-line-with-error";
-WebInspector.SourceFrame._lineClassPerLevel[WebInspector.SourceFrameMessage.Level.Warning] = "text-editor-line-with-warning";
+WebInspector.SourceFrame._lineClassPerLevel[WebInspector.SourceFrameMessage
+ .Level.Error] = "text-editor-line-with-error";
+WebInspector.SourceFrame._lineClassPerLevel[WebInspector.SourceFrameMessage
+ .Level.Warning] = "text-editor-line-with-warning";
/**
* @constructor
@@ -775,7 +755,8 @@ WebInspector.SourceFrame.RowMessage = function(message) {
this._repeatCount = 1;
this.element = createElementWithClass("div", "text-editor-row-message");
this._icon = this.element.createChild("label", "", "dt-icon-label");
- this._icon.type = WebInspector.SourceFrame._iconClassPerLevel[message.level()];
+ this._icon.type = WebInspector.SourceFrame._iconClassPerLevel[message
+ .level()];
this._repeatCountElement = this.element.createChild(
"span",
"bubble-repeat-count hidden error"
@@ -961,20 +942,14 @@ WebInspector.SourceFrame.RowMessageBucket.prototype = {
}
if (this._level) {
- this._textEditor.toggleLineClass(
- lineNumber,
- WebInspector.SourceFrame._lineClassPerLevel[this._level],
- false
- );
+ this
+ ._textEditor.toggleLineClass(lineNumber, WebInspector.SourceFrame._lineClassPerLevel[this._level], false);
this._icon.type = "";
}
this._level = maxMessage.level();
if (!this._level) return;
- this._textEditor.toggleLineClass(
- lineNumber,
- WebInspector.SourceFrame._lineClassPerLevel[this._level],
- true
- );
+ this
+ ._textEditor.toggleLineClass(lineNumber, WebInspector.SourceFrame._lineClassPerLevel[this._level], true);
this._icon.type = WebInspector.SourceFrame._iconClassPerLevel[this._level];
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/TextEditorAutocompleteController.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/TextEditorAutocompleteController.js
index d18d25c..e821480 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/TextEditorAutocompleteController.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/TextEditorAutocompleteController.js
@@ -136,13 +136,8 @@ WebInspector.TextEditorAutocompleteController.prototype = {
prefixRange.startColumn !== oldPrefixRange.startColumn
)
this._updateAnchorBox();
- this._suggestBox.updateSuggestions(
- this._anchorBox,
- wordsWithPrefix,
- 0,
- true,
- this._textEditor.copyRange(prefixRange)
- );
+ this
+ ._suggestBox.updateSuggestions(this._anchorBox, wordsWithPrefix, 0, true, this._textEditor.copyRange(prefixRange));
if (!this._suggestBox.visible()) this.finishAutocomplete();
this._onSuggestionsShownForTest(wordsWithPrefix);
},
@@ -198,12 +193,8 @@ WebInspector.TextEditorAutocompleteController.prototype = {
for (var i = selections.length - 1; i >= 0; --i) {
var start = selections[i].head;
var end = new CodeMirror.Pos(start.line, start.ch - prefixLength);
- this._codeMirror.replaceRange(
- this._currentSuggestion,
- start,
- end,
- "+autocomplete"
- );
+ this
+ ._codeMirror.replaceRange(this._currentSuggestion, start, end, "+autocomplete");
}
},
_onScroll: function() {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AddSourceMapURLDialog.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AddSourceMapURLDialog.js
index e5e0b1e..98b7259 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AddSourceMapURLDialog.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AddSourceMapURLDialog.js
@@ -30,9 +30,8 @@ WebInspector.AddSourceMapURLDialog = function(callback) {
* @param {function(string)} callback
*/
WebInspector.AddSourceMapURLDialog.show = function(element, callback) {
- WebInspector.Dialog.show(element, new WebInspector.AddSourceMapURLDialog(
- callback
- ));
+ WebInspector
+ .Dialog.show(element, new WebInspector.AddSourceMapURLDialog(callback));
};
WebInspector.AddSourceMapURLDialog.prototype = {
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AdvancedSearchView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AdvancedSearchView.js
index 1733e9d..2c9e570 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AdvancedSearchView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AdvancedSearchView.js
@@ -18,11 +18,8 @@ WebInspector.AdvancedSearchView = function() {
"div",
"search-drawer-header"
);
- this._searchPanelElement.addEventListener(
- "keydown",
- this._onKeyDown.bind(this),
- false
- );
+ this
+ ._searchPanelElement.addEventListener("keydown", this._onKeyDown.bind(this), false);
this._searchResultsElement = this.contentElement.createChild("div");
this._searchResultsElement.className = "search-results";
@@ -59,17 +56,16 @@ WebInspector.AdvancedSearchView = function() {
"div",
"search-message"
);
- this._searchProgressPlaceholderElement = this._searchStatusBarElement.createChild(
- "div",
- "flex-centered"
- );
+ this._searchProgressPlaceholderElement = this._searchStatusBarElement
+ .createChild("div", "flex-centered");
this._searchStatusBarElement.createChild("div", "search-message-spacer");
this._searchResultsMessageElement = this._searchStatusBarElement.createChild(
"div",
"search-message"
);
- WebInspector.settings.advancedSearchConfig = WebInspector.settings.createSetting(
+ WebInspector.settings.advancedSearchConfig = WebInspector.settings
+ .createSetting(
"advancedSearchConfig",
new WebInspector.SearchConfig("", true, false).toPlainObject()
);
@@ -88,11 +84,8 @@ WebInspector.AdvancedSearchView.prototype = {
* @return {!WebInspector.SearchConfig}
*/
_buildSearchConfig: function() {
- return new WebInspector.SearchConfig(
- this._search.value,
- this._ignoreCaseCheckbox.checked,
- this._regexCheckbox.checked
- );
+ return new WebInspector
+ .SearchConfig(this._search.value, this._ignoreCaseCheckbox.checked, this._regexCheckbox.checked);
},
/**
* @param {string} queryCandidate
@@ -120,10 +113,8 @@ WebInspector.AdvancedSearchView.prototype = {
if (this._progressIndicator) this._progressIndicator.done();
this._progressIndicator = new WebInspector.ProgressIndicator();
this._indexingStarted(this._progressIndicator);
- this._searchScope.performIndexing(
- this._progressIndicator,
- this._onIndexingFinished.bind(this)
- );
+ this
+ ._searchScope.performIndexing(this._progressIndicator, this._onIndexingFinished.bind(this));
},
/**
* @param {number} searchId
@@ -168,12 +159,8 @@ WebInspector.AdvancedSearchView.prototype = {
if (this._progressIndicator) this._progressIndicator.done();
this._progressIndicator = new WebInspector.ProgressIndicator();
this._searchStarted(this._progressIndicator);
- this._searchScope.performSearch(
- searchConfig,
- this._progressIndicator,
- this._onSearchResult.bind(this, this._searchId),
- this._onSearchFinished.bind(this, this._searchId)
- );
+ this
+ ._searchScope.performSearch(searchConfig, this._progressIndicator, this._onSearchResult.bind(this, this._searchId), this._onSearchFinished.bind(this, this._searchId));
},
_resetSearch: function() {
this._stopSearch();
@@ -289,9 +276,8 @@ WebInspector.AdvancedSearchView.prototype = {
}
},
_save: function() {
- WebInspector.settings.advancedSearchConfig.set(
- this._buildSearchConfig().toPlainObject()
- );
+ WebInspector
+ .settings.advancedSearchConfig.set(this._buildSearchConfig().toPlainObject());
},
_load: function() {
var searchConfig = WebInspector.SearchConfig.fromPlainObject(
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AsyncOperationsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AsyncOperationsSidebarPane.js
index 5793349..901e9d2 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AsyncOperationsSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AsyncOperationsSidebarPane.js
@@ -8,10 +8,8 @@
* @implements {WebInspector.TargetManager.Observer}
*/
WebInspector.AsyncOperationsSidebarPane = function() {
- WebInspector.BreakpointsSidebarPaneBase.call(
- this,
- WebInspector.UIString("Async Operation Breakpoints")
- );
+ WebInspector
+ .BreakpointsSidebarPaneBase.call(this, WebInspector.UIString("Async Operation Breakpoints"));
this.bodyElement.classList.add("async-operations");
this._updateEmptyElement();
@@ -19,11 +17,8 @@ WebInspector.AsyncOperationsSidebarPane = function() {
"button",
"pane-title-button refresh"
);
- refreshButton.addEventListener(
- "click",
- this._refreshButtonClicked.bind(this),
- false
- );
+ refreshButton
+ .addEventListener("click", this._refreshButtonClicked.bind(this), false);
refreshButton.title = WebInspector.UIString("Refresh");
/** @type {!Map.<!WebInspector.Target, !Map.<number, !DebuggerAgent.AsyncOperation>>} */
@@ -32,9 +27,8 @@ WebInspector.AsyncOperationsSidebarPane = function() {
this._operationIdToElement = new Map();
this._revealBlackboxedCallFrames = false;
- this._linkifier = new WebInspector.Linkifier(
- new WebInspector.Linkifier.DefaultFormatter(30)
- );
+ this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier
+ .DefaultFormatter(30));
this._popoverHelper = new WebInspector.PopoverHelper(
this.bodyElement,
@@ -42,50 +36,24 @@ WebInspector.AsyncOperationsSidebarPane = function() {
this._showPopover.bind(this)
);
this._popoverHelper.setTimeout(250, 250);
- this.bodyElement.addEventListener(
- "click",
- this._hidePopover.bind(this),
- true
- );
+ this
+ .bodyElement.addEventListener("click", this._hidePopover.bind(this), true);
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.AsyncOperationStarted,
- this._onAsyncOperationStarted,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.AsyncOperationCompleted,
- this._onAsyncOperationCompleted,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerResumed,
- this._debuggerResumed,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this._debuggerReset,
- this
- );
- WebInspector.context.addFlavorChangeListener(
- WebInspector.Target,
- this._targetChanged,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.AsyncOperationStarted, this._onAsyncOperationStarted, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.AsyncOperationCompleted, this._onAsyncOperationCompleted, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerResumed, this._debuggerResumed, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
+ WebInspector
+ .context.addFlavorChangeListener(WebInspector.Target, this._targetChanged, this);
- WebInspector.settings.skipStackFramesPattern.addChangeListener(
- this._refresh,
- this
- );
- WebInspector.settings.enableAsyncStackTraces.addChangeListener(
- this._asyncStackTracesStateChanged,
- this
- );
+ WebInspector
+ .settings.skipStackFramesPattern.addChangeListener(this._refresh, this);
+ WebInspector
+ .settings.enableAsyncStackTraces.addChangeListener(this._asyncStackTracesStateChanged, this);
WebInspector.targetManager.observeTargets(this);
};
@@ -279,14 +247,12 @@ WebInspector.AsyncOperationsSidebarPane.prototype = {
WebInspector.UIString("Async Operation");
var label = createCheckboxLabel(title, operation[this._checkedSymbol]);
label.classList.add("checkbox-elem");
- label.checkboxElement.addEventListener(
- "click",
- this._checkboxClicked.bind(this, operation.id),
- false
- );
+ label
+ .checkboxElement.addEventListener("click", this._checkboxClicked.bind(this, operation.id), false);
element.appendChild(label);
- var callFrame = WebInspector.DebuggerPresentationUtils.callFrameAnchorFromStackTrace(
+ var callFrame = WebInspector.DebuggerPresentationUtils
+ .callFrameAnchorFromStackTrace(
this._target,
operation.stackTrace,
operation.asyncStackTrace,
@@ -295,9 +261,8 @@ WebInspector.AsyncOperationsSidebarPane.prototype = {
if (callFrame)
element
.createChild("div")
- .appendChild(
- this._linkifier.linkifyConsoleCallFrame(this._target, callFrame)
- );
+
+ .appendChild(this._linkifier.linkifyConsoleCallFrame(this._target, callFrame));
element[this._operationIdSymbol] = operation.id;
this._operationIdToElement.set(operation.id, element);
@@ -336,9 +301,8 @@ WebInspector.AsyncOperationsSidebarPane.prototype = {
* @return {!Element|!AnchorBox|undefined}
*/
_getPopoverAnchor: function(element, event) {
- var anchor /** @type {?Element} */ = element.enclosingNodeOrSelfWithNodeName(
- "a"
- );
+ var anchor /** @type {?Element} */ = element
+ .enclosingNodeOrSelfWithNodeName("a");
if (!anchor) return undefined;
var operation = this._operationForPopover(anchor);
return operation ? anchor : undefined;
@@ -350,7 +314,8 @@ WebInspector.AsyncOperationsSidebarPane.prototype = {
_showPopover: function(anchor, popover) {
var operation = this._operationForPopover(anchor);
if (!operation) return;
- var content = WebInspector.DOMPresentationUtils.buildStackTracePreviewContents(
+ var content = WebInspector.DOMPresentationUtils
+ .buildStackTracePreviewContents(
this._target,
this._linkifier,
operation.stackTrace,
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CSSSourceFrame.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CSSSourceFrame.js
index 3188e73..703c7b8 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CSSSourceFrame.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CSSSourceFrame.js
@@ -35,9 +35,8 @@
*/
WebInspector.CSSSourceFrame = function(uiSourceCode) {
WebInspector.UISourceCodeFrame.call(this, uiSourceCode);
- this.textEditor.setAutocompleteDelegate(
- new WebInspector.CSSSourceFrame.AutocompleteDelegate()
- );
+ this
+ .textEditor.setAutocompleteDelegate(new WebInspector.CSSSourceFrame.AutocompleteDelegate());
this._registerShortcuts();
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CallStackSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CallStackSidebarPane.js
index ed4cabb..b90f50b 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CallStackSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CallStackSidebarPane.js
@@ -44,20 +44,12 @@ WebInspector.CallStackSidebarPane = function() {
);
asyncCheckbox.classList.add("scripts-callstack-async");
asyncCheckbox.addEventListener("click", consumeEvent, false);
- WebInspector.settings.enableAsyncStackTraces.addChangeListener(
- this._asyncStackTracesStateChanged,
- this
- );
- WebInspector.settings.skipStackFramesPattern.addChangeListener(
- this._blackboxingStateChanged,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.SelectedThreadChanged,
- this._handleSelectedThreadChange,
- this
- );
+ WebInspector
+ .settings.enableAsyncStackTraces.addChangeListener(this._asyncStackTracesStateChanged, this);
+ WebInspector
+ .settings.skipStackFramesPattern.addChangeListener(this._blackboxingStateChanged, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.SelectedThreadChanged, this._handleSelectedThreadChange, this);
};
/** @enum {string} */
@@ -97,20 +89,10 @@ WebInspector.CallStackSidebarPane.prototype = {
asyncStackTrace.description
);
var asyncCallFrame = new WebInspector.UIList.Item(title, "", true);
- asyncCallFrame.element.addEventListener(
- "click",
- this._selectNextVisibleCallFrame.bind(
- this,
- this.callFrames.length,
- false
- ),
- false
- );
- asyncCallFrame.element.addEventListener(
- "contextmenu",
- this._asyncCallFrameContextMenu.bind(this, this.callFrames.length),
- true
- );
+ asyncCallFrame
+ .element.addEventListener("click", this._selectNextVisibleCallFrame.bind(this, this.callFrames.length, false), false);
+ asyncCallFrame
+ .element.addEventListener("contextmenu", this._asyncCallFrameContextMenu.bind(this, this.callFrames.length), true);
this._appendSidebarCallFrames(asyncStackTrace.callFrames, asyncCallFrame);
asyncStackTrace = asyncStackTrace.asyncStackTrace;
}
@@ -130,11 +112,8 @@ WebInspector.CallStackSidebarPane.prototype = {
element.createTextChild(" ");
var showAllLink = element.createChild("span", "link");
showAllLink.textContent = WebInspector.UIString("Show");
- showAllLink.addEventListener(
- "click",
- this._revealHiddenCallFrames.bind(this),
- false
- );
+ showAllLink
+ .addEventListener("click", this._revealHiddenCallFrames.bind(this), false);
this.bodyElement.insertBefore(element, this.bodyElement.firstChild);
this._hiddenCallFramesMessageElement = element;
}
@@ -145,9 +124,8 @@ WebInspector.CallStackSidebarPane.prototype = {
this.bodyElement.removeChildren();
},
_handleSelectedThreadChange: function() {
- this._getActiveDebuggerModel().threadStore.getActiveThreadStack(
- this._onStackFramesFetched.bind(this)
- );
+ this
+ ._getActiveDebuggerModel().threadStore.getActiveThreadStack(this._onStackFramesFetched.bind(this));
},
_onStackFramesFetched: function(callframes) {
this._clear();
@@ -227,9 +205,8 @@ WebInspector.CallStackSidebarPane.prototype = {
this._hiddenCallFramesMessageElement.remove();
delete this._hiddenCallFramesMessageElement;
}
- this.dispatchEventToListeners(
- WebInspector.CallStackSidebarPane.Events.RevealHiddenCallFrames
- );
+ this
+ .dispatchEventToListeners(WebInspector.CallStackSidebarPane.Events.RevealHiddenCallFrames);
},
/**
* @param {!WebInspector.CallStackSidebarPane.CallFrame} callFrame
@@ -290,15 +267,8 @@ WebInspector.CallStackSidebarPane.prototype = {
contextMenu.appendSeparator();
if (blackboxed) {
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Stop ^blackboxing"),
- this._handleContextMenuBlackboxURL.bind(
- this,
- url,
- isContentScript,
- false
- )
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Stop ^blackboxing"), this._handleContextMenuBlackboxURL.bind(this, url, isContentScript, false));
} else {
if (canBlackBox)
contextMenu.appendItem(
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EditingLocationHistoryManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EditingLocationHistoryManager.js
index ed9044d..b044c0f 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EditingLocationHistoryManager.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EditingLocationHistoryManager.js
@@ -51,10 +51,8 @@ WebInspector.EditingLocationHistoryManager.prototype = {
* @param {!WebInspector.UISourceCodeFrame} sourceFrame
*/
trackSourceFrameCursorJumps: function(sourceFrame) {
- sourceFrame.addEventListener(
- WebInspector.SourceFrame.Events.JumpHappened,
- this._onJumpHappened.bind(this)
- );
+ sourceFrame
+ .addEventListener(WebInspector.SourceFrame.Events.JumpHappened, this._onJumpHappened.bind(this));
},
/**
* @param {!WebInspector.Event} event
@@ -187,10 +185,7 @@ WebInspector.EditingLocationHistoryEntry.prototype = {
if (!position || !uiSourceCode) return;
this._editingLocationManager.updateCurrentState();
- this._sourcesView.showSourceLocation(
- uiSourceCode,
- position.lineNumber,
- position.columnNumber
- );
+ this
+ ._sourcesView.showSourceLocation(uiSourceCode, position.lineNumber, position.columnNumber);
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js
index d5f79b6..b2b809b 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js
@@ -8,181 +8,62 @@
* @implements {WebInspector.TargetManager.Observer}
*/
WebInspector.EventListenerBreakpointsSidebarPane = function() {
- WebInspector.SidebarPane.call(
- this,
- WebInspector.UIString("Event Listener Breakpoints")
- );
+ WebInspector
+ .SidebarPane.call(this, WebInspector.UIString("Event Listener Breakpoints"));
this.registerRequiredCSS("components/breakpointsList.css");
this._categoriesTreeOutline = new TreeOutline();
this._categoriesTreeOutline.element.tabIndex = 0;
- this._categoriesTreeOutline.element.classList.add(
- "event-listener-breakpoints"
- );
+ this
+ ._categoriesTreeOutline.element.classList.add("event-listener-breakpoints");
this.bodyElement.appendChild(this._categoriesTreeOutline.element);
this._categoryItems = [];
// FIXME: uncomment following once inspector stops being drop targer in major ports.
// Otherwise, inspector page reacts on drop event and tries to load the event data.
// this._createCategory(WebInspector.UIString("Drag"), ["drag", "drop", "dragstart", "dragend", "dragenter", "dragleave", "dragover"]);
- this._createCategory(
- WebInspector.UIString("Animation"),
- [ "requestAnimationFrame", "cancelAnimationFrame", "animationFrameFired" ],
- true
- );
- this._createCategory(WebInspector.UIString("Control"), [
- "resize",
- "scroll",
- "zoom",
- "focus",
- "blur",
- "select",
- "change",
- "submit",
- "reset"
- ]);
- this._createCategory(WebInspector.UIString("Clipboard"), [
- "copy",
- "cut",
- "paste",
- "beforecopy",
- "beforecut",
- "beforepaste"
- ]);
- this._createCategory(WebInspector.UIString("DOM Mutation"), [
- "DOMActivate",
- "DOMFocusIn",
- "DOMFocusOut",
- "DOMAttrModified",
- "DOMCharacterDataModified",
- "DOMNodeInserted",
- "DOMNodeInsertedIntoDocument",
- "DOMNodeRemoved",
- "DOMNodeRemovedFromDocument",
- "DOMSubtreeModified",
- "DOMContentLoaded"
- ]);
- this._createCategory(WebInspector.UIString("Device"), [
- "deviceorientation",
- "devicemotion"
- ]);
- this._createCategory(WebInspector.UIString("Drag / drop"), [
- "dragenter",
- "dragover",
- "dragleave",
- "drop"
- ]);
- this._createCategory(WebInspector.UIString("Keyboard"), [
- "keydown",
- "keyup",
- "keypress",
- "input"
- ]);
- this._createCategory(WebInspector.UIString("Load"), [
- "load",
- "beforeunload",
- "unload",
- "abort",
- "error",
- "hashchange",
- "popstate"
- ]);
- this._createCategory(
- WebInspector.UIString("Media"),
- [
- "play",
- "pause",
- "playing",
- "canplay",
- "canplaythrough",
- "seeking",
- "seeked",
- "timeupdate",
- "ended",
- "ratechange",
- "durationchange",
- "volumechange",
- "loadstart",
- "progress",
- "suspend",
- "abort",
- "error",
- "emptied",
- "stalled",
- "loadedmetadata",
- "loadeddata",
- "waiting"
- ],
- false,
- [ "audio", "video" ]
- );
- this._createCategory(WebInspector.UIString("Mouse"), [
- "click",
- "dblclick",
- "mousedown",
- "mouseup",
- "mouseover",
- "mousemove",
- "mouseout",
- "mouseenter",
- "mouseleave",
- "mousewheel",
- "wheel",
- "contextmenu"
- ]);
- this._createCategory(
- WebInspector.UIString("Parse"),
- [ "setInnerHTML" ],
- true
- );
- this._createCategory(
- WebInspector.UIString("Promise"),
- [ "newPromise", "promiseResolved", "promiseRejected" ],
- true
- );
- this._createCategory(
- WebInspector.UIString("Script"),
- [ "scriptFirstStatement" ],
- true
- );
- this._createCategory(
- WebInspector.UIString("Timer"),
- [ "setTimer", "clearTimer", "timerFired" ],
- true
- );
- this._createCategory(WebInspector.UIString("Touch"), [
- "touchstart",
- "touchmove",
- "touchend",
- "touchcancel"
- ]);
- this._createCategory(
- WebInspector.UIString("XHR"),
- [
- "readystatechange",
- "load",
- "loadstart",
- "loadend",
- "abort",
- "error",
- "progress",
- "timeout"
- ],
- false,
- [ "XMLHttpRequest", "XMLHttpRequestUpload" ]
- );
- this._createCategory(
- WebInspector.UIString("WebGL"),
- [ "webglErrorFired", "webglWarningFired" ],
- true
- );
+ this
+ ._createCategory(WebInspector.UIString("Animation"), [ "requestAnimationFrame", "cancelAnimationFrame", "animationFrameFired" ], true);
+ this
+ ._createCategory(WebInspector.UIString("Control"), [ "resize", "scroll", "zoom", "focus", "blur", "select", "change", "submit", "reset" ]);
+ this
+ ._createCategory(WebInspector.UIString("Clipboard"), [ "copy", "cut", "paste", "beforecopy", "beforecut", "beforepaste" ]);
+ this
+ ._createCategory(WebInspector.UIString("DOM Mutation"), [ "DOMActivate", "DOMFocusIn", "DOMFocusOut", "DOMAttrModified", "DOMCharacterDataModified", "DOMNodeInserted", "DOMNodeInsertedIntoDocument", "DOMNodeRemoved", "DOMNodeRemovedFromDocument", "DOMSubtreeModified", "DOMContentLoaded" ]);
+ this
+ ._createCategory(WebInspector.UIString("Device"), [ "deviceorientation", "devicemotion" ]);
+ this
+ ._createCategory(WebInspector.UIString("Drag / drop"), [ "dragenter", "dragover", "dragleave", "drop" ]);
+ this
+ ._createCategory(WebInspector.UIString("Keyboard"), [ "keydown", "keyup", "keypress", "input" ]);
+ this
+ ._createCategory(WebInspector.UIString("Load"), [ "load", "beforeunload", "unload", "abort", "error", "hashchange", "popstate" ]);
+ this
+ ._createCategory(WebInspector.UIString("Media"), [ "play", "pause", "playing", "canplay", "canplaythrough", "seeking", "seeked", "timeupdate", "ended", "ratechange", "durationchange", "volumechange", "loadstart", "progress", "suspend", "abort", "error", "emptied", "stalled", "loadedmetadata", "loadeddata", "waiting" ], false, [ "audio", "video" ]);
+ this
+ ._createCategory(WebInspector.UIString("Mouse"), [ "click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove", "mouseout", "mouseenter", "mouseleave", "mousewheel", "wheel", "contextmenu" ]);
+ this
+ ._createCategory(WebInspector.UIString("Parse"), [ "setInnerHTML" ], true);
+ this
+ ._createCategory(WebInspector.UIString("Promise"), [ "newPromise", "promiseResolved", "promiseRejected" ], true);
+ this
+ ._createCategory(WebInspector.UIString("Script"), [ "scriptFirstStatement" ], true);
+ this
+ ._createCategory(WebInspector.UIString("Timer"), [ "setTimer", "clearTimer", "timerFired" ], true);
+ this
+ ._createCategory(WebInspector.UIString("Touch"), [ "touchstart", "touchmove", "touchend", "touchcancel" ]);
+ this
+ ._createCategory(WebInspector.UIString("XHR"), [ "readystatechange", "load", "loadstart", "loadend", "abort", "error", "progress", "timeout" ], false, [ "XMLHttpRequest", "XMLHttpRequestUpload" ]);
+ this
+ ._createCategory(WebInspector.UIString("WebGL"), [ "webglErrorFired", "webglWarningFired" ], true);
this._createCategory(WebInspector.UIString("Window"), [ "close" ], true);
WebInspector.targetManager.observeTargets(this);
};
WebInspector.EventListenerBreakpointsSidebarPane.categoryListener = "listener:";
-WebInspector.EventListenerBreakpointsSidebarPane.categoryInstrumentation = "instrumentation:";
+WebInspector.EventListenerBreakpointsSidebarPane
+ .categoryInstrumentation = "instrumentation:";
WebInspector.EventListenerBreakpointsSidebarPane.eventTargetAny = "*";
/**
@@ -238,7 +119,8 @@ WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI = function(
return WebInspector.UIString("WebGL Error Fired (%s)", errorName);
}
}
- return WebInspector.EventListenerBreakpointsSidebarPane._eventNamesForUI[eventName] ||
+ return WebInspector.EventListenerBreakpointsSidebarPane
+ ._eventNamesForUI[eventName] ||
eventName.substring(eventName.indexOf(":") + 1);
};
@@ -294,9 +176,8 @@ WebInspector.EventListenerBreakpointsSidebarPane.prototype = {
var eventName = category + eventNames[i];
var breakpointItem = {};
- var title = WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI(
- eventName
- );
+ var title = WebInspector.EventListenerBreakpointsSidebarPane
+ .eventNameForUI(eventName);
labelNode = createCheckboxLabel(title);
labelNode.classList.add("source-code");
@@ -411,7 +292,8 @@ WebInspector.EventListenerBreakpointsSidebarPane.prototype = {
)
) {
var protocolEventName = eventName.substring(
- WebInspector.EventListenerBreakpointsSidebarPane.categoryListener.length
+ WebInspector.EventListenerBreakpointsSidebarPane.categoryListener
+ .length
);
if (enable)
targets[i]
@@ -423,11 +305,13 @@ WebInspector.EventListenerBreakpointsSidebarPane.prototype = {
.removeEventListenerBreakpoint(protocolEventName, eventTargetName);
} else if (
eventName.startsWith(
- WebInspector.EventListenerBreakpointsSidebarPane.categoryInstrumentation
+ WebInspector.EventListenerBreakpointsSidebarPane
+ .categoryInstrumentation
)
) {
var protocolEventName = eventName.substring(
- WebInspector.EventListenerBreakpointsSidebarPane.categoryInstrumentation.length
+ WebInspector.EventListenerBreakpointsSidebarPane
+ .categoryInstrumentation.length
);
if (enable)
targets[i]
@@ -463,7 +347,8 @@ WebInspector.EventListenerBreakpointsSidebarPane.prototype = {
*/
_findBreakpointItem: function(eventName, targetName) {
targetName = (targetName ||
- WebInspector.EventListenerBreakpointsSidebarPane.eventTargetAny).toLowerCase();
+ WebInspector.EventListenerBreakpointsSidebarPane.eventTargetAny)
+ .toLowerCase();
for (var i = 0; i < this._categoryItems.length; ++i) {
var categoryItem = this._categoryItems[i];
if (categoryItem.targetNames.indexOf(targetName) === -1) continue;
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FileBasedSearchResultsPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FileBasedSearchResultsPane.js
index 2d0c8e6..cf83a2a 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FileBasedSearchResultsPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FileBasedSearchResultsPane.js
@@ -38,10 +38,8 @@ WebInspector.FileBasedSearchResultsPane.prototype = {
* @param {!WebInspector.FileBasedSearchResult} searchResult
*/
_addFileTreeElement: function(searchResult) {
- var fileTreeElement = new WebInspector.FileBasedSearchResultsPane.FileTreeElement(
- this._searchConfig,
- searchResult
- );
+ var fileTreeElement = new WebInspector.FileBasedSearchResultsPane
+ .FileTreeElement(this._searchConfig, searchResult);
this._treeOutline.appendChild(fileTreeElement);
// Expand until at least a certain number of matches is expanded.
if (
@@ -100,7 +98,8 @@ WebInspector.FileBasedSearchResultsPane.FileTreeElement.prototype = {
var fileNameSpan = createElement("span");
fileNameSpan.className = "search-result-file-name";
- fileNameSpan.textContent = this._searchResult.uiSourceCode.fullDisplayName();
+ fileNameSpan.textContent = this._searchResult.uiSourceCode
+ .fullDisplayName();
this.listItemElement.appendChild(fileNameSpan);
var matchesCountSpan = createElement("span");
@@ -182,13 +181,10 @@ WebInspector.FileBasedSearchResultsPane.FileTreeElement.prototype = {
);
this._showMoreMatchesTreeElement = new TreeElement(showMoreMatchesText);
this.appendChild(this._showMoreMatchesTreeElement);
- this._showMoreMatchesTreeElement.listItemElement.classList.add(
- "show-more-matches"
- );
- this._showMoreMatchesTreeElement.onselect = this._showMoreMatchesElementSelected.bind(
- this,
- startMatchIndex
- );
+ this
+ ._showMoreMatchesTreeElement.listItemElement.classList.add("show-more-matches");
+ this._showMoreMatchesTreeElement.onselect = this
+ ._showMoreMatchesElementSelected.bind(this, startMatchIndex);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -241,10 +237,8 @@ WebInspector.FileBasedSearchResultsPane.FileTreeElement.prototype = {
*/
_showMoreMatchesElementSelected: function(startMatchIndex) {
this.removeChild(this._showMoreMatchesTreeElement);
- this._appendSearchMatches(
- startMatchIndex,
- this._searchResult.searchMatches.length
- );
+ this
+ ._appendSearchMatches(startMatchIndex, this._searchResult.searchMatches.length);
return false;
},
__proto__: TreeElement.prototype
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilePathScoreFunction.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilePathScoreFunction.js
index f3da131..646936a 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilePathScoreFunction.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilePathScoreFunction.js
@@ -187,12 +187,7 @@ WebInspector.FilePathScoreFunction.prototype = {
if (this._queryUpperCase[i] !== this._dataUpperCase[j]) return 0;
if (!consecutiveMatch) return this._singleCharScore(query, data, i, j);
- else return this._sequenceCharScore(
- query,
- data,
- i,
- j - consecutiveMatch,
- consecutiveMatch
- );
+ else return this
+ ._sequenceCharScore(query, data, i, j - consecutiveMatch, consecutiveMatch);
}
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilteredItemSelectionDialog.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilteredItemSelectionDialog.js
index c12bcb6..e11a31f 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilteredItemSelectionDialog.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilteredItemSelectionDialog.js
@@ -40,18 +40,12 @@ WebInspector.FilteredItemSelectionDialog = function(delegate) {
this.element = createElement("div");
this.element.className = "filtered-item-list-dialog";
this.element.addEventListener("keydown", this._onKeyDown.bind(this), false);
- this.element.appendChild(
- WebInspector.View.createStyleElement(
- "sources/filteredItemSelectionDialog.css"
- )
- );
+ this
+ .element.appendChild(WebInspector.View.createStyleElement("sources/filteredItemSelectionDialog.css"));
this._promptElement = this.element.createChild("input", "monospace");
- this._promptElement.addEventListener(
- "input",
- this._onInput.bind(this),
- false
- );
+ this
+ ._promptElement.addEventListener("input", this._onInput.bind(this), false);
this._promptElement.type = "text";
this._promptElement.setAttribute("spellcheck", "false");
@@ -60,11 +54,8 @@ WebInspector.FilteredItemSelectionDialog = function(delegate) {
this._itemElementsContainer = this._viewportControl.element;
this._itemElementsContainer.classList.add("container");
this._itemElementsContainer.classList.add("monospace");
- this._itemElementsContainer.addEventListener(
- "click",
- this._onClick.bind(this),
- false
- );
+ this
+ ._itemElementsContainer.addEventListener("click", this._onClick.bind(this), false);
this.element.appendChild(this._itemElementsContainer);
this._delegate = delegate;
@@ -167,12 +158,8 @@ WebInspector.FilteredItemSelectionDialog.prototype = {
);
itemElement._subtitleElement.textContent = "​";
itemElement._index = index;
- this._delegate.renderItem(
- index,
- this._promptElement.value.trim(),
- itemElement._titleElement,
- itemElement._subtitleElement
- );
+ this
+ ._delegate.renderItem(index, this._promptElement.value.trim(), itemElement._titleElement, itemElement._subtitleElement);
return itemElement;
},
/**
@@ -291,10 +278,8 @@ WebInspector.FilteredItemSelectionDialog.prototype = {
},
_updateShowMatchingItems: function() {
var shouldShowMatchingItems = this._shouldShowMatchingItems();
- this._itemElementsContainer.classList.toggle(
- "hidden",
- !shouldShowMatchingItems
- );
+ this
+ ._itemElementsContainer.classList.toggle("hidden", !shouldShowMatchingItems);
this.element.style.height = shouldShowMatchingItems
? this._dialogHeight + "px"
: "auto";
@@ -303,9 +288,8 @@ WebInspector.FilteredItemSelectionDialog.prototype = {
* @return {number}
*/
_rowsPerViewport: function() {
- return Math.floor(
- this._viewportControl.element.clientHeight / this._rowHeight
- );
+ return Math
+ .floor(this._viewportControl.element.clientHeight / this._rowHeight);
},
_onKeyDown: function(event) {
var newSelectedIndex = this._selectedIndexInFiltered;
@@ -365,10 +349,8 @@ WebInspector.FilteredItemSelectionDialog.prototype = {
"filtered-item-list-dialog-item"
);
if (!itemElement) return;
- this._delegate.selectItem(
- itemElement._index,
- this._promptElement.value.trim()
- );
+ this
+ ._delegate.selectItem(itemElement._index, this._promptElement.value.trim());
WebInspector.Dialog.hide();
},
/**
@@ -554,9 +536,11 @@ WebInspector.JavaScriptOutlineDialog.show = function(
selectItemCallback
) {
if (WebInspector.Dialog.currentInstance()) return;
- var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDialog(
- new WebInspector.JavaScriptOutlineDialog(uiSourceCode, selectItemCallback)
- );
+ var filteredItemSelectionDialog = new WebInspector
+ .FilteredItemSelectionDialog(new WebInspector.JavaScriptOutlineDialog(
+ uiSourceCode,
+ selectItemCallback
+ ));
WebInspector.Dialog.show(view.element, filteredItemSelectionDialog);
};
@@ -565,7 +549,8 @@ WebInspector.JavaScriptOutlineDialog.prototype = {
* @param {!MessageEvent} event
*/
_didBuildOutlineChunk: function(event) {
- var data /** @type {!WebInspector.JavaScriptOutlineDialog.MessageEventData} */ = event.data;
+ var data /** @type {!WebInspector.JavaScriptOutlineDialog.MessageEventData} */ = event
+ .data;
var chunk = data.chunk;
for (var i = 0; i < chunk.length; ++i) this._functionItems.push(chunk[i]);
@@ -647,16 +632,10 @@ WebInspector.SelectUISourceCodeDialog = function(defaultScores) {
this._populate();
this._defaultScores = defaultScores;
this._scorer = new WebInspector.FilePathScoreFunction("");
- WebInspector.workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeAdded,
- this._uiSourceCodeAdded,
- this
- );
- WebInspector.workspace.addEventListener(
- WebInspector.Workspace.Events.ProjectRemoved,
- this._projectRemoved,
- this
- );
+ WebInspector
+ .workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this);
+ WebInspector
+ .workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved, this._projectRemoved, this);
};
WebInspector.SelectUISourceCodeDialog.prototype = {
@@ -760,17 +739,11 @@ WebInspector.SelectUISourceCodeDialog.prototype = {
i < ranges.length;
++i
) ranges[i].offset -= fileNameIndex + 1;
- WebInspector.highlightRangesWithStyleClass(
- titleElement,
- ranges,
- "highlight"
- );
+ WebInspector
+ .highlightRangesWithStyleClass(titleElement, ranges, "highlight");
} else {
- WebInspector.highlightRangesWithStyleClass(
- subtitleElement,
- ranges,
- "highlight"
- );
+ WebInspector
+ .highlightRangesWithStyleClass(subtitleElement, ranges, "highlight");
}
},
/**
@@ -817,16 +790,10 @@ WebInspector.SelectUISourceCodeDialog.prototype = {
this.refresh();
},
dispose: function() {
- WebInspector.workspace.removeEventListener(
- WebInspector.Workspace.Events.UISourceCodeAdded,
- this._uiSourceCodeAdded,
- this
- );
- WebInspector.workspace.removeEventListener(
- WebInspector.Workspace.Events.ProjectRemoved,
- this._projectRemoved,
- this
- );
+ WebInspector
+ .workspace.removeEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this);
+ WebInspector
+ .workspace.removeEventListener(WebInspector.Workspace.Events.ProjectRemoved, this._projectRemoved, this);
},
__proto__: WebInspector.SelectionDialogContentProvider.prototype
};
@@ -891,9 +858,11 @@ WebInspector.OpenResourceDialog.show = function(
) {
if (WebInspector.Dialog.currentInstance()) return;
- var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDialog(
- new WebInspector.OpenResourceDialog(sourcesView, defaultScores)
- );
+ var filteredItemSelectionDialog = new WebInspector
+ .FilteredItemSelectionDialog(new WebInspector.OpenResourceDialog(
+ sourcesView,
+ defaultScores
+ ));
filteredItemSelectionDialog.renderAsTwoRows();
WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog);
if (query) filteredItemSelectionDialog.setQuery(query);
@@ -949,9 +918,9 @@ WebInspector.SelectUISourceCodeForProjectTypesDialog.show = function(
) {
if (WebInspector.Dialog.currentInstance()) return;
- var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDialog(
- new WebInspector.SelectUISourceCodeForProjectTypesDialog(types, callback)
- );
+ var filteredItemSelectionDialog = new WebInspector
+ .FilteredItemSelectionDialog(new WebInspector
+ .SelectUISourceCodeForProjectTypesDialog(types, callback));
filteredItemSelectionDialog.setQuery(name);
filteredItemSelectionDialog.renderAsTwoRows();
WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog);
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/InplaceFormatterEditorAction.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/InplaceFormatterEditorAction.js
index 7d80e51..48dd065 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/InplaceFormatterEditorAction.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/InplaceFormatterEditorAction.js
@@ -27,10 +27,8 @@ WebInspector.InplaceFormatterEditorAction.prototype = {
* @param {?WebInspector.UISourceCode} uiSourceCode
*/
_updateButton: function(uiSourceCode) {
- this._button.element.classList.toggle(
- "hidden",
- !this._isFormattable(uiSourceCode)
- );
+ this
+ ._button.element.classList.toggle("hidden", !this._isFormattable(uiSourceCode));
},
/**
* @override
@@ -86,15 +84,10 @@ WebInspector.InplaceFormatterEditorAction.prototype = {
* @param {?string} content
*/
function contentLoaded(content) {
- var highlighterType = WebInspector.SourcesView.uiSourceCodeHighlighterType(
- uiSourceCode
- );
- WebInspector.Formatter.format(
- uiSourceCode.contentType(),
- highlighterType,
- content || "",
- innerCallback.bind(this)
- );
+ var highlighterType = WebInspector.SourcesView
+ .uiSourceCodeHighlighterType(uiSourceCode);
+ WebInspector
+ .Formatter.format(uiSourceCode.contentType(), highlighterType, content || "", innerCallback.bind(this));
}
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js
index 9def461..2bfdb57 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js
@@ -64,13 +64,8 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
var breakpointActiveTitle = breakpointActive
? WebInspector.UIString.capitalize("Deactivate ^breakpoints")
: WebInspector.UIString.capitalize("Activate ^breakpoints");
- contextMenu.appendItem(
- breakpointActiveTitle,
- this._breakpointManager.setBreakpointsActive.bind(
- this._breakpointManager,
- !breakpointActive
- )
- );
+ contextMenu
+ .appendItem(breakpointActiveTitle, this._breakpointManager.setBreakpointsActive.bind(this._breakpointManager, !breakpointActive));
},
/**
* @param {!WebInspector.Event} event
@@ -78,8 +73,10 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
_breakpointAdded: function(event) {
this._breakpointRemoved(event);
- var breakpoint /** @type {!WebInspector.BreakpointManager.Breakpoint} */ = event.data.breakpoint;
- var uiLocation /** @type {!WebInspector.UILocation} */ = event.data.uiLocation;
+ var breakpoint /** @type {!WebInspector.BreakpointManager.Breakpoint} */ = event
+ .data.breakpoint;
+ var uiLocation /** @type {!WebInspector.UILocation} */ = event.data
+ .uiLocation;
this._addBreakpoint(breakpoint, uiLocation);
},
/**
@@ -152,7 +149,8 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
* @param {!WebInspector.Event} event
*/
_breakpointRemoved: function(event) {
- var breakpoint /** @type {!WebInspector.BreakpointManager.Breakpoint} */ = event.data.breakpoint;
+ var breakpoint /** @type {!WebInspector.BreakpointManager.Breakpoint} */ = event
+ .data.breakpoint;
var breakpointItem = this._items.get(breakpoint);
if (!breakpointItem) return;
this._items.remove(breakpoint);
@@ -169,17 +167,14 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
},
clearBreakpointHighlight: function() {
if (this._highlightedBreakpointItem) {
- this._highlightedBreakpointItem.element.classList.remove(
- "breakpoint-hit"
- );
+ this
+ ._highlightedBreakpointItem.element.classList.remove("breakpoint-hit");
delete this._highlightedBreakpointItem;
}
},
_breakpointClicked: function(uiLocation, event) {
- this._showSourceLineDelegate(
- uiLocation.uiSourceCode,
- uiLocation.lineNumber
- );
+ this
+ ._showSourceLineDelegate(uiLocation.uiSourceCode, uiLocation.lineNumber);
},
/**
* @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint
@@ -205,12 +200,8 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
var removeAllTitle = WebInspector.UIString.capitalize(
"Remove ^all ^breakpoints"
);
- contextMenu.appendItem(
- removeAllTitle,
- this._breakpointManager.removeAllBreakpoints.bind(
- this._breakpointManager
- )
- );
+ contextMenu
+ .appendItem(removeAllTitle, this._breakpointManager.removeAllBreakpoints.bind(this._breakpointManager));
}
contextMenu.appendSeparator();
@@ -234,22 +225,10 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
contextMenu.appendSeparator();
- contextMenu.appendItem(
- enableTitle,
- this._breakpointManager.toggleAllBreakpoints.bind(
- this._breakpointManager,
- true
- ),
- !(enableBreakpointCount != breakpoints.length)
- );
- contextMenu.appendItem(
- disableTitle,
- this._breakpointManager.toggleAllBreakpoints.bind(
- this._breakpointManager,
- false
- ),
- !(enableBreakpointCount > 1)
- );
+ contextMenu
+ .appendItem(enableTitle, this._breakpointManager.toggleAllBreakpoints.bind(this._breakpointManager, true), !(enableBreakpointCount != breakpoints.length));
+ contextMenu
+ .appendItem(disableTitle, this._breakpointManager.toggleAllBreakpoints.bind(this._breakpointManager, false), !(enableBreakpointCount > 1));
}
contextMenu.show();
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptCompiler.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptCompiler.js
index 5352bc3..be68883 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptCompiler.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptCompiler.js
@@ -48,13 +48,8 @@ WebInspector.JavaScriptCompiler.prototype = {
var code = this._sourceFrame.textEditor.text();
target
.debuggerAgent()
- .compileScript(
- code,
- "",
- false,
- undefined,
- compileCallback.bind(this, target)
- );
+
+ .compileScript(code, "", false, undefined, compileCallback.bind(this, target));
/**
* @param {!WebInspector.Target} target
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptSourceFrame.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptSourceFrame.js
index 06c5b15..d785c4e 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptSourceFrame.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptSourceFrame.js
@@ -53,67 +53,31 @@ WebInspector.JavaScriptSourceFrame = function(scriptsPanel, uiSourceCode) {
true
);
- this.textEditor.element.addEventListener(
- "keydown",
- this._onKeyDown.bind(this),
- true
- );
-
- this.textEditor.addEventListener(
- WebInspector.CodeMirrorTextEditor.Events.GutterClick,
- this._handleGutterClick.bind(this),
- this
- );
-
- this._breakpointManager.addEventListener(
- WebInspector.BreakpointManager.Events.BreakpointAdded,
- this._breakpointAdded,
- this
- );
- this._breakpointManager.addEventListener(
- WebInspector.BreakpointManager.Events.BreakpointRemoved,
- this._breakpointRemoved,
- this
- );
-
- WebInspector.presentationConsoleMessageHelper.addConsoleMessageEventListener(
- WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageAdded,
- this._uiSourceCode,
- this._consoleMessageAdded,
- this
- );
- WebInspector.presentationConsoleMessageHelper.addConsoleMessageEventListener(
- WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageRemoved,
- this._uiSourceCode,
- this._consoleMessageRemoved,
- this
- );
- WebInspector.presentationConsoleMessageHelper.addConsoleMessageEventListener(
- WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessagesCleared,
- this._uiSourceCode,
- this._consoleMessagesCleared,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.SourceMappingChanged,
- this._onSourceMappingChanged,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._workingCopyChanged,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._workingCopyCommitted,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.TitleChanged,
- this._showBlackboxInfobarIfNeeded,
- this
- );
+ this
+ .textEditor.element.addEventListener("keydown", this._onKeyDown.bind(this), true);
+
+ this
+ .textEditor.addEventListener(WebInspector.CodeMirrorTextEditor.Events.GutterClick, this._handleGutterClick.bind(this), this);
+
+ this
+ ._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded, this);
+ this
+ ._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved, this._breakpointRemoved, this);
+
+ WebInspector
+ .presentationConsoleMessageHelper.addConsoleMessageEventListener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageAdded, this._uiSourceCode, this._consoleMessageAdded, this);
+ WebInspector
+ .presentationConsoleMessageHelper.addConsoleMessageEventListener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageRemoved, this._uiSourceCode, this._consoleMessageRemoved, this);
+ WebInspector
+ .presentationConsoleMessageHelper.addConsoleMessageEventListener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessagesCleared, this._uiSourceCode, this._consoleMessagesCleared, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.SourceMappingChanged, this._onSourceMappingChanged, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._showBlackboxInfobarIfNeeded, this);
/** @type {!Map.<!WebInspector.Target, !WebInspector.ResourceScriptFile>}*/
this._scriptFileForTarget = new Map();
@@ -127,14 +91,10 @@ WebInspector.JavaScriptSourceFrame = function(scriptsPanel, uiSourceCode) {
if (scriptFile) this._updateScriptFile(targets[i]);
}
- WebInspector.settings.skipStackFramesPattern.addChangeListener(
- this._showBlackboxInfobarIfNeeded,
- this
- );
- WebInspector.settings.skipContentScripts.addChangeListener(
- this._showBlackboxInfobarIfNeeded,
- this
- );
+ WebInspector
+ .settings.skipStackFramesPattern.addChangeListener(this._showBlackboxInfobarIfNeeded, this);
+ WebInspector
+ .settings.skipContentScripts.addChangeListener(this._showBlackboxInfobarIfNeeded, this);
this._showBlackboxInfobarIfNeeded();
/** @type {!Map.<number, !Element>} */
this._valueWidgets = new Map();
@@ -158,36 +118,21 @@ WebInspector.JavaScriptSourceFrame.prototype = {
var fileURL = this._uiSourceCode.originURL();
infobar
- .createDetailsRowMessage(
- WebInspector.UIString("The content of this file on the file system: ")
- )
- .appendChild(
- WebInspector.linkifyURLAsNode(
- fileURL,
- fileURL,
- "source-frame-infobar-details-url",
- true
- )
- );
+
+ .createDetailsRowMessage(WebInspector.UIString("The content of this file on the file system: "))
+
+ .appendChild(WebInspector.linkifyURLAsNode(fileURL, fileURL, "source-frame-infobar-details-url", true));
var scriptURL = WebInspector.networkMapping.networkURL(this._uiSourceCode);
infobar
- .createDetailsRowMessage(
- WebInspector.UIString("does not match the loaded script: ")
- )
- .appendChild(
- WebInspector.linkifyURLAsNode(
- scriptURL,
- scriptURL,
- "source-frame-infobar-details-url",
- true
- )
- );
+
+ .createDetailsRowMessage(WebInspector.UIString("does not match the loaded script: "))
+
+ .appendChild(WebInspector.linkifyURLAsNode(scriptURL, scriptURL, "source-frame-infobar-details-url", true));
infobar.createDetailsRowMessage();
- infobar.createDetailsRowMessage(
- WebInspector.UIString("Possible solutions are:")
- );
+ infobar
+ .createDetailsRowMessage(WebInspector.UIString("Possible solutions are:"));
if (WebInspector.settings.cacheDisabled.get())
infobar
@@ -196,18 +141,12 @@ WebInspector.JavaScriptSourceFrame.prototype = {
else
infobar
.createDetailsRowMessage(" - ")
- .createTextChild(
- WebInspector.UIString(
- 'Check "Disable cache" in settings and reload inspected page (recommended setup for authoring and debugging)'
- )
- );
+
+ .createTextChild(WebInspector.UIString('Check "Disable cache" in settings and reload inspected page (recommended setup for authoring and debugging)'));
infobar
.createDetailsRowMessage(" - ")
- .createTextChild(
- WebInspector.UIString(
- "Check that your file and script are both loaded from the correct source and their contents match"
- )
- );
+
+ .createTextChild(WebInspector.UIString("Check that your file and script are both loaded from the correct source and their contents match"));
this._updateInfobars();
},
@@ -244,24 +183,16 @@ WebInspector.JavaScriptSourceFrame.prototype = {
);
this._blackboxInfobar = infobar;
- infobar.createDetailsRowMessage(
- WebInspector.UIString(
- "Debugger will skip stepping through this script, and will not stop on exceptions"
- )
- );
+ infobar
+ .createDetailsRowMessage(WebInspector.UIString("Debugger will skip stepping through this script, and will not stop on exceptions"));
infobar.createDetailsRowMessage();
- infobar.createDetailsRowMessage(
- WebInspector.UIString("Possible ways to cancel this behavior are:")
- );
+ infobar
+ .createDetailsRowMessage(WebInspector.UIString("Possible ways to cancel this behavior are:"));
infobar
.createDetailsRowMessage(" - ")
- .createTextChild(
- WebInspector.UIString(
- 'Press "%s" button in settings',
- WebInspector.manageBlackboxingButtonLabel()
- )
- );
+
+ .createTextChild(WebInspector.UIString('Press "%s" button in settings', WebInspector.manageBlackboxingButtonLabel()));
var unblackboxLink = infobar
.createDetailsRowMessage(" - ")
.createChild("span", "link");
@@ -285,17 +216,13 @@ WebInspector.JavaScriptSourceFrame.prototype = {
var shortcutKeys = WebInspector.ShortcutsScreen.SourcesPanelShortcuts;
for (var i = 0; i < shortcutKeys.EvaluateSelectionInConsole.length; ++i) {
var keyDescriptor = shortcutKeys.EvaluateSelectionInConsole[i];
- this.addShortcut(
- keyDescriptor.key,
- this._evaluateSelectionInConsole.bind(this)
- );
+ this
+ .addShortcut(keyDescriptor.key, this._evaluateSelectionInConsole.bind(this));
}
for (var i = 0; i < shortcutKeys.AddSelectionToWatch.length; ++i) {
var keyDescriptor = shortcutKeys.AddSelectionToWatch[i];
- this.addShortcut(
- keyDescriptor.key,
- this._addCurrentSelectionToWatch.bind(this)
- );
+ this
+ .addShortcut(keyDescriptor.key, this._addCurrentSelectionToWatch.bind(this));
}
},
_addCurrentSelectionToWatch: function() {
@@ -344,49 +271,35 @@ WebInspector.JavaScriptSourceFrame.prototype = {
},
onUISourceCodeContentChanged: function() {
this._removeAllBreakpoints();
- WebInspector.UISourceCodeFrame.prototype.onUISourceCodeContentChanged.call(
- this
- );
+ WebInspector
+ .UISourceCodeFrame.prototype.onUISourceCodeContentChanged.call(this);
},
onTextChanged: function(oldRange, newRange) {
this._scriptsPanel.setIgnoreExecutionLineEvents(true);
- WebInspector.UISourceCodeFrame.prototype.onTextChanged.call(
- this,
- oldRange,
- newRange
- );
+ WebInspector
+ .UISourceCodeFrame.prototype.onTextChanged.call(this, oldRange, newRange);
this._scriptsPanel.setIgnoreExecutionLineEvents(false);
if (this._compiler) this._compiler.scheduleCompile();
},
populateLineGutterContextMenu: function(contextMenu, lineNumber) {
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Continue to ^here"),
- this._continueToLine.bind(this, lineNumber)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Continue to ^here"), this._continueToLine.bind(this, lineNumber));
var breakpoint = this._breakpointManager.findBreakpointOnLine(
this._uiSourceCode,
lineNumber
);
if (!breakpoint) {
// This row doesn't have a breakpoint: We want to show Add Breakpoint and Add and Edit Breakpoint.
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Add ^breakpoint"),
- this._createNewBreakpoint.bind(this, lineNumber, 0, "", true)
- );
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Add ^conditional ^breakpoint…"),
- this._editBreakpointCondition.bind(this, lineNumber)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Add ^breakpoint"), this._createNewBreakpoint.bind(this, lineNumber, 0, "", true));
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Add ^conditional ^breakpoint…"), this._editBreakpointCondition.bind(this, lineNumber));
} else {
// This row has a breakpoint, we want to show edit and remove breakpoint, and either disable or enable.
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Remove ^breakpoint"),
- breakpoint.remove.bind(breakpoint)
- );
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Edit ^breakpoint…"),
- this._editBreakpointCondition.bind(this, lineNumber, breakpoint)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Remove ^breakpoint"), breakpoint.remove.bind(breakpoint));
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Edit ^breakpoint…"), this._editBreakpointCondition.bind(this, lineNumber, breakpoint));
if (breakpoint.enabled())
contextMenu.appendItem(
WebInspector.UIString.capitalize("Disable ^breakpoint"),
@@ -404,17 +317,13 @@ WebInspector.JavaScriptSourceFrame.prototype = {
if (textSelection && !textSelection.isEmpty()) {
var selection = this.textEditor.copyRange(textSelection);
var addToWatchLabel = WebInspector.UIString.capitalize("Add to ^watch");
- contextMenu.appendItem(
- addToWatchLabel,
- this._innerAddToWatch.bind(this, selection)
- );
+ contextMenu
+ .appendItem(addToWatchLabel, this._innerAddToWatch.bind(this, selection));
var evaluateLabel = WebInspector.UIString.capitalize(
"Evaluate in ^console"
);
- contextMenu.appendItem(
- evaluateLabel,
- this._evaluateInConsole.bind(this, selection)
- );
+ contextMenu
+ .appendItem(evaluateLabel, this._evaluateInConsole.bind(this, selection));
contextMenu.appendSeparator();
}
@@ -423,10 +332,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
* @param {!WebInspector.ResourceScriptFile} scriptFile
*/
function addSourceMapURL(scriptFile) {
- WebInspector.AddSourceMapURLDialog.show(
- this.element,
- addSourceMapURLDialogCallback.bind(null, scriptFile)
- );
+ WebInspector
+ .AddSourceMapURLDialog.show(this.element, addSourceMapURLDialogCallback.bind(null, scriptFile));
}
/**
@@ -438,11 +345,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
scriptFile.addSourceMapURL(url);
}
- WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu.call(
- this,
- contextMenu,
- lineNumber
- );
+ WebInspector
+ .UISourceCodeFrame.prototype.populateTextAreaContextMenu.call(this, contextMenu, lineNumber);
if (
this._uiSourceCode.project().type() ===
@@ -454,10 +358,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
var addSourceMapURLLabel = WebInspector.UIString.capitalize(
"Add ^source ^map…"
);
- contextMenu.appendItem(
- addSourceMapURLLabel,
- addSourceMapURL.bind(this, scriptFile)
- );
+ contextMenu
+ .appendItem(addSourceMapURLLabel, addSourceMapURL.bind(this, scriptFile));
contextMenu.appendSeparator();
}
}
@@ -542,14 +444,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
);
this.addMessageToSource(message);
} else {
- WebInspector.console.addMessage(
- WebInspector.UIString(
- "Unknown LiveEdit error: %s; %s",
- JSON.stringify(errorData),
- error
- ),
- warningLevel
- );
+ WebInspector
+ .console.addMessage(WebInspector.UIString("Unknown LiveEdit error: %s; %s", JSON.stringify(errorData), error), warningLevel);
}
}
@@ -585,13 +481,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
);
if (!breakpointDecoration) continue;
this._removeBreakpointDecoration(lineNumber);
- this._addBreakpointDecoration(
- lineNumber,
- breakpointDecoration.columnNumber,
- breakpointDecoration.condition,
- breakpointDecoration.enabled,
- true
- );
+ this
+ ._addBreakpointDecoration(lineNumber, breakpointDecoration.columnNumber, breakpointDecoration.condition, breakpointDecoration.enabled, true);
}
this._muted = true;
},
@@ -664,12 +555,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
var lineNumber = parseInt(lineNumberString, 10);
if (isNaN(lineNumber)) continue;
var breakpointDecoration = breakpoints[lineNumberString];
- this._setBreakpoint(
- lineNumber,
- breakpointDecoration.columnNumber,
- breakpointDecoration.condition,
- breakpointDecoration.enabled
- );
+ this
+ ._setBreakpoint(lineNumber, breakpointDecoration.columnNumber, breakpointDecoration.condition, breakpointDecoration.enabled);
}
},
_removeAllBreakpoints: function() {
@@ -794,15 +681,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
}
var evaluationText = line.substring(startHighlight, endHighlight + 1);
var selectedCallFrame = target.debuggerModel.selectedCallFrame();
- selectedCallFrame.evaluate(
- evaluationText,
- objectGroupName,
- false,
- true,
- false,
- false,
- showObjectPopover.bind(this)
- );
+ selectedCallFrame
+ .evaluate(evaluationText, objectGroupName, false, true, false, false, showObjectPopover.bind(this));
/**
* @param {?RuntimeAgent.RemoteObject} result
@@ -833,10 +713,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
lineNumber,
endHighlight
);
- this._popoverAnchorBox._highlightDescriptor = this.textEditor.highlightRange(
- highlightRange,
- "source-frame-eval-expression"
- );
+ this._popoverAnchorBox._highlightDescriptor = this.textEditor
+ .highlightRange(highlightRange, "source-frame-eval-expression");
}
}
},
@@ -931,12 +809,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
"source-frame-breakpoint-message"
);
labelElement.htmlFor = "source-frame-breakpoint-condition";
- labelElement.createTextChild(
- WebInspector.UIString(
- "The breakpoint on line %d will stop only if this expression is true:",
- lineNumber + 1
- )
- );
+ labelElement
+ .createTextChild(WebInspector.UIString("The breakpoint on line %d will stop only if this expression is true:", lineNumber + 1));
var editorElement = conditionElement.createChild("input", "monospace");
editorElement.id = "source-frame-breakpoint-condition";
@@ -973,10 +847,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
if (localScope && functionLocation)
localScope
.object()
- .getAllProperties(
- false,
- this._prepareScopeVariables.bind(this, callFrame)
- );
+
+ .getAllProperties(false, this._prepareScopeVariables.bind(this, callFrame));
if (this._clearValueWidgetsTimer) {
clearTimeout(this._clearValueWidgetsTimer);
@@ -994,12 +866,12 @@ WebInspector.JavaScriptSourceFrame.prototype = {
return;
}
- var functionUILocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation /**@type {!WebInspector.DebuggerModel.Location} */(
+ var functionUILocation = WebInspector.debuggerWorkspaceBinding
+ .rawLocationToUILocation /**@type {!WebInspector.DebuggerModel.Location} */(
callFrame.functionLocation()
);
- var executionUILocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(
- callFrame.location()
- );
+ var executionUILocation = WebInspector.debuggerWorkspaceBinding
+ .rawLocationToUILocation(callFrame.location());
if (
functionUILocation.uiSourceCode !== this._uiSourceCode ||
executionUILocation.uiSourceCode !== this._uiSourceCode
@@ -1027,9 +899,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
/** @type {!Map.<number, !Set<string>>} */
var namesPerLine = new Map();
- var tokenizer = new WebInspector.CodeMirrorUtils.TokenizerFactory().createTokenizer(
- "text/javascript"
- );
+ var tokenizer = new WebInspector.CodeMirrorUtils.TokenizerFactory()
+ .createTokenizer("text/javascript");
tokenizer(
this.textEditor.line(fromLine).substring(fromColumn),
processToken.bind(this, fromLine)
@@ -1144,10 +1015,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
: "";
if (newText !== oldText) {
// value has changed, update it.
- WebInspector.runCSSAnimationOnce /** @type {!Element} */(
- widget.__nameToToken.get(name),
- "source-frame-value-update-highlight"
- );
+ WebInspector
+ .runCSSAnimationOnce /** @type {!Element} */(widget.__nameToToken.get(name), "source-frame-value-update-highlight");
}
}
this._valueWidgets.delete(i);
@@ -1185,11 +1054,13 @@ WebInspector.JavaScriptSourceFrame.prototype = {
return false;
},
_breakpointAdded: function(event) {
- var uiLocation /** @type {!WebInspector.UILocation} */ = event.data.uiLocation;
+ var uiLocation /** @type {!WebInspector.UILocation} */ = event.data
+ .uiLocation;
if (uiLocation.uiSourceCode !== this._uiSourceCode) return;
if (this._shouldIgnoreExternalBreakpointEvents()) return;
- var breakpoint /** @type {!WebInspector.BreakpointManager.Breakpoint} */ = event.data.breakpoint;
+ var breakpoint /** @type {!WebInspector.BreakpointManager.Breakpoint} */ = event
+ .data.breakpoint;
if (this.loaded)
this._addBreakpointDecoration(
uiLocation.lineNumber,
@@ -1200,7 +1071,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
);
},
_breakpointRemoved: function(event) {
- var uiLocation /** @type {!WebInspector.UILocation} */ = event.data.uiLocation;
+ var uiLocation /** @type {!WebInspector.UILocation} */ = event.data
+ .uiLocation;
if (uiLocation.uiSourceCode !== this._uiSourceCode) return;
if (this._shouldIgnoreExternalBreakpointEvents()) return;
@@ -1212,11 +1084,13 @@ WebInspector.JavaScriptSourceFrame.prototype = {
this._removeBreakpointDecoration(uiLocation.lineNumber);
},
_consoleMessageAdded: function(event) {
- var message /** @type {!WebInspector.PresentationConsoleMessage} */ = event.data;
+ var message /** @type {!WebInspector.PresentationConsoleMessage} */ = event
+ .data;
if (this.loaded) this.addMessageToSource(this._sourceFrameMessage(message));
},
_consoleMessageRemoved: function(event) {
- var message /** @type {!WebInspector.PresentationConsoleMessage} */ = event.data;
+ var message /** @type {!WebInspector.PresentationConsoleMessage} */ = event
+ .data;
if (this.loaded)
this.removeMessageFromSource(this._sourceFrameMessage(message));
},
@@ -1244,10 +1118,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
_updateLinesWithoutMappingHighlight: function() {
var linesCount = this.textEditor.linesCount;
for (var i = 0; i < linesCount; ++i) {
- var lineHasMapping = WebInspector.debuggerWorkspaceBinding.uiLineHasMapping(
- this._uiSourceCode,
- i
- );
+ var lineHasMapping = WebInspector.debuggerWorkspaceBinding
+ .uiLineHasMapping(this._uiSourceCode, i);
if (!lineHasMapping) this._hasLineWithoutMapping = true;
if (this._hasLineWithoutMapping)
this.textEditor.toggleLineClass(
@@ -1268,16 +1140,10 @@ WebInspector.JavaScriptSourceFrame.prototype = {
);
this._scriptFileForTarget.remove(target);
if (oldScriptFile) {
- oldScriptFile.removeEventListener(
- WebInspector.ResourceScriptFile.Events.DidMergeToVM,
- this._didMergeToVM,
- this
- );
- oldScriptFile.removeEventListener(
- WebInspector.ResourceScriptFile.Events.DidDivergeFromVM,
- this._didDivergeFromVM,
- this
- );
+ oldScriptFile
+ .removeEventListener(WebInspector.ResourceScriptFile.Events.DidMergeToVM, this._didMergeToVM, this);
+ oldScriptFile
+ .removeEventListener(WebInspector.ResourceScriptFile.Events.DidDivergeFromVM, this._didDivergeFromVM, this);
if (this._muted && !this._uiSourceCode.isDirty())
this._restoreBreakpointsIfConsistentScripts();
}
@@ -1287,16 +1153,10 @@ WebInspector.JavaScriptSourceFrame.prototype = {
this._updateDivergedInfobar();
if (newScriptFile) {
- newScriptFile.addEventListener(
- WebInspector.ResourceScriptFile.Events.DidMergeToVM,
- this._didMergeToVM,
- this
- );
- newScriptFile.addEventListener(
- WebInspector.ResourceScriptFile.Events.DidDivergeFromVM,
- this._didDivergeFromVM,
- this
- );
+ newScriptFile
+ .addEventListener(WebInspector.ResourceScriptFile.Events.DidMergeToVM, this._didMergeToVM, this);
+ newScriptFile
+ .addEventListener(WebInspector.ResourceScriptFile.Events.DidDivergeFromVM, this._didDivergeFromVM, this);
if (this.loaded) newScriptFile.checkMapping();
}
},
@@ -1304,18 +1164,16 @@ WebInspector.JavaScriptSourceFrame.prototype = {
if (typeof this._executionLineNumber === "number")
this.setExecutionLine(this._executionLineNumber);
- var breakpointLocations = this._breakpointManager.breakpointLocationsForUISourceCode(
- this._uiSourceCode
- );
+ var breakpointLocations = this._breakpointManager
+ .breakpointLocationsForUISourceCode(this._uiSourceCode);
for (
var i = 0;
i < breakpointLocations.length;
++i
) this._breakpointAdded({ data: breakpointLocations[i] });
- var messages = WebInspector.presentationConsoleMessageHelper.consoleMessages(
- this._uiSourceCode
- );
+ var messages = WebInspector.presentationConsoleMessageHelper
+ .consoleMessages(this._uiSourceCode);
for (var message of messages) this.addMessageToSource(this._sourceFrameMessage(message));
var scriptFiles = this._scriptFileForTarget.valuesArray();
@@ -1329,7 +1187,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
_handleGutterClick: function(event) {
if (this._muted) return;
- var eventData /** @type {!WebInspector.CodeMirrorTextEditor.GutterClickEventData} */ = event.data;
+ var eventData /** @type {!WebInspector.CodeMirrorTextEditor.GutterClickEventData} */ = event
+ .data;
var lineNumber = eventData.lineNumber;
var eventObject = eventData.event;
@@ -1406,7 +1265,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
WebInspector.ExecutionContext
);
if (!executionContext) return;
- var rawLocation = WebInspector.debuggerWorkspaceBinding.uiLocationToRawLocation(
+ var rawLocation = WebInspector.debuggerWorkspaceBinding
+ .uiLocationToRawLocation(
executionContext.target(),
this._uiSourceCode,
lineNumber,
@@ -1416,62 +1276,28 @@ WebInspector.JavaScriptSourceFrame.prototype = {
this._scriptsPanel.continueToLocation(rawLocation);
},
dispose: function() {
- this._breakpointManager.removeEventListener(
- WebInspector.BreakpointManager.Events.BreakpointAdded,
- this._breakpointAdded,
- this
- );
- this._breakpointManager.removeEventListener(
- WebInspector.BreakpointManager.Events.BreakpointRemoved,
- this._breakpointRemoved,
- this
- );
- WebInspector.presentationConsoleMessageHelper.removeConsoleMessageEventListener(
- WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageAdded,
- this._uiSourceCode,
- this._consoleMessageAdded,
- this
- );
- WebInspector.presentationConsoleMessageHelper.removeConsoleMessageEventListener(
- WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageRemoved,
- this._uiSourceCode,
- this._consoleMessageRemoved,
- this
- );
- WebInspector.presentationConsoleMessageHelper.removeConsoleMessageEventListener(
- WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessagesCleared,
- this._uiSourceCode,
- this._consoleMessagesCleared,
- this
- );
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.SourceMappingChanged,
- this._onSourceMappingChanged,
- this
- );
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._workingCopyChanged,
- this
- );
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._workingCopyCommitted,
- this
- );
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.TitleChanged,
- this._showBlackboxInfobarIfNeeded,
- this
- );
- WebInspector.settings.skipStackFramesPattern.removeChangeListener(
- this._showBlackboxInfobarIfNeeded,
- this
- );
- WebInspector.settings.skipContentScripts.removeChangeListener(
- this._showBlackboxInfobarIfNeeded,
- this
- );
+ this
+ ._breakpointManager.removeEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded, this);
+ this
+ ._breakpointManager.removeEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved, this._breakpointRemoved, this);
+ WebInspector
+ .presentationConsoleMessageHelper.removeConsoleMessageEventListener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageAdded, this._uiSourceCode, this._consoleMessageAdded, this);
+ WebInspector
+ .presentationConsoleMessageHelper.removeConsoleMessageEventListener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageRemoved, this._uiSourceCode, this._consoleMessageRemoved, this);
+ WebInspector
+ .presentationConsoleMessageHelper.removeConsoleMessageEventListener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessagesCleared, this._uiSourceCode, this._consoleMessagesCleared, this);
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.SourceMappingChanged, this._onSourceMappingChanged, this);
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._showBlackboxInfobarIfNeeded, this);
+ WebInspector
+ .settings.skipStackFramesPattern.removeChangeListener(this._showBlackboxInfobarIfNeeded, this);
+ WebInspector
+ .settings.skipContentScripts.removeChangeListener(this._showBlackboxInfobarIfNeeded, this);
WebInspector.UISourceCodeFrame.prototype.dispose.call(this);
},
__proto__: WebInspector.UISourceCodeFrame.prototype
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/NavigatorView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/NavigatorView.js
index 0de622a..075e412 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/NavigatorView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/NavigatorView.js
@@ -37,9 +37,8 @@ WebInspector.NavigatorView = function() {
this.element.classList.add("navigator-container");
var scriptsOutlineElement = this.element.createChild("div", "navigator");
this._scriptsTree = new TreeOutline();
- this._scriptsTree.setComparator(
- WebInspector.NavigatorView._treeElementsCompare
- );
+ this
+ ._scriptsTree.setComparator(WebInspector.NavigatorView._treeElementsCompare);
this._scriptsTree.element.classList.add("outline-disclosure");
scriptsOutlineElement.appendChild(this._scriptsTree.element);
@@ -53,11 +52,8 @@ WebInspector.NavigatorView = function() {
this._rootNode = new WebInspector.NavigatorRootTreeNode(this);
this._rootNode.populate();
- this.element.addEventListener(
- "contextmenu",
- this.handleContextMenu.bind(this),
- false
- );
+ this
+ .element.addEventListener("contextmenu", this.handleContextMenu.bind(this), false);
};
WebInspector.NavigatorView.Events = {
@@ -88,21 +84,12 @@ WebInspector.NavigatorView.iconClassForType = function(type) {
WebInspector.NavigatorView.prototype = {
setWorkspace: function(workspace) {
this._workspace = workspace;
- this._workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeAdded,
- this._uiSourceCodeAdded,
- this
- );
- this._workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeRemoved,
- this._uiSourceCodeRemoved,
- this
- );
- this._workspace.addEventListener(
- WebInspector.Workspace.Events.ProjectRemoved,
- this._projectRemoved.bind(this),
- this
- );
+ this
+ ._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this);
+ this
+ ._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved, this._uiSourceCodeRemoved, this);
+ this
+ ._workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved, this._projectRemoved.bind(this), this);
},
wasShown: function() {
if (this._loaded) return;
@@ -149,11 +136,8 @@ WebInspector.NavigatorView.prototype = {
*/
_projectRemoved: function(event) {
var project /** @type {!WebInspector.Project} */ = event.data;
- project.removeEventListener(
- WebInspector.Project.Events.DisplayNameUpdated,
- this._updateProjectNodeTitle,
- this
- );
+ project
+ .removeEventListener(WebInspector.Project.Events.DisplayNameUpdated, this._updateProjectNodeTitle, this);
var uiSourceCodes = project.uiSourceCodes();
for (
var i = 0;
@@ -388,18 +372,12 @@ WebInspector.NavigatorView.prototype = {
var project = uiSourceCode.project();
if (project.type() === WebInspector.projectTypes.FileSystem) {
var path = uiSourceCode.parentPath();
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Rename…"),
- this._handleContextMenuRename.bind(this, uiSourceCode)
- );
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Make a ^copy…"),
- this._handleContextMenuCreate.bind(this, project, path, uiSourceCode)
- );
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Delete"),
- this._handleContextMenuDelete.bind(this, uiSourceCode)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Rename…"), this._handleContextMenuRename.bind(this, uiSourceCode));
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Make a ^copy…"), this._handleContextMenuCreate.bind(this, project, path, uiSourceCode));
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Delete"), this._handleContextMenuDelete.bind(this, uiSourceCode));
contextMenu.appendSeparator();
}
@@ -422,18 +400,12 @@ WebInspector.NavigatorView.prototype = {
var project = projectNode._project;
if (project.type() === WebInspector.projectTypes.FileSystem) {
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Refresh"),
- this._handleContextMenuRefresh.bind(this, project, path)
- );
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("New ^file"),
- this._handleContextMenuCreate.bind(this, project, path)
- );
- contextMenu.appendItem(
- WebInspector.UIString.capitalize("Exclude ^folder"),
- this._handleContextMenuExclude.bind(this, project, path)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Refresh"), this._handleContextMenuRefresh.bind(this, project, path));
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("New ^file"), this._handleContextMenuCreate.bind(this, project, path));
+ contextMenu
+ .appendItem(WebInspector.UIString.capitalize("Exclude ^folder"), this._handleContextMenuExclude.bind(this, project, path));
}
contextMenu.appendSeparator();
this._appendAddFolderItem(contextMenu);
@@ -540,11 +512,8 @@ WebInspector.NavigatorView.prototype = {
*/
WebInspector.SourcesNavigatorView = function() {
WebInspector.NavigatorView.call(this);
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.InspectedURLChanged,
- this._inspectedURLChanged,
- this
- );
+ WebInspector
+ .targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
};
WebInspector.SourcesNavigatorView.prototype = {
@@ -754,13 +723,8 @@ WebInspector.BaseNavigatorTreeElement.prototype = {
*/
WebInspector.NavigatorFolderTreeElement = function(navigatorView, type, title) {
var iconClass = WebInspector.NavigatorView.iconClassForType(type);
- WebInspector.BaseNavigatorTreeElement.call(
- this,
- type,
- title,
- [ iconClass ],
- true
- );
+ WebInspector
+ .BaseNavigatorTreeElement.call(this, type, title, [ iconClass ], true);
this._navigatorView = navigatorView;
};
@@ -771,11 +735,8 @@ WebInspector.NavigatorFolderTreeElement.prototype = {
onattach: function() {
WebInspector.BaseNavigatorTreeElement.prototype.onattach.call(this);
this.collapse();
- this.listItemElement.addEventListener(
- "contextmenu",
- this._handleContextMenuEvent.bind(this),
- false
- );
+ this
+ .listItemElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), false);
},
/**
* @param {!WebInspector.NavigatorFolderTreeNode} node
@@ -846,26 +807,14 @@ WebInspector.NavigatorSourceTreeElement.prototype = {
onattach: function() {
WebInspector.BaseNavigatorTreeElement.prototype.onattach.call(this);
this.listItemElement.draggable = true;
- this.listItemElement.addEventListener(
- "click",
- this._onclick.bind(this),
- false
- );
- this.listItemElement.addEventListener(
- "contextmenu",
- this._handleContextMenuEvent.bind(this),
- false
- );
- this.listItemElement.addEventListener(
- "mousedown",
- this._onmousedown.bind(this),
- false
- );
- this.listItemElement.addEventListener(
- "dragstart",
- this._ondragstart.bind(this),
- false
- );
+ this
+ .listItemElement.addEventListener("click", this._onclick.bind(this), false);
+ this
+ .listItemElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), false);
+ this
+ .listItemElement.addEventListener("mousedown", this._onmousedown.bind(this), false);
+ this
+ .listItemElement.addEventListener("dragstart", this._ondragstart.bind(this), false);
},
_onmousedown: function(event) {
if (event.which === 1) // Warm-up data for drag'n'drop
@@ -1128,21 +1077,12 @@ WebInspector.NavigatorUISourceCodeTreeNode.prototype = {
);
this.updateTitle();
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.TitleChanged,
- this._titleChanged,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._workingCopyChanged,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._workingCopyCommitted,
- this
- );
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._titleChanged, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
return this._treeElement;
},
@@ -1170,21 +1110,12 @@ WebInspector.NavigatorUISourceCodeTreeNode.prototype = {
},
dispose: function() {
if (!this._treeElement) return;
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.TitleChanged,
- this._titleChanged,
- this
- );
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._workingCopyChanged,
- this
- );
- this._uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._workingCopyCommitted,
- this
- );
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._titleChanged, this);
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
+ this
+ ._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
},
_titleChanged: function(event) {
this.updateTitle();
@@ -1266,18 +1197,12 @@ WebInspector.NavigatorUISourceCodeTreeNode.prototype = {
cancelHandler.bind(this)
);
this.updateTitle(true);
- WebInspector.InplaceEditor.startEditing(
- this._treeElement.titleElement,
- editingConfig
- );
+ WebInspector
+ .InplaceEditor.startEditing(this._treeElement.titleElement, editingConfig);
treeOutlineElement
.getComponentSelection()
- .setBaseAndExtent(
- this._treeElement.titleElement,
- 0,
- this._treeElement.titleElement,
- 1
- );
+
+ .setBaseAndExtent(this._treeElement.titleElement, 0, this._treeElement.titleElement, 1);
},
__proto__: WebInspector.NavigatorTreeNode.prototype
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/RevisionHistoryView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/RevisionHistoryView.js
index 07948db..0c9eb68 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/RevisionHistoryView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/RevisionHistoryView.js
@@ -51,21 +51,12 @@ WebInspector.RevisionHistoryView = function() {
}
WebInspector.workspace.uiSourceCodes().forEach(populateRevisions.bind(this));
- WebInspector.workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeContentCommitted,
- this._revisionAdded,
- this
- );
- WebInspector.workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeRemoved,
- this._uiSourceCodeRemoved,
- this
- );
- WebInspector.workspace.addEventListener(
- WebInspector.Workspace.Events.ProjectRemoved,
- this._projectRemoved,
- this
- );
+ WebInspector
+ .workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeContentCommitted, this._revisionAdded, this);
+ WebInspector
+ .workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved, this._uiSourceCodeRemoved, this);
+ WebInspector
+ .workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved, this._projectRemoved, this);
};
/**
@@ -73,13 +64,11 @@ WebInspector.RevisionHistoryView = function() {
*/
WebInspector.RevisionHistoryView.showHistory = function(uiSourceCode) {
if (!WebInspector.RevisionHistoryView._view)
- WebInspector.RevisionHistoryView._view = new WebInspector.RevisionHistoryView();
+ WebInspector.RevisionHistoryView._view = new WebInspector
+ .RevisionHistoryView();
var view = WebInspector.RevisionHistoryView._view;
- WebInspector.inspectorView.showCloseableViewInDrawer(
- "history",
- WebInspector.UIString("History"),
- view
- );
+ WebInspector
+ .inspectorView.showCloseableViewInDrawer("history", WebInspector.UIString("History"), view);
view._revealUISourceCode(uiSourceCode);
};
@@ -129,20 +118,16 @@ WebInspector.RevisionHistoryView.prototype = {
revertToOriginal.textContent = WebInspector.UIString(
"apply original content"
);
- revertToOriginal.addEventListener(
- "click",
- this._revertToOriginal.bind(this, uiSourceCode)
- );
+ revertToOriginal
+ .addEventListener("click", this._revertToOriginal.bind(this, uiSourceCode));
var clearHistoryElement = uiSourceCodeItem.listItemElement.createChild(
"span",
"revision-history-link"
);
clearHistoryElement.textContent = WebInspector.UIString("revert");
- clearHistoryElement.addEventListener(
- "click",
- this._clearHistory.bind(this, uiSourceCode)
- );
+ clearHistoryElement
+ .addEventListener("click", this._clearHistory.bind(this, uiSourceCode));
return uiSourceCodeItem;
},
/**
@@ -151,13 +136,8 @@ WebInspector.RevisionHistoryView.prototype = {
_revertToOriginal: function(uiSourceCode) {
uiSourceCode.revertToOriginal();
- WebInspector.notifications.dispatchEventToListeners(
- WebInspector.UserMetrics.UserAction,
- {
- action: WebInspector.UserMetrics.UserActionNames.ApplyOriginalContent,
- url: WebInspector.networkMapping.networkURL(uiSourceCode)
- }
- );
+ WebInspector
+ .notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction, { action: WebInspector.UserMetrics.UserActionNames.ApplyOriginalContent, url: WebInspector.networkMapping.networkURL(uiSourceCode) });
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -165,16 +145,12 @@ WebInspector.RevisionHistoryView.prototype = {
_clearHistory: function(uiSourceCode) {
uiSourceCode.revertAndClearHistory(this._removeUISourceCode.bind(this));
- WebInspector.notifications.dispatchEventToListeners(
- WebInspector.UserMetrics.UserAction,
- {
- action: WebInspector.UserMetrics.UserActionNames.RevertRevision,
- url: WebInspector.networkMapping.networkURL(uiSourceCode)
- }
- );
+ WebInspector
+ .notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction, { action: WebInspector.UserMetrics.UserActionNames.RevertRevision, url: WebInspector.networkMapping.networkURL(uiSourceCode) });
},
_revisionAdded: function(event) {
- var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data.uiSourceCode;
+ var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data
+ .uiSourceCode;
var uiSourceCodeItem = this._uiSourceCodeItems.get(uiSourceCode);
if (!uiSourceCodeItem) {
uiSourceCodeItem = this._createUISourceCodeItem(uiSourceCode);
@@ -294,12 +270,8 @@ WebInspector.RevisionHistoryTreeElement.prototype = {
for (var i = 0; i < rowCount; i++) {
if (change === "delete" || change === "replace" && b < be) {
var lineNumber = b++;
- this._createLine(
- lineNumber,
- null,
- baseLines[lineNumber],
- "removed"
- );
+ this
+ ._createLine(lineNumber, null, baseLines[lineNumber], "removed");
lastWasSeparator = false;
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScopeChainSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScopeChainSidebarPane.js
index 5c8e772..fb89594 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScopeChainSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScopeChainSidebarPane.js
@@ -81,7 +81,8 @@ WebInspector.ScopeChainSidebarPane.prototype = {
thisObject
));
if (i == 0) {
- var details = callFrame.target().debuggerModel.debuggerPausedDetails();
+ var details = callFrame.target().debuggerModel
+ .debuggerPausedDetails();
if (!callFrame.isAsync()) {
var exception = details.exception();
if (exception)
@@ -130,21 +131,12 @@ WebInspector.ScopeChainSidebarPane.prototype = {
true,
extraProperties
);
- section.propertiesTreeOutline.addEventListener(
- TreeOutline.Events.ElementAttached,
- this._elementAttached,
- this
- );
- section.propertiesTreeOutline.addEventListener(
- TreeOutline.Events.ElementExpanded,
- this._elementExpanded,
- this
- );
- section.propertiesTreeOutline.addEventListener(
- TreeOutline.Events.ElementCollapsed,
- this._elementCollapsed,
- this
- );
+ section
+ .propertiesTreeOutline.addEventListener(TreeOutline.Events.ElementAttached, this._elementAttached, this);
+ section
+ .propertiesTreeOutline.addEventListener(TreeOutline.Events.ElementExpanded, this._elementExpanded, this);
+ section
+ .propertiesTreeOutline.addEventListener(TreeOutline.Events.ElementCollapsed, this._elementCollapsed, this);
section.editInSelectedCallFrameWhenPaused = true;
section.pane = this;
@@ -162,7 +154,8 @@ WebInspector.ScopeChainSidebarPane.prototype = {
* @param {!WebInspector.Event} event
*/
_elementAttached: function(event) {
- var element /** @type {!WebInspector.ObjectPropertyTreeElement} */ = event.data;
+ var element /** @type {!WebInspector.ObjectPropertyTreeElement} */ = event
+ .data;
if (
element.isExpandable() &&
this._expandedProperties.has(this._propertyPath(element))
@@ -173,14 +166,16 @@ WebInspector.ScopeChainSidebarPane.prototype = {
* @param {!WebInspector.Event} event
*/
_elementExpanded: function(event) {
- var element /** @type {!WebInspector.ObjectPropertyTreeElement} */ = event.data;
+ var element /** @type {!WebInspector.ObjectPropertyTreeElement} */ = event
+ .data;
this._expandedProperties.add(this._propertyPath(element));
},
/**
* @param {!WebInspector.Event} event
*/
_elementCollapsed: function(event) {
- var element /** @type {!WebInspector.ObjectPropertyTreeElement} */ = event.data;
+ var element /** @type {!WebInspector.ObjectPropertyTreeElement} */ = event
+ .data;
this._expandedProperties.delete(this._propertyPath(element));
},
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatterEditorAction.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatterEditorAction.js
index 06d9d8d..2e99592 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -104,12 +104,8 @@ WebInspector.FormatterScriptMapping.FormatData = function(
* @extends {WebInspector.ContentProviderBasedProjectDelegate}
*/
WebInspector.FormatterProjectDelegate = function(workspace, id) {
- WebInspector.ContentProviderBasedProjectDelegate.call(
- this,
- workspace,
- id,
- WebInspector.projectTypes.Formatter
- );
+ WebInspector
+ .ContentProviderBasedProjectDelegate.call(this, workspace, id, WebInspector.projectTypes.Formatter);
};
WebInspector.FormatterProjectDelegate.prototype = {
@@ -183,15 +179,10 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
* @param {!WebInspector.Target} target
*/
targetAdded: function(target) {
- this._scriptMappingByTarget.set(
- target,
- new WebInspector.FormatterScriptMapping(target, this)
- );
- target.debuggerModel.addEventListener(
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this._debuggerReset,
- this
- );
+ this
+ ._scriptMappingByTarget.set(target, new WebInspector.FormatterScriptMapping(target, this));
+ target
+ .debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
},
/**
* @override
@@ -200,11 +191,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
targetRemoved: function(target) {
this._scriptMappingByTarget.remove(target);
this._cleanForTarget(target);
- target.debuggerModel.removeEventListener(
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this._debuggerReset,
- this
- );
+ target
+ .debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
},
/**
* @param {!WebInspector.Event} event
@@ -226,7 +214,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
* @param {!WebInspector.Event} event
*/
_editorClosed: function(event) {
- var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data.uiSourceCode;
+ var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data
+ .uiSourceCode;
var wasSelected /** @type {boolean} */ = event.data.wasSelected;
if (wasSelected) this._updateButton(null);
@@ -236,10 +225,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
* @param {?WebInspector.UISourceCode} uiSourceCode
*/
_updateButton: function(uiSourceCode) {
- this._button.element.classList.toggle(
- "hidden",
- !this._isFormatableScript(uiSourceCode)
- );
+ this
+ ._button.element.classList.toggle("hidden", !this._isFormatableScript(uiSourceCode));
},
/**
* @override
@@ -295,14 +282,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
if (!this._isFormatableScript(uiSourceCode)) return;
this._formatUISourceCodeScript(uiSourceCode);
- WebInspector.notifications.dispatchEventToListeners(
- WebInspector.UserMetrics.UserAction,
- {
- action: WebInspector.UserMetrics.UserActionNames.TogglePrettyPrint,
- enabled: true,
- url: uiSourceCode.originURL()
- }
- );
+ WebInspector
+ .notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction, { action: WebInspector.UserMetrics.UserActionNames.TogglePrettyPrint, enabled: true, url: uiSourceCode.originURL() });
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -341,9 +322,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
this._pathsToFormatOnLoad.delete(path);
for (var i = 0; i < formatData.scripts.length; ++i) {
this._uiSourceCodes.remove(formatData.scripts[i]);
- WebInspector.debuggerWorkspaceBinding.popSourceMapping(
- formatData.scripts[i]
- );
+ WebInspector
+ .debuggerWorkspaceBinding.popSourceMapping(formatData.scripts[i]);
}
this._projectDelegate._removeFormatted(formattedUISourceCode.path());
},
@@ -353,11 +333,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
_cleanForTarget: function(target) {
var uiSourceCodes = this._formatData.keysArray();
for (var i = 0; i < uiSourceCodes.length; ++i) {
- WebInspector.debuggerWorkspaceBinding.setSourceMapping(
- target,
- uiSourceCodes[i],
- null
- );
+ WebInspector
+ .debuggerWorkspaceBinding.setSourceMapping(target, uiSourceCodes[i], null);
var formatData = this._formatData.get(uiSourceCodes[i]);
var scripts = [];
for (var j = 0; j < formatData.scripts.length; ++j) {
@@ -369,9 +346,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
if (scripts.length) formatData.scripts = scripts;
else {
- this._formattedPaths.remove(
- formatData.projectId + ":" + formatData.path
- );
+ this
+ ._formattedPaths.remove(formatData.projectId + ":" + formatData.path);
this._formatData.remove(uiSourceCodes[i]);
this._projectDelegate._removeFormatted(uiSourceCodes[i].path());
}
@@ -402,18 +378,14 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
var targets = WebInspector.targetManager.targets();
for (var i = 0; i < targets.length; ++i) {
var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode);
- scripts.pushAll(
- targets[i].debuggerModel.scriptsForSourceURL(networkURL)
- );
+ scripts
+ .pushAll(targets[i].debuggerModel.scriptsForSourceURL(networkURL));
}
return scripts.filter(isInlineScript);
}
if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script) {
- var rawLocations = WebInspector.debuggerWorkspaceBinding.uiLocationToRawLocations(
- uiSourceCode,
- 0,
- 0
- );
+ var rawLocations = WebInspector.debuggerWorkspaceBinding
+ .uiLocationToRawLocations(uiSourceCode, 0, 0);
return rawLocations.map(function(rawLocation) {
return rawLocation.script();
});
@@ -452,15 +424,10 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
* @param {?string} content
*/
function contentLoaded(content) {
- var highlighterType = WebInspector.SourcesView.uiSourceCodeHighlighterType(
- uiSourceCode
- );
- WebInspector.Formatter.format(
- uiSourceCode.contentType(),
- highlighterType,
- content || "",
- innerCallback.bind(this)
- );
+ var highlighterType = WebInspector.SourcesView
+ .uiSourceCodeHighlighterType(uiSourceCode);
+ WebInspector
+ .Formatter.format(uiSourceCode.contentType(), highlighterType, content || "", innerCallback.bind(this));
}
/**
@@ -484,10 +451,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
uiSourceCode.contentType(),
formattedContent
);
- var formattedUISourceCode /** @type {!WebInspector.UISourceCode} */ = this._workspace.uiSourceCode(
- this._projectId,
- formattedPath
- );
+ var formattedUISourceCode /** @type {!WebInspector.UISourceCode} */ = this
+ ._workspace.uiSourceCode(this._projectId, formattedPath);
var formatData = new WebInspector.FormatterScriptMapping.FormatData(
uiSourceCode.project().id(),
uiSourceCode.path(),
@@ -500,25 +465,18 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
this._pathsToFormatOnLoad.add(path);
for (var i = 0; i < scripts.length; ++i) {
this._uiSourceCodes.set(scripts[i], formattedUISourceCode);
- var scriptMapping /** @type {!WebInspector.FormatterScriptMapping} */ = this._scriptMappingByTarget.get(
- scripts[i].target()
- );
- WebInspector.debuggerWorkspaceBinding.pushSourceMapping(
- scripts[i],
- scriptMapping
- );
+ var scriptMapping /** @type {!WebInspector.FormatterScriptMapping} */ = this
+ ._scriptMappingByTarget.get(scripts[i].target());
+ WebInspector
+ .debuggerWorkspaceBinding.pushSourceMapping(scripts[i], scriptMapping);
}
var targets = WebInspector.targetManager.targets();
for (var i = 0; i < targets.length; ++i) {
- var scriptMapping /** @type {!WebInspector.FormatterScriptMapping} */ = this._scriptMappingByTarget.get(
- targets[i]
- );
- WebInspector.debuggerWorkspaceBinding.setSourceMapping(
- targets[i],
- formattedUISourceCode,
- scriptMapping
- );
+ var scriptMapping /** @type {!WebInspector.FormatterScriptMapping} */ = this
+ ._scriptMappingByTarget.get(targets[i]);
+ WebInspector
+ .debuggerWorkspaceBinding.setSourceMapping(targets[i], formattedUISourceCode, scriptMapping);
}
this._showIfNeeded(uiSourceCode, formattedUISourceCode, formatterMapping);
}
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ServiceWorkersSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ServiceWorkersSidebarPane.js
index 6e06003..3325696 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ServiceWorkersSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ServiceWorkersSidebarPane.js
@@ -8,10 +8,8 @@
* @implements {WebInspector.TargetManager.Observer}
*/
WebInspector.ServiceWorkersSidebarPane = function() {
- WebInspector.SidebarPane.call(
- this,
- WebInspector.UIString("⚙ Service Workers")
- );
+ WebInspector
+ .SidebarPane.call(this, WebInspector.UIString("⚙ Service Workers"));
this.registerRequiredCSS("sources/serviceWorkersSidebar.css");
this.setVisible(false);
@@ -29,11 +27,8 @@ WebInspector.ServiceWorkersSidebarPane.prototype = {
if (this._manager || !target.isPage()) return;
this._manager = target.serviceWorkerManager;
this._updateVisibility();
- target.serviceWorkerManager.addEventListener(
- WebInspector.ServiceWorkerManager.Events.WorkersUpdated,
- this._update,
- this
- );
+ target
+ .serviceWorkerManager.addEventListener(WebInspector.ServiceWorkerManager.Events.WorkersUpdated, this._update, this);
},
/**
* @override
@@ -58,10 +53,8 @@ WebInspector.ServiceWorkersSidebarPane.prototype = {
for (var worker of this._manager.workers()) {
var workerElement = this.bodyElement.createChild("div", "service-worker");
workerElement.createChild("span").textContent = worker.name();
- workerElement.createChild(
- "span",
- "service-worker-scope"
- ).textContent = " — " + worker.scope();
+ workerElement.createChild("span", "service-worker-scope")
+ .textContent = " — " + worker.scope();
var stopButton = workerElement.createChild("div", "service-worker-stop");
stopButton.title = WebInspector.UIString("Stop");
stopButton.addEventListener("click", worker.stop.bind(worker), false);
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesNavigator.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesNavigator.js
index 3929977..9dde520 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesNavigator.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesNavigator.js
@@ -59,16 +59,10 @@ WebInspector.SourcesNavigator.prototype = {
*/
_navigatorViewCreated: function(id, view) {
var navigatorView /** @type {!WebInspector.NavigatorView} */ = view;
- navigatorView.addEventListener(
- WebInspector.NavigatorView.Events.ItemSelected,
- this._sourceSelected,
- this
- );
- navigatorView.addEventListener(
- WebInspector.NavigatorView.Events.ItemRenamed,
- this._sourceRenamed,
- this
- );
+ navigatorView
+ .addEventListener(WebInspector.NavigatorView.Events.ItemSelected, this._sourceSelected, this);
+ navigatorView
+ .addEventListener(WebInspector.NavigatorView.Events.ItemRenamed, this._sourceRenamed, this);
this._navigatorViews.set(id, navigatorView);
navigatorView.setWorkspace(this._workspace);
},
@@ -109,19 +103,15 @@ WebInspector.SourcesNavigator.prototype = {
* @param {!WebInspector.Event} event
*/
_sourceSelected: function(event) {
- this.dispatchEventToListeners(
- WebInspector.SourcesNavigator.Events.SourceSelected,
- event.data
- );
+ this
+ .dispatchEventToListeners(WebInspector.SourcesNavigator.Events.SourceSelected, event.data);
},
/**
* @param {!WebInspector.Event} event
*/
_sourceRenamed: function(event) {
- this.dispatchEventToListeners(
- WebInspector.SourcesNavigator.Events.SourceRenamed,
- event.data
- );
+ this
+ .dispatchEventToListeners(WebInspector.SourcesNavigator.Events.SourceRenamed, event.data);
},
__proto__: WebInspector.Object.prototype
};
@@ -151,10 +141,8 @@ WebInspector.SnippetsNavigatorView.prototype = {
*/
handleContextMenu: function(event) {
var contextMenu = new WebInspector.ContextMenu(event);
- contextMenu.appendItem(
- WebInspector.UIString("New"),
- this._handleCreateSnippet.bind(this)
- );
+ contextMenu
+ .appendItem(WebInspector.UIString("New"), this._handleCreateSnippet.bind(this));
contextMenu.show();
},
/**
@@ -195,10 +183,8 @@ WebInspector.SnippetsNavigatorView.prototype = {
!executionContext
)
return;
- WebInspector.scriptSnippetModel.evaluateScriptSnippet(
- executionContext,
- uiSourceCode
- );
+ WebInspector
+ .scriptSnippetModel.evaluateScriptSnippet(executionContext, uiSourceCode);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesPanel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesPanel.js
index f79c2a1..1d946f1 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesPanel.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesPanel.js
@@ -33,12 +33,8 @@
WebInspector.SourcesPanel = function(workspaceForTest) {
WebInspector.Panel.call(this, "sources");
this.registerRequiredCSS("sources/sourcesPanel.css");
- new WebInspector.DropTarget(
- this.element,
- [ WebInspector.DropTarget.Types.Files ],
- WebInspector.UIString("Drop workspace folder here"),
- this._handleDrop.bind(this)
- );
+ new WebInspector
+ .DropTarget(this.element, [ WebInspector.DropTarget.Types.Files ], WebInspector.UIString("Drop workspace folder here"), this._handleDrop.bind(this));
this._workspace = workspaceForTest || WebInspector.workspace;
this._networkMapping = WebInspector.networkMapping;
@@ -71,69 +67,57 @@ WebInspector.SourcesPanel = function(workspaceForTest) {
this._navigator = new WebInspector.SourcesNavigator(this._workspace);
this._navigator.view.setMinimumSize(100, 25);
this.editorView.setSidebarView(this._navigator.view);
- this._navigator.addEventListener(
- WebInspector.SourcesNavigator.Events.SourceSelected,
- this._sourceSelected,
- this
- );
- this._navigator.addEventListener(
- WebInspector.SourcesNavigator.Events.SourceRenamed,
- this._sourceRenamed,
- this
- );
+ this
+ ._navigator.addEventListener(WebInspector.SourcesNavigator.Events.SourceSelected, this._sourceSelected, this);
+ this
+ ._navigator.addEventListener(WebInspector.SourcesNavigator.Events.SourceRenamed, this._sourceRenamed, this);
this._sourcesView = new WebInspector.SourcesView(this._workspace, this);
- this._sourcesView.addEventListener(
- WebInspector.SourcesView.Events.EditorSelected,
- this._editorSelected.bind(this)
- );
- this._sourcesView.addEventListener(
- WebInspector.SourcesView.Events.EditorClosed,
- this._editorClosed.bind(this)
- );
+ this
+ ._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSelected, this._editorSelected.bind(this));
+ this
+ ._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClosed, this._editorClosed.bind(this));
this._sourcesView.registerShortcuts(this.registerShortcuts.bind(this));
this.editorView.setMainView(this._sourcesView);
this._debugSidebarResizeWidgetElement = createElement("div");
- this._debugSidebarResizeWidgetElement.id = "scripts-debug-sidebar-resizer-widget";
- this._splitView.addEventListener(
- WebInspector.SplitView.Events.ShowModeChanged,
- this._updateDebugSidebarResizeWidget,
- this
- );
+ this._debugSidebarResizeWidgetElement
+ .id = "scripts-debug-sidebar-resizer-widget";
+ this
+ ._splitView.addEventListener(WebInspector.SplitView.Events.ShowModeChanged, this._updateDebugSidebarResizeWidget, this);
this._updateDebugSidebarResizeWidget();
this._splitView.installResizer(this._debugSidebarResizeWidgetElement);
this.sidebarPanes = {};
this.sidebarPanes.threads = new WebInspector.ThreadsSidebarPane();
- this.sidebarPanes.watchExpressions = new WebInspector.WatchExpressionsSidebarPane();
+ this.sidebarPanes.watchExpressions = new WebInspector
+ .WatchExpressionsSidebarPane();
this.sidebarPanes.callstack = new WebInspector.CallStackSidebarPane();
- this.sidebarPanes.callstack.addEventListener(
- WebInspector.CallStackSidebarPane.Events.CallFrameSelected,
- this._callFrameSelectedInSidebar.bind(this)
- );
- this.sidebarPanes.callstack.addEventListener(
- WebInspector.CallStackSidebarPane.Events.RevealHiddenCallFrames,
- this._hiddenCallFramesRevealedInSidebar.bind(this)
- );
- this.sidebarPanes.callstack.registerShortcuts(
- this.registerShortcuts.bind(this)
- );
+ this
+ .sidebarPanes.callstack.addEventListener(WebInspector.CallStackSidebarPane.Events.CallFrameSelected, this._callFrameSelectedInSidebar.bind(this));
+ this
+ .sidebarPanes.callstack.addEventListener(WebInspector.CallStackSidebarPane.Events.RevealHiddenCallFrames, this._hiddenCallFramesRevealedInSidebar.bind(this));
+ this
+ .sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(this));
this.sidebarPanes.scopechain = new WebInspector.ScopeChainSidebarPane();
if (Runtime.experiments.isEnabled("serviceWorkersInPageFrontend"))
- this.sidebarPanes.serviceWorkers = new WebInspector.ServiceWorkersSidebarPane();
- this.sidebarPanes.jsBreakpoints = new WebInspector.JavaScriptBreakpointsSidebarPane(
+ this.sidebarPanes.serviceWorkers = new WebInspector
+ .ServiceWorkersSidebarPane();
+ this.sidebarPanes.jsBreakpoints = new WebInspector
+ .JavaScriptBreakpointsSidebarPane(
WebInspector.breakpointManager,
this.showUISourceCode.bind(this)
);
- this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.createProxy(
- this
- );
- this.sidebarPanes.xhrBreakpoints = new WebInspector.XHRBreakpointsSidebarPane();
- this.sidebarPanes.eventListenerBreakpoints = new WebInspector.EventListenerBreakpointsSidebarPane();
+ this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane
+ .createProxy(this);
+ this.sidebarPanes.xhrBreakpoints = new WebInspector
+ .XHRBreakpointsSidebarPane();
+ this.sidebarPanes.eventListenerBreakpoints = new WebInspector
+ .EventListenerBreakpointsSidebarPane();
if (Runtime.experiments.isEnabled("stepIntoAsync"))
- this.sidebarPanes.asyncOperationBreakpoints = new WebInspector.AsyncOperationsSidebarPane();
+ this.sidebarPanes.asyncOperationBreakpoints = new WebInspector
+ .AsyncOperationsSidebarPane();
this._lastSelectedTabSetting = WebInspector.settings.createSetting(
"lastSelectedSourcesSidebarPaneTab",
@@ -142,80 +126,38 @@ WebInspector.SourcesPanel = function(workspaceForTest) {
this._installDebuggerSidebarController();
- WebInspector.dockController.addEventListener(
- WebInspector.DockController.Events.DockSideChanged,
- this._dockSideChanged.bind(this)
- );
- WebInspector.settings.splitVerticallyWhenDockedToRight.addChangeListener(
- this._dockSideChanged.bind(this)
- );
+ WebInspector
+ .dockController.addEventListener(WebInspector.DockController.Events.DockSideChanged, this._dockSideChanged.bind(this));
+ WebInspector
+ .settings.splitVerticallyWhenDockedToRight.addChangeListener(this._dockSideChanged.bind(this));
this._dockSideChanged();
this._updateDebuggerButtons();
this._pauseOnExceptionEnabledChanged();
- WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(
- this._pauseOnExceptionEnabledChanged,
- this
- );
+ WebInspector
+ .settings.pauseOnExceptionEnabled.addChangeListener(this._pauseOnExceptionEnabledChanged, this);
this._setTarget(WebInspector.context.flavor(WebInspector.Target));
- WebInspector.breakpointManager.addEventListener(
- WebInspector.BreakpointManager.Events.BreakpointsActiveStateChanged,
- this._breakpointsActiveStateChanged,
- this
- );
- WebInspector.context.addFlavorChangeListener(
- WebInspector.Target,
- this._onCurrentTargetChanged,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerWasEnabled,
- this._debuggerWasEnabled,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerWasDisabled,
- this._debuggerReset,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerPaused,
- this._debuggerPaused,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerResumed,
- this._debuggerResumed,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.CallFrameSelected,
- this._callFrameSelected,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.ConsoleCommandEvaluatedInSelectedCallFrame,
- this._consoleCommandEvaluatedInSelectedCallFrame,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.GlobalObjectCleared,
- this._debuggerReset,
- this
- );
+ WebInspector
+ .breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointsActiveStateChanged, this._breakpointsActiveStateChanged, this);
+ WebInspector
+ .context.addFlavorChangeListener(WebInspector.Target, this._onCurrentTargetChanged, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerWasEnabled, this._debuggerWasEnabled, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerWasDisabled, this._debuggerReset, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPaused, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerResumed, this._debuggerResumed, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.CallFrameSelected, this._callFrameSelected, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.ConsoleCommandEvaluatedInSelectedCallFrame, this._consoleCommandEvaluatedInSelectedCallFrame, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
new WebInspector.WorkspaceMappingTip(this, this._workspace);
- WebInspector.extensionServer.addEventListener(
- WebInspector.ExtensionServer.Events.SidebarPaneAdded,
- this._extensionSidebarPaneAdded,
- this
- );
+ WebInspector
+ .extensionServer.addEventListener(WebInspector.ExtensionServer.Events.SidebarPaneAdded, this._extensionSidebarPaneAdded, this);
};
WebInspector.SourcesPanel.minToolbarWidth = 215;
@@ -228,9 +170,8 @@ WebInspector.SourcesPanel.prototype = {
if (!target) return;
if (target.debuggerModel.isPaused()) {
- this._showDebuggerPausedDetails /** @type {!WebInspector.DebuggerPausedDetails} */(
- target.debuggerModel.debuggerPausedDetails()
- );
+ this
+ ._showDebuggerPausedDetails /** @type {!WebInspector.DebuggerPausedDetails} */(target.debuggerModel.debuggerPausedDetails());
var callFrame = target.debuggerModel.selectedCallFrame();
if (callFrame) this._selectCallFrame(callFrame);
} else {
@@ -277,9 +218,8 @@ WebInspector.SourcesPanel.prototype = {
_consoleCommandEvaluatedInSelectedCallFrame: function(event) {
var target /** @type {!WebInspector.Target} */ = event.target.target();
if (WebInspector.context.flavor(WebInspector.Target) !== target) return;
- this.sidebarPanes.scopechain.update(
- target.debuggerModel.selectedCallFrame()
- );
+ this
+ .sidebarPanes.scopechain.update(target.debuggerModel.selectedCallFrame());
},
/**
* @param {!WebInspector.Event} event
@@ -321,19 +261,15 @@ WebInspector.SourcesPanel.prototype = {
);
if (!breakpoint) return;
this.sidebarPanes.jsBreakpoints.highlightBreakpoint(breakpoint);
- this.sidebarPanes.callstack.setStatus(
- WebInspector.UIString("Paused on a breakpoint.")
- );
+ this
+ .sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on a breakpoint."));
}
if (details.reason === WebInspector.DebuggerModel.BreakReason.DOM) {
- WebInspector.domBreakpointsSidebarPane.highlightBreakpoint(
- details.auxData
- );
- WebInspector.domBreakpointsSidebarPane.createBreakpointHitStatusMessage(
- details,
- didCreateBreakpointHitStatusMessage.bind(this)
- );
+ WebInspector
+ .domBreakpointsSidebarPane.highlightBreakpoint(details.auxData);
+ WebInspector
+ .domBreakpointsSidebarPane.createBreakpointHitStatusMessage(details, didCreateBreakpointHitStatusMessage.bind(this));
} else if (
details.reason === WebInspector.DebuggerModel.BreakReason.EventListener
) {
@@ -343,10 +279,8 @@ WebInspector.SourcesPanel.prototype = {
eventName,
targetName
);
- var eventNameForUI = WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI(
- eventName,
- details.auxData
- );
+ var eventNameForUI = WebInspector.EventListenerBreakpointsSidebarPane
+ .eventNameForUI(eventName, details.auxData);
this.sidebarPanes.callstack.setStatus(
WebInspector.UIString(
'Paused on a "%s" Event Listener.',
@@ -354,12 +288,10 @@ WebInspector.SourcesPanel.prototype = {
)
);
} else if (details.reason === WebInspector.DebuggerModel.BreakReason.XHR) {
- this.sidebarPanes.xhrBreakpoints.highlightBreakpoint(
- details.auxData["breakpointURL"]
- );
- this.sidebarPanes.callstack.setStatus(
- WebInspector.UIString("Paused on a XMLHttpRequest.")
- );
+ this
+ .sidebarPanes.xhrBreakpoints.highlightBreakpoint(details.auxData["breakpointURL"]);
+ this
+ .sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on a XMLHttpRequest."));
} else if (
details.reason === WebInspector.DebuggerModel.BreakReason.Exception
) {
@@ -404,21 +336,14 @@ WebInspector.SourcesPanel.prototype = {
) {
if (Runtime.experiments.isEnabled("stepIntoAsync")) {
var operationId = details.auxData["operationId"];
- var operation = this.sidebarPanes.asyncOperationBreakpoints.operationById(
- details.target(),
- operationId
- );
+ var operation = this.sidebarPanes.asyncOperationBreakpoints
+ .operationById(details.target(), operationId);
var description = operation && operation.description ||
WebInspector.UIString("<unknown>");
- this.sidebarPanes.callstack.setStatus(
- WebInspector.UIString(
- 'Paused on a "%s" async operation.',
- description
- )
- );
- this.sidebarPanes.asyncOperationBreakpoints.highlightBreakpoint(
- operationId
- );
+ this
+ .sidebarPanes.callstack.setStatus(WebInspector.UIString('Paused on a "%s" async operation.', description));
+ this
+ .sidebarPanes.asyncOperationBreakpoints.highlightBreakpoint(operationId);
}
} else {
if (details.callFrames.length)
@@ -492,11 +417,8 @@ WebInspector.SourcesPanel.prototype = {
* @param {!WebInspector.UILocation} uiLocation
*/
showUILocation: function(uiLocation) {
- this.showUISourceCode(
- uiLocation.uiSourceCode,
- uiLocation.lineNumber,
- uiLocation.columnNumber
- );
+ this
+ .showUISourceCode(uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -517,19 +439,15 @@ WebInspector.SourcesPanel.prototype = {
this._sourcesView.clearCurrentExecutionLine();
this._sourcesView.setExecutionLine(uiLocation);
if (this._ignoreExecutionLineEvents) return;
- this._sourcesView.showSourceLocation(
- uiLocation.uiSourceCode,
- uiLocation.lineNumber,
- uiLocation.columnNumber,
- undefined,
- true
- );
+ this
+ ._sourcesView.showSourceLocation(uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber, undefined, true);
},
/**
* @param {!WebInspector.Event} event
*/
_callFrameSelected: function(event) {
- var callFrame /** @type {?WebInspector.DebuggerModel.CallFrame} */ = event.data;
+ var callFrame /** @type {?WebInspector.DebuggerModel.CallFrame} */ = event
+ .data;
if (
!callFrame ||
@@ -546,22 +464,17 @@ WebInspector.SourcesPanel.prototype = {
this.sidebarPanes.scopechain.update(callFrame);
this.sidebarPanes.watchExpressions.refreshExpressions();
this.sidebarPanes.callstack.setSelectedCallFrame(callFrame);
- WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(
- callFrame,
- this._executionLineChanged.bind(this)
- );
+ WebInspector
+ .debuggerWorkspaceBinding.createCallFrameLiveLocation(callFrame, this._executionLineChanged.bind(this));
},
/**
* @param {!WebInspector.Event} event
*/
_sourceSelected: function(event) {
- var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data.uiSourceCode;
- this._sourcesView.showSourceLocation(
- uiSourceCode,
- undefined,
- undefined,
- !event.data.focusSource
- );
+ var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data
+ .uiSourceCode;
+ this
+ ._sourcesView.showSourceLocation(uiSourceCode, undefined, undefined, !event.data.focusSource);
},
/**
* @param {!WebInspector.Event} event
@@ -573,11 +486,8 @@ WebInspector.SourcesPanel.prototype = {
_pauseOnExceptionEnabledChanged: function() {
var enabled = WebInspector.settings.pauseOnExceptionEnabled.get();
this._pauseOnExceptionButton.setToggled(enabled);
- this._pauseOnExceptionButton.setTitle(
- WebInspector.UIString(
- enabled ? "Don't pause on exceptions." : "Pause on exceptions."
- )
- );
+ this
+ ._pauseOnExceptionButton.setTitle(WebInspector.UIString(enabled ? "Don't pause on exceptions." : "Pause on exceptions."));
this._debugToolbarDrawer.classList.toggle("expanded", enabled);
},
_updateDebuggerButtons: function() {
@@ -585,10 +495,8 @@ WebInspector.SourcesPanel.prototype = {
if (!currentTarget) return;
if (this._paused) {
- this._updateButtonTitle(
- this._pauseButton,
- WebInspector.UIString("Resume script execution (%s).")
- );
+ this
+ ._updateButtonTitle(this._pauseButton, WebInspector.UIString("Resume script execution (%s)."));
this._pauseButton.setToggled(true);
this._pauseButton.setLongClickOptionsEnabled(
function() {
@@ -601,10 +509,8 @@ WebInspector.SourcesPanel.prototype = {
this._stepIntoButton.setEnabled(true);
this._stepOutButton.setEnabled(true);
} else {
- this._updateButtonTitle(
- this._pauseButton,
- WebInspector.UIString("Pause script execution (%s).")
- );
+ this
+ ._updateButtonTitle(this._pauseButton, WebInspector.UIString("Pause script execution (%s)."));
this._pauseButton.setToggled(false);
this._pauseButton.setLongClickOptionsEnabled(null);
@@ -617,10 +523,8 @@ WebInspector.SourcesPanel.prototype = {
_clearInterface: function() {
var currentTarget = WebInspector.context.flavor(WebInspector.Target);
if (currentTarget != null) {
- currentTarget.debuggerModel.dispatchEventToListeners(
- WebInspector.DebuggerModel.Events.ClearInterface,
- this
- );
+ currentTarget
+ .debuggerModel.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ClearInterface, this);
}
this.sidebarPanes.callstack.update(null);
@@ -652,9 +556,8 @@ WebInspector.SourcesPanel.prototype = {
}
},
_togglePauseOnExceptions: function() {
- WebInspector.settings.pauseOnExceptionEnabled.set(
- !this._pauseOnExceptionButton.toggled()
- );
+ WebInspector
+ .settings.pauseOnExceptionEnabled.set(!this._pauseOnExceptionButton.toggled());
},
/**
* @return {boolean}
@@ -669,10 +572,8 @@ WebInspector.SourcesPanel.prototype = {
);
if (!currentExecutionContext) return false;
- WebInspector.scriptSnippetModel.evaluateScriptSnippet(
- currentExecutionContext,
- uiSourceCode
- );
+ WebInspector
+ .scriptSnippetModel.evaluateScriptSnippet(currentExecutionContext, uiSourceCode);
return true;
},
/**
@@ -782,7 +683,8 @@ WebInspector.SourcesPanel.prototype = {
* @param {!WebInspector.Event} event
*/
_callFrameSelectedInSidebar: function(event) {
- var callFrame /** @type {!WebInspector.DebuggerModel.CallFrame} */ = event.data;
+ var callFrame /** @type {!WebInspector.DebuggerModel.CallFrame} */ = event
+ .data;
callFrame.target().debuggerModel.setSelectedCallFrame(callFrame);
},
_hiddenCallFramesRevealedInSidebar: function() {
@@ -800,17 +702,14 @@ WebInspector.SourcesPanel.prototype = {
rawLocation.continueToLocation();
},
_toggleBreakpointsClicked: function(event) {
- WebInspector.breakpointManager.setBreakpointsActive(
- !WebInspector.breakpointManager.breakpointsActive()
- );
+ WebInspector
+ .breakpointManager.setBreakpointsActive(!WebInspector.breakpointManager.breakpointsActive());
},
_breakpointsActiveStateChanged: function(event) {
var active = event.data;
this._toggleBreakpointsButton.setToggled(!active);
- this.sidebarPanes.jsBreakpoints.listElement.classList.toggle(
- "breakpoints-list-deactivated",
- !active
- );
+ this
+ .sidebarPanes.jsBreakpoints.listElement.classList.toggle("breakpoints-list-deactivated", !active);
this._sourcesView.toggleBreakpointsActiveState(active);
if (active)
this._toggleBreakpointsButton.setTitle(
@@ -855,11 +754,8 @@ WebInspector.SourcesPanel.prototype = {
title,
"play-status-bar-item"
);
- this._longResumeButton.addEventListener(
- "click",
- this._longResume.bind(this),
- this
- );
+ this
+ ._longResumeButton.addEventListener("click", this._longResume.bind(this), this);
// Step over.
title = WebInspector.UIString("Step over next function call (%s).");
@@ -894,11 +790,8 @@ WebInspector.SourcesPanel.prototype = {
"breakpoint-status-bar-item"
);
this._toggleBreakpointsButton.setToggled(false);
- this._toggleBreakpointsButton.addEventListener(
- "click",
- this._toggleBreakpointsClicked,
- this
- );
+ this
+ ._toggleBreakpointsButton.addEventListener("click", this._toggleBreakpointsClicked, this);
debugToolbar.appendStatusBarItem(this._toggleBreakpointsButton);
// Pause on Exception
@@ -906,11 +799,8 @@ WebInspector.SourcesPanel.prototype = {
"",
"pause-on-exceptions-status-bar-item"
);
- this._pauseOnExceptionButton.addEventListener(
- "click",
- this._togglePauseOnExceptions,
- this
- );
+ this
+ ._pauseOnExceptionButton.addEventListener("click", this._togglePauseOnExceptions, this);
debugToolbar.appendStatusBarItem(this._pauseOnExceptionButton);
return debugToolbar;
@@ -923,9 +813,8 @@ WebInspector.SourcesPanel.prototype = {
var label = WebInspector.UIString("Pause On Caught Exceptions");
var setting = WebInspector.settings.pauseOnCaughtException;
- debugToolbarDrawer.appendChild(
- WebInspector.SettingsUI.createSettingCheckbox(label, setting, true)
- );
+ debugToolbarDrawer
+ .appendChild(WebInspector.SettingsUI.createSettingCheckbox(label, setting, true));
return debugToolbarDrawer;
},
@@ -958,9 +847,8 @@ WebInspector.SourcesPanel.prototype = {
}
var button = new WebInspector.StatusBarButton(buttonTitle, buttonId);
button.element.addEventListener("click", handler, false);
- button._shortcuts = WebInspector.shortcutRegistry.shortcutDescriptorsForAction(
- actionId
- );
+ button._shortcuts = WebInspector.shortcutRegistry
+ .shortcutDescriptorsForAction(actionId);
this._updateButtonTitle(button, buttonTitle);
return button;
},
@@ -969,19 +857,17 @@ WebInspector.SourcesPanel.prototype = {
},
_installDebuggerSidebarController: function() {
this.editorView.displayShowHideSidebarButton("navigator");
- this._toggleDebuggerSidebarButton = this._splitView.displayShowHideSidebarButton(
+ this._toggleDebuggerSidebarButton = this._splitView
+ .displayShowHideSidebarButton(
"debugger",
"scripts-debugger-show-hide-button"
);
- this._sourcesView.element.appendChild(
- this._debugSidebarResizeWidgetElement
- );
+ this
+ ._sourcesView.element.appendChild(this._debugSidebarResizeWidgetElement);
},
_updateDebugSidebarResizeWidget: function() {
- this._debugSidebarResizeWidgetElement.classList.toggle(
- "hidden",
- this._splitView.showMode() !== WebInspector.SplitView.ShowMode.Both
- );
+ this
+ ._debugSidebarResizeWidgetElement.classList.toggle("hidden", this._splitView.showMode() !== WebInspector.SplitView.ShowMode.Both);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -1014,15 +900,8 @@ WebInspector.SourcesPanel.prototype = {
* @param {!WebInspector.UISourceCode} uiSourceCode
*/
mapFileSystemToNetwork: function(uiSourceCode) {
- WebInspector.SelectUISourceCodeForProjectTypesDialog.show(
- uiSourceCode.name(),
- [
- WebInspector.projectTypes.Network,
- WebInspector.projectTypes.ContentScripts
- ],
- mapFileSystemToNetwork.bind(this),
- this._sourcesView.element
- );
+ WebInspector
+ .SelectUISourceCodeForProjectTypesDialog.show(uiSourceCode.name(), [ WebInspector.projectTypes.Network, WebInspector.projectTypes.ContentScripts ], mapFileSystemToNetwork.bind(this), this._sourcesView.element);
/**
* @param {?WebInspector.UISourceCode} networkUISourceCode
@@ -1030,11 +909,8 @@ WebInspector.SourcesPanel.prototype = {
*/
function mapFileSystemToNetwork(networkUISourceCode) {
if (!networkUISourceCode) return;
- this._networkMapping.addMapping(
- networkUISourceCode,
- uiSourceCode,
- WebInspector.fileSystemWorkspaceBinding
- );
+ this
+ ._networkMapping.addMapping(networkUISourceCode, uiSourceCode, WebInspector.fileSystemWorkspaceBinding);
this._suggestReload();
}
},
@@ -1042,12 +918,8 @@ WebInspector.SourcesPanel.prototype = {
* @param {!WebInspector.UISourceCode} networkUISourceCode
*/
mapNetworkToFileSystem: function(networkUISourceCode) {
- WebInspector.SelectUISourceCodeForProjectTypesDialog.show(
- networkUISourceCode.name(),
- [ WebInspector.projectTypes.FileSystem ],
- mapNetworkToFileSystem.bind(this),
- this._sourcesView.element
- );
+ WebInspector
+ .SelectUISourceCodeForProjectTypesDialog.show(networkUISourceCode.name(), [ WebInspector.projectTypes.FileSystem ], mapNetworkToFileSystem.bind(this), this._sourcesView.element);
/**
* @param {?WebInspector.UISourceCode} uiSourceCode
@@ -1055,11 +927,8 @@ WebInspector.SourcesPanel.prototype = {
*/
function mapNetworkToFileSystem(uiSourceCode) {
if (!uiSourceCode) return;
- this._networkMapping.addMapping(
- networkUISourceCode,
- uiSourceCode,
- WebInspector.fileSystemWorkspaceBinding
- );
+ this
+ ._networkMapping.addMapping(networkUISourceCode, uiSourceCode, WebInspector.fileSystemWorkspaceBinding);
this._suggestReload();
}
},
@@ -1243,11 +1112,8 @@ WebInspector.SourcesPanel.prototype = {
}
if (wasThrown || !global) failedToSave(global);
- else global.callFunction(
- remoteFunction,
- [ WebInspector.RemoteObject.toCallArgument(remoteObject) ],
- didSave.bind(null, global)
- );
+ else global
+ .callFunction(remoteFunction, [ WebInspector.RemoteObject.toCallArgument(remoteObject) ], didSave.bind(null, global));
}
/**
@@ -1283,20 +1149,16 @@ WebInspector.SourcesPanel.prototype = {
*/
_showFunctionDefinition: function(remoteObject) {
var debuggerModel = remoteObject.target().debuggerModel;
- debuggerModel.functionDetails(
- remoteObject,
- this._didGetFunctionOrGeneratorObjectDetails.bind(this)
- );
+ debuggerModel
+ .functionDetails(remoteObject, this._didGetFunctionOrGeneratorObjectDetails.bind(this));
},
/**
* @param {!WebInspector.RemoteObject} remoteObject
*/
_showGeneratorLocation: function(remoteObject) {
var debuggerModel = remoteObject.target().debuggerModel;
- debuggerModel.generatorObjectDetails(
- remoteObject,
- this._didGetFunctionOrGeneratorObjectDetails.bind(this)
- );
+ debuggerModel
+ .generatorObjectDetails(remoteObject, this._didGetFunctionOrGeneratorObjectDetails.bind(this));
},
/**
* @param {?{location: ?WebInspector.DebuggerModel.Location}} response
@@ -1307,9 +1169,8 @@ WebInspector.SourcesPanel.prototype = {
var location = response.location;
if (!location) return;
- var uiLocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(
- location
- );
+ var uiLocation = WebInspector.debuggerWorkspaceBinding
+ .rawLocationToUILocation(location);
if (uiLocation) this.showUILocation(uiLocation);
},
showGoToSourceDialog: function() {
@@ -1330,10 +1191,8 @@ WebInspector.SourcesPanel.prototype = {
if (this.sidebarPaneView) this.sidebarPaneView.detach();
this._splitView.setVertical(!vertically);
- this._splitView.element.classList.toggle(
- "sources-split-view-vertical",
- vertically
- );
+ this
+ ._splitView.element.classList.toggle("sources-split-view-vertical", vertically);
if (!vertically)
this._splitView.uninstallResizer(
@@ -1348,12 +1207,8 @@ WebInspector.SourcesPanel.prototype = {
var vbox = new WebInspector.VBox();
vbox.element.appendChild(this._debugToolbarDrawer);
vbox.element.appendChild(this._debugToolbar.element);
- vbox.setMinimumAndPreferredSizes(
- 25,
- 25,
- WebInspector.SourcesPanel.minToolbarWidth,
- 100
- );
+ vbox
+ .setMinimumAndPreferredSizes(25, 25, WebInspector.SourcesPanel.minToolbarWidth, 100);
var sidebarPaneStack = new WebInspector.SidebarPaneStack();
sidebarPaneStack.element.classList.add("flex-auto");
sidebarPaneStack.show(vbox.element);
@@ -1393,11 +1248,8 @@ WebInspector.SourcesPanel.prototype = {
if (this.sidebarPanes.serviceWorkers)
tabbedPane.addPane(this.sidebarPanes.serviceWorkers);
tabbedPane.selectTab(this._lastSelectedTabSetting.get());
- tabbedPane.addEventListener(
- WebInspector.TabbedPane.EventTypes.TabSelected,
- this._tabSelected,
- this
- );
+ tabbedPane
+ .addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, this._tabSelected, this);
this._extensionSidebarPanesContainer = tabbedPane;
this.sidebarPaneView = splitView;
}
@@ -1597,10 +1449,8 @@ WebInspector.SourcesPanel.BaseActionDelegate.prototype = {
* @extends {WebInspector.SourcesPanel.BaseActionDelegate}
*/
WebInspector.SourcesPanel.StepOverActionDelegate = function() {
- WebInspector.SourcesPanel.BaseActionDelegate.call(
- this,
- WebInspector.SourcesPanel.prototype._stepOverClicked
- );
+ WebInspector
+ .SourcesPanel.BaseActionDelegate.call(this, WebInspector.SourcesPanel.prototype._stepOverClicked);
};
WebInspector.SourcesPanel.StepOverActionDelegate.prototype = {
@@ -1612,10 +1462,8 @@ WebInspector.SourcesPanel.StepOverActionDelegate.prototype = {
* @extends {WebInspector.SourcesPanel.BaseActionDelegate}
*/
WebInspector.SourcesPanel.StepIntoActionDelegate = function() {
- WebInspector.SourcesPanel.BaseActionDelegate.call(
- this,
- WebInspector.SourcesPanel.prototype._stepIntoClicked
- );
+ WebInspector
+ .SourcesPanel.BaseActionDelegate.call(this, WebInspector.SourcesPanel.prototype._stepIntoClicked);
};
WebInspector.SourcesPanel.StepIntoActionDelegate.prototype = {
@@ -1627,10 +1475,8 @@ WebInspector.SourcesPanel.StepIntoActionDelegate.prototype = {
* @extends {WebInspector.SourcesPanel.BaseActionDelegate}
*/
WebInspector.SourcesPanel.StepIntoAsyncActionDelegate = function() {
- WebInspector.SourcesPanel.BaseActionDelegate.call(
- this,
- WebInspector.SourcesPanel.prototype._stepIntoAsyncClicked
- );
+ WebInspector
+ .SourcesPanel.BaseActionDelegate.call(this, WebInspector.SourcesPanel.prototype._stepIntoAsyncClicked);
};
WebInspector.SourcesPanel.StepIntoAsyncActionDelegate.prototype = {
@@ -1642,10 +1488,8 @@ WebInspector.SourcesPanel.StepIntoAsyncActionDelegate.prototype = {
* @extends {WebInspector.SourcesPanel.BaseActionDelegate}
*/
WebInspector.SourcesPanel.StepOutActionDelegate = function() {
- WebInspector.SourcesPanel.BaseActionDelegate.call(
- this,
- WebInspector.SourcesPanel.prototype._stepOutClicked
- );
+ WebInspector
+ .SourcesPanel.BaseActionDelegate.call(this, WebInspector.SourcesPanel.prototype._stepOutClicked);
};
WebInspector.SourcesPanel.StepOutActionDelegate.prototype = {
@@ -1657,10 +1501,8 @@ WebInspector.SourcesPanel.StepOutActionDelegate.prototype = {
* @extends {WebInspector.SourcesPanel.BaseActionDelegate}
*/
WebInspector.SourcesPanel.RunSnippetActionDelegate = function() {
- WebInspector.SourcesPanel.BaseActionDelegate.call(
- this,
- WebInspector.SourcesPanel.prototype._runSnippet
- );
+ WebInspector
+ .SourcesPanel.BaseActionDelegate.call(this, WebInspector.SourcesPanel.prototype._runSnippet);
};
WebInspector.SourcesPanel.RunSnippetActionDelegate.prototype = {
@@ -1668,9 +1510,8 @@ WebInspector.SourcesPanel.RunSnippetActionDelegate.prototype = {
};
WebInspector.SourcesPanel.show = function() {
- WebInspector.inspectorView.setCurrentPanel(
- WebInspector.SourcesPanel.instance()
- );
+ WebInspector
+ .inspectorView.setCurrentPanel(WebInspector.SourcesPanel.instance());
};
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesSearchScope.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesSearchScope.js
index f4dd022..5515282 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesSearchScope.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesSearchScope.js
@@ -144,9 +144,8 @@ WebInspector.SourcesSearchScope.prototype = {
for (var i = 0; i < projects.length; ++i) {
var project = projects[i];
var weight = project.uiSourceCodes().length;
- var findMatchingFilesInProjectProgress = findMatchingFilesProgress.createSubProgress(
- weight
- );
+ var findMatchingFilesInProjectProgress = findMatchingFilesProgress
+ .createSubProgress(weight);
var barrierCallback = barrier.createCallback();
var filesMathingFileQuery = this._projectFilesMatchingFileQuery(
project,
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesView.js
index e84bbc5..83590e9 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesView.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesView.js
@@ -40,16 +40,10 @@ WebInspector.SourcesView = function(workspace, sourcesPanel) {
tabbedEditorPlaceholderText
);
this._editorContainer.show(this._searchableView.element);
- this._editorContainer.addEventListener(
- WebInspector.TabbedEditorContainer.Events.EditorSelected,
- this._editorSelected,
- this
- );
- this._editorContainer.addEventListener(
- WebInspector.TabbedEditorContainer.Events.EditorClosed,
- this._editorClosed,
- this
- );
+ this
+ ._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorSelected, this._editorSelected, this);
+ this
+ ._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorClosed, this._editorClosed, this);
this._historyManager = new WebInspector.EditingLocationHistoryManager(
this,
@@ -86,21 +80,12 @@ WebInspector.SourcesView = function(workspace, sourcesPanel) {
this._workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this));
WebInspector.endBatchUpdate();
- this._workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeAdded,
- this._uiSourceCodeAdded,
- this
- );
- this._workspace.addEventListener(
- WebInspector.Workspace.Events.UISourceCodeRemoved,
- this._uiSourceCodeRemoved,
- this
- );
- this._workspace.addEventListener(
- WebInspector.Workspace.Events.ProjectRemoved,
- this._projectRemoved.bind(this),
- this
- );
+ this
+ ._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this);
+ this
+ ._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved, this._uiSourceCodeRemoved, this);
+ this
+ ._workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved, this._projectRemoved.bind(this), this);
function handleBeforeUnload(event) {
if (event.returnValue) return;
@@ -110,9 +95,8 @@ WebInspector.SourcesView = function(workspace, sourcesPanel) {
event.returnValue = WebInspector.UIString(
"DevTools have unsaved changes that will be permanently lost."
);
- WebInspector.inspectorView.setCurrentPanel(
- WebInspector.SourcesPanel.instance()
- );
+ WebInspector
+ .inspectorView.setCurrentPanel(WebInspector.SourcesPanel.instance());
for (
var i = 0;
i < unsavedSourceCodes.length;
@@ -123,11 +107,8 @@ WebInspector.SourcesView = function(workspace, sourcesPanel) {
window.addEventListener("beforeunload", handleBeforeUnload, true);
this._shortcuts = {};
- this.element.addEventListener(
- "keydown",
- this._handleKeyDown.bind(this),
- false
- );
+ this
+ .element.addEventListener("keydown", this._handleKeyDown.bind(this), false);
};
WebInspector.SourcesView.Events = {
@@ -270,7 +251,8 @@ WebInspector.SourcesView.prototype = {
currentSourceFrame: function() {
var view = this.visibleView();
if (!(view instanceof WebInspector.SourceFrame)) return null;
- return /** @type {!WebInspector.SourceFrame} */
+ return;
+ /** @type {!WebInspector.SourceFrame} */
view;
},
/**
@@ -467,9 +449,8 @@ WebInspector.SourcesView.prototype = {
var oldSourceFrame = this._sourceFramesByUISourceCode.get(uiSourceCode);
if (!oldSourceFrame) return;
if (this._sourceFrameMatchesUISourceCode(oldSourceFrame, uiSourceCode)) {
- oldSourceFrame.setHighlighterType(
- WebInspector.SourcesView.uiSourceCodeHighlighterType(uiSourceCode)
- );
+ oldSourceFrame
+ .setHighlighterType(WebInspector.SourcesView.uiSourceCodeHighlighterType(uiSourceCode));
} else {
this._editorContainer.removeUISourceCode(uiSourceCode);
this._removeSourceFrame(uiSourceCode);
@@ -519,28 +500,24 @@ WebInspector.SourcesView.prototype = {
var data = {};
data.uiSourceCode = uiSourceCode;
data.wasSelected = wasSelected;
- this.dispatchEventToListeners(
- WebInspector.SourcesView.Events.EditorClosed,
- data
- );
+ this
+ .dispatchEventToListeners(WebInspector.SourcesView.Events.EditorClosed, data);
},
_editorSelected: function(event) {
- var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data.currentFile;
+ var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data
+ .currentFile;
var shouldUseHistoryManager = uiSourceCode !== this._currentUISourceCode &&
event.data.userGesture;
if (shouldUseHistoryManager) this._historyManager.updateCurrentState();
var sourceFrame = this._showFile(uiSourceCode);
if (shouldUseHistoryManager) this._historyManager.pushNewState();
- this._searchableView.setReplaceable(
- !!sourceFrame && sourceFrame.canEditSource()
- );
+ this
+ ._searchableView.setReplaceable(!!sourceFrame && sourceFrame.canEditSource());
this._searchableView.refreshSearch();
- this.dispatchEventToListeners(
- WebInspector.SourcesView.Events.EditorSelected,
- uiSourceCode
- );
+ this
+ .dispatchEventToListeners(WebInspector.SourcesView.Events.EditorSelected, uiSourceCode);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -685,18 +662,12 @@ WebInspector.SourcesView.prototype = {
switch (uiSourceCode.contentType()) {
case WebInspector.resourceTypes.Document:
case WebInspector.resourceTypes.Script:
- WebInspector.JavaScriptOutlineDialog.show(
- this,
- uiSourceCode,
- this.showSourceLocation.bind(this, uiSourceCode)
- );
+ WebInspector
+ .JavaScriptOutlineDialog.show(this, uiSourceCode, this.showSourceLocation.bind(this, uiSourceCode));
return true;
case WebInspector.resourceTypes.Stylesheet:
- WebInspector.StyleSheetOutlineDialog.show(
- this,
- uiSourceCode,
- this.showSourceLocation.bind(this, uiSourceCode)
- );
+ WebInspector
+ .StyleSheetOutlineDialog.show(this, uiSourceCode, this.showSourceLocation.bind(this, uiSourceCode));
return true;
default:
// We don't want default browser shortcut to be executed, so pretend to handle this event.
@@ -712,12 +683,8 @@ WebInspector.SourcesView.prototype = {
var defaultScores = new Map();
for (var i = 1; i < uiSourceCodes.length; ++i) // Skip current element
defaultScores.set(uiSourceCodes[i], uiSourceCodes.length - i);
- WebInspector.OpenResourceDialog.show(
- this,
- this.element,
- query,
- defaultScores
- );
+ WebInspector
+ .OpenResourceDialog.show(this, this.element, query, defaultScores);
},
/**
* @param {!Event=} event
@@ -769,10 +736,8 @@ WebInspector.SourcesView.prototype = {
* @param {boolean} active
*/
toggleBreakpointsActiveState: function(active) {
- this._editorContainer.view.element.classList.toggle(
- "breakpoints-deactivated",
- !active
- );
+ this
+ ._editorContainer.view.element.classList.toggle("breakpoints-deactivated", !active);
},
__proto__: WebInspector.VBox.prototype
};
@@ -844,9 +809,8 @@ WebInspector.SourcesView.SwitchFileActionDelegate.prototype = {
if (!sourcesView) return false;
var currentUISourceCode = sourcesView.currentUISourceCode();
if (!currentUISourceCode) return true;
- var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate._nextFile(
- currentUISourceCode
- );
+ var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
+ ._nextFile(currentUISourceCode);
if (!nextUISourceCode) return true;
sourcesView.showSourceLocation(nextUISourceCode);
return true;
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/StyleSheetOutlineDialog.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/StyleSheetOutlineDialog.js
index e723c98..040c07c 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/StyleSheetOutlineDialog.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/StyleSheetOutlineDialog.js
@@ -61,9 +61,8 @@ WebInspector.StyleSheetOutlineDialog.show = function(
uiSourceCode,
selectItemCallback
);
- var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDialog(
- delegate
- );
+ var filteredItemSelectionDialog = new WebInspector
+ .FilteredItemSelectionDialog(delegate);
WebInspector.Dialog.show(view.element, filteredItemSelectionDialog);
};
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/TabbedEditorContainer.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/TabbedEditorContainer.js
index 13cbb05..aa1ee45 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/TabbedEditorContainer.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/TabbedEditorContainer.js
@@ -77,10 +77,8 @@ WebInspector.TabbedEditorContainer = function(
this._tabIds = new Map();
this._files = {};
- this._previouslyViewedFilesSetting = WebInspector.settings.createSetting(
- settingName,
- []
- );
+ this._previouslyViewedFilesSetting = WebInspector.settings
+ .createSetting(settingName, []);
this._history = WebInspector.TabbedEditorContainer.History.fromObject(
this._previouslyViewedFilesSetting.get()
);
@@ -112,7 +110,8 @@ WebInspector.TabbedEditorContainer.prototype = {
* @return {!Array.<!WebInspector.SourceFrame>}
*/
fileViews: function() {
- return /** @type {!Array.<!WebInspector.SourceFrame>} */
+ return;
+ /** @type {!Array.<!WebInspector.SourceFrame>} */
this._tabbedPane.tabViews();
},
/**
@@ -156,29 +155,17 @@ WebInspector.TabbedEditorContainer.prototype = {
},
_addViewListeners: function() {
if (!this._currentView) return;
- this._currentView.addEventListener(
- WebInspector.SourceFrame.Events.ScrollChanged,
- this._scrollChanged,
- this
- );
- this._currentView.addEventListener(
- WebInspector.SourceFrame.Events.SelectionChanged,
- this._selectionChanged,
- this
- );
+ this
+ ._currentView.addEventListener(WebInspector.SourceFrame.Events.ScrollChanged, this._scrollChanged, this);
+ this
+ ._currentView.addEventListener(WebInspector.SourceFrame.Events.SelectionChanged, this._selectionChanged, this);
},
_removeViewListeners: function() {
if (!this._currentView) return;
- this._currentView.removeEventListener(
- WebInspector.SourceFrame.Events.ScrollChanged,
- this._scrollChanged,
- this
- );
- this._currentView.removeEventListener(
- WebInspector.SourceFrame.Events.SelectionChanged,
- this._selectionChanged,
- this
- );
+ this
+ ._currentView.removeEventListener(WebInspector.SourceFrame.Events.ScrollChanged, this._scrollChanged, this);
+ this
+ ._currentView.removeEventListener(WebInspector.SourceFrame.Events.SelectionChanged, this._selectionChanged, this);
},
/**
* @param {!WebInspector.Event} event
@@ -407,10 +394,8 @@ WebInspector.TabbedEditorContainer.prototype = {
this._removeUISourceCodeListeners(uiSourceCode);
- this.dispatchEventToListeners(
- WebInspector.TabbedEditorContainer.Events.EditorClosed,
- uiSourceCode
- );
+ this
+ .dispatchEventToListeners(WebInspector.TabbedEditorContainer.Events.EditorClosed, uiSourceCode);
if (userGesture) this._editorClosedByUserAction(uiSourceCode);
},
@@ -428,51 +413,27 @@ WebInspector.TabbedEditorContainer.prototype = {
* @param {!WebInspector.UISourceCode} uiSourceCode
*/
_addUISourceCodeListeners: function(uiSourceCode) {
- uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.TitleChanged,
- this._uiSourceCodeTitleChanged,
- this
- );
- uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._uiSourceCodeWorkingCopyChanged,
- this
- );
- uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._uiSourceCodeWorkingCopyCommitted,
- this
- );
- uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.SavedStateUpdated,
- this._uiSourceCodeSavedStateUpdated,
- this
- );
+ uiSourceCode
+ .addEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._uiSourceCodeTitleChanged, this);
+ uiSourceCode
+ .addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._uiSourceCodeWorkingCopyChanged, this);
+ uiSourceCode
+ .addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._uiSourceCodeWorkingCopyCommitted, this);
+ uiSourceCode
+ .addEventListener(WebInspector.UISourceCode.Events.SavedStateUpdated, this._uiSourceCodeSavedStateUpdated, this);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
*/
_removeUISourceCodeListeners: function(uiSourceCode) {
- uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.TitleChanged,
- this._uiSourceCodeTitleChanged,
- this
- );
- uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._uiSourceCodeWorkingCopyChanged,
- this
- );
- uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._uiSourceCodeWorkingCopyCommitted,
- this
- );
- uiSourceCode.removeEventListener(
- WebInspector.UISourceCode.Events.SavedStateUpdated,
- this._uiSourceCodeSavedStateUpdated,
- this
- );
+ uiSourceCode
+ .removeEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._uiSourceCodeTitleChanged, this);
+ uiSourceCode
+ .removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._uiSourceCodeWorkingCopyChanged, this);
+ uiSourceCode
+ .removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._uiSourceCodeWorkingCopyCommitted, this);
+ uiSourceCode
+ .removeEventListener(WebInspector.UISourceCode.Events.SavedStateUpdated, this._uiSourceCodeSavedStateUpdated, this);
},
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -549,7 +510,8 @@ WebInspector.TabbedEditorContainer.HistoryItem = function(
this.scrollLineNumber = scrollLineNumber;
};
-WebInspector.TabbedEditorContainer.HistoryItem.serializableUrlLengthLimit = 4096;
+WebInspector.TabbedEditorContainer.HistoryItem
+ .serializableUrlLengthLimit = 4096;
/**
* @param {!Object} serializedHistoryItem
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ThreadsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ThreadsSidebarPane.js
index 31e0ed9..0661cda 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ThreadsSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ThreadsSidebarPane.js
@@ -19,23 +19,12 @@ WebInspector.ThreadsSidebarPane = function() {
this._selectedListItem = null;
this.threadList = new WebInspector.UIList();
this.threadList.show(this.bodyElement);
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerPaused,
- this._onDebuggerStateChanged,
- this
- );
- WebInspector.targetManager.addModelListener(
- WebInspector.DebuggerModel,
- WebInspector.DebuggerModel.Events.DebuggerResumed,
- this._onDebuggerStateChanged,
- this
- );
- WebInspector.context.addFlavorChangeListener(
- WebInspector.Target,
- this._targetChanged,
- this
- );
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerPaused, this._onDebuggerStateChanged, this);
+ WebInspector
+ .targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerResumed, this._onDebuggerStateChanged, this);
+ WebInspector
+ .context.addFlavorChangeListener(WebInspector.Target, this._targetChanged, this);
WebInspector.targetManager.observeTargets(this);
};
@@ -50,11 +39,8 @@ WebInspector.ThreadsSidebarPane.prototype = {
return;
}
var listItem = new WebInspector.UIList.Item(target.name(), "");
- listItem.element.addEventListener(
- "click",
- this._onListItemClick.bind(this, listItem),
- false
- );
+ listItem
+ .element.addEventListener("click", this._onListItemClick.bind(this, listItem), false);
var currentTarget = WebInspector.context.flavor(WebInspector.Target);
if (currentTarget === target) this._selectListItem(listItem);
@@ -84,9 +70,8 @@ WebInspector.ThreadsSidebarPane.prototype = {
*/
_targetChanged: function(event) {
var newTarget /** @type {!WebInspector.Target} */ = event.data;
- var listItem /** @type {!WebInspector.UIList.Item} */ = this._targetsToListItems.get(
- newTarget
- );
+ var listItem /** @type {!WebInspector.UIList.Item} */ = this
+ ._targetsToListItems.get(newTarget);
this._selectListItem(listItem);
},
/**
@@ -101,9 +86,8 @@ WebInspector.ThreadsSidebarPane.prototype = {
*/
_updateDebuggerState: function(target) {
var listItem = this._targetsToListItems.get(target);
- listItem.setSubtitle(
- WebInspector.UIString(target.debuggerModel.isPaused() ? "paused" : "")
- );
+ listItem
+ .setSubtitle(WebInspector.UIString(target.debuggerModel.isPaused() ? "paused" : ""));
},
/**
* @param {!WebInspector.UIList.Item} listItem
@@ -120,10 +104,8 @@ WebInspector.ThreadsSidebarPane.prototype = {
* @param {!WebInspector.UIList.Item} listItem
*/
_onListItemClick: function(listItem) {
- WebInspector.context.setFlavor(
- WebInspector.Target,
- this._listItemsToTargets.get(listItem)
- );
+ WebInspector
+ .context.setFlavor(WebInspector.Target, this._listItemsToTargets.get(listItem));
listItem.element.scrollIntoViewIfNeeded();
},
__proto__: WebInspector.SidebarPane.prototype
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/UISourceCodeFrame.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/UISourceCodeFrame.js
index 41c66ad..735e905 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/UISourceCodeFrame.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/UISourceCodeFrame.js
@@ -34,25 +34,15 @@
WebInspector.UISourceCodeFrame = function(uiSourceCode) {
this._uiSourceCode = uiSourceCode;
WebInspector.SourceFrame.call(this, this._uiSourceCode);
- this.textEditor.setAutocompleteDelegate(
- new WebInspector.SimpleAutocompleteDelegate()
- );
+ this
+ .textEditor.setAutocompleteDelegate(new WebInspector.SimpleAutocompleteDelegate());
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyChanged,
- this._onWorkingCopyChanged,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.WorkingCopyCommitted,
- this._onWorkingCopyCommitted,
- this
- );
- this._uiSourceCode.addEventListener(
- WebInspector.UISourceCode.Events.SavedStateUpdated,
- this._onSavedStateUpdated,
- this
- );
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._onWorkingCopyChanged, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._onWorkingCopyCommitted, this);
+ this
+ ._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.SavedStateUpdated, this._onSavedStateUpdated, this);
this._updateStyle();
};
@@ -66,20 +56,14 @@ WebInspector.UISourceCodeFrame.prototype = {
wasShown: function() {
WebInspector.SourceFrame.prototype.wasShown.call(this);
this._boundWindowFocused = this._windowFocused.bind(this);
- this.element.ownerDocument.defaultView.addEventListener(
- "focus",
- this._boundWindowFocused,
- false
- );
+ this
+ .element.ownerDocument.defaultView.addEventListener("focus", this._boundWindowFocused, false);
this._checkContentUpdated();
},
willHide: function() {
WebInspector.SourceFrame.prototype.willHide.call(this);
- this.element.ownerDocument.defaultView.removeEventListener(
- "focus",
- this._boundWindowFocused,
- false
- );
+ this
+ .element.ownerDocument.defaultView.removeEventListener("focus", this._boundWindowFocused, false);
delete this._boundWindowFocused;
this._uiSourceCode.removeWorkingCopyGetter();
},
@@ -117,17 +101,13 @@ WebInspector.UISourceCodeFrame.prototype = {
delete this._muteSourceCodeEvents;
},
onTextChanged: function(oldRange, newRange) {
- WebInspector.SourceFrame.prototype.onTextChanged.call(
- this,
- oldRange,
- newRange
- );
+ WebInspector
+ .SourceFrame.prototype.onTextChanged.call(this, oldRange, newRange);
if (this._isSettingContent) return;
this._muteSourceCodeEvents = true;
if (this._textEditor.isClean()) this._uiSourceCode.resetWorkingCopy();
- else this._uiSourceCode.setWorkingCopyGetter(
- this._textEditor.text.bind(this._textEditor)
- );
+ else this
+ ._uiSourceCode.setWorkingCopyGetter(this._textEditor.text.bind(this._textEditor));
delete this._muteSourceCodeEvents;
},
/**
@@ -148,13 +128,8 @@ WebInspector.UISourceCodeFrame.prototype = {
}
this._textEditor.markClean();
this._updateStyle();
- WebInspector.notifications.dispatchEventToListeners(
- WebInspector.UserMetrics.UserAction,
- {
- action: WebInspector.UserMetrics.UserActionNames.FileSaved,
- url: WebInspector.networkMapping.networkURL(this._uiSourceCode)
- }
- );
+ WebInspector
+ .notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction, { action: WebInspector.UserMetrics.UserActionNames.FileSaved, url: WebInspector.networkMapping.networkURL(this._uiSourceCode) });
},
/**
* @param {!WebInspector.Event} event
@@ -163,10 +138,8 @@ WebInspector.UISourceCodeFrame.prototype = {
this._updateStyle();
},
_updateStyle: function() {
- this.element.classList.toggle(
- "source-frame-unsaved-committed-changes",
- this._uiSourceCode.hasUnsavedCommittedChanges()
- );
+ this
+ .element.classList.toggle("source-frame-unsaved-committed-changes", this._uiSourceCode.hasUnsavedCommittedChanges());
},
onUISourceCodeContentChanged: function() {},
/**
@@ -178,11 +151,8 @@ WebInspector.UISourceCodeFrame.prototype = {
delete this._isSettingContent;
},
populateTextAreaContextMenu: function(contextMenu, lineNumber) {
- WebInspector.SourceFrame.prototype.populateTextAreaContextMenu.call(
- this,
- contextMenu,
- lineNumber
- );
+ WebInspector
+ .SourceFrame.prototype.populateTextAreaContextMenu.call(this, contextMenu, lineNumber);
contextMenu.appendApplicableItems(this._uiSourceCode);
contextMenu.appendSeparator();
},
@@ -226,20 +196,15 @@ WebInspector.UISourceCodeFrame.Infobar = function(level, message, onDispose) {
);
this._mainRow.createChild("span", "source-frame-infobar-icon");
- this._mainRow.createChild(
- "span",
- "source-frame-infobar-row-message"
- ).textContent = message;
+ this._mainRow.createChild("span", "source-frame-infobar-row-message")
+ .textContent = message;
this._toggleElement = this._mainRow.createChild(
"div",
"source-frame-infobar-toggle link"
);
- this._toggleElement.addEventListener(
- "click",
- this._onToggleDetails.bind(this),
- false
- );
+ this
+ ._toggleElement.addEventListener("click", this._onToggleDetails.bind(this), false);
this._closeElement = this._mainRow.createChild("div", "close-button");
this._closeElement.addEventListener("click", this._onClose.bind(this), false);
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WatchExpressionsSidebarPane.js
index 62a1f5c..9cb025c 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WatchExpressionsSidebarPane.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WatchExpressionsSidebarPane.js
@@ -41,21 +41,15 @@ WebInspector.WatchExpressionsSidebarPane = function() {
this.registerRequiredCSS("components/objectValue.css");
this.bodyElement.classList.add("vbox", "watch-expressions");
- this.bodyElement.addEventListener(
- "contextmenu",
- this._contextMenu.bind(this),
- false
- );
+ this
+ .bodyElement.addEventListener("contextmenu", this._contextMenu.bind(this), false);
var refreshButton = this.titleElement.createChild(
"button",
"pane-title-button refresh"
);
- refreshButton.addEventListener(
- "click",
- this._refreshButtonClicked.bind(this),
- false
- );
+ refreshButton
+ .addEventListener("click", this._refreshButtonClicked.bind(this), false);
refreshButton.title = WebInspector.UIString("Refresh");
var addButton = this.titleElement.createChild(
@@ -64,11 +58,8 @@ WebInspector.WatchExpressionsSidebarPane = function() {
);
addButton.addEventListener("click", this._addButtonClicked.bind(this), false);
addButton.title = WebInspector.UIString("Add watch expression");
- WebInspector.context.addFlavorChangeListener(
- WebInspector.ExecutionContext,
- this.refreshExpressions,
- this
- );
+ WebInspector
+ .context.addFlavorChangeListener(WebInspector.ExecutionContext, this.refreshExpressions, this);
};
WebInspector.WatchExpressionsSidebarPane.prototype = {
@@ -156,14 +147,13 @@ WebInspector.WatchExpressionsSidebarPane.prototype = {
* @param {!WebInspector.Event} event
*/
_watchExpressionUpdated: function(event) {
- var watchExpression /** @type {!WebInspector.WatchExpression} */ = event.target;
+ var watchExpression /** @type {!WebInspector.WatchExpression} */ = event
+ .target;
if (!watchExpression.expression()) {
this._watchExpressions.remove(watchExpression);
this.bodyElement.removeChild(watchExpression.element());
- this._emptyElement.classList.toggle(
- "hidden",
- !!this._watchExpressions.length
- );
+ this
+ ._emptyElement.classList.toggle("hidden", !!this._watchExpressions.length);
}
this._saveExpressions();
@@ -269,11 +259,8 @@ WebInspector.WatchExpression.prototype = {
this._finishEditing.bind(this, this._expression)
);
proxyElement.classList.add("watch-expression-text-prompt-proxy");
- proxyElement.addEventListener(
- "keydown",
- this._promptKeyDown.bind(this),
- false
- );
+ proxyElement
+ .addEventListener("keydown", this._promptKeyDown.bind(this), false);
this._element
.getComponentSelection()
.setBaseAndExtent(newDiv, 0, newDiv, 1);
@@ -311,9 +298,8 @@ WebInspector.WatchExpression.prototype = {
_updateExpression: function(newExpression) {
this._expression = newExpression;
this.update();
- this.dispatchEventToListeners(
- WebInspector.WatchExpression.Events.ExpressionUpdated
- );
+ this
+ .dispatchEventToListeners(WebInspector.WatchExpression.Events.ExpressionUpdated);
},
/**
* @param {!Event} event
@@ -341,11 +327,8 @@ WebInspector.WatchExpression.prototype = {
titleElement.classList.add("dimmed");
this._valueElement.textContent = WebInspector.UIString("<not available>");
} else {
- this._valueElement = WebInspector.ObjectPropertiesSection.createValueElement(
- result,
- wasThrown,
- titleElement
- );
+ this._valueElement = WebInspector.ObjectPropertiesSection
+ .createValueElement(result, wasThrown, titleElement);
}
var separatorElement = createElementWithClass("span", "separator");
separatorElement.textContent = ": ";
@@ -361,11 +344,8 @@ WebInspector.WatchExpression.prototype = {
titleElement
);
this._objectPresentationElement = objectPropertiesSection.element;
- objectPropertiesSection.headerElement.addEventListener(
- "click",
- this._onSectionClick.bind(this, objectPropertiesSection),
- false
- );
+ objectPropertiesSection
+ .headerElement.addEventListener("click", this._onSectionClick.bind(this, objectPropertiesSection), false);
objectPropertiesSection.doNotExpandOnTitleClick();
this._installHover(objectPropertiesSection.headerElement);
} else {
@@ -390,11 +370,8 @@ WebInspector.WatchExpression.prototype = {
_installHover: function(hoverableElement) {
var deleteButton = createElementWithClass("button", "delete-button");
deleteButton.title = WebInspector.UIString("Delete watch expression");
- deleteButton.addEventListener(
- "click",
- this._deleteWatchExpression.bind(this),
- false
- );
+ deleteButton
+ .addEventListener("click", this._deleteWatchExpression.bind(this), false);
hoverableElement.insertBefore(deleteButton, hoverableElement.firstChild);
},
/**
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WorkspaceMappingTip.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WorkspaceMappingTip.js
index 2365806..6fbe696 100644
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WorkspaceMappingTip.js
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WorkspaceMappingTip.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment