Upstream version 10.38.222.0
[platform/framework/web/crosswalk.git] / src / chrome / tools / test / reference_build / chrome_linux / resources / inspector / SourcesPanel.js
index 82ad758..435ecf2 100644 (file)
@@ -1,13 +1,13 @@
-WebInspector.JavaScriptBreakpointsSidebarPane=function(breakpointManager,showSourceLineDelegate)
-{WebInspector.SidebarPane.call(this,WebInspector.UIString("Breakpoints"));this.registerRequiredCSS("breakpointsList.css");this._breakpointManager=breakpointManager;this._showSourceLineDelegate=showSourceLineDelegate;this.listElement=document.createElement("ol");this.listElement.className="breakpoint-list";this.emptyElement=document.createElement("div");this.emptyElement.className="info";this.emptyElement.textContent=WebInspector.UIString("No Breakpoints");this.bodyElement.appendChild(this.emptyElement);this._items=new Map();var breakpointLocations=this._breakpointManager.allBreakpointLocations();for(var i=0;i<breakpointLocations.length;++i)
+WebInspector.JavaScriptBreakpointsSidebarPane=function(debuggerModel,breakpointManager,showSourceLineDelegate)
+{WebInspector.SidebarPane.call(this,WebInspector.UIString("Breakpoints"));this._debuggerModel=debuggerModel;this.registerRequiredCSS("breakpointsList.css");this._breakpointManager=breakpointManager;this._showSourceLineDelegate=showSourceLineDelegate;this.listElement=document.createElement("ol");this.listElement.className="breakpoint-list";this.emptyElement=document.createElement("div");this.emptyElement.className="info";this.emptyElement.textContent=WebInspector.UIString("No Breakpoints");this.bodyElement.appendChild(this.emptyElement);this._items=new Map();var breakpointLocations=this._breakpointManager.allBreakpointLocations();for(var i=0;i<breakpointLocations.length;++i)
 this._addBreakpoint(breakpointLocations[i].breakpoint,breakpointLocations[i].uiLocation);this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded,this._breakpointAdded,this);this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved,this._breakpointRemoved,this);this.emptyElement.addEventListener("contextmenu",this._emptyElementContextMenu.bind(this),true);}
 WebInspector.JavaScriptBreakpointsSidebarPane.prototype={_emptyElementContextMenu:function(event)
-{var contextMenu=new WebInspector.ContextMenu(event);var breakpointActive=WebInspector.debuggerModel.breakpointsActive();var breakpointActiveTitle=breakpointActive?WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Deactivate breakpoints":"Deactivate Breakpoints"):WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Activate breakpoints":"Activate Breakpoints");contextMenu.appendItem(breakpointActiveTitle,WebInspector.debuggerModel.setBreakpointsActive.bind(WebInspector.debuggerModel,!breakpointActive));contextMenu.show();},_breakpointAdded:function(event)
+{var contextMenu=new WebInspector.ContextMenu(event);var breakpointActive=this._debuggerModel.breakpointsActive();var breakpointActiveTitle=breakpointActive?WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Deactivate breakpoints":"Deactivate Breakpoints"):WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Activate breakpoints":"Activate Breakpoints");contextMenu.appendItem(breakpointActiveTitle,this._debuggerModel.setBreakpointsActive.bind(this._debuggerModel,!breakpointActive));contextMenu.show();},_breakpointAdded:function(event)
 {this._breakpointRemoved(event);var breakpoint=(event.data.breakpoint);var uiLocation=(event.data.uiLocation);this._addBreakpoint(breakpoint,uiLocation);},_addBreakpoint:function(breakpoint,uiLocation)
 {var element=document.createElement("li");element.classList.add("cursor-pointer");element.addEventListener("contextmenu",this._breakpointContextMenu.bind(this,breakpoint),true);element.addEventListener("click",this._breakpointClicked.bind(this,uiLocation),false);var checkbox=document.createElement("input");checkbox.className="checkbox-elem";checkbox.type="checkbox";checkbox.checked=breakpoint.enabled();checkbox.addEventListener("click",this._breakpointCheckboxClicked.bind(this,breakpoint),false);element.appendChild(checkbox);var labelElement=document.createTextNode(uiLocation.linkText());element.appendChild(labelElement);var snippetElement=document.createElement("div");snippetElement.className="source-text monospace";element.appendChild(snippetElement);function didRequestContent(content)
-{var lineEndings=content.lineEndings();if(uiLocation.lineNumber<lineEndings.length)
-snippetElement.textContent=content.substring(lineEndings[uiLocation.lineNumber-1],lineEndings[uiLocation.lineNumber]);}
-uiLocation.uiSourceCode.requestContent(didRequestContent.bind(this));element._data=uiLocation;var currentElement=this.listElement.firstChild;while(currentElement){if(currentElement._data&&this._compareBreakpoints(currentElement._data,element._data)>0)
+{var lineNumber=uiLocation.lineNumber
+var columnNumber=uiLocation.columnNumber;var contentString=new String(content);if(lineNumber<contentString.lineCount()){var lineText=contentString.lineAt(lineNumber);var maxSnippetLength=200;snippetElement.textContent=lineText.substr(columnNumber).trimEnd(maxSnippetLength);}}
+uiLocation.uiSourceCode.requestContent(didRequestContent);element._data=uiLocation;var currentElement=this.listElement.firstChild;while(currentElement){if(currentElement._data&&this._compareBreakpoints(currentElement._data,element._data)>0)
 break;currentElement=currentElement.nextSibling;}
 this._addListElement(element,currentElement);var breakpointItem={};breakpointItem.element=element;breakpointItem.checkbox=checkbox;this._items.put(breakpoint,breakpointItem);this.expand();},_breakpointRemoved:function(event)
 {var breakpoint=(event.data.breakpoint);var uiLocation=(event.data.uiLocation);var breakpointItem=this._items.get(breakpoint);if(!breakpointItem)
@@ -18,7 +18,7 @@ return;breakpointItem.element.classList.add("breakpoint-hit");this._highlightedB
 {this._showSourceLineDelegate(uiLocation.uiSourceCode,uiLocation.lineNumber);},_breakpointCheckboxClicked:function(breakpoint,event)
 {event.consume();breakpoint.setEnabled(event.target.checked);},_breakpointContextMenu:function(breakpoint,event)
 {var breakpoints=this._items.values();var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Remove breakpoint":"Remove Breakpoint"),breakpoint.remove.bind(breakpoint));if(breakpoints.length>1){var removeAllTitle=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Remove all breakpoints":"Remove All Breakpoints");contextMenu.appendItem(removeAllTitle,this._breakpointManager.removeAllBreakpoints.bind(this._breakpointManager));}
-contextMenu.appendSeparator();var breakpointActive=WebInspector.debuggerModel.breakpointsActive();var breakpointActiveTitle=breakpointActive?WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Deactivate breakpoints":"Deactivate Breakpoints"):WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Activate breakpoints":"Activate Breakpoints");contextMenu.appendItem(breakpointActiveTitle,WebInspector.debuggerModel.setBreakpointsActive.bind(WebInspector.debuggerModel,!breakpointActive));function enabledBreakpointCount(breakpoints)
+contextMenu.appendSeparator();var breakpointActive=this._debuggerModel.breakpointsActive();var breakpointActiveTitle=breakpointActive?WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Deactivate breakpoints":"Deactivate Breakpoints"):WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Activate breakpoints":"Activate Breakpoints");contextMenu.appendItem(breakpointActiveTitle,this._debuggerModel.setBreakpointsActive.bind(this._debuggerModel,!breakpointActive));function enabledBreakpointCount(breakpoints)
 {var count=0;for(var i=0;i<breakpoints.length;++i){if(breakpoints[i].checkbox.checked)
 count++;}
 return count;}
@@ -40,7 +40,7 @@ WebInspector.XHRBreakpointsSidebarPane.prototype={_emptyElementContextMenu:funct
 {if(event)
 event.consume();this.expand();var inputElementContainer=document.createElement("p");inputElementContainer.className="breakpoint-condition";var inputElement=document.createElement("span");inputElementContainer.textContent=WebInspector.UIString("Break when URL contains:");inputElement.className="editing";inputElement.id="breakpoint-condition-input";inputElementContainer.appendChild(inputElement);this._addListElement(inputElementContainer,this.listElement.firstChild);function finishEditing(accept,e,text)
 {this._removeListElement(inputElementContainer);if(accept){this._setBreakpoint(text,true);this._saveBreakpoints();}}
-var config=new WebInspector.EditingConfig(finishEditing.bind(this,true),finishEditing.bind(this,false));WebInspector.startEditing(inputElement,config);},_setBreakpoint:function(url,enabled)
+var config=new WebInspector.InplaceEditor.Config(finishEditing.bind(this,true),finishEditing.bind(this,false));WebInspector.InplaceEditor.startEditing(inputElement,config);},_setBreakpoint:function(url,enabled)
 {if(url in this._breakpointElements)
 return;var element=document.createElement("li");element._url=url;element.addEventListener("contextmenu",this._contextMenu.bind(this,url),true);var checkboxElement=document.createElement("input");checkboxElement.className="checkbox-elem";checkboxElement.type="checkbox";checkboxElement.checked=enabled;checkboxElement.addEventListener("click",this._checkboxClicked.bind(this,url),false);element._checkboxElement=checkboxElement;element.appendChild(checkboxElement);var labelElement=document.createElement("span");if(!url)
 labelElement.textContent=WebInspector.UIString("Any XHR");else
@@ -63,7 +63,7 @@ DOMDebuggerAgent.removeXHRBreakpoint(url);this._saveBreakpoints();},_labelClicke
 {var element=this._breakpointElements[url];var inputElement=document.createElement("span");inputElement.className="breakpoint-condition editing";inputElement.textContent=url;this.listElement.insertBefore(inputElement,element);element.classList.add("hidden");function finishEditing(accept,e,text)
 {this._removeListElement(inputElement);if(accept){this._removeBreakpoint(url);this._setBreakpoint(text,element._checkboxElement.checked);this._saveBreakpoints();}else
 element.classList.remove("hidden");}
-WebInspector.startEditing(inputElement,new WebInspector.EditingConfig(finishEditing.bind(this,true),finishEditing.bind(this,false)));},highlightBreakpoint:function(url)
+WebInspector.InplaceEditor.startEditing(inputElement,new WebInspector.InplaceEditor.Config(finishEditing.bind(this,true),finishEditing.bind(this,false)));},highlightBreakpoint:function(url)
 {var element=this._breakpointElements[url];if(!element)
 return;this.expand();element.classList.add("breakpoint-hit");this._highlightedElement=element;},clearBreakpointHighlight:function()
 {if(this._highlightedElement){this._highlightedElement.classList.remove("breakpoint-hit");delete this._highlightedElement;}},_saveBreakpoints:function()
@@ -72,7 +72,7 @@ breakpoints.push({url:url,enabled:this._breakpointElements[url]._checkboxElement
 {var breakpoints=WebInspector.settings.xhrBreakpoints.get();for(var i=0;i<breakpoints.length;++i){var breakpoint=breakpoints[i];if(breakpoint&&typeof breakpoint.url==="string")
 this._setBreakpoint(breakpoint.url,breakpoint.enabled);}},__proto__:WebInspector.NativeBreakpointsSidebarPane.prototype}
 WebInspector.EventListenerBreakpointsSidebarPane=function()
-{WebInspector.SidebarPane.call(this,WebInspector.UIString("Event Listener Breakpoints"));this.registerRequiredCSS("breakpointsList.css");this.categoriesElement=document.createElement("ol");this.categoriesElement.tabIndex=0;this.categoriesElement.classList.add("properties-tree");this.categoriesElement.classList.add("event-listener-breakpoints");this.categoriesTreeOutline=new TreeOutline(this.categoriesElement);this.bodyElement.appendChild(this.categoriesElement);this._breakpointItems={};this._createCategory(WebInspector.UIString("Animation"),false,["requestAnimationFrame","cancelAnimationFrame","animationFrameFired"]);this._createCategory(WebInspector.UIString("Control"),true,["resize","scroll","zoom","focus","blur","select","change","submit","reset"]);this._createCategory(WebInspector.UIString("Clipboard"),true,["copy","cut","paste","beforecopy","beforecut","beforepaste"]);this._createCategory(WebInspector.UIString("DOM Mutation"),true,["DOMActivate","DOMFocusIn","DOMFocusOut","DOMAttrModified","DOMCharacterDataModified","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","DOMContentLoaded"]);this._createCategory(WebInspector.UIString("Device"),true,["deviceorientation","devicemotion"]);this._createCategory(WebInspector.UIString("Keyboard"),true,["keydown","keyup","keypress","input"]);this._createCategory(WebInspector.UIString("Load"),true,["load","beforeunload","unload","abort","error","hashchange","popstate"]);this._createCategory(WebInspector.UIString("Mouse"),true,["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout","mousewheel"]);this._createCategory(WebInspector.UIString("Timer"),false,["setTimer","clearTimer","timerFired"]);this._createCategory(WebInspector.UIString("Touch"),true,["touchstart","touchmove","touchend","touchcancel"]);this._createCategory(WebInspector.UIString("WebGL"),false,["webglErrorFired","webglWarningFired"]);this._restoreBreakpoints();}
+{WebInspector.SidebarPane.call(this,WebInspector.UIString("Event Listener Breakpoints"));this.registerRequiredCSS("breakpointsList.css");this.categoriesElement=document.createElement("ol");this.categoriesElement.tabIndex=0;this.categoriesElement.classList.add("properties-tree");this.categoriesElement.classList.add("event-listener-breakpoints");this.categoriesTreeOutline=new TreeOutline(this.categoriesElement);this.bodyElement.appendChild(this.categoriesElement);this._breakpointItems={};this._createCategory(WebInspector.UIString("Animation"),false,["requestAnimationFrame","cancelAnimationFrame","animationFrameFired"]);this._createCategory(WebInspector.UIString("Control"),true,["resize","scroll","zoom","focus","blur","select","change","submit","reset"]);this._createCategory(WebInspector.UIString("Clipboard"),true,["copy","cut","paste","beforecopy","beforecut","beforepaste"]);this._createCategory(WebInspector.UIString("DOM Mutation"),true,["DOMActivate","DOMFocusIn","DOMFocusOut","DOMAttrModified","DOMCharacterDataModified","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","DOMContentLoaded"]);this._createCategory(WebInspector.UIString("Device"),true,["deviceorientation","devicemotion"]);this._createCategory(WebInspector.UIString("Drag / drop"),true,["dragenter","dragover","dragleave","drop"]);this._createCategory(WebInspector.UIString("Keyboard"),true,["keydown","keyup","keypress","input"]);this._createCategory(WebInspector.UIString("Load"),true,["load","beforeunload","unload","abort","error","hashchange","popstate"]);this._createCategory(WebInspector.UIString("Mouse"),true,["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout","mousewheel","wheel"]);this._createCategory(WebInspector.UIString("Timer"),false,["setTimer","clearTimer","timerFired"]);this._createCategory(WebInspector.UIString("Touch"),true,["touchstart","touchmove","touchend","touchcancel"]);this._createCategory(WebInspector.UIString("WebGL"),false,["webglErrorFired","webglWarningFired"]);this._restoreBreakpoints();}
 WebInspector.EventListenerBreakpointsSidebarPane.categotyListener="listener:";WebInspector.EventListenerBreakpointsSidebarPane.categotyInstrumentation="instrumentation:";WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI=function(eventName,auxData)
 {if(!WebInspector.EventListenerBreakpointsSidebarPane._eventNamesForUI){WebInspector.EventListenerBreakpointsSidebarPane._eventNamesForUI={"instrumentation:setTimer":WebInspector.UIString("Set Timer"),"instrumentation:clearTimer":WebInspector.UIString("Clear Timer"),"instrumentation:timerFired":WebInspector.UIString("Timer Fired"),"instrumentation:requestAnimationFrame":WebInspector.UIString("Request Animation Frame"),"instrumentation:cancelAnimationFrame":WebInspector.UIString("Cancel Animation Frame"),"instrumentation:animationFrameFired":WebInspector.UIString("Animation Frame Fired"),"instrumentation:webglErrorFired":WebInspector.UIString("WebGL Error Fired"),"instrumentation:webglWarningFired":WebInspector.UIString("WebGL Warning Fired")};}
 if(auxData){if(eventName==="instrumentation:webglErrorFired"&&auxData["webglErrorName"]){var errorName=auxData["webglErrorName"];errorName=errorName.replace(/^.*(0x[0-9a-f]+).*$/i,"$1");return WebInspector.UIString("WebGL Error Fired (%s)",errorName);}}
@@ -108,11 +108,13 @@ breakpoints.push({eventName:eventName});}
 WebInspector.settings.eventListenerBreakpoints.set(breakpoints);},_restoreBreakpoints:function()
 {var breakpoints=WebInspector.settings.eventListenerBreakpoints.get();for(var i=0;i<breakpoints.length;++i){var breakpoint=breakpoints[i];if(breakpoint&&typeof breakpoint.eventName==="string")
 this._setBreakpoint(breakpoint.eventName);}},__proto__:WebInspector.SidebarPane.prototype};WebInspector.CallStackSidebarPane=function()
-{WebInspector.SidebarPane.call(this,WebInspector.UIString("Call Stack"));this.bodyElement.addEventListener("keydown",this._keyDown.bind(this),true);this.bodyElement.tabIndex=0;var asyncCheckbox=this.titleElement.appendChild(WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIString("Async"),WebInspector.settings.enableAsyncStackTraces,true,undefined,WebInspector.UIString("Capture async stack traces")));asyncCheckbox.classList.add("scripts-callstack-async");asyncCheckbox.addEventListener("click",consumeEvent,false);WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncStackTracesStateChanged,this);}
+{WebInspector.SidebarPane.call(this,WebInspector.UIString("Call Stack"));this.bodyElement.addEventListener("keydown",this._keyDown.bind(this),true);this.bodyElement.tabIndex=0;var asyncCheckbox=this.titleElement.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Async"),WebInspector.settings.enableAsyncStackTraces,true,undefined,WebInspector.UIString("Capture async stack traces")));asyncCheckbox.classList.add("scripts-callstack-async");asyncCheckbox.addEventListener("click",consumeEvent,false);WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncStackTracesStateChanged,this);}
 WebInspector.CallStackSidebarPane.Events={CallFrameRestarted:"CallFrameRestarted",CallFrameSelected:"CallFrameSelected"}
 WebInspector.CallStackSidebarPane.prototype={update:function(callFrames,asyncStackTrace)
 {this.bodyElement.removeChildren();delete this._statusMessageElement;this.placards=[];if(!callFrames){var infoElement=this.bodyElement.createChild("div","info");infoElement.textContent=WebInspector.UIString("Not Paused");return;}
-this._appendSidebarPlacards(callFrames);while(asyncStackTrace){var title="["+(asyncStackTrace.description||WebInspector.UIString("Async Call"))+"]";var asyncPlacard=new WebInspector.Placard(title,"");this.bodyElement.appendChild(asyncPlacard.element);this._appendSidebarPlacards(asyncStackTrace.callFrames,asyncPlacard);asyncStackTrace=asyncStackTrace.asyncStackTrace;}},_appendSidebarPlacards:function(callFrames,asyncPlacard)
+this._appendSidebarPlacards(callFrames);while(asyncStackTrace){var title=asyncStackTrace.description;if(title)
+title+=" "+WebInspector.UIString("(async)");else
+title=WebInspector.UIString("Async Call");var asyncPlacard=new WebInspector.Placard(title,"");asyncPlacard.element.classList.add("placard-label");this.bodyElement.appendChild(asyncPlacard.element);this._appendSidebarPlacards(asyncStackTrace.callFrames,asyncPlacard);asyncStackTrace=asyncStackTrace.asyncStackTrace;}},_appendSidebarPlacards:function(callFrames,asyncPlacard)
 {for(var i=0,n=callFrames.length;i<n;++i){var placard=new WebInspector.CallStackSidebarPane.Placard(callFrames[i],asyncPlacard);placard.element.addEventListener("click",this._placardSelected.bind(this,placard),false);placard.element.addEventListener("contextmenu",this._placardContextMenu.bind(this,placard),true);if(!i&&asyncPlacard){asyncPlacard.element.addEventListener("click",this._placardSelected.bind(this,placard),false);asyncPlacard.element.addEventListener("contextmenu",this._placardContextMenu.bind(this,placard),true);}
 this.placards.push(placard);this.bodyElement.appendChild(placard.element);}},_placardContextMenu:function(placard,event)
 {var contextMenu=new WebInspector.ContextMenu(event);if(!placard._callFrame.isAsync())
@@ -171,8 +173,8 @@ return false;var revealIndex=this._activeEntryIndex-1;while(revealIndex>=0&&!thi
 return false;this.readOnlyLock();this._entries[revealIndex].reveal();this.releaseReadOnlyLock();this._activeEntryIndex=revealIndex;return true;},rollover:function()
 {var revealIndex=this._activeEntryIndex+1;while(revealIndex<this._entries.length&&!this._entries[revealIndex].valid())
 ++revealIndex;if(revealIndex>=this._entries.length)
-return false;this.readOnlyLock();this._entries[revealIndex].reveal();this.releaseReadOnlyLock();this._activeEntryIndex=revealIndex;return true;},};;WebInspector.EditingLocationHistoryManager=function(sourcesPanel,currentSourceFrameCallback)
-{this._sourcesPanel=sourcesPanel;this._historyManager=new WebInspector.SimpleHistoryManager(WebInspector.EditingLocationHistoryManager.HistoryDepth);this._currentSourceFrameCallback=currentSourceFrameCallback;}
+return false;this.readOnlyLock();this._entries[revealIndex].reveal();this.releaseReadOnlyLock();this._activeEntryIndex=revealIndex;return true;},};;WebInspector.EditingLocationHistoryManager=function(sourcesView,currentSourceFrameCallback)
+{this._sourcesView=sourcesView;this._historyManager=new WebInspector.SimpleHistoryManager(WebInspector.EditingLocationHistoryManager.HistoryDepth);this._currentSourceFrameCallback=currentSourceFrameCallback;}
 WebInspector.EditingLocationHistoryManager.HistoryDepth=20;WebInspector.EditingLocationHistoryManager.prototype={trackSourceFrameCursorJumps:function(sourceFrame)
 {sourceFrame.addEventListener(WebInspector.SourceFrame.Events.JumpHappened,this._onJumpHappened.bind(this));},_onJumpHappened:function(event)
 {if(event.data.from)
@@ -186,21 +188,21 @@ return;this._updateActiveState(sourceFrame.textEditor.selection());},pushNewStat
 return;this._pushActiveState(sourceFrame.textEditor.selection());},_updateActiveState:function(selection)
 {var active=this._historyManager.active();if(!active)
 return;var sourceFrame=this._currentSourceFrameCallback();if(!sourceFrame)
-return;var entry=new WebInspector.EditingLocationHistoryEntry(this._sourcesPanel,this,sourceFrame,selection);active.merge(entry);},_pushActiveState:function(selection)
+return;var entry=new WebInspector.EditingLocationHistoryEntry(this._sourcesView,this,sourceFrame,selection);active.merge(entry);},_pushActiveState:function(selection)
 {var sourceFrame=this._currentSourceFrameCallback();if(!sourceFrame)
-return;var entry=new WebInspector.EditingLocationHistoryEntry(this._sourcesPanel,this,sourceFrame,selection);this._historyManager.push(entry);},removeHistoryForSourceCode:function(uiSourceCode)
+return;var entry=new WebInspector.EditingLocationHistoryEntry(this._sourcesView,this,sourceFrame,selection);this._historyManager.push(entry);},removeHistoryForSourceCode:function(uiSourceCode)
 {function filterOut(entry)
 {return entry._projectId===uiSourceCode.project().id()&&entry._path===uiSourceCode.path();}
 this._historyManager.filterOut(filterOut);},}
-WebInspector.EditingLocationHistoryEntry=function(sourcesPanel,editingLocationManager,sourceFrame,selection)
-{this._sourcesPanel=sourcesPanel;this._editingLocationManager=editingLocationManager;var uiSourceCode=sourceFrame.uiSourceCode();this._projectId=uiSourceCode.project().id();this._path=uiSourceCode.path();var position=this._positionFromSelection(selection);this._positionHandle=sourceFrame.textEditor.textEditorPositionHandle(position.lineNumber,position.columnNumber);}
+WebInspector.EditingLocationHistoryEntry=function(sourcesView,editingLocationManager,sourceFrame,selection)
+{this._sourcesView=sourcesView;this._editingLocationManager=editingLocationManager;var uiSourceCode=sourceFrame.uiSourceCode();this._projectId=uiSourceCode.project().id();this._path=uiSourceCode.path();var position=this._positionFromSelection(selection);this._positionHandle=sourceFrame.textEditor.textEditorPositionHandle(position.lineNumber,position.columnNumber);}
 WebInspector.EditingLocationHistoryEntry.prototype={merge:function(entry)
 {if(this._projectId!==entry._projectId||this._path!==entry._path)
 return;this._positionHandle=entry._positionHandle;},_positionFromSelection:function(selection)
 {return{lineNumber:selection.endLine,columnNumber:selection.endColumn};},valid:function()
 {var position=this._positionHandle.resolve();var uiSourceCode=WebInspector.workspace.project(this._projectId).uiSourceCode(this._path);return!!(position&&uiSourceCode);},reveal:function()
 {var position=this._positionHandle.resolve();var uiSourceCode=WebInspector.workspace.project(this._projectId).uiSourceCode(this._path);if(!position||!uiSourceCode)
-return;this._editingLocationManager.updateCurrentState();this._sourcesPanel.showUISourceCode(uiSourceCode,position.lineNumber,position.columnNumber);}};;WebInspector.FilePathScoreFunction=function(query)
+return;this._editingLocationManager.updateCurrentState();this._sourcesView.showSourceLocation(uiSourceCode,position.lineNumber,position.columnNumber);}};;WebInspector.FilePathScoreFunction=function(query)
 {this._query=query;this._queryUpperCase=query.toUpperCase();this._score=null;this._sequence=null;this._dataUpperCase="";this._fileNameIndex=0;}
 WebInspector.FilePathScoreFunction.filterRegex=function(query)
 {const toEscape=String.regexSpecialCharacters();var regexString="";for(var i=0;i<query.length;++i){var c=query.charAt(i);if(toEscape.indexOf(c)!==-1)
@@ -230,9 +232,10 @@ score+=5;score+=sequenceLength*4;return score;},_match:function(query,data,i,j,c
 return 0;if(!consecutiveMatch)
 return this._singleCharScore(query,data,i,j);else
 return this._sequenceCharScore(query,data,i,j-consecutiveMatch,consecutiveMatch);},};WebInspector.FilteredItemSelectionDialog=function(delegate)
-{WebInspector.DialogDelegate.call(this);var xhr=new XMLHttpRequest();xhr.open("GET","filteredItemSelectionDialog.css",false);xhr.send(null);this.element=document.createElement("div");this.element.className="filtered-item-list-dialog";this.element.addEventListener("keydown",this._onKeyDown.bind(this),false);var styleElement=this.element.createChild("style");styleElement.type="text/css";styleElement.textContent=xhr.responseText;this._promptElement=this.element.createChild("input","monospace");this._promptElement.addEventListener("input",this._onInput.bind(this),false);this._promptElement.type="text";this._promptElement.setAttribute("spellcheck","false");this._filteredItems=[];this._viewportControl=new WebInspector.ViewportControl(this);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.element.appendChild(this._itemElementsContainer);this._delegate=delegate;this._delegate.setRefreshCallback(this._itemsLoaded.bind(this));this._itemsLoaded();this._shouldShowMatchingItems=true;}
+{WebInspector.DialogDelegate.call(this);if(!WebInspector.FilteredItemSelectionDialog._stylesLoaded){WebInspector.View.createStyleElement("filteredItemSelectionDialog.css");WebInspector.FilteredItemSelectionDialog._stylesLoaded=true;}
+this.element=document.createElement("div");this.element.className="filtered-item-list-dialog";this.element.addEventListener("keydown",this._onKeyDown.bind(this),false);this._promptElement=this.element.createChild("input","monospace");this._promptElement.addEventListener("input",this._onInput.bind(this),false);this._promptElement.type="text";this._promptElement.setAttribute("spellcheck","false");this._filteredItems=[];this._viewportControl=new WebInspector.ViewportControl(this);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.element.appendChild(this._itemElementsContainer);this._delegate=delegate;this._delegate.setRefreshCallback(this._itemsLoaded.bind(this));this._itemsLoaded();}
 WebInspector.FilteredItemSelectionDialog.prototype={position:function(element,relativeToElement)
-{const minWidth=500;const minHeight=204;var width=Math.max(relativeToElement.offsetWidth*2/3,minWidth);var height=Math.max(relativeToElement.offsetHeight*2/3,minHeight);this.element.style.width=width+"px";const shadowPadding=20;element.positionAt(relativeToElement.totalOffsetLeft()+Math.max((relativeToElement.offsetWidth-width-2*shadowPadding)/2,shadowPadding),relativeToElement.totalOffsetTop()+Math.max((relativeToElement.offsetHeight-height-2*shadowPadding)/2,shadowPadding));this._dialogHeight=height;this._updateShowMatchingItems();},focus:function()
+{const shadow=10;const shadowPadding=20;var container=WebInspector.Dialog.modalHostView().element;var preferredWidth=Math.max(relativeToElement.offsetWidth*2/3,500);var width=Math.min(preferredWidth,container.offsetWidth-2*shadowPadding);var preferredHeight=Math.max(relativeToElement.offsetHeight*2/3,204);var height=Math.min(preferredHeight,container.offsetHeight-2*shadowPadding);this.element.style.width=width+"px";var box=relativeToElement.boxInWindow(window).relativeToElement(container);var positionX=box.x+Math.max((box.width-width-2*shadowPadding)/2,shadow);positionX=Math.max(shadow,Math.min(container.offsetWidth-width-2*shadowPadding,positionX));var positionY=box.y+Math.max((box.height-height-2*shadowPadding)/2,shadow);positionY=Math.max(shadow,Math.min(container.offsetHeight-height-2*shadowPadding,positionY));element.positionAt(positionX,positionY,container);this._dialogHeight=height;this._updateShowMatchingItems();},focus:function()
 {WebInspector.setCurrentFocusElement(this._promptElement);if(this._filteredItems.length&&this._viewportControl.lastVisibleIndex()===-1)
 this._viewportControl.refresh();},willHide:function()
 {if(this._isHiding)
@@ -240,11 +243,11 @@ return;this._isHiding=true;this._delegate.dispose();if(this._filterTimer)
 clearTimeout(this._filterTimer);},renderAsTwoRows:function()
 {this._renderAsTwoRows=true;},onEnter:function()
 {if(!this._delegate.itemCount())
-return;this._delegate.selectItem(this._filteredItems[this._selectedIndexInFiltered],this._promptElement.value.trim());},_itemsLoaded:function()
+return;var selectedIndex=this._selectedIndexInFiltered<this._filteredItems.length?this._filteredItems[this._selectedIndexInFiltered]:null;this._delegate.selectItem(selectedIndex,this._promptElement.value.trim());},_itemsLoaded:function()
 {if(this._loadTimeout)
 return;this._loadTimeout=setTimeout(this._updateAfterItemsLoaded.bind(this),0);},_updateAfterItemsLoaded:function()
 {delete this._loadTimeout;this._filterItems();},_createItemElement:function(index)
-{var itemElement=document.createElement("div");itemElement.className="filtered-item-list-dialog-item "+(this._renderAsTwoRows?"two-rows":"one-row");itemElement._titleElement=itemElement.createChild("span");itemElement._titleSuffixElement=itemElement.createChild("span");itemElement._subtitleElement=itemElement.createChild("div","filtered-item-list-dialog-subtitle");itemElement._subtitleElement.textContent="\u200B";itemElement._index=index;this._delegate.renderItem(index,this._promptElement.value.trim(),itemElement._titleElement,itemElement._subtitleElement);return itemElement;},setQuery:function(query)
+{var itemElement=document.createElement("div");itemElement.className="filtered-item-list-dialog-item "+(this._renderAsTwoRows?"two-rows":"one-row");itemElement._titleElement=itemElement.createChild("div","filtered-item-list-dialog-title");itemElement._subtitleElement=itemElement.createChild("div","filtered-item-list-dialog-subtitle");itemElement._subtitleElement.textContent="\u200B";itemElement._index=index;this._delegate.renderItem(index,this._promptElement.value.trim(),itemElement._titleElement,itemElement._subtitleElement);return itemElement;},setQuery:function(query)
 {this._promptElement.value=query;this._scheduleFilter();},_filterItems:function()
 {delete this._filterTimer;if(this._scoringTimer){clearTimeout(this._scoringTimer);delete this._scoringTimer;}
 var query=this._delegate.rewriteQuery(this._promptElement.value.trim());this._query=query;var queryLength=query.length;var filterRegex=query?WebInspector.FilePathScoreFunction.filterRegex(query):null;var oldSelectedAbsoluteIndex=this._selectedIndexInFiltered?this._filteredItems[this._selectedIndexInFiltered]:null;var filteredItems=[];this._selectedIndexInFiltered=0;var bestScores=[];var bestItems=[];var bestItemsToCollect=100;var minBestScore=0;var overflowItems=[];scoreItems.call(this,0);function compareIntegers(a,b)
@@ -258,9 +261,10 @@ filteredItems.push(i);}
 if(i<this._delegate.itemCount()){this._scoringTimer=setTimeout(scoreItems.bind(this,i),0);return;}
 delete this._scoringTimer;this._filteredItems=bestItems.concat(overflowItems).concat(filteredItems);for(var i=0;i<this._filteredItems.length;++i){if(this._filteredItems[i]===oldSelectedAbsoluteIndex){this._selectedIndexInFiltered=i;break;}}
 this._viewportControl.refresh();if(!query)
-this._selectedIndexInFiltered=0;this._updateSelection(this._selectedIndexInFiltered,false);}},_onInput:function(event)
-{this._shouldShowMatchingItems=this._delegate.shouldShowMatchingItems(this._promptElement.value);this._updateShowMatchingItems();this._scheduleFilter();},_updateShowMatchingItems:function()
-{this._itemElementsContainer.enableStyleClass("hidden",!this._shouldShowMatchingItems);this.element.style.height=this._shouldShowMatchingItems?this._dialogHeight+"px":"auto";},_onKeyDown:function(event)
+this._selectedIndexInFiltered=0;this._updateSelection(this._selectedIndexInFiltered,false);}},_shouldShowMatchingItems:function()
+{return this._delegate.shouldShowMatchingItems(this._promptElement.value);},_onInput:function(event)
+{this._updateShowMatchingItems();this._scheduleFilter();},_updateShowMatchingItems:function()
+{var shouldShowMatchingItems=this._shouldShowMatchingItems();this._itemElementsContainer.classList.toggle("hidden",!shouldShowMatchingItems);this.element.style.height=shouldShowMatchingItems?this._dialogHeight+"px":"auto";},_onKeyDown:function(event)
 {var newSelectedIndex=this._selectedIndexInFiltered;switch(event.keyCode){case WebInspector.KeyboardShortcut.Keys.Down.code:if(++newSelectedIndex>=this._filteredItems.length)
 newSelectedIndex=this._filteredItems.length-1;this._updateSelection(newSelectedIndex,true);event.consume(true);break;case WebInspector.KeyboardShortcut.Keys.Up.code:if(--newSelectedIndex<0)
 newSelectedIndex=0;this._updateSelection(newSelectedIndex,false);event.consume(true);break;case WebInspector.KeyboardShortcut.Keys.PageDown.code:newSelectedIndex=Math.min(newSelectedIndex+this._viewportControl.rowsPerViewport(),this._filteredItems.length-1);this._updateSelection(newSelectedIndex,true);event.consume(true);break;case WebInspector.KeyboardShortcut.Keys.PageUp.code:newSelectedIndex=Math.max(newSelectedIndex-this._viewportControl.rowsPerViewport(),0);this._updateSelection(newSelectedIndex,false);event.consume(true);break;default:}},_scheduleFilter:function()
@@ -296,27 +300,27 @@ return false;},selectItem:function(itemIndex,promptValue)
 {this._refreshCallback();},rewriteQuery:function(query)
 {return query;},dispose:function()
 {}}
-WebInspector.JavaScriptOutlineDialog=function(view,contentProvider,selectItemCallback)
-{WebInspector.SelectionDialogContentProvider.call(this);this._functionItems=[];this._view=view;this._selectItemCallback=selectItemCallback;contentProvider.requestContent(this._contentAvailable.bind(this));}
-WebInspector.JavaScriptOutlineDialog.show=function(view,contentProvider,selectItemCallback)
+WebInspector.JavaScriptOutlineDialog=function(uiSourceCode,selectItemCallback)
+{WebInspector.SelectionDialogContentProvider.call(this);this._functionItems=[];this._selectItemCallback=selectItemCallback;this._outlineWorker=new Worker("ScriptFormatterWorker.js");this._outlineWorker.onmessage=this._didBuildOutlineChunk.bind(this);this._outlineWorker.postMessage({method:"javaScriptOutline",params:{content:uiSourceCode.workingCopy()}});}
+WebInspector.JavaScriptOutlineDialog.show=function(view,uiSourceCode,selectItemCallback)
 {if(WebInspector.Dialog.currentInstance())
-return null;var filteredItemSelectionDialog=new WebInspector.FilteredItemSelectionDialog(new WebInspector.JavaScriptOutlineDialog(view,contentProvider,selectItemCallback));WebInspector.Dialog.show(view.element,filteredItemSelectionDialog);}
-WebInspector.JavaScriptOutlineDialog.prototype={_contentAvailable:function(content)
-{this._outlineWorker=new Worker("ScriptFormatterWorker.js");this._outlineWorker.onmessage=this._didBuildOutlineChunk.bind(this);const method="outline";this._outlineWorker.postMessage({method:method,params:{content:content}});},_didBuildOutlineChunk:function(event)
-{var data=event.data;var chunk=data["chunk"];for(var i=0;i<chunk.length;++i)
-this._functionItems.push(chunk[i]);if(data.total===data.index)
+return null;var filteredItemSelectionDialog=new WebInspector.FilteredItemSelectionDialog(new WebInspector.JavaScriptOutlineDialog(uiSourceCode,selectItemCallback));WebInspector.Dialog.show(view.element,filteredItemSelectionDialog);}
+WebInspector.JavaScriptOutlineDialog.prototype={_didBuildOutlineChunk:function(event)
+{var data=(event.data);var chunk=data.chunk;for(var i=0;i<chunk.length;++i)
+this._functionItems.push(chunk[i]);if(data.total===data.index+1)
 this.dispose();this.refresh();},itemCount:function()
 {return this._functionItems.length;},itemKeyAt:function(itemIndex)
 {return this._functionItems[itemIndex].name;},itemScoreAt:function(itemIndex,query)
 {var item=this._functionItems[itemIndex];return-item.line;},renderItem:function(itemIndex,query,titleElement,subtitleElement)
 {var item=this._functionItems[itemIndex];titleElement.textContent=item.name+(item.arguments?item.arguments:"");this.highlightRanges(titleElement,query);subtitleElement.textContent=":"+(item.line+1);},selectItem:function(itemIndex,promptValue)
-{var lineNumber=this._functionItems[itemIndex].line;if(!isNaN(lineNumber)&&lineNumber>=0)
+{if(itemIndex===null)
+return;var lineNumber=this._functionItems[itemIndex].line;if(!isNaN(lineNumber)&&lineNumber>=0)
 this._selectItemCallback(lineNumber,this._functionItems[itemIndex].column);},dispose:function()
 {if(this._outlineWorker){this._outlineWorker.terminate();delete this._outlineWorker;}},__proto__:WebInspector.SelectionDialogContentProvider.prototype}
 WebInspector.SelectUISourceCodeDialog=function(defaultScores)
 {WebInspector.SelectionDialogContentProvider.call(this);this._uiSourceCodes=[];var projects=WebInspector.workspace.projects().filter(this.filterProject.bind(this));for(var i=0;i<projects.length;++i)
 this._uiSourceCodes=this._uiSourceCodes.concat(projects[i].uiSourceCodes());this._defaultScores=defaultScores;this._scorer=new WebInspector.FilePathScoreFunction("");WebInspector.workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded,this._uiSourceCodeAdded,this);}
-WebInspector.SelectUISourceCodeDialog.prototype={uiSourceCodeSelected:function(uiSourceCode,lineNumber)
+WebInspector.SelectUISourceCodeDialog.prototype={uiSourceCodeSelected:function(uiSourceCode,lineNumber,columnNumber)
 {},filterProject:function(project)
 {return true;},itemCount:function()
 {return this._uiSourceCodes.length;},itemKeyAt:function(itemIndex)
@@ -324,39 +328,41 @@ WebInspector.SelectUISourceCodeDialog.prototype={uiSourceCodeSelected:function(u
 {var uiSourceCode=this._uiSourceCodes[itemIndex];var score=this._defaultScores?(this._defaultScores.get(uiSourceCode)||0):0;if(!query||query.length<2)
 return score;if(this._query!==query){this._query=query;this._scorer=new WebInspector.FilePathScoreFunction(query);}
 var path=uiSourceCode.fullDisplayName();return score+10*this._scorer.score(path,null);},renderItem:function(itemIndex,query,titleElement,subtitleElement)
-{query=this.rewriteQuery(query);var uiSourceCode=this._uiSourceCodes[itemIndex];titleElement.textContent=uiSourceCode.displayName()+(this._queryLineNumber?this._queryLineNumber:"");subtitleElement.textContent=uiSourceCode.fullDisplayName().trimEnd(100);var indexes=[];var score=new WebInspector.FilePathScoreFunction(query).score(subtitleElement.textContent,indexes);var fileNameIndex=subtitleElement.textContent.lastIndexOf("/");var ranges=[];for(var i=0;i<indexes.length;++i)
+{query=this.rewriteQuery(query);var uiSourceCode=this._uiSourceCodes[itemIndex];titleElement.textContent=uiSourceCode.displayName()+(this._queryLineNumberAndColumnNumber||"");subtitleElement.textContent=uiSourceCode.fullDisplayName().trimEnd(100);var indexes=[];var score=new WebInspector.FilePathScoreFunction(query).score(subtitleElement.textContent,indexes);var fileNameIndex=subtitleElement.textContent.lastIndexOf("/");var ranges=[];for(var i=0;i<indexes.length;++i)
 ranges.push({offset:indexes[i],length:1});if(indexes[0]>fileNameIndex){for(var i=0;i<ranges.length;++i)
 ranges[i].offset-=fileNameIndex+1;return WebInspector.highlightRangesWithStyleClass(titleElement,ranges,"highlight");}else{return WebInspector.highlightRangesWithStyleClass(subtitleElement,ranges,"highlight");}},selectItem:function(itemIndex,promptValue)
-{if(/^:\d+$/.test(promptValue.trimRight())){var lineNumber=parseInt(promptValue.trimRight().substring(1),10)-1;if(!isNaN(lineNumber)&&lineNumber>=0)
-this.uiSourceCodeSelected(null,lineNumber);return;}
-var lineNumberMatch=promptValue.match(/[^:]+\:([\d]*)$/);var lineNumber=lineNumberMatch?Math.max(parseInt(lineNumberMatch[1],10)-1,0):undefined;this.uiSourceCodeSelected(this._uiSourceCodes[itemIndex],lineNumber);},rewriteQuery:function(query)
+{var parsedExpression=promptValue.trim().match(/^([^:]*)(:\d+)?(:\d+)?$/);if(!parsedExpression)
+return;var lineNumber;var columnNumber;if(parsedExpression[2])
+lineNumber=parseInt(parsedExpression[2].substr(1),10)-1;if(parsedExpression[3])
+columnNumber=parseInt(parsedExpression[3].substr(1),10)-1;var uiSourceCode=itemIndex!==null?this._uiSourceCodes[itemIndex]:null;this.uiSourceCodeSelected(uiSourceCode,lineNumber,columnNumber);},rewriteQuery:function(query)
 {if(!query)
-return query;query=query.trim();var lineNumberMatch=query.match(/([^:]+)(\:[\d]*)$/);this._queryLineNumber=lineNumberMatch?lineNumberMatch[2]:"";return lineNumberMatch?lineNumberMatch[1]:query;},_uiSourceCodeAdded:function(event)
+return query;query=query.trim();var lineNumberMatch=query.match(/^([^:]+)((?::[^:]*){0,2})$/);this._queryLineNumberAndColumnNumber=lineNumberMatch?lineNumberMatch[2]:"";return lineNumberMatch?lineNumberMatch[1]:query;},_uiSourceCodeAdded:function(event)
 {var uiSourceCode=(event.data);if(!this.filterProject(uiSourceCode.project()))
 return;this._uiSourceCodes.push(uiSourceCode)
 this.refresh();},dispose:function()
 {WebInspector.workspace.removeEventListener(WebInspector.Workspace.Events.UISourceCodeAdded,this._uiSourceCodeAdded,this);},__proto__:WebInspector.SelectionDialogContentProvider.prototype}
-WebInspector.OpenResourceDialog=function(panel,defaultScores)
-{WebInspector.SelectUISourceCodeDialog.call(this,defaultScores);this._panel=panel;}
-WebInspector.OpenResourceDialog.prototype={uiSourceCodeSelected:function(uiSourceCode,lineNumber)
+WebInspector.OpenResourceDialog=function(sourcesView,defaultScores)
+{WebInspector.SelectUISourceCodeDialog.call(this,defaultScores);this._sourcesView=sourcesView;}
+WebInspector.OpenResourceDialog.prototype={uiSourceCodeSelected:function(uiSourceCode,lineNumber,columnNumber)
 {if(!uiSourceCode)
-uiSourceCode=this._panel.currentUISourceCode();if(!uiSourceCode)
-return;this._panel.showUISourceCode(uiSourceCode,lineNumber);},shouldShowMatchingItems:function(query)
+uiSourceCode=this._sourcesView.currentUISourceCode();if(!uiSourceCode)
+return;this._sourcesView.showSourceLocation(uiSourceCode,lineNumber,columnNumber);},shouldShowMatchingItems:function(query)
 {return!query.startsWith(":");},filterProject:function(project)
 {return!project.isServiceProject();},__proto__:WebInspector.SelectUISourceCodeDialog.prototype}
-WebInspector.OpenResourceDialog.show=function(panel,relativeToElement,name,defaultScores)
+WebInspector.OpenResourceDialog.show=function(sourcesView,relativeToElement,query,defaultScores)
 {if(WebInspector.Dialog.currentInstance())
-return;var filteredItemSelectionDialog=new WebInspector.FilteredItemSelectionDialog(new WebInspector.OpenResourceDialog(panel,defaultScores));filteredItemSelectionDialog.renderAsTwoRows();if(name)
-filteredItemSelectionDialog.setQuery(name);WebInspector.Dialog.show(relativeToElement,filteredItemSelectionDialog);}
+return;var filteredItemSelectionDialog=new WebInspector.FilteredItemSelectionDialog(new WebInspector.OpenResourceDialog(sourcesView,defaultScores));filteredItemSelectionDialog.renderAsTwoRows();if(query)
+filteredItemSelectionDialog.setQuery(query);WebInspector.Dialog.show(relativeToElement,filteredItemSelectionDialog);}
 WebInspector.SelectUISourceCodeForProjectTypeDialog=function(type,callback)
 {this._type=type;WebInspector.SelectUISourceCodeDialog.call(this);this._callback=callback;}
-WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype={uiSourceCodeSelected:function(uiSourceCode,lineNumber)
+WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype={uiSourceCodeSelected:function(uiSourceCode,lineNumber,columnNumber)
 {this._callback(uiSourceCode);},filterProject:function(project)
 {return project.type()===this._type;},__proto__:WebInspector.SelectUISourceCodeDialog.prototype}
 WebInspector.SelectUISourceCodeForProjectTypeDialog.show=function(name,type,callback,relativeToElement)
 {if(WebInspector.Dialog.currentInstance())
-return;var filteredItemSelectionDialog=new WebInspector.FilteredItemSelectionDialog(new WebInspector.SelectUISourceCodeForProjectTypeDialog(type,callback));filteredItemSelectionDialog.setQuery(name);filteredItemSelectionDialog.renderAsTwoRows();WebInspector.Dialog.show(relativeToElement,filteredItemSelectionDialog);};WebInspector.UISourceCodeFrame=function(uiSourceCode)
-{this._uiSourceCode=uiSourceCode;WebInspector.SourceFrame.call(this,this._uiSourceCode);WebInspector.settings.textEditorAutocompletion.addChangeListener(this._enableAutocompletionIfNeeded,this);this._enableAutocompletionIfNeeded();this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.FormattedChanged,this._onFormattedChanged,this);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged,this._onWorkingCopyChanged,this);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted,this._onWorkingCopyCommitted,this);this._updateStyle();}
+return;var filteredItemSelectionDialog=new WebInspector.FilteredItemSelectionDialog(new WebInspector.SelectUISourceCodeForProjectTypeDialog(type,callback));filteredItemSelectionDialog.setQuery(name);filteredItemSelectionDialog.renderAsTwoRows();WebInspector.Dialog.show(relativeToElement,filteredItemSelectionDialog);}
+WebInspector.JavaScriptOutlineDialog.MessageEventData;;WebInspector.UISourceCodeFrame=function(uiSourceCode)
+{this._uiSourceCode=uiSourceCode;WebInspector.SourceFrame.call(this,this._uiSourceCode);WebInspector.settings.textEditorAutocompletion.addChangeListener(this._enableAutocompletionIfNeeded,this);this._enableAutocompletionIfNeeded();this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged,this._onWorkingCopyChanged,this);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted,this._onWorkingCopyCommitted,this);this._updateStyle();}
 WebInspector.UISourceCodeFrame.prototype={uiSourceCode:function()
 {return this._uiSourceCode;},_enableAutocompletionIfNeeded:function()
 {this.textEditor.setCompletionDictionary(WebInspector.settings.textEditorAutocompletion.get()?new WebInspector.SampleCompletionDictionary():null);},wasShown:function()
@@ -365,27 +371,25 @@ WebInspector.UISourceCodeFrame.prototype={uiSourceCode:function()
 {return this._uiSourceCode.isEditable();},_windowFocused:function(event)
 {this._checkContentUpdated();},_checkContentUpdated:function()
 {if(!this.loaded||!this.isShowing())
-return;this._uiSourceCode.checkContentUpdated();},commitEditing:function(text)
+return;this._uiSourceCode.checkContentUpdated();},commitEditing:function()
 {if(!this._uiSourceCode.isDirty())
 return;this._muteSourceCodeEvents=true;this._uiSourceCode.commitWorkingCopy(this._didEditContent.bind(this));delete this._muteSourceCodeEvents;},onTextChanged:function(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));delete this._muteSourceCodeEvents;},_didEditContent:function(error)
-{if(error){WebInspector.log(error,WebInspector.ConsoleMessage.MessageLevel.Error,true);return;}},beforeFormattedChange:function(){},_onFormattedChanged:function(event)
-{this.beforeFormattedChange();var content=(event.data.content);this._textEditor.setReadOnly(this._uiSourceCode.formatted());var selection=this._textEditor.selection();this._innerSetContent(content);var start=null;var end=null;if(this._uiSourceCode.formatted()){start=event.data.newFormatter.originalToFormatted(selection.startLine,selection.startColumn);end=event.data.newFormatter.originalToFormatted(selection.endLine,selection.endColumn);}else{start=event.data.oldFormatter.formattedToOriginal(selection.startLine,selection.startColumn);end=event.data.oldFormatter.formattedToOriginal(selection.endLine,selection.endColumn);}
-this.textEditor.setSelection(new WebInspector.TextRange(start[0],start[1],end[0],end[1]));this.textEditor.revealLine(start[0]);},_onWorkingCopyChanged:function(event)
+{if(error){WebInspector.console.log(error,WebInspector.ConsoleMessage.MessageLevel.Error,true);return;}},_onWorkingCopyChanged:function(event)
 {if(this._muteSourceCodeEvents)
 return;this._innerSetContent(this._uiSourceCode.workingCopy());this.onUISourceCodeContentChanged();},_onWorkingCopyCommitted:function(event)
 {if(!this._muteSourceCodeEvents){this._innerSetContent(this._uiSourceCode.workingCopy());this.onUISourceCodeContentChanged();}
 this._textEditor.markClean();this._updateStyle();},_updateStyle:function()
-{this.element.enableStyleClass("source-frame-unsaved-committed-changes",this._uiSourceCode.hasUnsavedCommittedChanges());},onUISourceCodeContentChanged:function()
+{this.element.classList.toggle("source-frame-unsaved-committed-changes",this._uiSourceCode.hasUnsavedCommittedChanges());},onUISourceCodeContentChanged:function()
 {},_innerSetContent:function(content)
 {this._isSettingContent=true;this.setContent(content);delete this._isSettingContent;},populateTextAreaContextMenu:function(contextMenu,lineNumber)
 {WebInspector.SourceFrame.prototype.populateTextAreaContextMenu.call(this,contextMenu,lineNumber);contextMenu.appendApplicableItems(this._uiSourceCode);contextMenu.appendSeparator();},dispose:function()
 {this.detach();},__proto__:WebInspector.SourceFrame.prototype};WebInspector.JavaScriptSourceFrame=function(scriptsPanel,uiSourceCode)
 {this._scriptsPanel=scriptsPanel;this._breakpointManager=WebInspector.breakpointManager;this._uiSourceCode=uiSourceCode;WebInspector.UISourceCodeFrame.call(this,uiSourceCode);if(uiSourceCode.project().type()===WebInspector.projectTypes.Debugger)
-this.element.classList.add("source-frame-debugger-script");this._popoverHelper=new WebInspector.ObjectPopoverHelper(this.textEditor.element,this._getPopoverAnchor.bind(this),this._resolveObjectForPopover.bind(this),this._onHidePopover.bind(this),true);this.textEditor.element.addEventListener("keydown",this._onKeyDown.bind(this),true);this.textEditor.addEventListener(WebInspector.TextEditor.Events.GutterClick,this._handleGutterClick.bind(this),this);this.textEditor.element.addEventListener("mousedown",this._onMouseDownAndClick.bind(this,true),true);this.textEditor.element.addEventListener("click",this._onMouseDownAndClick.bind(this,false),true);this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded,this._breakpointAdded,this);this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved,this._breakpointRemoved,this);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.ConsoleMessageAdded,this._consoleMessageAdded,this);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.ConsoleMessageRemoved,this._consoleMessageRemoved,this);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.ConsoleMessagesCleared,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._registerShortcuts();this._updateScriptFile();}
+this.element.classList.add("source-frame-debugger-script");this._popoverHelper=new WebInspector.ObjectPopoverHelper(this.textEditor.element,this._getPopoverAnchor.bind(this),this._resolveObjectForPopover.bind(this),this._onHidePopover.bind(this),true);this.textEditor.element.addEventListener("keydown",this._onKeyDown.bind(this),true);this.textEditor.addEventListener(WebInspector.TextEditor.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);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.ConsoleMessageAdded,this._consoleMessageAdded,this);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.ConsoleMessageRemoved,this._consoleMessageRemoved,this);this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.ConsoleMessagesCleared,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._registerShortcuts();this._updateScriptFile();}
 WebInspector.JavaScriptSourceFrame.prototype={_registerShortcuts:function()
 {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));}
 for(var i=0;i<shortcutKeys.AddSelectionToWatch.length;++i){var keyDescriptor=shortcutKeys.AddSelectionToWatch[i];this.addShortcut(keyDescriptor.key,this._addCurrentSelectionToWatch.bind(this));}},_addCurrentSelectionToWatch:function()
@@ -393,14 +397,15 @@ for(var i=0;i<shortcutKeys.AddSelectionToWatch.length;++i){var keyDescriptor=sho
 this._innerAddToWatch(this.textEditor.copyRange(textSelection));},_innerAddToWatch:function(expression)
 {this._scriptsPanel.addToWatch(expression);},_evaluateSelectionInConsole:function()
 {var selection=this.textEditor.selection();if(!selection||selection.isEmpty())
-return false;WebInspector.evaluateInConsole(this.textEditor.copyRange(selection));return true;},wasShown:function()
+return false;this._evaluateInConsole(this.textEditor.copyRange(selection));return true;},_evaluateInConsole:function(expression)
+{WebInspector.console.evaluate(expression);},wasShown:function()
 {WebInspector.UISourceCodeFrame.prototype.wasShown.call(this);},willHide:function()
 {WebInspector.UISourceCodeFrame.prototype.willHide.call(this);this._popoverHelper.hidePopover();},onUISourceCodeContentChanged:function()
 {this._removeAllBreakpoints();WebInspector.UISourceCodeFrame.prototype.onUISourceCodeContentChanged.call(this);},populateLineGutterContextMenu:function(contextMenu,lineNumber)
-{contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Continue to here":"Continue to Here"),this._continueToLine.bind(this,lineNumber));var breakpoint=this._breakpointManager.findBreakpoint(this._uiSourceCode,lineNumber);if(!breakpoint){contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Add breakpoint":"Add Breakpoint"),this._setBreakpoint.bind(this,lineNumber,"",true));contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Add conditional breakpoint…":"Add Conditional Breakpoint…"),this._editBreakpointCondition.bind(this,lineNumber));}else{contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Remove breakpoint":"Remove Breakpoint"),breakpoint.remove.bind(breakpoint));contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Edit breakpoint…":"Edit Breakpoint…"),this._editBreakpointCondition.bind(this,lineNumber,breakpoint));if(breakpoint.enabled())
+{contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Continue to here":"Continue to Here"),this._continueToLine.bind(this,lineNumber));var breakpoint=this._breakpointManager.findBreakpointOnLine(this._uiSourceCode,lineNumber);if(!breakpoint){contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Add breakpoint":"Add Breakpoint"),this._setBreakpoint.bind(this,lineNumber,0,"",true));contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Add conditional breakpoint…":"Add Conditional Breakpoint…"),this._editBreakpointCondition.bind(this,lineNumber));}else{contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Remove breakpoint":"Remove Breakpoint"),breakpoint.remove.bind(breakpoint));contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Edit breakpoint…":"Edit Breakpoint…"),this._editBreakpointCondition.bind(this,lineNumber,breakpoint));if(breakpoint.enabled())
 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Disable breakpoint":"Disable Breakpoint"),breakpoint.setEnabled.bind(breakpoint,false));else
 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Enable breakpoint":"Enable Breakpoint"),breakpoint.setEnabled.bind(breakpoint,true));}},populateTextAreaContextMenu:function(contextMenu,lineNumber)
-{var textSelection=this.textEditor.selection();if(textSelection&&!textSelection.isEmpty()){var selection=this.textEditor.copyRange(textSelection);var addToWatchLabel=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Add to watch":"Add to Watch");contextMenu.appendItem(addToWatchLabel,this._innerAddToWatch.bind(this,selection));var evaluateLabel=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Evaluate in console":"Evaluate in Console");contextMenu.appendItem(evaluateLabel,WebInspector.evaluateInConsole.bind(WebInspector,selection));contextMenu.appendSeparator();}else if(!this._uiSourceCode.isEditable()&&this._uiSourceCode.contentType()===WebInspector.resourceTypes.Script){var liveEditLabel=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Live edit":"Live Edit");contextMenu.appendItem(liveEditLabel,liveEdit.bind(this));contextMenu.appendSeparator();}
+{var textSelection=this.textEditor.selection();if(textSelection&&!textSelection.isEmpty()){var selection=this.textEditor.copyRange(textSelection);var addToWatchLabel=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Add to watch":"Add to Watch");contextMenu.appendItem(addToWatchLabel,this._innerAddToWatch.bind(this,selection));var evaluateLabel=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Evaluate in console":"Evaluate in Console");contextMenu.appendItem(evaluateLabel,this._evaluateInConsole.bind(this,selection));contextMenu.appendSeparator();}else if(!this._uiSourceCode.isEditable()&&this._uiSourceCode.contentType()===WebInspector.resourceTypes.Script){var liveEditLabel=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Live edit":"Live Edit");contextMenu.appendItem(liveEditLabel,liveEdit.bind(this));contextMenu.appendSeparator();}
 function liveEdit()
 {var liveEditUISourceCode=WebInspector.liveEditSupport.uiSourceCodeForLiveEdit(this._uiSourceCode);this._scriptsPanel.showUISourceCode(liveEditUISourceCode,lineNumber)}
 WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu.call(this,contextMenu,lineNumber);},_workingCopyChanged:function(event)
@@ -416,12 +421,12 @@ return;this._restoreBreakpointsAfterEditing();},_didDivergeFromVM:function()
 return;this._muteBreakpointsWhileEditing();},_muteBreakpointsWhileEditing:function()
 {if(this._muted)
 return;for(var lineNumber=0;lineNumber<this._textEditor.linesCount;++lineNumber){var breakpointDecoration=this._textEditor.getAttribute(lineNumber,"breakpoint");if(!breakpointDecoration)
-continue;this._removeBreakpointDecoration(lineNumber);this._addBreakpointDecoration(lineNumber,breakpointDecoration.condition,breakpointDecoration.enabled,true);}
+continue;this._removeBreakpointDecoration(lineNumber);this._addBreakpointDecoration(lineNumber,breakpointDecoration.columnNumber,breakpointDecoration.condition,breakpointDecoration.enabled,true);}
 this._muted=true;},_supportsEnabledBreakpointsWhileEditing:function()
 {return this._uiSourceCode.project().type()===WebInspector.projectTypes.Snippets;},_restoreBreakpointsAfterEditing:function()
 {delete this._muted;var breakpoints={};for(var lineNumber=0;lineNumber<this._textEditor.linesCount;++lineNumber){var breakpointDecoration=this._textEditor.getAttribute(lineNumber,"breakpoint");if(breakpointDecoration){breakpoints[lineNumber]=breakpointDecoration;this._removeBreakpointDecoration(lineNumber);}}
 this._removeAllBreakpoints();for(var lineNumberString in breakpoints){var lineNumber=parseInt(lineNumberString,10);if(isNaN(lineNumber))
-continue;var breakpointDecoration=breakpoints[lineNumberString];this._setBreakpoint(lineNumber,breakpointDecoration.condition,breakpointDecoration.enabled);}},_removeAllBreakpoints:function()
+continue;var breakpointDecoration=breakpoints[lineNumberString];this._setBreakpoint(lineNumber,breakpointDecoration.columnNumber,breakpointDecoration.condition,breakpointDecoration.enabled);}},_removeAllBreakpoints:function()
 {var breakpoints=this._breakpointManager.breakpointsForUISourceCode(this._uiSourceCode);for(var i=0;i<breakpoints.length;++i)
 breakpoints[i].remove();},_getPopoverAnchor:function(element,event)
 {if(!WebInspector.debuggerModel.isPaused())
@@ -429,7 +434,7 @@ return null;var textPosition=this.textEditor.coordinatesToCursorPosition(event.x
 return null;var mouseLine=textPosition.startLine;var mouseColumn=textPosition.startColumn;var textSelection=this.textEditor.selection().normalize();if(textSelection&&!textSelection.isEmpty()){if(textSelection.startLine!==textSelection.endLine||textSelection.startLine!==mouseLine||mouseColumn<textSelection.startColumn||mouseColumn>textSelection.endColumn)
 return null;var leftCorner=this.textEditor.cursorPositionToCoordinates(textSelection.startLine,textSelection.startColumn);var rightCorner=this.textEditor.cursorPositionToCoordinates(textSelection.endLine,textSelection.endColumn);var anchorBox=new AnchorBox(leftCorner.x,leftCorner.y,rightCorner.x-leftCorner.x,leftCorner.height);anchorBox.highlight={lineNumber:textSelection.startLine,startColumn:textSelection.startColumn,endColumn:textSelection.endColumn-1};anchorBox.forSelection=true;return anchorBox;}
 var token=this.textEditor.tokenAtTextPosition(textPosition.startLine,textPosition.startColumn);if(!token)
-return null;var lineNumber=textPosition.startLine;var line=this.textEditor.line(lineNumber);var tokenContent=line.substring(token.startColumn,token.endColumn+1);if(token.type!=="javascript-ident"&&(token.type!=="javascript-keyword"||tokenContent!=="this"))
+return null;var lineNumber=textPosition.startLine;var line=this.textEditor.line(lineNumber);var tokenContent=line.substring(token.startColumn,token.endColumn+1);var isIdentifier=token.type.startsWith("js-variable")||token.type.startsWith("js-property")||token.type=="js-def";if(!isIdentifier&&(token.type!=="js-keyword"||tokenContent!=="this"))
 return null;var leftCorner=this.textEditor.cursorPositionToCoordinates(lineNumber,token.startColumn);var rightCorner=this.textEditor.cursorPositionToCoordinates(lineNumber,token.endColumn+1);var anchorBox=new AnchorBox(leftCorner.x,leftCorner.y,rightCorner.x-leftCorner.x,leftCorner.height);anchorBox.highlight={lineNumber:lineNumber,startColumn:token.startColumn,endColumn:token.endColumn};return anchorBox;},_resolveObjectForPopover:function(anchorBox,showCallback,objectGroupName)
 {function showObjectPopover(result,wasThrown)
 {if(!WebInspector.debuggerModel.isPaused()||!result){this._popoverHelper.hidePopover();return;}
@@ -440,43 +445,31 @@ startHighlight=token.startColumn;}}
 var evaluationText=line.substring(startHighlight,endHighlight+1);var selectedCallFrame=WebInspector.debuggerModel.selectedCallFrame();selectedCallFrame.evaluate(evaluationText,objectGroupName,false,true,false,false,showObjectPopover.bind(this));},_onHidePopover:function()
 {if(!this._popoverAnchorBox)
 return;if(this._popoverAnchorBox._highlightDescriptor)
-this.textEditor.removeHighlight(this._popoverAnchorBox._highlightDescriptor);delete this._popoverAnchorBox;},_addBreakpointDecoration:function(lineNumber,condition,enabled,mutedWhileEditing)
-{var breakpoint={condition:condition,enabled:enabled};this.textEditor.setAttribute(lineNumber,"breakpoint",breakpoint);var disabled=!enabled||mutedWhileEditing;this.textEditor.addBreakpoint(lineNumber,disabled,!!condition);},_removeBreakpointDecoration:function(lineNumber)
+this.textEditor.removeHighlight(this._popoverAnchorBox._highlightDescriptor);delete this._popoverAnchorBox;},_addBreakpointDecoration:function(lineNumber,columnNumber,condition,enabled,mutedWhileEditing)
+{var breakpoint={condition:condition,enabled:enabled,columnNumber:columnNumber};this.textEditor.setAttribute(lineNumber,"breakpoint",breakpoint);var disabled=!enabled||mutedWhileEditing;this.textEditor.addBreakpoint(lineNumber,disabled,!!condition);},_removeBreakpointDecoration:function(lineNumber)
 {this.textEditor.removeAttribute(lineNumber,"breakpoint");this.textEditor.removeBreakpoint(lineNumber);},_onKeyDown:function(event)
-{if(event.keyIdentifier==="U+001B"){if(this._popoverHelper.isPopoverVisible()){this._popoverHelper.hidePopover();event.consume();return;}
-if(this._stepIntoMarkup&&WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event)){this._stepIntoMarkup.stoptIteratingSelection();event.consume();return;}}},_editBreakpointCondition:function(lineNumber,breakpoint)
+{if(event.keyIdentifier==="U+001B"){if(this._popoverHelper.isPopoverVisible()){this._popoverHelper.hidePopover();event.consume();}}},_editBreakpointCondition:function(lineNumber,breakpoint)
 {this._conditionElement=this._createConditionElement(lineNumber);this.textEditor.addDecoration(lineNumber,this._conditionElement);function finishEditing(committed,element,newText)
 {this.textEditor.removeDecoration(lineNumber,this._conditionElement);delete this._conditionEditorElement;delete this._conditionElement;if(!committed)
 return;if(breakpoint)
 breakpoint.setCondition(newText);else
-this._setBreakpoint(lineNumber,newText,true);}
-var config=new WebInspector.EditingConfig(finishEditing.bind(this,true),finishEditing.bind(this,false));WebInspector.startEditing(this._conditionEditorElement,config);this._conditionEditorElement.value=breakpoint?breakpoint.condition():"";this._conditionEditorElement.select();},_createConditionElement:function(lineNumber)
-{var conditionElement=document.createElement("div");conditionElement.className="source-frame-breakpoint-condition";var labelElement=document.createElement("label");labelElement.className="source-frame-breakpoint-message";labelElement.htmlFor="source-frame-breakpoint-condition";labelElement.appendChild(document.createTextNode(WebInspector.UIString("The breakpoint on line %d will stop only if this expression is true:",lineNumber)));conditionElement.appendChild(labelElement);var editorElement=document.createElement("input");editorElement.id="source-frame-breakpoint-condition";editorElement.className="monospace";editorElement.type="text";conditionElement.appendChild(editorElement);this._conditionEditorElement=editorElement;return conditionElement;},setExecutionLine:function(lineNumber,callFrame)
-{this._executionLineNumber=lineNumber;this._executionCallFrame=callFrame;if(this.loaded){this.textEditor.setExecutionLine(lineNumber);if(WebInspector.experimentsSettings.stepIntoSelection.isEnabled())
-callFrame.getStepIntoLocations(locationsCallback.bind(this));}
-function locationsCallback(locations)
-{if(this._executionCallFrame!==callFrame||this._stepIntoMarkup)
-return;this._stepIntoMarkup=WebInspector.JavaScriptSourceFrame.StepIntoMarkup.create(this,locations);if(this._stepIntoMarkup)
-this._stepIntoMarkup.show();}},clearExecutionLine:function()
-{if(this._stepIntoMarkup){this._stepIntoMarkup.dispose();delete this._stepIntoMarkup;}
-if(this.loaded&&typeof this._executionLineNumber==="number")
-this.textEditor.clearExecutionLine();delete this._executionLineNumber;delete this._executionCallFrame;},_lineNumberAfterEditing:function(lineNumber,oldRange,newRange)
-{var shiftOffset=lineNumber<=oldRange.startLine?0:newRange.linesCount-oldRange.linesCount;if(lineNumber===oldRange.startLine){var whiteSpacesRegex=/^[\s\xA0]*$/;for(var i=0;lineNumber+i<=newRange.endLine;++i){if(!whiteSpacesRegex.test(this.textEditor.line(lineNumber+i))){shiftOffset=i;break;}}}
-var newLineNumber=Math.max(0,lineNumber+shiftOffset);if(oldRange.startLine<lineNumber&&lineNumber<oldRange.endLine)
-newLineNumber=oldRange.startLine;return newLineNumber;},_onMouseDownAndClick:function(isMouseDown,event)
-{var markup=this._stepIntoMarkup;if(!markup)
-return;var index=markup.findItemByCoordinates(event.x,event.y);if(typeof index==="undefined")
-return;if(isMouseDown){event.consume();}else{var rawLocation=markup.getRawPosition(index);this._scriptsPanel.doStepIntoSelection(rawLocation);}},_shouldIgnoreExternalBreakpointEvents:function()
+this._setBreakpoint(lineNumber,0,newText,true);}
+var config=new WebInspector.InplaceEditor.Config(finishEditing.bind(this,true),finishEditing.bind(this,false));WebInspector.InplaceEditor.startEditing(this._conditionEditorElement,config);this._conditionEditorElement.value=breakpoint?breakpoint.condition():"";this._conditionEditorElement.select();},_createConditionElement:function(lineNumber)
+{var conditionElement=document.createElement("div");conditionElement.className="source-frame-breakpoint-condition";var labelElement=document.createElement("label");labelElement.className="source-frame-breakpoint-message";labelElement.htmlFor="source-frame-breakpoint-condition";labelElement.appendChild(document.createTextNode(WebInspector.UIString("The breakpoint on line %d will stop only if this expression is true:",lineNumber)));conditionElement.appendChild(labelElement);var editorElement=document.createElement("input");editorElement.id="source-frame-breakpoint-condition";editorElement.className="monospace";editorElement.type="text";conditionElement.appendChild(editorElement);this._conditionEditorElement=editorElement;return conditionElement;},setExecutionLine:function(lineNumber)
+{this._executionLineNumber=lineNumber;if(this.loaded)
+this.textEditor.setExecutionLine(lineNumber);},clearExecutionLine:function()
+{if(this.loaded&&typeof this._executionLineNumber==="number")
+this.textEditor.clearExecutionLine();delete this._executionLineNumber;},_shouldIgnoreExternalBreakpointEvents:function()
 {if(this._supportsEnabledBreakpointsWhileEditing())
 return false;if(this._muted)
 return true;return this._scriptFile&&(this._scriptFile.isDivergingFromVM()||this._scriptFile.isMergingToVM());},_breakpointAdded:function(event)
 {var uiLocation=(event.data.uiLocation);if(uiLocation.uiSourceCode!==this._uiSourceCode)
 return;if(this._shouldIgnoreExternalBreakpointEvents())
 return;var breakpoint=(event.data.breakpoint);if(this.loaded)
-this._addBreakpointDecoration(uiLocation.lineNumber,breakpoint.condition(),breakpoint.enabled(),false);},_breakpointRemoved:function(event)
+this._addBreakpointDecoration(uiLocation.lineNumber,uiLocation.columnNumber,breakpoint.condition(),breakpoint.enabled(),false);},_breakpointRemoved:function(event)
 {var uiLocation=(event.data.uiLocation);if(uiLocation.uiSourceCode!==this._uiSourceCode)
 return;if(this._shouldIgnoreExternalBreakpointEvents())
-return;var breakpoint=(event.data.breakpoint);var remainingBreakpoint=this._breakpointManager.findBreakpoint(this._uiSourceCode,uiLocation.lineNumber);if(!remainingBreakpoint&&this.loaded)
+return;var breakpoint=(event.data.breakpoint);var remainingBreakpoint=this._breakpointManager.findBreakpointOnLine(this._uiSourceCode,uiLocation.lineNumber);if(!remainingBreakpoint&&this.loaded)
 this._removeBreakpointDecoration(uiLocation.lineNumber);},_consoleMessageAdded:function(event)
 {var message=(event.data);if(this.loaded)
 this.addMessageToSource(message.lineNumber,message.originalMessage);},_consoleMessageRemoved:function(event)
@@ -487,58 +480,25 @@ this.removeMessageFromSource(message.lineNumber,message.originalMessage);},_cons
 {if(this._scriptFile){this._scriptFile.removeEventListener(WebInspector.ScriptFile.Events.DidMergeToVM,this._didMergeToVM,this);this._scriptFile.removeEventListener(WebInspector.ScriptFile.Events.DidDivergeFromVM,this._didDivergeFromVM,this);if(this._muted&&!this._uiSourceCode.isDirty())
 this._restoreBreakpointsAfterEditing();}
 this._scriptFile=this._uiSourceCode.scriptFile();if(this._scriptFile){this._scriptFile.addEventListener(WebInspector.ScriptFile.Events.DidMergeToVM,this._didMergeToVM,this);this._scriptFile.addEventListener(WebInspector.ScriptFile.Events.DidDivergeFromVM,this._didDivergeFromVM,this);if(this.loaded)
-this._scriptFile.checkMapping();}},beforeFormattedChange:function()
-{this.clearExecutionLine();},onTextEditorContentLoaded:function()
+this._scriptFile.checkMapping();}},onTextEditorContentLoaded:function()
 {if(typeof this._executionLineNumber==="number")
-this.setExecutionLine(this._executionLineNumber,this._executionCallFrame);var breakpointLocations=this._breakpointManager.breakpointLocationsForUISourceCode(this._uiSourceCode);for(var i=0;i<breakpointLocations.length;++i)
+this.setExecutionLine(this._executionLineNumber);var breakpointLocations=this._breakpointManager.breakpointLocationsForUISourceCode(this._uiSourceCode);for(var i=0;i<breakpointLocations.length;++i)
 this._breakpointAdded({data:breakpointLocations[i]});var messages=this._uiSourceCode.consoleMessages();for(var i=0;i<messages.length;++i){var message=messages[i];this.addMessageToSource(message.lineNumber,message.originalMessage);}
 if(this._scriptFile)
 this._scriptFile.checkMapping();},_handleGutterClick:function(event)
 {if(this._muted)
 return;var eventData=(event.data);var lineNumber=eventData.lineNumber;var eventObject=(eventData.event);if(eventObject.button!=0||eventObject.altKey||eventObject.ctrlKey||eventObject.metaKey)
 return;this._toggleBreakpoint(lineNumber,eventObject.shiftKey);eventObject.consume(true);},_toggleBreakpoint:function(lineNumber,onlyDisable)
-{var breakpoint=this._breakpointManager.findBreakpoint(this._uiSourceCode,lineNumber);if(breakpoint){if(onlyDisable)
+{var breakpoint=this._breakpointManager.findBreakpointOnLine(this._uiSourceCode,lineNumber);if(breakpoint){if(onlyDisable)
 breakpoint.setEnabled(!breakpoint.enabled());else
 breakpoint.remove();}else
-this._setBreakpoint(lineNumber,"",true);},toggleBreakpointOnCurrentLine:function()
+this._setBreakpoint(lineNumber,0,"",true);},toggleBreakpointOnCurrentLine:function()
 {if(this._muted)
 return;var selection=this.textEditor.selection();if(!selection)
-return;this._toggleBreakpoint(selection.startLine,false);},_setBreakpoint:function(lineNumber,condition,enabled)
-{this._breakpointManager.setBreakpoint(this._uiSourceCode,lineNumber,condition,enabled);WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.SetBreakpoint,url:this._uiSourceCode.originURL(),line:lineNumber,enabled:enabled});},_continueToLine:function(lineNumber)
-{var rawLocation=(this._uiSourceCode.uiLocationToRawLocation(lineNumber,0));this._scriptsPanel.continueToLocation(rawLocation);},stepIntoMarkup:function()
-{return this._stepIntoMarkup;},dispose:function()
-{this._breakpointManager.removeEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded,this._breakpointAdded,this);this._breakpointManager.removeEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved,this._breakpointRemoved,this);this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.ConsoleMessageAdded,this._consoleMessageAdded,this);this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.ConsoleMessageRemoved,this._consoleMessageRemoved,this);this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.ConsoleMessagesCleared,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);WebInspector.UISourceCodeFrame.prototype.dispose.call(this);},__proto__:WebInspector.UISourceCodeFrame.prototype}
-WebInspector.JavaScriptSourceFrame.StepIntoMarkup=function(rawPositions,editorRanges,firstToExecute,sourceFrame)
-{this._positions=rawPositions;this._editorRanges=editorRanges;this._highlightDescriptors=new Array(rawPositions.length);this._currentHighlight=undefined;this._firstToExecute=firstToExecute;this._currentSelection=undefined;this._sourceFrame=sourceFrame;};WebInspector.JavaScriptSourceFrame.StepIntoMarkup.prototype={show:function()
-{var highlight=this._getVisibleHighlight();for(var i=0;i<this._positions.length;++i)
-this._highlightItem(i,i===highlight);this._shownVisibleHighlight=highlight;},startIteratingSelection:function()
-{this._currentSelection=this._positions.length
-this._redrawHighlight();},stopIteratingSelection:function()
-{this._currentSelection=undefined;this._redrawHighlight();},iterateSelection:function(backward)
-{if(typeof this._currentSelection==="undefined")
-return;var nextSelection=backward?this._currentSelection-1:this._currentSelection+1;var modulo=this._positions.length+1;nextSelection=(nextSelection+modulo)%modulo;this._currentSelection=nextSelection;this._redrawHighlight();},_redrawHighlight:function()
-{var visibleHighlight=this._getVisibleHighlight();if(this._shownVisibleHighlight===visibleHighlight)
-return;this._hideItemHighlight(this._shownVisibleHighlight);this._hideItemHighlight(visibleHighlight);this._highlightItem(this._shownVisibleHighlight,false);this._highlightItem(visibleHighlight,true);this._shownVisibleHighlight=visibleHighlight;},_getVisibleHighlight:function()
-{return typeof this._currentSelection==="undefined"?this._firstToExecute:this._currentSelection;},_highlightItem:function(position,selected)
-{if(position===this._positions.length)
-return;var styleName=selected?"source-frame-stepin-mark-highlighted":"source-frame-stepin-mark";var textEditor=this._sourceFrame.textEditor;var highlightDescriptor=textEditor.highlightRange(this._editorRanges[position],styleName);this._highlightDescriptors[position]=highlightDescriptor;},_hideItemHighlight:function(position)
-{if(position===this._positions.length)
-return;var highlightDescriptor=this._highlightDescriptors[position];console.assert(highlightDescriptor);var textEditor=this._sourceFrame.textEditor;textEditor.removeHighlight(highlightDescriptor);this._highlightDescriptors[position]=undefined;},dispose:function()
-{for(var i=0;i<this._positions.length;++i)
-this._hideItemHighlight(i);},findItemByCoordinates:function(x,y)
-{var textPosition=this._sourceFrame.textEditor.coordinatesToCursorPosition(x,y);if(!textPosition)
-return;var ranges=this._editorRanges;for(var i=0;i<ranges.length;++i){var nextRange=ranges[i];if(nextRange.startLine==textPosition.startLine&&nextRange.startColumn<=textPosition.startColumn&&nextRange.endColumn>=textPosition.startColumn)
-return i;}},getSelectedItemIndex:function()
-{if(this._currentSelection===this._positions.length)
-return undefined;return this._currentSelection;},getRawPosition:function(position)
-{return(this._positions[position]);}};WebInspector.JavaScriptSourceFrame.StepIntoMarkup.create=function(sourceFrame,stepIntoRawLocations)
-{if(!stepIntoRawLocations.length)
-return null;var firstToExecute=stepIntoRawLocations[0];stepIntoRawLocations.sort(WebInspector.JavaScriptSourceFrame.StepIntoMarkup._Comparator);var firstToExecuteIndex=stepIntoRawLocations.indexOf(firstToExecute);var textEditor=sourceFrame.textEditor;var uiRanges=[];for(var i=0;i<stepIntoRawLocations.length;++i){var uiLocation=WebInspector.debuggerModel.rawLocationToUILocation((stepIntoRawLocations[i]));var token=textEditor.tokenAtTextPosition(uiLocation.lineNumber,uiLocation.columnNumber);var startColumn;var endColumn;if(token){startColumn=token.startColumn;endColumn=token.endColumn;}else{startColumn=uiLocation.columnNumber;endColumn=uiLocation.columnNumber;}
-var range=new WebInspector.TextRange(uiLocation.lineNumber,startColumn,uiLocation.lineNumber,endColumn);uiRanges.push(range);}
-return new WebInspector.JavaScriptSourceFrame.StepIntoMarkup(stepIntoRawLocations,uiRanges,firstToExecuteIndex,sourceFrame);};WebInspector.JavaScriptSourceFrame.StepIntoMarkup._Comparator=function(locationA,locationB)
-{if(locationA.lineNumber===locationB.lineNumber)
-return locationA.columnNumber-locationB.columnNumber;else
-return locationA.lineNumber-locationB.lineNumber;};;WebInspector.CSSSourceFrame=function(uiSourceCode)
+return;this._toggleBreakpoint(selection.startLine,false);},_setBreakpoint:function(lineNumber,columnNumber,condition,enabled)
+{this._breakpointManager.setBreakpoint(this._uiSourceCode,lineNumber,columnNumber,condition,enabled);WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.SetBreakpoint,url:this._uiSourceCode.originURL(),line:lineNumber,enabled:enabled});},_continueToLine:function(lineNumber)
+{var rawLocation=(this._uiSourceCode.uiLocationToRawLocation(lineNumber,0));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);this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.ConsoleMessageAdded,this._consoleMessageAdded,this);this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.ConsoleMessageRemoved,this._consoleMessageRemoved,this);this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.ConsoleMessagesCleared,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);WebInspector.UISourceCodeFrame.prototype.dispose.call(this);},__proto__:WebInspector.UISourceCodeFrame.prototype};WebInspector.CSSSourceFrame=function(uiSourceCode)
 {WebInspector.UISourceCodeFrame.call(this,uiSourceCode);this._registerShortcuts();}
 WebInspector.CSSSourceFrame.prototype={_registerShortcuts:function()
 {var shortcutKeys=WebInspector.ShortcutsScreen.SourcesPanelShortcuts;for(var i=0;i<shortcutKeys.IncreaseCSSUnitByOne.length;++i)
@@ -553,41 +513,24 @@ token=this.textEditor.tokenAtTextPosition(selection.startLine,selection.startCol
 return false;}
 if(token.type!=="css-number")
 return false;var cssUnitRange=new WebInspector.TextRange(selection.startLine,token.startColumn,selection.startLine,token.endColumn+1);var cssUnitText=this.textEditor.copyRange(cssUnitRange);var newUnitText=this._modifyUnit(cssUnitText,change);if(!newUnitText)
-return false;this.textEditor.editRange(cssUnitRange,newUnitText);selection.startColumn=token.startColumn;selection.endColumn=selection.startColumn+newUnitText.length;this.textEditor.setSelection(selection);return true;},__proto__:WebInspector.UISourceCodeFrame.prototype};WebInspector.NavigatorOverlayController=function(parentSidebarView,navigatorView,editorView)
-{this._parentSidebarView=parentSidebarView;this._navigatorView=navigatorView;this._editorView=editorView;this._navigatorSidebarResizeWidgetElement=this._navigatorView.element.createChild("div","resizer-widget");this._parentSidebarView.installResizer(this._navigatorSidebarResizeWidgetElement);this._navigatorShowHideButton=new WebInspector.StatusBarButton(WebInspector.UIString("Hide navigator"),"left-sidebar-show-hide-button scripts-navigator-show-hide-button",3);this._navigatorShowHideButton.state="left";this._navigatorShowHideButton.addEventListener("click",this._toggleNavigator,this);parentSidebarView.mainElement().appendChild(this._navigatorShowHideButton.element);WebInspector.settings.navigatorHidden=WebInspector.settings.createSetting("navigatorHidden",true);if(WebInspector.settings.navigatorHidden.get())
-this._toggleNavigator();}
-WebInspector.NavigatorOverlayController.prototype={wasShown:function()
-{window.setTimeout(this._maybeShowNavigatorOverlay.bind(this),0);},_maybeShowNavigatorOverlay:function()
-{if(WebInspector.settings.navigatorHidden.get()&&!WebInspector.settings.navigatorWasOnceHidden.get())
-this.showNavigatorOverlay();},_toggleNavigator:function()
-{if(this._navigatorShowHideButton.state==="overlay")
-this._pinNavigator();else if(this._navigatorShowHideButton.state==="right")
-this.showNavigatorOverlay();else
-this._hidePinnedNavigator();},_hidePinnedNavigator:function()
-{this._navigatorShowHideButton.state="right";this._navigatorShowHideButton.title=WebInspector.UIString("Show navigator");this._parentSidebarView.element.appendChild(this._navigatorShowHideButton.element);this._editorView.element.classList.add("navigator-hidden");this._navigatorSidebarResizeWidgetElement.classList.add("hidden");this._parentSidebarView.hideSidebarElement();this._navigatorView.detach();this._editorView.focus();WebInspector.settings.navigatorWasOnceHidden.set(true);WebInspector.settings.navigatorHidden.set(true);},_pinNavigator:function()
-{this._navigatorShowHideButton.state="left";this._navigatorShowHideButton.title=WebInspector.UIString("Hide navigator");this._editorView.element.classList.remove("navigator-hidden");this._navigatorSidebarResizeWidgetElement.classList.remove("hidden");this._editorView.element.appendChild(this._navigatorShowHideButton.element);this._innerHideNavigatorOverlay();this._parentSidebarView.showSidebarElement();this._parentSidebarView.setSidebarView(this._navigatorView);this._navigatorView.focus();WebInspector.settings.navigatorHidden.set(false);},showNavigatorOverlay:function()
-{if(this._navigatorShowHideButton.state==="overlay")
-return;this._navigatorShowHideButton.state="overlay";this._navigatorShowHideButton.title=WebInspector.UIString("Pin navigator");this._sidebarOverlay=new WebInspector.SidebarOverlay(this._navigatorView,"scriptsPanelNavigatorOverlayWidth",Preferences.minScriptsSidebarWidth);this._boundKeyDown=this._keyDown.bind(this);this._sidebarOverlay.element.addEventListener("keydown",this._boundKeyDown,false);var navigatorOverlayResizeWidgetElement=document.createElement("div");navigatorOverlayResizeWidgetElement.classList.add("resizer-widget");this._sidebarOverlay.resizerWidgetElement=navigatorOverlayResizeWidgetElement;this._navigatorView.element.appendChild(this._navigatorShowHideButton.element);this._boundContainingElementFocused=this._containingElementFocused.bind(this);this._parentSidebarView.element.addEventListener("mousedown",this._boundContainingElementFocused,false);this._sidebarOverlay.show(this._parentSidebarView.element);this._navigatorView.focus();},_keyDown:function(event)
-{if(event.handled)
-return;if(event.keyCode===WebInspector.KeyboardShortcut.Keys.Esc.code){this.hideNavigatorOverlay();event.consume(true);}},hideNavigatorOverlay:function()
-{if(this._navigatorShowHideButton.state!=="overlay")
-return;this._navigatorShowHideButton.state="right";this._navigatorShowHideButton.title=WebInspector.UIString("Show navigator");this._parentSidebarView.element.appendChild(this._navigatorShowHideButton.element);this._innerHideNavigatorOverlay();this._editorView.focus();},_innerHideNavigatorOverlay:function()
-{this._parentSidebarView.element.removeEventListener("mousedown",this._boundContainingElementFocused,false);this._sidebarOverlay.element.removeEventListener("keydown",this._boundKeyDown,false);this._sidebarOverlay.hide();},_containingElementFocused:function(event)
-{if(!event.target.isSelfOrDescendant(this._sidebarOverlay.element))
-this.hideNavigatorOverlay();},isNavigatorPinned:function()
-{return this._navigatorShowHideButton.state==="left";},isNavigatorHidden:function()
-{return this._navigatorShowHideButton.state==="right";}};WebInspector.NavigatorView=function()
-{WebInspector.View.call(this);this.registerRequiredCSS("navigatorView.css");var scriptsTreeElement=document.createElement("ol");this._scriptsTree=new WebInspector.NavigatorTreeOutline(scriptsTreeElement);this._scriptsTree.childrenListElement.addEventListener("keypress",this._treeKeyPress.bind(this),true);var scriptsOutlineElement=document.createElement("div");scriptsOutlineElement.classList.add("outline-disclosure");scriptsOutlineElement.classList.add("navigator");scriptsOutlineElement.appendChild(scriptsTreeElement);this.element.classList.add("fill");this.element.classList.add("navigator-container");this.element.appendChild(scriptsOutlineElement);this.setDefaultFocusedElement(this._scriptsTree.element);this._uiSourceCodeNodes=new Map();this._subfolderNodes=new Map();this._rootNode=new WebInspector.NavigatorRootTreeNode(this);this._rootNode.populate();WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged,this._inspectedURLChanged,this);this.element.addEventListener("contextmenu",this.handleContextMenu.bind(this),false);}
-WebInspector.NavigatorView.Events={ItemSelected:"ItemSelected",ItemSearchStarted:"ItemSearchStarted",ItemRenamingRequested:"ItemRenamingRequested",ItemCreationRequested:"ItemCreationRequested"}
+return false;this.textEditor.editRange(cssUnitRange,newUnitText);selection.startColumn=token.startColumn;selection.endColumn=selection.startColumn+newUnitText.length;this.textEditor.setSelection(selection);return true;},__proto__:WebInspector.UISourceCodeFrame.prototype};WebInspector.NavigatorView=function()
+{WebInspector.VBox.call(this);this.registerRequiredCSS("navigatorView.css");var scriptsTreeElement=document.createElement("ol");this._scriptsTree=new WebInspector.NavigatorTreeOutline(scriptsTreeElement);var scriptsOutlineElement=document.createElement("div");scriptsOutlineElement.classList.add("outline-disclosure");scriptsOutlineElement.classList.add("navigator");scriptsOutlineElement.appendChild(scriptsTreeElement);this.element.classList.add("navigator-container");this.element.appendChild(scriptsOutlineElement);this.setDefaultFocusedElement(this._scriptsTree.element);this._uiSourceCodeNodes=new Map();this._subfolderNodes=new Map();this._rootNode=new WebInspector.NavigatorRootTreeNode(this);this._rootNode.populate();this.element.addEventListener("contextmenu",this.handleContextMenu.bind(this),false);}
+WebInspector.NavigatorView.Events={ItemSelected:"ItemSelected",ItemRenamed:"ItemRenamed",}
 WebInspector.NavigatorView.iconClassForType=function(type)
 {if(type===WebInspector.NavigatorTreeOutline.Types.Domain)
 return"navigator-domain-tree-item";if(type===WebInspector.NavigatorTreeOutline.Types.FileSystem)
 return"navigator-folder-tree-item";return"navigator-folder-tree-item";}
-WebInspector.NavigatorView.prototype={addUISourceCode:function(uiSourceCode)
-{var projectNode=this._projectNode(uiSourceCode.project());var folderNode=this._folderNode(projectNode,uiSourceCode.parentPath());var uiSourceCodeNode=new WebInspector.NavigatorUISourceCodeTreeNode(this,uiSourceCode);this._uiSourceCodeNodes.put(uiSourceCode,uiSourceCodeNode);folderNode.appendChild(uiSourceCodeNode);if(uiSourceCode.url===WebInspector.inspectedPageURL)
-this.revealUISourceCode(uiSourceCode);},_inspectedURLChanged:function(event)
-{var nodes=this._uiSourceCodeNodes.values();for(var i=0;i<nodes.length;++i){var uiSourceCode=nodes[i].uiSourceCode();if(uiSourceCode.url===WebInspector.inspectedPageURL)
-this.revealUISourceCode(uiSourceCode);}},_projectNode:function(project)
+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.ProjectWillReset,this._projectWillReset.bind(this),this);},wasShown:function()
+{if(this._loaded)
+return;this._loaded=true;this._workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this));},accept:function(uiSourceCode)
+{return!uiSourceCode.project().isServiceProject();},_addUISourceCode:function(uiSourceCode)
+{if(!this.accept(uiSourceCode))
+return;var projectNode=this._projectNode(uiSourceCode.project());var folderNode=this._folderNode(projectNode,uiSourceCode.parentPath());var uiSourceCodeNode=new WebInspector.NavigatorUISourceCodeTreeNode(this,uiSourceCode);this._uiSourceCodeNodes.put(uiSourceCode,uiSourceCodeNode);folderNode.appendChild(uiSourceCodeNode);},_uiSourceCodeAdded:function(event)
+{var uiSourceCode=(event.data);this._addUISourceCode(uiSourceCode);},_uiSourceCodeRemoved:function(event)
+{var uiSourceCode=(event.data);this._removeUISourceCode(uiSourceCode);},_projectWillReset:function(event)
+{var project=(event.data);var uiSourceCodes=project.uiSourceCodes();for(var i=0;i<uiSourceCodes.length;++i)
+this._removeUISourceCode(uiSourceCodes[i]);},_projectNode:function(project)
 {if(!project.displayName())
 return this._rootNode;var projectNode=this._rootNode.child(project.id());if(!projectNode){var type=project.type()===WebInspector.projectTypes.FileSystem?WebInspector.NavigatorTreeOutline.Types.FileSystem:WebInspector.NavigatorTreeOutline.Types.Domain;projectNode=new WebInspector.NavigatorFolderTreeNode(this,project,project.id(),type,"",project.displayName());this._rootNode.appendChild(projectNode);}
 return projectNode;},_folderNode:function(projectNode,folderPath)
@@ -600,15 +543,12 @@ parentNode=this._folderNode(projectNode,folderPath.substring(0,index));var name=
 return;if(this._scriptsTree.selectedTreeElement)
 this._scriptsTree.selectedTreeElement.deselect();this._lastSelectedUISourceCode=uiSourceCode;node.reveal(select);},_sourceSelected:function(uiSourceCode,focusSource)
 {this._lastSelectedUISourceCode=uiSourceCode;var data={uiSourceCode:uiSourceCode,focusSource:focusSource};this.dispatchEventToListeners(WebInspector.NavigatorView.Events.ItemSelected,data);},sourceDeleted:function(uiSourceCode)
-{},removeUISourceCode:function(uiSourceCode)
+{},_removeUISourceCode:function(uiSourceCode)
 {var node=this._uiSourceCodeNodes.get(uiSourceCode);if(!node)
 return;var projectNode=this._projectNode(uiSourceCode.project());var subfolderNodes=this._subfolderNodes.get(projectNode);var parentNode=node.parent;this._uiSourceCodeNodes.remove(uiSourceCode);parentNode.removeChild(node);node=parentNode;while(node){parentNode=node.parent;if(!parentNode||!node.isEmpty())
 break;if(subfolderNodes)
-subfolderNodes.remove(node._folderPath);parentNode.removeChild(node);node=parentNode;}},updateIcon:function(uiSourceCode)
-{var node=this._uiSourceCodeNodes.get(uiSourceCode);node.updateIcon();},requestRename:function(uiSourceCode)
-{this.dispatchEventToListeners(WebInspector.SourcesNavigator.Events.ItemRenamingRequested,uiSourceCode);},rename:function(uiSourceCode,callback)
-{var node=this._uiSourceCodeNodes.get(uiSourceCode);if(!node)
-return;node.rename(callback);},reset:function()
+subfolderNodes.remove(node._folderPath);parentNode.removeChild(node);node=parentNode;}},_updateIcon:function(uiSourceCode)
+{var node=this._uiSourceCodeNodes.get(uiSourceCode);node.updateIcon();},reset:function()
 {var nodes=this._uiSourceCodeNodes.values();for(var i=0;i<nodes.length;++i)
 nodes[i].dispose();this._scriptsTree.removeChildren();this._uiSourceCodeNodes.clear();this._subfolderNodes.clear();this._rootNode.reset();},handleContextMenu:function(event)
 {var contextMenu=new WebInspector.ContextMenu(event);this._appendAddFolderItem(contextMenu);contextMenu.show();},_appendAddFolderItem:function(contextMenu)
@@ -616,7 +556,7 @@ nodes[i].dispose();this._scriptsTree.removeChildren();this._uiSourceCodeNodes.cl
 {WebInspector.isolatedFileSystemManager.addFileSystem();}
 var addFolderLabel=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Add folder to workspace":"Add Folder to Workspace");contextMenu.appendItem(addFolderLabel,addFolder);},_handleContextMenuRefresh:function(project,path)
 {project.refresh(path);},_handleContextMenuCreate:function(project,path,uiSourceCode)
-{var data={};data.project=project;data.path=path;data.uiSourceCode=uiSourceCode;this.dispatchEventToListeners(WebInspector.NavigatorView.Events.ItemCreationRequested,data);},_handleContextMenuExclude:function(project,path)
+{this.create(project,path,uiSourceCode);},_handleContextMenuExclude:function(project,path)
 {var shouldExclude=window.confirm(WebInspector.UIString("Are you sure you want to exclude this folder?"));if(shouldExclude){WebInspector.startBatchUpdate();project.excludeFolder(path);WebInspector.endBatchUpdate();}},_handleContextMenuDelete:function(uiSourceCode)
 {var shouldDelete=window.confirm(WebInspector.UIString("Are you sure you want to delete this file?"));if(shouldDelete)
 uiSourceCode.project().deleteFile(uiSourceCode.path());},handleFileContextMenu:function(event,uiSourceCode)
@@ -627,16 +567,42 @@ contextMenu.appendSeparator();this._appendAddFolderItem(contextMenu);function re
 {var shouldRemove=window.confirm(WebInspector.UIString("Are you sure you want to remove this folder?"));if(shouldRemove)
 project.remove();}
 if(project.type()===WebInspector.projectTypes.FileSystem&&node===projectNode){var removeFolderLabel=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Remove folder from workspace":"Remove Folder from Workspace");contextMenu.appendItem(removeFolderLabel,removeFolder);}
-contextMenu.show();},_treeKeyPress:function(event)
-{if(WebInspector.isBeingEdited(this._scriptsTree.childrenListElement))
-return;var searchText=String.fromCharCode(event.charCode);if(searchText.trim()!==searchText)
-return;this.dispatchEventToListeners(WebInspector.NavigatorView.Events.ItemSearchStarted,searchText);event.consume(true);},__proto__:WebInspector.View.prototype}
+contextMenu.show();},rename:function(uiSourceCode,deleteIfCanceled)
+{var node=this._uiSourceCodeNodes.get(uiSourceCode);console.assert(node);node.rename(callback.bind(this));function callback(committed)
+{if(!committed){if(deleteIfCanceled)
+uiSourceCode.remove();return;}
+var data={uiSourceCode:uiSourceCode};this.dispatchEventToListeners(WebInspector.NavigatorView.Events.ItemRenamed,data);this._updateIcon(uiSourceCode);this._sourceSelected(uiSourceCode,true)}},create:function(project,path,uiSourceCodeToCopy)
+{var filePath;var uiSourceCode;function contentLoaded(content)
+{createFile.call(this,content||"");}
+if(uiSourceCodeToCopy)
+uiSourceCodeToCopy.requestContent(contentLoaded.bind(this));else
+createFile.call(this);function createFile(content)
+{project.createFile(path,null,content||"",fileCreated.bind(this));}
+function fileCreated(path)
+{if(!path)
+return;filePath=path;uiSourceCode=project.uiSourceCode(filePath);if(!uiSourceCode){console.assert(uiSourceCode)
+return;}
+this._sourceSelected(uiSourceCode,false);this.rename(uiSourceCode,true);}},__proto__:WebInspector.VBox.prototype}
+WebInspector.SourcesNavigatorView=function()
+{WebInspector.NavigatorView.call(this);WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged,this._inspectedURLChanged,this);}
+WebInspector.SourcesNavigatorView.prototype={accept:function(uiSourceCode)
+{if(!WebInspector.NavigatorView.prototype.accept(uiSourceCode))
+return false;return!uiSourceCode.isContentScript&&uiSourceCode.project().type()!==WebInspector.projectTypes.Snippets;},_inspectedURLChanged:function(event)
+{var nodes=this._uiSourceCodeNodes.values();for(var i=0;i<nodes.length;++i){var uiSourceCode=nodes[i].uiSourceCode();if(uiSourceCode.url===WebInspector.resourceTreeModel.inspectedPageURL())
+this.revealUISourceCode(uiSourceCode,true);}},_addUISourceCode:function(uiSourceCode)
+{WebInspector.NavigatorView.prototype._addUISourceCode.call(this,uiSourceCode);if(uiSourceCode.url===WebInspector.resourceTreeModel.inspectedPageURL())
+this.revealUISourceCode(uiSourceCode,true);},__proto__:WebInspector.NavigatorView.prototype}
+WebInspector.ContentScriptsNavigatorView=function()
+{WebInspector.NavigatorView.call(this);}
+WebInspector.ContentScriptsNavigatorView.prototype={accept:function(uiSourceCode)
+{if(!WebInspector.NavigatorView.prototype.accept(uiSourceCode))
+return false;return uiSourceCode.isContentScript;},__proto__:WebInspector.NavigatorView.prototype}
 WebInspector.NavigatorTreeOutline=function(element)
 {TreeOutline.call(this,element);this.element=element;this.comparator=WebInspector.NavigatorTreeOutline._treeElementsCompare;}
 WebInspector.NavigatorTreeOutline.Types={Root:"Root",Domain:"Domain",Folder:"Folder",UISourceCode:"UISourceCode",FileSystem:"FileSystem"}
 WebInspector.NavigatorTreeOutline._treeElementsCompare=function compare(treeElement1,treeElement2)
 {function typeWeight(treeElement)
-{var type=treeElement.type();if(type===WebInspector.NavigatorTreeOutline.Types.Domain){if(treeElement.titleText===WebInspector.inspectedPageDomain)
+{var type=treeElement.type();if(type===WebInspector.NavigatorTreeOutline.Types.Domain){if(treeElement.titleText===WebInspector.resourceTreeModel.inspectedPageDomain())
 return 1;return 2;}
 if(type===WebInspector.NavigatorTreeOutline.Types.FileSystem)
 return 3;if(type===WebInspector.NavigatorTreeOutline.Types.Folder)
@@ -690,7 +656,7 @@ return false;var isSelected=this===this.treeOutline.selectedTreeElement;var isFo
 {if(event.which!==1||!this._shouldRenameOnMouseDown()){TreeElement.prototype.selectOnMouseDown.call(this,event);return;}
 setTimeout(rename.bind(this),300);function rename()
 {if(this._shouldRenameOnMouseDown())
-this._navigatorView.requestRename(this._uiSourceCode);}},_ondragstart:function(event)
+this._navigatorView.rename(this.uiSourceCode,false);}},_ondragstart:function(event)
 {event.dataTransfer.setData("text/plain",this._warmedUpContent);event.dataTransfer.effectAllowed="copy";return true;},onspace:function()
 {this._navigatorView._sourceSelected(this.uiSourceCode,true);return true;},_onclick:function(event)
 {this._navigatorView._sourceSelected(this.uiSourceCode,false);},ondblclick:function(event)
@@ -700,7 +666,7 @@ this._navigatorView.requestRename(this._uiSourceCode);}},_ondragstart:function(e
 {this.select();this._navigatorView.handleFileContextMenu(event,this._uiSourceCode);},__proto__:WebInspector.BaseNavigatorTreeElement.prototype}
 WebInspector.NavigatorTreeNode=function(id)
 {this.id=id;this._children=new StringMap();}
-WebInspector.NavigatorTreeNode.prototype={treeElement:function(){},dispose:function(){},isRoot:function()
+WebInspector.NavigatorTreeNode.prototype={treeElement:function(){throw"Not implemented";},dispose:function(){},isRoot:function()
 {return false;},hasChildren:function()
 {return true;},populate:function()
 {if(this.isPopulated())
@@ -731,19 +697,18 @@ WebInspector.NavigatorUISourceCodeTreeNode.prototype={uiSourceCode:function()
 {if(this._treeElement)
 this._treeElement.updateIcon();},treeElement:function()
 {if(this._treeElement)
-return this._treeElement;this._treeElement=new WebInspector.NavigatorSourceTreeElement(this._navigatorView,this._uiSourceCode,"");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.FormattedChanged,this._formattedChanged,this);return this._treeElement;},updateTitle:function(ignoreIsDirty)
+return this._treeElement;this._treeElement=new WebInspector.NavigatorSourceTreeElement(this._navigatorView,this._uiSourceCode,"");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);return this._treeElement;},updateTitle:function(ignoreIsDirty)
 {if(!this._treeElement)
 return;var titleText=this._uiSourceCode.displayName();if(!ignoreIsDirty&&(this._uiSourceCode.isDirty()||this._uiSourceCode.hasUnsavedCommittedChanges()))
 titleText="*"+titleText;this._treeElement.titleText=titleText;},hasChildren:function()
 {return false;},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.FormattedChanged,this._formattedChanged,this);},_titleChanged:function(event)
+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);},_titleChanged:function(event)
 {this.updateTitle();},_workingCopyChanged:function(event)
 {this.updateTitle();},_workingCopyCommitted:function(event)
-{this.updateTitle();},_formattedChanged:function(event)
 {this.updateTitle();},reveal:function(select)
 {this.parent.populate();this.parent.treeElement().expand();this._treeElement.reveal();if(select)
-this._treeElement.select();},rename:function(callback)
+this._treeElement.select(true);},rename:function(callback)
 {if(!this._treeElement)
 return;var treeOutlineElement=this._treeElement.treeOutline.element;WebInspector.markBeingEdited(treeOutlineElement,true);function commitHandler(element,newTitle,oldTitle)
 {if(newTitle!==oldTitle){this._treeElement.titleText=newTitle;this._uiSourceCode.rename(newTitle,renameCallback.bind(this));return;}
@@ -756,7 +721,7 @@ function cancelHandler()
 function afterEditing(committed)
 {WebInspector.markBeingEdited(treeOutlineElement,false);this.updateTitle();this._treeElement.treeOutline.childrenListElement.focus();if(callback)
 callback(committed);}
-var editingConfig=new WebInspector.EditingConfig(commitHandler.bind(this),cancelHandler.bind(this));this.updateTitle(true);WebInspector.startEditing(this._treeElement.titleElement,editingConfig);window.getSelection().setBaseAndExtent(this._treeElement.titleElement,0,this._treeElement.titleElement,1);},__proto__:WebInspector.NavigatorTreeNode.prototype}
+var editingConfig=new WebInspector.InplaceEditor.Config(commitHandler.bind(this),cancelHandler.bind(this));this.updateTitle(true);WebInspector.InplaceEditor.startEditing(this._treeElement.titleElement,editingConfig);window.getSelection().setBaseAndExtent(this._treeElement.titleElement,0,this._treeElement.titleElement,1);},__proto__:WebInspector.NavigatorTreeNode.prototype}
 WebInspector.NavigatorFolderTreeNode=function(navigatorView,project,id,type,folderPath,title)
 {WebInspector.NavigatorTreeNode.call(this,id);this._navigatorView=navigatorView;this._project=project;this._type=type;this._folderPath=folderPath;this._title=title;}
 WebInspector.NavigatorFolderTreeNode.prototype={treeElement:function()
@@ -783,7 +748,7 @@ if(this.isPopulated())
 this._treeElement.appendChild(node.treeElement());},willRemoveChild:function(node)
 {if(node._isMerged||!this.isPopulated())
 return;this._treeElement.removeChild(node._treeElement);},__proto__:WebInspector.NavigatorTreeNode.prototype};WebInspector.RevisionHistoryView=function()
-{WebInspector.View.call(this);this.registerRequiredCSS("revisionHistory.css");this.element.classList.add("revision-history-drawer");this.element.classList.add("fill");this.element.classList.add("outline-disclosure");this._uiSourceCodeItems=new Map();var olElement=this.element.createChild("ol");this._treeOutline=new TreeOutline(olElement);function populateRevisions(uiSourceCode)
+{WebInspector.VBox.call(this);this.registerRequiredCSS("revisionHistory.css");this.element.classList.add("revision-history-drawer");this.element.classList.add("outline-disclosure");this._uiSourceCodeItems=new Map();var olElement=this.element.createChild("ol");this._treeOutline=new TreeOutline(olElement);function populateRevisions(uiSourceCode)
 {if(uiSourceCode.history.length)
 this._createUISourceCodeItem(uiSourceCode);}
 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.ProjectWillReset,this._projectWillReset,this);}
@@ -803,7 +768,7 @@ uiSourceCodeItem.children[0].allowRevert();uiSourceCodeItem.insertChild(historyI
 {var uiSourceCode=(event.data);this._removeUISourceCode(uiSourceCode);},_removeUISourceCode:function(uiSourceCode)
 {var uiSourceCodeItem=this._uiSourceCodeItems.get(uiSourceCode);if(!uiSourceCodeItem)
 return;this._treeOutline.removeChild(uiSourceCodeItem);this._uiSourceCodeItems.remove(uiSourceCode);},_projectWillReset:function(event)
-{var project=event.data;project.uiSourceCodes().forEach(this._removeUISourceCode.bind(this));},__proto__:WebInspector.View.prototype}
+{var project=event.data;project.uiSourceCodes().forEach(this._removeUISourceCode.bind(this));},__proto__:WebInspector.VBox.prototype}
 WebInspector.RevisionHistoryTreeElement=function(revision,baseRevision,allowRevert)
 {TreeElement.call(this,revision.timestamp.toLocaleTimeString(),null,true);this.selectable=false;this._revision=revision;this._baseRevision=baseRevision;this._revertElement=document.createElement("span");this._revertElement.className="revision-history-link";this._revertElement.textContent=WebInspector.UIString("apply revision content");this._revertElement.addEventListener("click",this._revision.revertToThis.bind(this._revision),false);if(!allowRevert)
 this._revertElement.classList.add("hidden");}
@@ -832,7 +797,7 @@ continue;if(section.expanded)
 this._expandedSections[section.title]=true;else
 delete this._expandedSections[section.title];}
 this._sections=[];var foundLocalScope=false;var scopeChain=callFrame.scopeChain;for(var i=0;i<scopeChain.length;++i){var scope=scopeChain[i];var title=null;var subtitle=scope.object.description;var emptyPlaceholder=null;var extraProperties=[];var declarativeScope;switch(scope.type){case DebuggerAgent.ScopeType.Local:foundLocalScope=true;title=WebInspector.UIString("Local");emptyPlaceholder=WebInspector.UIString("No Variables");subtitle=undefined;if(callFrame.this)
-extraProperties.push(new WebInspector.RemoteObjectProperty("this",WebInspector.RemoteObject.fromPayload(callFrame.this)));if(i==0){var details=WebInspector.debuggerModel.debuggerPausedDetails();var exception=details.reason===WebInspector.DebuggerModel.BreakReason.Exception?details.auxData:0;if(exception){var exceptionObject=(exception);extraProperties.push(new WebInspector.RemoteObjectProperty("<exception>",WebInspector.RemoteObject.fromPayload(exceptionObject)));}
+extraProperties.push(new WebInspector.RemoteObjectProperty("this",WebInspector.RemoteObject.fromPayload(callFrame.this)));if(i==0){var details=WebInspector.debuggerModel.debuggerPausedDetails();var exception=details.reason===WebInspector.DebuggerModel.BreakReason.Exception?details.auxData:0;if(exception&&!callFrame.isAsync()){var exceptionObject=(exception);extraProperties.push(new WebInspector.RemoteObjectProperty("<exception>",WebInspector.RemoteObject.fromPayload(exceptionObject)));}
 if(callFrame.returnValue)
 extraProperties.push(new WebInspector.RemoteObjectProperty("<return>",WebInspector.RemoteObject.fromPayload(callFrame.returnValue)));}
 declarativeScope=true;break;case DebuggerAgent.ScopeType.Closure:title=WebInspector.UIString("Closure");emptyPlaceholder=WebInspector.UIString("No Variables");subtitle=undefined;declarativeScope=true;break;case DebuggerAgent.ScopeType.Catch:title=WebInspector.UIString("Catch");subtitle=undefined;declarativeScope=true;break;case DebuggerAgent.ScopeType.With:title=WebInspector.UIString("With Block");declarativeScope=false;break;case DebuggerAgent.ScopeType.Global:title=WebInspector.UIString("Global");declarativeScope=false;break;}
@@ -848,47 +813,40 @@ this.expand();},onexpand:function()
 {this.treeOutline.section.pane._expandedProperties[this.propertyIdentifier]=true;},oncollapse:function()
 {delete this.treeOutline.section.pane._expandedProperties[this.propertyIdentifier];},get propertyIdentifier()
 {if("_propertyIdentifier"in this)
-return this._propertyIdentifier;var section=this.treeOutline.section;this._propertyIdentifier=section.title+":"+(section.subtitle?section.subtitle+":":"")+this.propertyPath();return this._propertyIdentifier;},__proto__:WebInspector.ObjectPropertyTreeElement.prototype};WebInspector.SourcesNavigator=function()
-{WebInspector.Object.call(this);this._tabbedPane=new WebInspector.TabbedPane();this._tabbedPane.shrinkableTabs=true;this._tabbedPane.element.classList.add("navigator-tabbed-pane");this._sourcesView=new WebInspector.NavigatorView();this._sourcesView.addEventListener(WebInspector.NavigatorView.Events.ItemSelected,this._sourceSelected,this);this._sourcesView.addEventListener(WebInspector.NavigatorView.Events.ItemSearchStarted,this._itemSearchStarted,this);this._sourcesView.addEventListener(WebInspector.NavigatorView.Events.ItemRenamingRequested,this._itemRenamingRequested,this);this._sourcesView.addEventListener(WebInspector.NavigatorView.Events.ItemCreationRequested,this._itemCreationRequested,this);this._contentScriptsView=new WebInspector.NavigatorView();this._contentScriptsView.addEventListener(WebInspector.NavigatorView.Events.ItemSelected,this._sourceSelected,this);this._contentScriptsView.addEventListener(WebInspector.NavigatorView.Events.ItemSearchStarted,this._itemSearchStarted,this);this._contentScriptsView.addEventListener(WebInspector.NavigatorView.Events.ItemRenamingRequested,this._itemRenamingRequested,this);this._contentScriptsView.addEventListener(WebInspector.NavigatorView.Events.ItemCreationRequested,this._itemCreationRequested,this);this._snippetsView=new WebInspector.SnippetsNavigatorView();this._snippetsView.addEventListener(WebInspector.NavigatorView.Events.ItemSelected,this._sourceSelected,this);this._snippetsView.addEventListener(WebInspector.NavigatorView.Events.ItemSearchStarted,this._itemSearchStarted,this);this._snippetsView.addEventListener(WebInspector.NavigatorView.Events.ItemRenamingRequested,this._itemRenamingRequested,this);this._snippetsView.addEventListener(WebInspector.NavigatorView.Events.ItemCreationRequested,this._itemCreationRequested,this);this._tabbedPane.appendTab(WebInspector.SourcesNavigator.SourcesTab,WebInspector.UIString("Sources"),this._sourcesView);this._tabbedPane.selectTab(WebInspector.SourcesNavigator.SourcesTab);this._tabbedPane.appendTab(WebInspector.SourcesNavigator.ContentScriptsTab,WebInspector.UIString("Content scripts"),this._contentScriptsView);this._tabbedPane.appendTab(WebInspector.SourcesNavigator.SnippetsTab,WebInspector.UIString("Snippets"),this._snippetsView);}
-WebInspector.SourcesNavigator.Events={SourceSelected:"SourceSelected",ItemCreationRequested:"ItemCreationRequested",ItemRenamingRequested:"ItemRenamingRequested",ItemSearchStarted:"ItemSearchStarted",}
-WebInspector.SourcesNavigator.SourcesTab="sources";WebInspector.SourcesNavigator.ContentScriptsTab="contentScripts";WebInspector.SourcesNavigator.SnippetsTab="snippets";WebInspector.SourcesNavigator.prototype={get view()
-{return this._tabbedPane;},_navigatorViewForUISourceCode:function(uiSourceCode)
-{if(uiSourceCode.isContentScript)
-return this._contentScriptsView;else if(uiSourceCode.project().type()===WebInspector.projectTypes.Snippets)
-return this._snippetsView;else
-return this._sourcesView;},addUISourceCode:function(uiSourceCode)
-{this._navigatorViewForUISourceCode(uiSourceCode).addUISourceCode(uiSourceCode);},removeUISourceCode:function(uiSourceCode)
-{this._navigatorViewForUISourceCode(uiSourceCode).removeUISourceCode(uiSourceCode);},revealUISourceCode:function(uiSourceCode,select)
-{this._navigatorViewForUISourceCode(uiSourceCode).revealUISourceCode(uiSourceCode,select);if(uiSourceCode.isContentScript)
-this._tabbedPane.selectTab(WebInspector.SourcesNavigator.ContentScriptsTab);else if(uiSourceCode.project().type()!==WebInspector.projectTypes.Snippets)
-this._tabbedPane.selectTab(WebInspector.SourcesNavigator.SourcesTab);},updateIcon:function(uiSourceCode)
-{this._navigatorViewForUISourceCode(uiSourceCode).updateIcon(uiSourceCode);},rename:function(uiSourceCode,callback)
-{this._navigatorViewForUISourceCode(uiSourceCode).rename(uiSourceCode,callback);},_sourceSelected:function(event)
-{this.dispatchEventToListeners(WebInspector.SourcesNavigator.Events.SourceSelected,event.data);},_itemSearchStarted:function(event)
-{this.dispatchEventToListeners(WebInspector.SourcesNavigator.Events.ItemSearchStarted,event.data);},_itemRenamingRequested:function(event)
-{this.dispatchEventToListeners(WebInspector.SourcesNavigator.Events.ItemRenamingRequested,event.data);},_itemCreationRequested:function(event)
-{this.dispatchEventToListeners(WebInspector.SourcesNavigator.Events.ItemCreationRequested,event.data);},__proto__:WebInspector.Object.prototype}
+return this._propertyIdentifier;var section=this.treeOutline.section;this._propertyIdentifier=section.title+":"+(section.subtitle?section.subtitle+":":"")+this.propertyPath();return this._propertyIdentifier;},__proto__:WebInspector.ObjectPropertyTreeElement.prototype};WebInspector.SourcesNavigator=function(workspace)
+{WebInspector.Object.call(this);this._workspace=workspace;this._tabbedPane=new WebInspector.TabbedPane();this._tabbedPane.shrinkableTabs=true;this._tabbedPane.element.classList.add("navigator-tabbed-pane");new WebInspector.ExtensibleTabbedPaneController(this._tabbedPane,"navigator-view",this._navigatorViewCreated.bind(this));this._navigatorViews=new StringMap();}
+WebInspector.SourcesNavigator.Events={SourceSelected:"SourceSelected",SourceRenamed:"SourceRenamed"}
+WebInspector.SourcesNavigator.prototype={_navigatorViewCreated:function(id,view)
+{var navigatorView=(view);navigatorView.addEventListener(WebInspector.NavigatorView.Events.ItemSelected,this._sourceSelected,this);navigatorView.addEventListener(WebInspector.NavigatorView.Events.ItemRenamed,this._sourceRenamed,this);this._navigatorViews.put(id,navigatorView);navigatorView.setWorkspace(this._workspace);},get view()
+{return this._tabbedPane;},_navigatorViewIdForUISourceCode:function(uiSourceCode)
+{var ids=this._navigatorViews.keys();for(var i=0;i<ids.length;++i){var id=ids[i]
+var navigatorView=this._navigatorViews.get(id);if(navigatorView.accept(uiSourceCode))
+return id;}
+return null;},revealUISourceCode:function(uiSourceCode)
+{var id=this._navigatorViewIdForUISourceCode(uiSourceCode);if(!id)
+return;var navigatorView=this._navigatorViews.get(id);console.assert(navigatorView);navigatorView.revealUISourceCode(uiSourceCode,true);this._tabbedPane.selectTab(id);},_sourceSelected:function(event)
+{this.dispatchEventToListeners(WebInspector.SourcesNavigator.Events.SourceSelected,event.data);},_sourceRenamed:function(event)
+{this.dispatchEventToListeners(WebInspector.SourcesNavigator.Events.SourceRenamed,event.data);},__proto__:WebInspector.Object.prototype}
 WebInspector.SnippetsNavigatorView=function()
 {WebInspector.NavigatorView.call(this);}
-WebInspector.SnippetsNavigatorView.prototype={handleContextMenu:function(event)
+WebInspector.SnippetsNavigatorView.prototype={accept:function(uiSourceCode)
+{if(!WebInspector.NavigatorView.prototype.accept(uiSourceCode))
+return false;return uiSourceCode.project().type()===WebInspector.projectTypes.Snippets;},handleContextMenu:function(event)
 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebInspector.UIString("New"),this._handleCreateSnippet.bind(this));contextMenu.show();},handleFileContextMenu:function(event,uiSourceCode)
-{var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebInspector.UIString("Run"),this._handleEvaluateSnippet.bind(this,uiSourceCode));contextMenu.appendItem(WebInspector.UIString("Rename"),this.requestRename.bind(this,uiSourceCode));contextMenu.appendItem(WebInspector.UIString("Remove"),this._handleRemoveSnippet.bind(this,uiSourceCode));contextMenu.appendSeparator();contextMenu.appendItem(WebInspector.UIString("New"),this._handleCreateSnippet.bind(this));contextMenu.show();},_handleEvaluateSnippet:function(uiSourceCode)
+{var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebInspector.UIString("Run"),this._handleEvaluateSnippet.bind(this,uiSourceCode));contextMenu.appendItem(WebInspector.UIString("Rename"),this.rename.bind(this,uiSourceCode));contextMenu.appendItem(WebInspector.UIString("Remove"),this._handleRemoveSnippet.bind(this,uiSourceCode));contextMenu.appendSeparator();contextMenu.appendItem(WebInspector.UIString("New"),this._handleCreateSnippet.bind(this));contextMenu.show();},_handleEvaluateSnippet:function(uiSourceCode)
 {if(uiSourceCode.project().type()!==WebInspector.projectTypes.Snippets)
 return;WebInspector.scriptSnippetModel.evaluateScriptSnippet(uiSourceCode);},_handleRemoveSnippet:function(uiSourceCode)
 {if(uiSourceCode.project().type()!==WebInspector.projectTypes.Snippets)
-return;uiSourceCode.project().deleteFile(uiSourceCode.path());},_handleCreateSnippet:function()
-{var data={};data.project=WebInspector.scriptSnippetModel.project();data.path="";this.dispatchEventToListeners(WebInspector.NavigatorView.Events.ItemCreationRequested,data);},sourceDeleted:function(uiSourceCode)
+return;uiSourceCode.remove();},_handleCreateSnippet:function()
+{this.create(WebInspector.scriptSnippetModel.project(),"")},sourceDeleted:function(uiSourceCode)
 {this._handleRemoveSnippet(uiSourceCode);},__proto__:WebInspector.NavigatorView.prototype};WebInspector.SourcesSearchScope=function()
 {this._searchId=0;this._workspace=WebInspector.workspace;}
 WebInspector.SourcesSearchScope.prototype={performIndexing:function(progress,indexingFinishedCallback)
-{this.stopSearch();function filterOutServiceProjects(project)
-{return!project.isServiceProject();}
-var projects=this._workspace.projects().filter(filterOutServiceProjects);var barrier=new CallbackBarrier();var compositeProgress=new WebInspector.CompositeProgress(progress);progress.addEventListener(WebInspector.Progress.Events.Canceled,indexingCanceled.bind(this));for(var i=0;i<projects.length;++i){var project=projects[i];var projectProgress=compositeProgress.createSubProgress(project.uiSourceCodes().length);project.indexContent(projectProgress,barrier.createCallback());}
+{this.stopSearch();var projects=this._workspace.projects().filter(this._filterOutServiceProjects);var barrier=new CallbackBarrier();var compositeProgress=new WebInspector.CompositeProgress(progress);progress.addEventListener(WebInspector.Progress.Events.Canceled,indexingCanceled);for(var i=0;i<projects.length;++i){var project=projects[i];var projectProgress=compositeProgress.createSubProgress(project.uiSourceCodes().length);project.indexContent(projectProgress,barrier.createCallback());}
 barrier.callWhenDone(indexingFinishedCallback.bind(this,true));function indexingCanceled()
-{indexingFinishedCallback(false);progress.done();}},performSearch:function(searchConfig,progress,searchResultCallback,searchFinishedCallback)
-{this.stopSearch();this._searchResultCallback=searchResultCallback;this._searchFinishedCallback=searchFinishedCallback;this._searchConfig=searchConfig;function filterOutServiceProjects(project)
-{return!project.isServiceProject();}
-var projects=this._workspace.projects().filter(filterOutServiceProjects);var barrier=new CallbackBarrier();var compositeProgress=new WebInspector.CompositeProgress(progress);for(var i=0;i<projects.length;++i){var project=projects[i];var weight=project.uiSourceCodes().length;var projectProgress=new WebInspector.CompositeProgress(compositeProgress.createSubProgress(weight));var findMatchingFilesProgress=projectProgress.createSubProgress();var searchContentProgress=projectProgress.createSubProgress();var barrierCallback=barrier.createCallback();var callback=this._processMatchingFilesForProject.bind(this,this._searchId,project,searchContentProgress,barrierCallback);project.findFilesMatchingSearchRequest(searchConfig.queries(),searchConfig.fileQueries(),!searchConfig.ignoreCase,searchConfig.isRegex,findMatchingFilesProgress,callback);}
+{indexingFinishedCallback(false);progress.done();}},_filterOutServiceProjects:function(project)
+{return!project.isServiceProject()||project.type()===WebInspector.projectTypes.Formatter;},performSearch:function(searchConfig,progress,searchResultCallback,searchFinishedCallback)
+{this.stopSearch();this._searchResultCallback=searchResultCallback;this._searchFinishedCallback=searchFinishedCallback;this._searchConfig=searchConfig;var projects=this._workspace.projects().filter(this._filterOutServiceProjects);var barrier=new CallbackBarrier();var compositeProgress=new WebInspector.CompositeProgress(progress);for(var i=0;i<projects.length;++i){var project=projects[i];var weight=project.uiSourceCodes().length;var projectProgress=new WebInspector.CompositeProgress(compositeProgress.createSubProgress(weight));var findMatchingFilesProgress=projectProgress.createSubProgress();var searchContentProgress=projectProgress.createSubProgress();var barrierCallback=barrier.createCallback();var callback=this._processMatchingFilesForProject.bind(this,this._searchId,project,searchContentProgress,barrierCallback);project.findFilesMatchingSearchRequest(searchConfig.queries(),searchConfig.fileQueries(),!searchConfig.ignoreCase,searchConfig.isRegex,findMatchingFilesProgress,callback);}
 barrier.callWhenDone(this._searchFinishedCallback.bind(this,true));},_processMatchingFilesForProject:function(searchId,project,progress,callback,files)
 {if(searchId!==this._searchId){this._searchFinishedCallback(false);return;}
 if(!files.length){progress.done();callback();return;}
@@ -908,25 +866,20 @@ matches=matches.mergeOrdered(nextMatches,matchesComparator);}}
 var uiSourceCode=project.uiSourceCode(path);if(matches&&uiSourceCode){var searchResult=new WebInspector.FileBasedSearchResultsPane.SearchResult(uiSourceCode,matches);this._searchResultCallback(searchResult);}
 --callbacksLeft;scheduleSearchInNextFileOrFinish.call(this);}},stopSearch:function()
 {++this._searchId;},createSearchResultsPane:function(searchConfig)
-{return new WebInspector.FileBasedSearchResultsPane(searchConfig);}};WebInspector.StyleSheetOutlineDialog=function(view,uiSourceCode,selectItemCallback)
-{WebInspector.SelectionDialogContentProvider.call(this);this._selectItemCallback=selectItemCallback;this._rules=[];this._view=view;this._uiSourceCode=uiSourceCode;this._requestItems();}
+{return new WebInspector.FileBasedSearchResultsPane(searchConfig);}};WebInspector.StyleSheetOutlineDialog=function(uiSourceCode,selectItemCallback)
+{WebInspector.SelectionDialogContentProvider.call(this);this._selectItemCallback=selectItemCallback;this._cssParser=new WebInspector.CSSParser();this._cssParser.addEventListener(WebInspector.CSSParser.Events.RulesParsed,this.refresh.bind(this));this._cssParser.parse(uiSourceCode.workingCopy());}
 WebInspector.StyleSheetOutlineDialog.show=function(view,uiSourceCode,selectItemCallback)
 {if(WebInspector.Dialog.currentInstance())
-return null;var delegate=new WebInspector.StyleSheetOutlineDialog(view,uiSourceCode,selectItemCallback);var filteredItemSelectionDialog=new WebInspector.FilteredItemSelectionDialog(delegate);WebInspector.Dialog.show(view.element,filteredItemSelectionDialog);}
+return null;var delegate=new WebInspector.StyleSheetOutlineDialog(uiSourceCode,selectItemCallback);var filteredItemSelectionDialog=new WebInspector.FilteredItemSelectionDialog(delegate);WebInspector.Dialog.show(view.element,filteredItemSelectionDialog);}
 WebInspector.StyleSheetOutlineDialog.prototype={itemCount:function()
-{return this._rules.length;},itemKeyAt:function(itemIndex)
-{return this._rules[itemIndex].selectorText;},itemScoreAt:function(itemIndex,query)
-{var rule=this._rules[itemIndex];return-rule.rawLocation.lineNumber;},renderItem:function(itemIndex,query,titleElement,subtitleElement)
-{var rule=this._rules[itemIndex];titleElement.textContent=rule.selectorText;this.highlightRanges(titleElement,query);subtitleElement.textContent=":"+(rule.rawLocation.lineNumber+1);},_requestItems:function()
-{function didGetAllStyleSheets(error,infos)
-{if(error)
-return;for(var i=0;i<infos.length;++i){var info=infos[i];if(info.sourceURL===this._uiSourceCode.url){WebInspector.CSSStyleSheet.createForId(info.styleSheetId,didGetStyleSheet.bind(this));return;}}}
-CSSAgent.getAllStyleSheets(didGetAllStyleSheets.bind(this));function didGetStyleSheet(styleSheet)
-{if(!styleSheet)
-return;this._rules=styleSheet.rules;this.refresh();}},selectItem:function(itemIndex,promptValue)
-{var rule=this._rules[itemIndex];var lineNumber=rule.rawLocation.lineNumber;if(!isNaN(lineNumber)&&lineNumber>=0)
-this._selectItemCallback(lineNumber,rule.rawLocation.columnNumber);},__proto__:WebInspector.SelectionDialogContentProvider.prototype};WebInspector.TabbedEditorContainerDelegate=function(){}
-WebInspector.TabbedEditorContainerDelegate.prototype={viewForFile:function(uiSourceCode){}}
+{return this._cssParser.rules().length;},itemKeyAt:function(itemIndex)
+{var rule=this._cssParser.rules()[itemIndex];return rule.selectorText||rule.atRule;},itemScoreAt:function(itemIndex,query)
+{var rule=this._cssParser.rules()[itemIndex];return-rule.lineNumber;},renderItem:function(itemIndex,query,titleElement,subtitleElement)
+{var rule=this._cssParser.rules()[itemIndex];titleElement.textContent=rule.selectorText||rule.atRule;this.highlightRanges(titleElement,query);subtitleElement.textContent=":"+(rule.lineNumber+1);},selectItem:function(itemIndex,promptValue)
+{var rule=this._cssParser.rules()[itemIndex];var lineNumber=rule.lineNumber;if(!isNaN(lineNumber)&&lineNumber>=0)
+this._selectItemCallback(lineNumber,rule.columnNumber);},dispose:function()
+{this._cssParser.dispose();},__proto__:WebInspector.SelectionDialogContentProvider.prototype};WebInspector.TabbedEditorContainerDelegate=function(){}
+WebInspector.TabbedEditorContainerDelegate.prototype={viewForFile:function(uiSourceCode){},}
 WebInspector.TabbedEditorContainer=function(delegate,settingName,placeholderText)
 {WebInspector.Object.call(this);this._delegate=delegate;this._tabbedPane=new WebInspector.TabbedPane();this._tabbedPane.setPlaceholderText(placeholderText);this._tabbedPane.setTabDelegate(new WebInspector.EditorContainerTabDelegate(this));this._tabbedPane.closeableTabs=true;this._tabbedPane.element.id="sources-editor-container-tabbed-pane";this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabClosed,this._tabClosed,this);this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected,this._tabSelected,this);this._tabIds=new Map();this._files={};this._previouslyViewedFilesSetting=WebInspector.settings.createSetting(settingName,[]);this._history=WebInspector.TabbedEditorContainer.History.fromObject(this._previouslyViewedFilesSetting.get());}
 WebInspector.TabbedEditorContainer.Events={EditorSelected:"EditorSelected",EditorClosed:"EditorClosed"}
@@ -934,20 +887,22 @@ WebInspector.TabbedEditorContainer._tabId=0;WebInspector.TabbedEditorContainer.m
 {return this._tabbedPane;},get visibleView()
 {return this._tabbedPane.visibleView;},show:function(parentElement)
 {this._tabbedPane.show(parentElement);},showFile:function(uiSourceCode)
-{this._innerShowFile(uiSourceCode,true);},historyUISourceCodes:function()
+{this._innerShowFile(uiSourceCode,true);},closeFile:function(uiSourceCode)
+{var tabId=this._tabIds.get(uiSourceCode);if(!tabId)
+return;this._closeTabs([tabId]);},historyUISourceCodes:function()
 {var uriToUISourceCode={};for(var id in this._files){var uiSourceCode=this._files[id];uriToUISourceCode[uiSourceCode.uri()]=uiSourceCode;}
 var result=[];var uris=this._history._urls();for(var i=0;i<uris.length;++i){var uiSourceCode=uriToUISourceCode[uris[i]];if(uiSourceCode)
 result.push(uiSourceCode);}
-return result;},_addScrollAndSelectionListeners:function()
+return result;},_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);},_removeScrollAndSelectionListeners:function()
+return;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);},_scrollChanged:function(event)
 {var lineNumber=(event.data);this._history.updateScrollLineNumber(this._currentFile.uri(),lineNumber);this._history.save(this._previouslyViewedFilesSetting);},_selectionChanged:function(event)
 {var range=(event.data);this._history.updateSelectionRange(this._currentFile.uri(),range);this._history.save(this._previouslyViewedFilesSetting);},_innerShowFile:function(uiSourceCode,userGesture)
 {if(this._currentFile===uiSourceCode)
-return;this._removeScrollAndSelectionListeners();this._currentFile=uiSourceCode;var tabId=this._tabIds.get(uiSourceCode)||this._appendFileTab(uiSourceCode,userGesture);this._tabbedPane.selectTab(tabId,userGesture);if(userGesture)
-this._editorSelectedByUserAction();this._currentView=this.visibleView;this._addScrollAndSelectionListeners();var eventData={currentFile:this._currentFile,userGesture:userGesture};this.dispatchEventToListeners(WebInspector.TabbedEditorContainer.Events.EditorSelected,eventData);},_titleForFile:function(uiSourceCode)
+return;this._removeViewListeners();this._currentFile=uiSourceCode;var tabId=this._tabIds.get(uiSourceCode)||this._appendFileTab(uiSourceCode,userGesture);this._tabbedPane.selectTab(tabId,userGesture);if(userGesture)
+this._editorSelectedByUserAction();this._currentView=this.visibleView;this._addViewListeners();var eventData={currentFile:this._currentFile,userGesture:userGesture};this.dispatchEventToListeners(WebInspector.TabbedEditorContainer.Events.EditorSelected,eventData);},_titleForFile:function(uiSourceCode)
 {var maxDisplayNameLength=30;var title=uiSourceCode.displayName(true).trimMiddle(maxDisplayNameLength);if(uiSourceCode.isDirty()||uiSourceCode.hasUnsavedCommittedChanges())
 title+="*";return title;},_maybeCloseTab:function(id,nextTabId)
 {var uiSourceCode=this._files[id];var shouldPrompt=uiSourceCode.isDirty()&&uiSourceCode.project().canSetFileContent();if(!shouldPrompt||confirm(WebInspector.UIString("Are you sure you want to close unsaved file: %s?",uiSourceCode.name()))){uiSourceCode.resetWorkingCopy();if(nextTabId)
@@ -979,19 +934,18 @@ this._history.update(tabIds.map(tabIdToURI.bind(this)));this._history.save(this.
 {var view=this._delegate.viewForFile(uiSourceCode);var title=this._titleForFile(uiSourceCode);var tooltip=this._tooltipForFile(uiSourceCode);var tabId=this._generateTabId();this._tabIds.put(uiSourceCode,tabId);this._files[tabId]=uiSourceCode;var savedSelectionRange=this._history.selectionRange(uiSourceCode.uri());if(savedSelectionRange)
 view.setSelection(savedSelectionRange);var savedScrollLineNumber=this._history.scrollLineNumber(uiSourceCode.uri());if(savedScrollLineNumber)
 view.scrollToLine(savedScrollLineNumber);this._tabbedPane.appendTab(tabId,title,view,tooltip,userGesture);this._updateFileTitle(uiSourceCode);this._addUISourceCodeListeners(uiSourceCode);return tabId;},_tabClosed:function(event)
-{var tabId=(event.data.tabId);var userGesture=(event.data.isUserGesture);var uiSourceCode=this._files[tabId];if(this._currentFile===uiSourceCode){this._removeScrollAndSelectionListeners();delete this._currentView;delete this._currentFile;}
+{var tabId=(event.data.tabId);var userGesture=(event.data.isUserGesture);var uiSourceCode=this._files[tabId];if(this._currentFile===uiSourceCode){this._removeViewListeners();delete this._currentView;delete this._currentFile;}
 this._tabIds.remove(uiSourceCode);delete this._files[tabId];this._removeUISourceCodeListeners(uiSourceCode);this.dispatchEventToListeners(WebInspector.TabbedEditorContainer.Events.EditorClosed,uiSourceCode);if(userGesture)
 this._editorClosedByUserAction(uiSourceCode);},_tabSelected:function(event)
 {var tabId=(event.data.tabId);var userGesture=(event.data.isUserGesture);var uiSourceCode=this._files[tabId];this._innerShowFile(uiSourceCode,userGesture);},_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.FormattedChanged,this._uiSourceCodeFormattedChanged,this);},_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.FormattedChanged,this._uiSourceCodeFormattedChanged,this);},_updateFileTitle: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);},_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);},_updateFileTitle:function(uiSourceCode)
 {var tabId=this._tabIds.get(uiSourceCode);if(tabId){var title=this._titleForFile(uiSourceCode);this._tabbedPane.changeTabTitle(tabId,title);if(uiSourceCode.hasUnsavedCommittedChanges())
 this._tabbedPane.setTabIcon(tabId,"editor-container-unsaved-committed-changes-icon",WebInspector.UIString("Changes to this file were not saved to file system."));else
 this._tabbedPane.setTabIcon(tabId,"");}},_uiSourceCodeTitleChanged:function(event)
 {var uiSourceCode=(event.target);this._updateFileTitle(uiSourceCode);this._updateHistory();},_uiSourceCodeWorkingCopyChanged:function(event)
 {var uiSourceCode=(event.target);this._updateFileTitle(uiSourceCode);},_uiSourceCodeWorkingCopyCommitted:function(event)
 {var uiSourceCode=(event.target);this._updateFileTitle(uiSourceCode);},_uiSourceCodeSavedStateUpdated:function(event)
-{var uiSourceCode=(event.target);this._updateFileTitle(uiSourceCode);},_uiSourceCodeFormattedChanged:function(event)
 {var uiSourceCode=(event.target);this._updateFileTitle(uiSourceCode);},reset:function()
 {delete this._userSelectedFiles;},_generateTabId:function()
 {return"tab_"+(WebInspector.TabbedEditorContainer._tabId++);},currentFile:function()
@@ -1121,52 +1075,267 @@ WebInspector.WatchedPropertyTreeElement.prototype={onattach:function()
 {WebInspector.ObjectPropertyTreeElement.prototype.onattach.call(this);if(this.hasChildren&&this.propertyPath()in this.treeOutline.section._expandedProperties)
 this.expand();},onexpand:function()
 {WebInspector.ObjectPropertyTreeElement.prototype.onexpand.call(this);this.treeOutline.section._expandedProperties[this.propertyPath()]=true;},oncollapse:function()
-{WebInspector.ObjectPropertyTreeElement.prototype.oncollapse.call(this);delete this.treeOutline.section._expandedProperties[this.propertyPath()];},__proto__:WebInspector.ObjectPropertyTreeElement.prototype};WebInspector.Worker=function(id,url,shared)
-{this.id=id;this.url=url;this.shared=shared;}
-WebInspector.WorkersSidebarPane=function(workerManager)
+{WebInspector.ObjectPropertyTreeElement.prototype.oncollapse.call(this);delete this.treeOutline.section._expandedProperties[this.propertyPath()];},__proto__:WebInspector.ObjectPropertyTreeElement.prototype};WebInspector.WorkersSidebarPane=function()
 {WebInspector.SidebarPane.call(this,WebInspector.UIString("Workers"));this._enableWorkersCheckbox=new WebInspector.Checkbox(WebInspector.UIString("Pause on start"),"sidebar-label",WebInspector.UIString("Automatically attach to new workers and pause them. Enabling this option will force opening inspector for all new workers."));this._enableWorkersCheckbox.element.id="pause-workers-checkbox";this.bodyElement.appendChild(this._enableWorkersCheckbox.element);this._enableWorkersCheckbox.addEventListener(this._autoattachToWorkersClicked.bind(this));this._enableWorkersCheckbox.checked=false;var note=this.bodyElement.createChild("div");note.id="shared-workers-list";note.classList.add("sidebar-label")
-note.textContent=WebInspector.UIString("Shared workers can be inspected in the Task Manager");var separator=this.bodyElement.createChild("div","sidebar-separator");separator.textContent=WebInspector.UIString("Dedicated worker inspectors");this._workerListElement=document.createElement("ol");this._workerListElement.tabIndex=0;this._workerListElement.classList.add("properties-tree");this._workerListElement.classList.add("sidebar-label");this.bodyElement.appendChild(this._workerListElement);this._idToWorkerItem={};this._workerManager=workerManager;workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkerAdded,this._workerAdded,this);workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkerRemoved,this._workerRemoved,this);workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkersCleared,this._workersCleared,this);}
+note.textContent=WebInspector.UIString("Shared workers can be inspected in the Task Manager");var separator=this.bodyElement.createChild("div","sidebar-separator");separator.textContent=WebInspector.UIString("Dedicated worker inspectors");this._workerListElement=document.createElement("ol");this._workerListElement.tabIndex=0;this._workerListElement.classList.add("properties-tree");this._workerListElement.classList.add("sidebar-label");this.bodyElement.appendChild(this._workerListElement);this._idToWorkerItem={};var threadList=WebInspector.workerManager.threadsList();for(var i=0;i<threadList.length;++i){var threadId=threadList[i];if(threadId===WebInspector.WorkerManager.MainThreadId)
+continue;this._addWorker(threadId,WebInspector.workerManager.threadUrl(threadId));}
+WebInspector.workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkerAdded,this._workerAdded,this);WebInspector.workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkerRemoved,this._workerRemoved,this);WebInspector.workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkersCleared,this._workersCleared,this);}
 WebInspector.WorkersSidebarPane.prototype={_workerAdded:function(event)
-{this._addWorker(event.data.workerId,event.data.url,event.data.inspectorConnected);},_workerRemoved:function(event)
+{this._addWorker(event.data.workerId,event.data.url);},_workerRemoved:function(event)
 {this._idToWorkerItem[event.data].remove();delete this._idToWorkerItem[event.data];},_workersCleared:function(event)
-{this._idToWorkerItem={};this._workerListElement.removeChildren();},_addWorker:function(workerId,url,inspectorConnected)
+{this._idToWorkerItem={};this._workerListElement.removeChildren();},_addWorker:function(workerId,url)
 {var item=this._workerListElement.createChild("div","dedicated-worker-item");var link=item.createChild("a");link.textContent=url;link.href="#";link.target="_blank";link.addEventListener("click",this._workerItemClicked.bind(this,workerId),true);this._idToWorkerItem[workerId]=item;},_workerItemClicked:function(workerId,event)
-{event.preventDefault();this._workerManager.openWorkerInspector(workerId);},_autoattachToWorkersClicked:function(event)
-{WorkerAgent.setAutoconnectToWorkers(this._enableWorkersCheckbox.checked);},__proto__:WebInspector.SidebarPane.prototype};WebInspector.SourcesPanel=function(workspaceForTest)
-{WebInspector.Panel.call(this,"sources");this.registerRequiredCSS("sourcesPanel.css");this.registerRequiredCSS("textPrompt.css");WebInspector.settings.navigatorWasOnceHidden=WebInspector.settings.createSetting("navigatorWasOnceHidden",false);WebInspector.settings.debuggerSidebarHidden=WebInspector.settings.createSetting("debuggerSidebarHidden",false);WebInspector.settings.showEditorInDrawer=WebInspector.settings.createSetting("showEditorInDrawer",true);this._workspace=workspaceForTest||WebInspector.workspace;function viewGetter()
-{return this;}
-WebInspector.GoToLineDialog.install(this,viewGetter.bind(this));var helpSection=WebInspector.shortcutsScreen.section(WebInspector.UIString("Sources Panel"));this.debugToolbar=this._createDebugToolbar();const initialDebugSidebarWidth=225;const minimumDebugSidebarWidthPercent=0.5;this.createSidebarView(this.element,WebInspector.SidebarView.SidebarPosition.End,initialDebugSidebarWidth);this.splitView.element.id="scripts-split-view";this.splitView.setSidebarElementConstraints(Preferences.minScriptsSidebarWidth);this.splitView.setMainElementConstraints(minimumDebugSidebarWidthPercent);const initialNavigatorWidth=225;const minimumViewsContainerWidthPercent=0.5;this.editorView=new WebInspector.SidebarView(WebInspector.SidebarView.SidebarPosition.Start,"scriptsPanelNavigatorSidebarWidth",initialNavigatorWidth);this.editorView.element.id="scripts-editor-split-view";this.editorView.element.tabIndex=0;this.editorView.setSidebarElementConstraints(Preferences.minScriptsSidebarWidth);this.editorView.setMainElementConstraints(minimumViewsContainerWidthPercent);this.splitView.setMainView(this.editorView);this._navigator=new WebInspector.SourcesNavigator();this.editorView.setSidebarView(this._navigator.view);var tabbedEditorPlaceholderText=WebInspector.isMac()?WebInspector.UIString("Hit Cmd+O to open a file"):WebInspector.UIString("Hit Ctrl+O to open a file");this.editorView.mainElement().classList.add("vbox");this.editorView.sidebarElement().classList.add("vbox");this.sourcesView=new WebInspector.SourcesView();this._searchableView=new WebInspector.SearchableView(this);this._searchableView.setMinimalSearchQuerySize(0);this._searchableView.show(this.sourcesView.element);this._editorContainer=new WebInspector.TabbedEditorContainer(this,"previouslyViewedFiles",tabbedEditorPlaceholderText);this._editorContainer.show(this._searchableView.element);this._navigatorController=new WebInspector.NavigatorOverlayController(this.editorView,this._navigator.view,this._editorContainer.view);this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.SourceSelected,this._sourceSelected,this);this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.ItemSearchStarted,this._itemSearchStarted,this);this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.ItemCreationRequested,this._itemCreationRequested,this);this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.ItemRenamingRequested,this._itemRenamingRequested,this);this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorSelected,this._editorSelected,this);this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorClosed,this._editorClosed,this);this._debugSidebarResizeWidgetElement=document.createElementWithClass("div","resizer-widget");this._debugSidebarResizeWidgetElement.id="scripts-debug-sidebar-resizer-widget";this.splitView.installResizer(this._debugSidebarResizeWidgetElement);this.sidebarPanes={};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.CallFrameRestarted,this._callFrameRestartedInSidebar.bind(this));this.sidebarPanes.scopechain=new WebInspector.ScopeChainSidebarPane();this.sidebarPanes.jsBreakpoints=new WebInspector.JavaScriptBreakpointsSidebarPane(WebInspector.breakpointManager,this._showSourceLocation.bind(this));this.sidebarPanes.domBreakpoints=WebInspector.domBreakpointsSidebarPane.createProxy(this);this.sidebarPanes.xhrBreakpoints=new WebInspector.XHRBreakpointsSidebarPane();this.sidebarPanes.eventListenerBreakpoints=new WebInspector.EventListenerBreakpointsSidebarPane();if(Capabilities.canInspectWorkers&&!WebInspector.WorkerManager.isWorkerFrontend()){WorkerAgent.enable();this.sidebarPanes.workerList=new WebInspector.WorkersSidebarPane(WebInspector.workerManager);}
-function currentSourceFrame()
-{var uiSourceCode=this.currentUISourceCode();if(!uiSourceCode)
-return null;return this._sourceFramesByUISourceCode.get(uiSourceCode);}
-this._historyManager=new WebInspector.EditingLocationHistoryManager(this,currentSourceFrame.bind(this));this.registerShortcuts(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation,this._onJumpToPreviousLocation.bind(this));this.registerShortcuts(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation,this._onJumpToNextLocation.bind(this));this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(this));this.registerShortcuts(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToMember,this._showOutlineDialog.bind(this));this.registerShortcuts(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint,this._toggleBreakpoint.bind(this));this._extensionSidebarPanes=[];this._toggleFormatSourceButton=new WebInspector.StatusBarButton(WebInspector.UIString("Pretty print"),"sources-toggle-pretty-print-status-bar-item");this._toggleFormatSourceButton.toggled=false;this._toggleFormatSourceButton.addEventListener("click",this._toggleFormatSource,this);this._scriptViewStatusBarItemsContainer=document.createElement("div");this._scriptViewStatusBarItemsContainer.className="inline-block";this._scriptViewStatusBarTextContainer=document.createElement("div");this._scriptViewStatusBarTextContainer.className="inline-block";this._statusBarContainerElement=this.sourcesView.element.createChild("div","sources-status-bar");this._statusBarContainerElement.appendChild(this._toggleFormatSourceButton.element);this._statusBarContainerElement.appendChild(this._scriptViewStatusBarItemsContainer);this._statusBarContainerElement.appendChild(this._scriptViewStatusBarTextContainer);this._installDebuggerSidebarController();WebInspector.dockController.addEventListener(WebInspector.DockController.Events.DockSideChanged,this._dockSideChanged.bind(this));WebInspector.settings.splitVerticallyWhenDockedToRight.addChangeListener(this._dockSideChanged.bind(this));this._dockSideChanged();this._sourceFramesByUISourceCode=new Map();this._updateDebuggerButtons();this._pauseOnExceptionStateChanged();if(WebInspector.debuggerModel.isPaused())
-this._showDebuggerPausedDetails();WebInspector.settings.pauseOnExceptionStateString.addChangeListener(this._pauseOnExceptionStateChanged,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasEnabled,this._debuggerWasEnabled,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasDisabled,this._debuggerWasDisabled,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerPaused,this._debuggerPaused,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerResumed,this._debuggerResumed,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.CallFrameSelected,this._callFrameSelected,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ConsoleCommandEvaluatedInSelectedCallFrame,this._consoleCommandEvaluatedInSelectedCallFrame,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.BreakpointsActiveStateChanged,this._breakpointsActiveStateChanged,this);WebInspector.startBatchUpdate();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.ProjectWillReset,this._projectWillReset.bind(this),this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared,this._debuggerReset,this);this._boundOnKeyUp=this._onKeyUp.bind(this);this._boundOnKeyDown=this._onKeyDown.bind(this);function handleBeforeUnload(event)
+{event.preventDefault();WebInspector.workerFrontendManager.openWorkerInspector(workerId);},_autoattachToWorkersClicked:function(event)
+{WorkerAgent.setAutoconnectToWorkers(this._enableWorkersCheckbox.checked);},__proto__:WebInspector.SidebarPane.prototype};WebInspector.ThreadsToolbar=function()
+{this.element=document.createElement("div");this.element.className="status-bar scripts-debug-toolbar threads-toolbar hidden";this._comboBox=new WebInspector.StatusBarComboBox(this._onComboBoxSelectionChange.bind(this));this.element.appendChild(this._comboBox.element);this._reset();if(WebInspector.experimentsSettings.workersInMainWindow.isEnabled()){WebInspector.workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkerAdded,this._workerAdded,this);WebInspector.workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkerRemoved,this._workerRemoved,this);WebInspector.workerManager.addEventListener(WebInspector.WorkerManager.Events.WorkersCleared,this._workersCleared,this);}}
+WebInspector.ThreadsToolbar.prototype={_reset:function()
+{if(!WebInspector.experimentsSettings.workersInMainWindow.isEnabled())
+return;this._threadIdToOption={};var connectedThreads=WebInspector.workerManager.threadsList();for(var i=0;i<connectedThreads.length;++i){var threadId=connectedThreads[i];this._addOption(threadId,WebInspector.workerManager.threadUrl(threadId));}
+this._alterVisibility();this._comboBox.select(this._threadIdToOption[WebInspector.workerManager.selectedThreadId()]);},_addOption:function(workerId,url)
+{var option=this._comboBox.createOption(url,"",String(workerId));this._threadIdToOption[workerId]=option;},_workerAdded:function(event)
+{var data=(event.data);this._addOption(data.workerId,data.url);this._alterVisibility();},_workerRemoved:function(event)
+{var data=(event.data);this._comboBox.removeOption(this._threadIdToOption[data.workerId]);delete this._threadIdToOption[data.workerId];this._alterVisibility();},_workersCleared:function()
+{this._comboBox.removeOptions();this._reset();},_onComboBoxSelectionChange:function()
+{var selectedOption=this._comboBox.selectedOption();if(!selectedOption)
+return;WebInspector.workerManager.setSelectedThreadId(parseInt(selectedOption.value,10));},_alterVisibility:function()
+{var hidden=this._comboBox.size()===1;this.element.classList.toggle("hidden",hidden);}};WebInspector.FormatterScriptMapping=function(workspace,debuggerModel)
+{this._workspace=workspace;this._debuggerModel=debuggerModel;this._init();this._projectDelegate=new WebInspector.FormatterProjectDelegate();this._workspace.addProject(this._projectDelegate);this._debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared,this._debuggerReset,this);}
+WebInspector.FormatterScriptMapping.prototype={rawLocationToUILocation:function(rawLocation)
+{var debuggerModelLocation=(rawLocation);var script=this._debuggerModel.scriptForId(debuggerModelLocation.scriptId);var uiSourceCode=this._uiSourceCodes.get(script);if(!uiSourceCode)
+return null;var formatData=this._formatData.get(uiSourceCode);if(!formatData)
+return null;var mapping=formatData.mapping;var lineNumber=debuggerModelLocation.lineNumber;var columnNumber=debuggerModelLocation.columnNumber||0;var formattedLocation=mapping.originalToFormatted(lineNumber,columnNumber);return new WebInspector.UILocation(uiSourceCode,formattedLocation[0],formattedLocation[1]);},uiLocationToRawLocation:function(uiSourceCode,lineNumber,columnNumber)
+{var formatData=this._formatData.get(uiSourceCode);if(!formatData)
+return null;var originalLocation=formatData.mapping.formattedToOriginal(lineNumber,columnNumber)
+return this._debuggerModel.createRawLocation(formatData.scripts[0],originalLocation[0],originalLocation[1]);},isIdentity:function()
+{return false;},_scriptsForUISourceCode:function(uiSourceCode)
+{function isInlineScript(script)
+{return script.isInlineScript();}
+if(uiSourceCode.contentType()===WebInspector.resourceTypes.Document)
+return this._debuggerModel.scriptsForSourceURL(uiSourceCode.url).filter(isInlineScript);if(uiSourceCode.contentType()===WebInspector.resourceTypes.Script){var rawLocation=uiSourceCode.uiLocationToRawLocation(0,0);return rawLocation?[this._debuggerModel.scriptForId(rawLocation.scriptId)]:[];}
+return[];},_init:function()
+{this._uiSourceCodes=new Map();this._formattedPaths=new StringMap();this._formatData=new Map();},_debuggerReset:function()
+{var formattedPaths=this._formattedPaths.values();for(var i=0;i<formattedPaths.length;++i)
+this._projectDelegate._removeFormatted(formattedPaths[i]);this._init();},_performUISourceCodeScriptFormatting:function(uiSourceCode,callback)
+{var path=this._formattedPaths.get(uiSourceCode.project().id()+":"+uiSourceCode.path());if(path){var uiSourceCodePath=path;var formattedUISourceCode=this._workspace.uiSourceCode(this._projectDelegate.id(),uiSourceCodePath);var formatData=formattedUISourceCode?this._formatData.get(formattedUISourceCode):null;if(!formatData)
+callback(null);else
+callback(formattedUISourceCode,formatData.mapping);return;}
+uiSourceCode.requestContent(contentLoaded.bind(this));function contentLoaded(content)
+{var formatter=WebInspector.Formatter.createFormatter(uiSourceCode.contentType());formatter.formatContent(uiSourceCode.highlighterType(),content||"",innerCallback.bind(this));}
+function innerCallback(formattedContent,formatterMapping)
+{var scripts=this._scriptsForUISourceCode(uiSourceCode);if(!scripts.length){callback(null);return;}
+var name;if(uiSourceCode.contentType()===WebInspector.resourceTypes.Document)
+name=uiSourceCode.displayName();else
+name=uiSourceCode.name()||scripts[0].scriptId;path=this._projectDelegate._addFormatted(name,uiSourceCode.url,uiSourceCode.contentType(),formattedContent);var formattedUISourceCode=(this._workspace.uiSourceCode(this._projectDelegate.id(),path));var formatData=new WebInspector.FormatterScriptMapping.FormatData(uiSourceCode.project().id(),uiSourceCode.path(),formatterMapping,scripts);this._formatData.put(formattedUISourceCode,formatData);this._formattedPaths.put(uiSourceCode.project().id()+":"+uiSourceCode.path(),path);for(var i=0;i<scripts.length;++i){this._uiSourceCodes.put(scripts[i],formattedUISourceCode);scripts[i].pushSourceMapping(this);}
+formattedUISourceCode.setSourceMapping(this);callback(formattedUISourceCode,formatterMapping);}},_discardFormattedUISourceCodeScript:function(formattedUISourceCode)
+{var formatData=this._formatData.get(formattedUISourceCode);if(!formatData)
+return null;this._formatData.remove(formattedUISourceCode);this._formattedPaths.remove(formatData.projectId+":"+formatData.path);for(var i=0;i<formatData.scripts.length;++i){this._uiSourceCodes.remove(formatData.scripts[i]);formatData.scripts[i].popSourceMapping();}
+this._projectDelegate._removeFormatted(formattedUISourceCode.path());return formatData.mapping;},}
+WebInspector.FormatterScriptMapping.FormatData=function(projectId,path,mapping,scripts)
+{this.projectId=projectId;this.path=path;this.mapping=mapping;this.scripts=scripts;}
+WebInspector.FormatterProjectDelegate=function()
+{WebInspector.ContentProviderBasedProjectDelegate.call(this,WebInspector.projectTypes.Formatter);}
+WebInspector.FormatterProjectDelegate.prototype={id:function()
+{return"formatter:";},displayName:function()
+{return"formatter";},_addFormatted:function(name,sourceURL,contentType,content)
+{var contentProvider=new WebInspector.StaticContentProvider(contentType,content);return this.addContentProvider(sourceURL,name+":formatted","deobfuscated:"+sourceURL,contentProvider,false,false);},_removeFormatted:function(path)
+{this.removeFile(path);},__proto__:WebInspector.ContentProviderBasedProjectDelegate.prototype}
+WebInspector.ScriptFormatterEditorAction=function()
+{this._scriptMapping=new WebInspector.FormatterScriptMapping(WebInspector.workspace,WebInspector.debuggerModel);}
+WebInspector.ScriptFormatterEditorAction.prototype={_editorSelected:function(event)
+{var uiSourceCode=(event.data);this._updateButton(uiSourceCode);},_editorClosed:function(event)
+{var uiSourceCode=(event.data.uiSourceCode);var wasSelected=(event.data.wasSelected);if(wasSelected)
+this._updateButton(null);this._discardFormattedUISourceCodeScript(uiSourceCode);},_updateButton:function(uiSourceCode)
+{this._button.element.classList.toggle("hidden",!this._isFormatableScript(uiSourceCode));},button:function(sourcesView)
+{if(this._button)
+return this._button.element;this._sourcesView=sourcesView;this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSelected,this._editorSelected.bind(this));this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClosed,this._editorClosed.bind(this));this._button=new WebInspector.StatusBarButton(WebInspector.UIString("Pretty print"),"sources-toggle-pretty-print-status-bar-item");this._button.toggled=false;this._button.addEventListener("click",this._toggleFormatScriptSource,this);this._updateButton(null);return this._button.element;},_isFormatableScript:function(uiSourceCode)
+{if(!uiSourceCode)
+return false;var projectType=uiSourceCode.project().type();if(projectType!==WebInspector.projectTypes.Network&&projectType!==WebInspector.projectTypes.Debugger)
+return false;var contentType=uiSourceCode.contentType();return contentType===WebInspector.resourceTypes.Script||contentType===WebInspector.resourceTypes.Document;},_toggleFormatScriptSource:function()
+{var uiSourceCode=this._sourcesView.currentUISourceCode();if(!this._isFormatableScript(uiSourceCode))
+return;this._formatUISourceCodeScript(uiSourceCode);WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.TogglePrettyPrint,enabled:true,url:uiSourceCode.originURL()});},_formatUISourceCodeScript:function(uiSourceCode)
+{this._scriptMapping._performUISourceCodeScriptFormatting(uiSourceCode,innerCallback.bind(this));function innerCallback(formattedUISourceCode,mapping)
+{if(!formattedUISourceCode)
+return;if(uiSourceCode!==this._sourcesView.currentUISourceCode())
+return;var sourceFrame=this._sourcesView.viewForFile(uiSourceCode);var start=[0,0];if(sourceFrame){var selection=sourceFrame.selection();start=mapping.originalToFormatted(selection.startLine,selection.startColumn);}
+this._sourcesView.showSourceLocation(formattedUISourceCode,start[0],start[1]);this._updateButton(formattedUISourceCode);}},_discardFormattedUISourceCodeScript:function(uiSourceCode)
+{this._scriptMapping._discardFormattedUISourceCodeScript(uiSourceCode);}};WebInspector.InplaceFormatterEditorAction=function()
+{}
+WebInspector.InplaceFormatterEditorAction.prototype={_editorSelected:function(event)
+{var uiSourceCode=(event.data);this._updateButton(uiSourceCode);},_editorClosed:function(event)
+{var wasSelected=(event.data.wasSelected);if(wasSelected)
+this._updateButton(null);},_updateButton:function(uiSourceCode)
+{this._button.element.classList.toggle("hidden",!this._isFormattable(uiSourceCode));},button:function(sourcesView)
+{if(this._button)
+return this._button.element;this._sourcesView=sourcesView;this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSelected,this._editorSelected.bind(this));this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClosed,this._editorClosed.bind(this));this._button=new WebInspector.StatusBarButton(WebInspector.UIString("Format"),"sources-toggle-pretty-print-status-bar-item");this._button.toggled=false;this._button.addEventListener("click",this._formatSourceInPlace,this);this._updateButton(null);return this._button.element;},_isFormattable:function(uiSourceCode)
+{if(!uiSourceCode)
+return false;return uiSourceCode.contentType()===WebInspector.resourceTypes.Stylesheet||uiSourceCode.project().type()===WebInspector.projectTypes.Snippets;},_formatSourceInPlace:function()
+{var uiSourceCode=this._sourcesView.currentUISourceCode();if(!this._isFormattable(uiSourceCode))
+return;if(uiSourceCode.isDirty())
+contentLoaded.call(this,uiSourceCode.workingCopy());else
+uiSourceCode.requestContent(contentLoaded.bind(this));function contentLoaded(content)
+{var formatter=WebInspector.Formatter.createFormatter(uiSourceCode.contentType());formatter.formatContent(uiSourceCode.highlighterType(),content||"",innerCallback.bind(this));}
+function innerCallback(formattedContent,formatterMapping)
+{if(uiSourceCode.workingCopy()===formattedContent)
+return;var sourceFrame=this._sourcesView.viewForFile(uiSourceCode);var start=[0,0];if(sourceFrame){var selection=sourceFrame.selection();start=formatterMapping.originalToFormatted(selection.startLine,selection.startColumn);}
+uiSourceCode.setWorkingCopy(formattedContent);this._sourcesView.showSourceLocation(uiSourceCode,start[0],start[1]);}},};WebInspector.Formatter=function()
+{}
+WebInspector.Formatter.createFormatter=function(contentType)
+{if(contentType===WebInspector.resourceTypes.Script||contentType===WebInspector.resourceTypes.Document||contentType===WebInspector.resourceTypes.Stylesheet)
+return new WebInspector.ScriptFormatter();return new WebInspector.IdentityFormatter();}
+WebInspector.Formatter.locationToPosition=function(lineEndings,lineNumber,columnNumber)
+{var position=lineNumber?lineEndings[lineNumber-1]+1:0;return position+columnNumber;}
+WebInspector.Formatter.positionToLocation=function(lineEndings,position)
+{var lineNumber=lineEndings.upperBound(position-1);if(!lineNumber)
+var columnNumber=position;else
+var columnNumber=position-lineEndings[lineNumber-1]-1;return[lineNumber,columnNumber];}
+WebInspector.Formatter.prototype={formatContent:function(mimeType,content,callback)
+{}}
+WebInspector.ScriptFormatter=function()
+{this._tasks=[];}
+WebInspector.ScriptFormatter.prototype={formatContent:function(mimeType,content,callback)
+{content=content.replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/^\uFEFF/,'');const method="format";var parameters={mimeType:mimeType,content:content,indentString:WebInspector.settings.textEditorIndent.get()};this._tasks.push({data:parameters,callback:callback});this._worker.postMessage({method:method,params:parameters});},_didFormatContent:function(event)
+{var task=this._tasks.shift();var originalContent=task.data.content;var formattedContent=event.data.content;var mapping=event.data["mapping"];var sourceMapping=new WebInspector.FormatterSourceMappingImpl(originalContent.lineEndings(),formattedContent.lineEndings(),mapping);task.callback(formattedContent,sourceMapping);},get _worker()
+{if(!this._cachedWorker){this._cachedWorker=new Worker("ScriptFormatterWorker.js");this._cachedWorker.onmessage=(this._didFormatContent.bind(this));}
+return this._cachedWorker;}}
+WebInspector.IdentityFormatter=function()
+{this._tasks=[];}
+WebInspector.IdentityFormatter.prototype={formatContent:function(mimeType,content,callback)
+{callback(content,new WebInspector.IdentityFormatterSourceMapping());}}
+WebInspector.FormatterMappingPayload=function()
+{this.original=[];this.formatted=[];}
+WebInspector.FormatterSourceMapping=function()
+{}
+WebInspector.FormatterSourceMapping.prototype={originalToFormatted:function(lineNumber,columnNumber){},formattedToOriginal:function(lineNumber,columnNumber){}}
+WebInspector.IdentityFormatterSourceMapping=function()
+{}
+WebInspector.IdentityFormatterSourceMapping.prototype={originalToFormatted:function(lineNumber,columnNumber)
+{return[lineNumber,columnNumber||0];},formattedToOriginal:function(lineNumber,columnNumber)
+{return[lineNumber,columnNumber||0];}}
+WebInspector.FormatterSourceMappingImpl=function(originalLineEndings,formattedLineEndings,mapping)
+{this._originalLineEndings=originalLineEndings;this._formattedLineEndings=formattedLineEndings;this._mapping=mapping;}
+WebInspector.FormatterSourceMappingImpl.prototype={originalToFormatted:function(lineNumber,columnNumber)
+{var originalPosition=WebInspector.Formatter.locationToPosition(this._originalLineEndings,lineNumber,columnNumber||0);var formattedPosition=this._convertPosition(this._mapping.original,this._mapping.formatted,originalPosition||0);return WebInspector.Formatter.positionToLocation(this._formattedLineEndings,formattedPosition);},formattedToOriginal:function(lineNumber,columnNumber)
+{var formattedPosition=WebInspector.Formatter.locationToPosition(this._formattedLineEndings,lineNumber,columnNumber||0);var originalPosition=this._convertPosition(this._mapping.formatted,this._mapping.original,formattedPosition);return WebInspector.Formatter.positionToLocation(this._originalLineEndings,originalPosition||0);},_convertPosition:function(positions1,positions2,position)
+{var index=positions1.upperBound(position)-1;var convertedPosition=positions2[index]+position-positions1[index];if(index<positions2.length-1&&convertedPosition>positions2[index+1])
+convertedPosition=positions2[index+1];return convertedPosition;}};WebInspector.SourcesView=function(workspace,sourcesPanel)
+{WebInspector.VBox.call(this);this.registerRequiredCSS("sourcesView.css");this.element.id="sources-panel-sources-view";this.setMinimumSize(50,25);this._workspace=workspace;this._sourcesPanel=sourcesPanel;this._searchableView=new WebInspector.SearchableView(this);this._searchableView.setMinimalSearchQuerySize(0);this._searchableView.show(this.element);this._sourceFramesByUISourceCode=new Map();var tabbedEditorPlaceholderText=WebInspector.isMac()?WebInspector.UIString("Hit Cmd+O to open a file"):WebInspector.UIString("Hit Ctrl+O to open a file");this._editorContainer=new WebInspector.TabbedEditorContainer(this,"previouslyViewedFiles",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._historyManager=new WebInspector.EditingLocationHistoryManager(this,this.currentSourceFrame.bind(this));this._scriptViewStatusBarItemsContainer=document.createElement("div");this._scriptViewStatusBarItemsContainer.className="inline-block";this._scriptViewStatusBarTextContainer=document.createElement("div");this._scriptViewStatusBarTextContainer.className="hbox";this._statusBarContainerElement=this.element.createChild("div","sources-status-bar");function appendButtonForExtension(EditorAction)
+{this._statusBarContainerElement.appendChild(EditorAction.button(this));}
+var editorActions=(WebInspector.moduleManager.instances(WebInspector.SourcesView.EditorAction));editorActions.forEach(appendButtonForExtension.bind(this));this._statusBarContainerElement.appendChild(this._scriptViewStatusBarItemsContainer);this._statusBarContainerElement.appendChild(this._scriptViewStatusBarTextContainer);WebInspector.startBatchUpdate();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.ProjectWillReset,this._projectWillReset.bind(this),this);function handleBeforeUnload(event)
 {if(event.returnValue)
 return;var unsavedSourceCodes=WebInspector.workspace.unsavedSourceCodes();if(!unsavedSourceCodes.length)
-return;event.returnValue=WebInspector.UIString("DevTools have unsaved changes that will be permanently lost.");WebInspector.showPanel("sources");for(var i=0;i<unsavedSourceCodes.length;++i)
+return;event.returnValue=WebInspector.UIString("DevTools have unsaved changes that will be permanently lost.");WebInspector.inspectorView.showPanel("sources");for(var i=0;i<unsavedSourceCodes.length;++i)
 WebInspector.panels.sources.showUISourceCode(unsavedSourceCodes[i]);}
-window.addEventListener("beforeunload",handleBeforeUnload.bind(this),true);}
-WebInspector.SourcesPanel.PauseOnExceptionsStates=[WebInspector.DebuggerModel.PauseOnExceptionsState.DontPauseOnExceptions,WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnUncaughtExceptions,WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnAllExceptions];WebInspector.SourcesPanel.prototype={_onJumpToPreviousLocation:function(event)
+window.addEventListener("beforeunload",handleBeforeUnload,true);this._shortcuts={};this.element.addEventListener("keydown",this._handleKeyDown.bind(this),false);}
+WebInspector.SourcesView.Events={EditorClosed:"EditorClosed",EditorSelected:"EditorSelected",}
+WebInspector.SourcesView.prototype={registerShortcuts:function(registerShortcutDelegate)
+{function registerShortcut(shortcuts,handler)
+{registerShortcutDelegate(shortcuts,handler);this._registerShortcuts(shortcuts,handler);}
+registerShortcut.call(this,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation,this._onJumpToPreviousLocation.bind(this));registerShortcut.call(this,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation,this._onJumpToNextLocation.bind(this));registerShortcut.call(this,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab,this._onCloseEditorTab.bind(this));registerShortcut.call(this,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToLine,this._showGoToLineDialog.bind(this));registerShortcut.call(this,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToMember,this._showOutlineDialog.bind(this));registerShortcut.call(this,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint,this._toggleBreakpoint.bind(this));registerShortcut.call(this,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.Save,this._save.bind(this));},_registerShortcuts:function(keys,handler)
+{for(var i=0;i<keys.length;++i)
+this._shortcuts[keys[i].key]=handler;},_handleKeyDown:function(event)
+{var shortcutKey=WebInspector.KeyboardShortcut.makeKeyFromEvent(event);var handler=this._shortcuts[shortcutKey];if(handler&&handler())
+event.consume(true);},statusBarContainerElement:function()
+{return this._statusBarContainerElement;},defaultFocusedElement:function()
+{return this._editorContainer.view.defaultFocusedElement();},searchableView:function()
+{return this._searchableView;},visibleView:function()
+{return this._editorContainer.visibleView;},currentSourceFrame:function()
+{var view=this.visibleView();if(!(view instanceof WebInspector.SourceFrame))
+return null;return(view);},currentUISourceCode:function()
+{return this._currentUISourceCode;},_onCloseEditorTab:function(event)
+{var uiSourceCode=this.currentUISourceCode();if(!uiSourceCode)
+return false;this._editorContainer.closeFile(uiSourceCode);return true;},_onJumpToPreviousLocation:function(event)
 {this._historyManager.rollback();return true;},_onJumpToNextLocation:function(event)
-{this._historyManager.rollover();return true;},defaultFocusedElement:function()
-{return this._editorContainer.view.defaultFocusedElement()||this._navigator.view.defaultFocusedElement();},get paused()
-{return this._paused;},wasShown:function()
-{WebInspector.inspectorView.closeViewInDrawer("editor");this.editorView.setMainView(this.sourcesView);WebInspector.Panel.prototype.wasShown.call(this);this._navigatorController.wasShown();this.element.addEventListener("keydown",this._boundOnKeyDown,false);this.element.addEventListener("keyup",this._boundOnKeyUp,false);},willHide:function()
-{this.element.removeEventListener("keydown",this._boundOnKeyDown,false);this.element.removeEventListener("keyup",this._boundOnKeyUp,false);WebInspector.Panel.prototype.willHide.call(this);},searchableView:function()
-{return this._searchableView;},_uiSourceCodeAdded:function(event)
+{this._historyManager.rollover();return true;},_uiSourceCodeAdded:function(event)
 {var uiSourceCode=(event.data);this._addUISourceCode(uiSourceCode);},_addUISourceCode:function(uiSourceCode)
-{if(this._toggleFormatSourceButton.toggled)
-uiSourceCode.setFormatted(true);if(uiSourceCode.project().isServiceProject())
-return;this._navigator.addUISourceCode(uiSourceCode);this._editorContainer.addUISourceCode(uiSourceCode);var currentUISourceCode=this._currentUISourceCode;if(currentUISourceCode&&currentUISourceCode.project().isServiceProject()&&currentUISourceCode!==uiSourceCode&&currentUISourceCode.url===uiSourceCode.url){this._showFile(uiSourceCode);this._editorContainer.removeUISourceCode(currentUISourceCode);}},_uiSourceCodeRemoved:function(event)
+{if(uiSourceCode.project().isServiceProject())
+return;this._editorContainer.addUISourceCode(uiSourceCode);var currentUISourceCode=this._currentUISourceCode;if(currentUISourceCode&&currentUISourceCode.project().isServiceProject()&&currentUISourceCode!==uiSourceCode&&currentUISourceCode.url===uiSourceCode.url){this._showFile(uiSourceCode);this._editorContainer.removeUISourceCode(currentUISourceCode);}},_uiSourceCodeRemoved:function(event)
 {var uiSourceCode=(event.data);this._removeUISourceCodes([uiSourceCode]);},_removeUISourceCodes:function(uiSourceCodes)
-{for(var i=0;i<uiSourceCodes.length;++i){this._navigator.removeUISourceCode(uiSourceCodes[i]);this._removeSourceFrame(uiSourceCodes[i]);this._historyManager.removeHistoryForSourceCode(uiSourceCodes[i]);}
-this._editorContainer.removeUISourceCodes(uiSourceCodes);},_consoleCommandEvaluatedInSelectedCallFrame:function(event)
+{for(var i=0;i<uiSourceCodes.length;++i){this._removeSourceFrame(uiSourceCodes[i]);this._historyManager.removeHistoryForSourceCode(uiSourceCodes[i]);}
+this._editorContainer.removeUISourceCodes(uiSourceCodes);},_projectWillReset:function(event)
+{var project=event.data;var uiSourceCodes=project.uiSourceCodes();this._removeUISourceCodes(uiSourceCodes);if(project.type()===WebInspector.projectTypes.Network)
+this._editorContainer.reset();},_updateScriptViewStatusBarItems:function()
+{this._scriptViewStatusBarItemsContainer.removeChildren();this._scriptViewStatusBarTextContainer.removeChildren();var sourceFrame=this.currentSourceFrame();if(!sourceFrame)
+return;var statusBarItems=sourceFrame.statusBarItems()||[];for(var i=0;i<statusBarItems.length;++i)
+this._scriptViewStatusBarItemsContainer.appendChild(statusBarItems[i]);var statusBarText=sourceFrame.statusBarText();if(statusBarText)
+this._scriptViewStatusBarTextContainer.appendChild(statusBarText);},showSourceLocation:function(uiSourceCode,lineNumber,columnNumber,omitFocus,omitHighlight)
+{this._historyManager.updateCurrentState();var sourceFrame=this._showFile(uiSourceCode);if(typeof lineNumber==="number")
+sourceFrame.revealPosition(lineNumber,columnNumber,!omitHighlight);this._historyManager.pushNewState();if(!omitFocus)
+sourceFrame.focus();WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.OpenSourceLink,url:uiSourceCode.originURL(),lineNumber:lineNumber});},_showFile:function(uiSourceCode)
+{var sourceFrame=this._getOrCreateSourceFrame(uiSourceCode);if(this._currentUISourceCode===uiSourceCode)
+return sourceFrame;this._currentUISourceCode=uiSourceCode;this._editorContainer.showFile(uiSourceCode);this._updateScriptViewStatusBarItems();return sourceFrame;},_createSourceFrame:function(uiSourceCode)
+{var sourceFrame;switch(uiSourceCode.contentType()){case WebInspector.resourceTypes.Script:sourceFrame=new WebInspector.JavaScriptSourceFrame(this._sourcesPanel,uiSourceCode);break;case WebInspector.resourceTypes.Document:sourceFrame=new WebInspector.JavaScriptSourceFrame(this._sourcesPanel,uiSourceCode);break;case WebInspector.resourceTypes.Stylesheet:sourceFrame=new WebInspector.CSSSourceFrame(uiSourceCode);break;default:sourceFrame=new WebInspector.UISourceCodeFrame(uiSourceCode);break;}
+sourceFrame.setHighlighterType(uiSourceCode.highlighterType());this._sourceFramesByUISourceCode.put(uiSourceCode,sourceFrame);this._historyManager.trackSourceFrameCursorJumps(sourceFrame);return sourceFrame;},_getOrCreateSourceFrame:function(uiSourceCode)
+{return this._sourceFramesByUISourceCode.get(uiSourceCode)||this._createSourceFrame(uiSourceCode);},_sourceFrameMatchesUISourceCode:function(sourceFrame,uiSourceCode)
+{switch(uiSourceCode.contentType()){case WebInspector.resourceTypes.Script:case WebInspector.resourceTypes.Document:return sourceFrame instanceof WebInspector.JavaScriptSourceFrame;case WebInspector.resourceTypes.Stylesheet:return sourceFrame instanceof WebInspector.CSSSourceFrame;default:return!(sourceFrame instanceof WebInspector.JavaScriptSourceFrame);}},_recreateSourceFrameIfNeeded:function(uiSourceCode)
+{var oldSourceFrame=this._sourceFramesByUISourceCode.get(uiSourceCode);if(!oldSourceFrame)
+return;if(this._sourceFrameMatchesUISourceCode(oldSourceFrame,uiSourceCode)){oldSourceFrame.setHighlighterType(uiSourceCode.highlighterType());}else{this._editorContainer.removeUISourceCode(uiSourceCode);this._removeSourceFrame(uiSourceCode);}},viewForFile:function(uiSourceCode)
+{return this._getOrCreateSourceFrame(uiSourceCode);},_removeSourceFrame:function(uiSourceCode)
+{var sourceFrame=this._sourceFramesByUISourceCode.get(uiSourceCode);if(!sourceFrame)
+return;this._sourceFramesByUISourceCode.remove(uiSourceCode);sourceFrame.dispose();},clearCurrentExecutionLine:function()
+{if(this._executionSourceFrame)
+this._executionSourceFrame.clearExecutionLine();delete this._executionSourceFrame;},setExecutionLine:function(uiLocation)
+{var sourceFrame=this._getOrCreateSourceFrame(uiLocation.uiSourceCode);sourceFrame.setExecutionLine(uiLocation.lineNumber);this._executionSourceFrame=sourceFrame;},_editorClosed:function(event)
+{var uiSourceCode=(event.data);this._historyManager.removeHistoryForSourceCode(uiSourceCode);var wasSelected=false;if(this._currentUISourceCode===uiSourceCode){delete this._currentUISourceCode;wasSelected=true;}
+this._updateScriptViewStatusBarItems();this._searchableView.resetSearch();var data={};data.uiSourceCode=uiSourceCode;data.wasSelected=wasSelected;this.dispatchEventToListeners(WebInspector.SourcesView.Events.EditorClosed,data);},_editorSelected:function(event)
+{var 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.resetSearch();this.dispatchEventToListeners(WebInspector.SourcesView.Events.EditorSelected,uiSourceCode);},sourceRenamed:function(uiSourceCode)
+{this._recreateSourceFrameIfNeeded(uiSourceCode);},searchCanceled:function()
+{if(this._searchView)
+this._searchView.searchCanceled();delete this._searchView;delete this._searchQuery;},performSearch:function(query,shouldJump)
+{this._searchableView.updateSearchMatchesCount(0);var sourceFrame=this.currentSourceFrame();if(!sourceFrame)
+return;this._searchView=sourceFrame;this._searchQuery=query;function finishedCallback(view,searchMatches)
+{if(!searchMatches)
+return;this._searchableView.updateSearchMatchesCount(searchMatches);}
+function currentMatchChanged(currentMatchIndex)
+{this._searchableView.updateCurrentMatchIndex(currentMatchIndex);}
+function searchResultsChanged()
+{this._searchableView.cancelSearch();}
+this._searchView.performSearch(query,shouldJump,finishedCallback.bind(this),currentMatchChanged.bind(this),searchResultsChanged.bind(this));},jumpToNextSearchResult:function()
+{if(!this._searchView)
+return;if(this._searchView!==this.currentSourceFrame()){this.performSearch(this._searchQuery,true);return;}
+this._searchView.jumpToNextSearchResult();},jumpToPreviousSearchResult:function()
+{if(!this._searchView)
+return;if(this._searchView!==this.currentSourceFrame()){this.performSearch(this._searchQuery,true);if(this._searchView)
+this._searchView.jumpToLastSearchResult();return;}
+this._searchView.jumpToPreviousSearchResult();},replaceSelectionWith:function(text)
+{var sourceFrame=this.currentSourceFrame();if(!sourceFrame){console.assert(sourceFrame);return;}
+sourceFrame.replaceSelectionWith(text);},replaceAllWith:function(query,text)
+{var sourceFrame=this.currentSourceFrame();if(!sourceFrame){console.assert(sourceFrame);return;}
+sourceFrame.replaceAllWith(query,text);},_showOutlineDialog:function(event)
+{var uiSourceCode=this._editorContainer.currentFile();if(!uiSourceCode)
+return false;switch(uiSourceCode.contentType()){case WebInspector.resourceTypes.Document:case WebInspector.resourceTypes.Script: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));return true;}
+return false;},showOpenResourceDialog:function(query)
+{var uiSourceCodes=this._editorContainer.historyUISourceCodes();var defaultScores=new Map();for(var i=1;i<uiSourceCodes.length;++i)
+defaultScores.put(uiSourceCodes[i],uiSourceCodes.length-i);WebInspector.OpenResourceDialog.show(this,this.element,query,defaultScores);},_showGoToLineDialog:function(event)
+{if(this._currentUISourceCode)
+this.showOpenResourceDialog(":");return true;},_save:function()
+{var sourceFrame=this.currentSourceFrame();if(!sourceFrame)
+return true;if(!(sourceFrame instanceof WebInspector.UISourceCodeFrame))
+return true;var uiSourceCodeFrame=(sourceFrame);uiSourceCodeFrame.commitEditing();return true;},_toggleBreakpoint:function()
+{var sourceFrame=this.currentSourceFrame();if(!sourceFrame)
+return false;if(sourceFrame instanceof WebInspector.JavaScriptSourceFrame){var javaScriptSourceFrame=(sourceFrame);javaScriptSourceFrame.toggleBreakpointOnCurrentLine();return true;}
+return false;},toggleBreakpointsActiveState:function(active)
+{this._editorContainer.view.element.classList.toggle("breakpoints-deactivated",!active);},__proto__:WebInspector.VBox.prototype}
+WebInspector.SourcesView.EditorAction=function()
+{}
+WebInspector.SourcesView.EditorAction.prototype={button:function(sourcesView){}};WebInspector.SourcesPanel=function(workspaceForTest)
+{WebInspector.Panel.call(this,"sources");this.registerRequiredCSS("sourcesPanel.css");this.registerRequiredCSS("textPrompt.css");new WebInspector.UpgradeFileSystemDropTarget(this.element);WebInspector.settings.showEditorInDrawer=WebInspector.settings.createSetting("showEditorInDrawer",true);this._workspace=workspaceForTest||WebInspector.workspace;var helpSection=WebInspector.shortcutsScreen.section(WebInspector.UIString("Sources Panel"));this.debugToolbar=this._createDebugToolbar();this._debugToolbarDrawer=this._createDebugToolbarDrawer();this.threadsToolbar=new WebInspector.ThreadsToolbar();const initialDebugSidebarWidth=225;this._splitView=new WebInspector.SplitView(true,true,"sourcesPanelSplitViewState",initialDebugSidebarWidth);this._splitView.enableShowModeSaving();this._splitView.show(this.element);const initialNavigatorWidth=225;this.editorView=new WebInspector.SplitView(true,false,"sourcesPanelNavigatorSplitViewState",initialNavigatorWidth);this.editorView.enableShowModeSaving();this.editorView.element.id="scripts-editor-split-view";this.editorView.element.tabIndex=0;this.editorView.show(this._splitView.mainElement());this._navigator=new WebInspector.SourcesNavigator(this._workspace);this._navigator.view.setMinimumSize(Preferences.minSidebarWidth,25);this._navigator.view.show(this.editorView.sidebarElement());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.registerShortcuts(this.registerShortcuts.bind(this));this._drawerEditorView=new WebInspector.SourcesPanel.DrawerEditorView();this._sourcesView.show(this._drawerEditorView.element);this._debugSidebarResizeWidgetElement=document.createElementWithClass("div","resizer-widget");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.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.CallFrameRestarted,this._callFrameRestartedInSidebar.bind(this));this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(this));this.sidebarPanes.scopechain=new WebInspector.ScopeChainSidebarPane();this.sidebarPanes.jsBreakpoints=new WebInspector.JavaScriptBreakpointsSidebarPane(WebInspector.debuggerModel,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();if(Capabilities.isMainFrontend)
+this.sidebarPanes.workerList=new WebInspector.WorkersSidebarPane();this._extensionSidebarPanes=[];this._installDebuggerSidebarController();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();if(WebInspector.debuggerModel.isPaused())
+this._showDebuggerPausedDetails();WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._pauseOnExceptionEnabledChanged,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasEnabled,this._debuggerWasEnabled,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasDisabled,this._debuggerWasDisabled,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerPaused,this._debuggerPaused,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerResumed,this._debuggerResumed,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.CallFrameSelected,this._callFrameSelected,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ConsoleCommandEvaluatedInSelectedCallFrame,this._consoleCommandEvaluatedInSelectedCallFrame,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.BreakpointsActiveStateChanged,this._breakpointsActiveStateChanged,this);WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared,this._debuggerReset,this);}
+WebInspector.SourcesPanel.minToolbarWidth=215;WebInspector.SourcesPanel.prototype={defaultFocusedElement:function()
+{return this._sourcesView.defaultFocusedElement()||this._navigator.view.defaultFocusedElement();},get paused()
+{return this._paused;},_drawerEditor:function()
+{var drawerEditorInstance=WebInspector.moduleManager.instance(WebInspector.DrawerEditor);console.assert(drawerEditorInstance instanceof WebInspector.SourcesPanel.DrawerEditor,"WebInspector.DrawerEditor module instance does not use WebInspector.SourcesPanel.DrawerEditor as an implementation. ");return(drawerEditorInstance);},wasShown:function()
+{this._drawerEditor()._panelWasShown();this._sourcesView.show(this.editorView.mainElement());WebInspector.Panel.prototype.wasShown.call(this);},willHide:function()
+{WebInspector.Panel.prototype.willHide.call(this);this._drawerEditor()._panelWillHide();this._sourcesView.show(this._drawerEditorView.element);},searchableView:function()
+{return this._sourcesView.searchableView();},_consoleCommandEvaluatedInSelectedCallFrame:function(event)
 {this.sidebarPanes.scopechain.update(WebInspector.debuggerModel.selectedCallFrame());},_debuggerPaused:function()
 {WebInspector.inspectorView.setCurrentPanel(this);this._showDebuggerPausedDetails();},_showDebuggerPausedDetails:function()
-{var details=WebInspector.debuggerModel.debuggerPausedDetails();this._paused=true;this._waitingToPause=false;this._stepping=false;this._updateDebuggerButtons();this.sidebarPanes.callstack.update(details.callFrames,details.asyncStackTrace);function didCreateBreakpointHitStatusMessage(element)
+{var details=WebInspector.debuggerModel.debuggerPausedDetails();this._paused=true;this._waitingToPause=false;this._updateDebuggerButtons();this.sidebarPanes.callstack.update(details.callFrames,details.asyncStackTrace);function didCreateBreakpointHitStatusMessage(element)
 {this.sidebarPanes.callstack.setStatus(element);}
 function didGetUILocation(uiLocation)
-{var breakpoint=WebInspector.breakpointManager.findBreakpoint(uiLocation.uiSourceCode,uiLocation.lineNumber);if(!breakpoint)
+{var breakpoint=WebInspector.breakpointManager.findBreakpointOnLine(uiLocation.uiSourceCode,uiLocation.lineNumber);if(!breakpoint)
 return;this.sidebarPanes.jsBreakpoints.highlightBreakpoint(breakpoint);this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on a JavaScript breakpoint."));}
 if(details.reason===WebInspector.DebuggerModel.BreakReason.DOM){WebInspector.domBreakpointsSidebarPane.highlightBreakpoint(details.auxData);WebInspector.domBreakpointsSidebarPane.createBreakpointHitStatusMessage(details.auxData,didCreateBreakpointHitStatusMessage.bind(this));}else if(details.reason===WebInspector.DebuggerModel.BreakReason.EventListener){var eventName=details.auxData.eventName;this.sidebarPanes.eventListenerBreakpoints.highlightBreakpoint(details.auxData.eventName);var eventNameForUI=WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI(eventName,details.auxData);this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on a \"%s\" Event Listener.",eventNameForUI));}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."));}else if(details.reason===WebInspector.DebuggerModel.BreakReason.Exception)
 this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on exception: '%s'.",details.auxData.description));else if(details.reason===WebInspector.DebuggerModel.BreakReason.Assert)
@@ -1175,180 +1344,73 @@ this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on a script
 this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on a debugged function"));else{if(details.callFrames.length)
 details.callFrames[0].createLiveLocation(didGetUILocation.bind(this));else
 console.warn("ScriptsPanel paused, but callFrames.length is zero.");}
-this._enableDebuggerSidebar(true);this._toggleDebuggerSidebarButton.setEnabled(false);window.focus();InspectorFrontendHost.bringToFront();},_debuggerResumed:function()
-{this._paused=false;this._waitingToPause=false;this._stepping=false;this._clearInterface();this._toggleDebuggerSidebarButton.setEnabled(true);},_debuggerWasEnabled:function()
+this._splitView.showBoth(true);this._toggleDebuggerSidebarButton.setEnabled(false);window.focus();InspectorFrontendHost.bringToFront();},_debuggerResumed:function()
+{this._paused=false;this._waitingToPause=false;this._clearInterface();this._toggleDebuggerSidebarButton.setEnabled(true);},_debuggerWasEnabled:function()
 {this._updateDebuggerButtons();},_debuggerWasDisabled:function()
 {this._debuggerReset();},_debuggerReset:function()
-{this._debuggerResumed();this.sidebarPanes.watchExpressions.reset();delete this._skipExecutionLineRevealing;},_projectWillReset:function(event)
-{var project=event.data;var uiSourceCodes=project.uiSourceCodes();this._removeUISourceCodes(uiSourceCodes);if(project.type()===WebInspector.projectTypes.Network)
-this._editorContainer.reset();},get visibleView()
-{return this._editorContainer.visibleView;},_updateScriptViewStatusBarItems:function()
-{this._scriptViewStatusBarItemsContainer.removeChildren();this._scriptViewStatusBarTextContainer.removeChildren();var sourceFrame=this.visibleView;if(sourceFrame){var statusBarItems=sourceFrame.statusBarItems()||[];for(var i=0;i<statusBarItems.length;++i)
-this._scriptViewStatusBarItemsContainer.appendChild(statusBarItems[i]);var statusBarText=sourceFrame.statusBarText();if(statusBarText)
-this._scriptViewStatusBarTextContainer.appendChild(statusBarText);}},showAnchorLocation:function(anchor)
-{if(!anchor.uiSourceCode){var uiSourceCode=WebInspector.workspace.uiSourceCodeForURL(anchor.href);if(uiSourceCode)
-anchor.uiSourceCode=uiSourceCode;}
-if(!anchor.uiSourceCode)
-return false;this._showSourceLocation(anchor.uiSourceCode,anchor.lineNumber,anchor.columnNumber);return true;},showUISourceCode:function(uiSourceCode,lineNumber,columnNumber,forceShowInPanel)
-{this._showSourceLocation(uiSourceCode,lineNumber,columnNumber,forceShowInPanel);},_showEditor:function(forceShowInPanel)
-{if(this.sourcesView.isShowing())
-return;if(this._canShowEditorInDrawer()&&!forceShowInPanel){var drawerEditorView=new WebInspector.DrawerEditorView();this.sourcesView.show(drawerEditorView.element);WebInspector.inspectorView.showCloseableViewInDrawer("editor",WebInspector.UIString("Editor"),drawerEditorView);}else{WebInspector.showPanel("sources");}},currentUISourceCode:function()
-{return this._currentUISourceCode;},showUILocation:function(uiLocation,forceShowInPanel)
-{this._showSourceLocation(uiLocation.uiSourceCode,uiLocation.lineNumber,uiLocation.columnNumber,forceShowInPanel);},_canShowEditorInDrawer:function()
-{return WebInspector.experimentsSettings.showEditorInDrawer.isEnabled()&&WebInspector.settings.showEditorInDrawer.get();},_showSourceLocation:function(uiSourceCode,lineNumber,columnNumber,forceShowInPanel)
-{this._showEditor(forceShowInPanel);this._historyManager.updateCurrentState();var sourceFrame=this._showFile(uiSourceCode);if(typeof lineNumber==="number")
-sourceFrame.highlightPosition(lineNumber,columnNumber);this._historyManager.pushNewState();sourceFrame.focus();WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.OpenSourceLink,url:uiSourceCode.originURL(),lineNumber:lineNumber});},_showFile:function(uiSourceCode)
-{var sourceFrame=this._getOrCreateSourceFrame(uiSourceCode);if(this._currentUISourceCode===uiSourceCode)
-return sourceFrame;this._currentUISourceCode=uiSourceCode;if(!uiSourceCode.project().isServiceProject())
-this._navigator.revealUISourceCode(uiSourceCode,true);this._editorContainer.showFile(uiSourceCode);this._updateScriptViewStatusBarItems();if(this._currentUISourceCode.project().type()===WebInspector.projectTypes.Snippets)
-this._runSnippetButton.element.classList.remove("hidden");else
-this._runSnippetButton.element.classList.add("hidden");return sourceFrame;},_createSourceFrame:function(uiSourceCode)
-{var sourceFrame;switch(uiSourceCode.contentType()){case WebInspector.resourceTypes.Script:sourceFrame=new WebInspector.JavaScriptSourceFrame(this,uiSourceCode);break;case WebInspector.resourceTypes.Document:sourceFrame=new WebInspector.JavaScriptSourceFrame(this,uiSourceCode);break;case WebInspector.resourceTypes.Stylesheet:sourceFrame=new WebInspector.CSSSourceFrame(uiSourceCode);break;default:sourceFrame=new WebInspector.UISourceCodeFrame(uiSourceCode);break;}
-sourceFrame.setHighlighterType(uiSourceCode.highlighterType());this._sourceFramesByUISourceCode.put(uiSourceCode,sourceFrame);this._historyManager.trackSourceFrameCursorJumps(sourceFrame);return sourceFrame;},_getOrCreateSourceFrame:function(uiSourceCode)
-{return this._sourceFramesByUISourceCode.get(uiSourceCode)||this._createSourceFrame(uiSourceCode);},_sourceFrameMatchesUISourceCode:function(sourceFrame,uiSourceCode)
-{switch(uiSourceCode.contentType()){case WebInspector.resourceTypes.Script:case WebInspector.resourceTypes.Document:return sourceFrame instanceof WebInspector.JavaScriptSourceFrame;case WebInspector.resourceTypes.Stylesheet:return sourceFrame instanceof WebInspector.CSSSourceFrame;default:return!(sourceFrame instanceof WebInspector.JavaScriptSourceFrame);}},_recreateSourceFrameIfNeeded:function(uiSourceCode)
-{var oldSourceFrame=this._sourceFramesByUISourceCode.get(uiSourceCode);if(!oldSourceFrame)
-return;if(this._sourceFrameMatchesUISourceCode(oldSourceFrame,uiSourceCode)){oldSourceFrame.setHighlighterType(uiSourceCode.highlighterType());}else{this._editorContainer.removeUISourceCode(uiSourceCode);this._removeSourceFrame(uiSourceCode);}},viewForFile:function(uiSourceCode)
-{return this._getOrCreateSourceFrame(uiSourceCode);},_removeSourceFrame:function(uiSourceCode)
-{var sourceFrame=this._sourceFramesByUISourceCode.get(uiSourceCode);if(!sourceFrame)
-return;this._sourceFramesByUISourceCode.remove(uiSourceCode);sourceFrame.dispose();},_clearCurrentExecutionLine:function()
-{if(this._executionSourceFrame)
-this._executionSourceFrame.clearExecutionLine();delete this._executionSourceFrame;},_setExecutionLine:function(uiLocation)
-{var callFrame=WebInspector.debuggerModel.selectedCallFrame()
-var sourceFrame=this._getOrCreateSourceFrame(uiLocation.uiSourceCode);sourceFrame.setExecutionLine(uiLocation.lineNumber,callFrame);this._executionSourceFrame=sourceFrame;},_executionLineChanged:function(uiLocation)
-{this._historyManager.updateCurrentState();this._clearCurrentExecutionLine();this._setExecutionLine(uiLocation);var uiSourceCode=uiLocation.uiSourceCode;var scriptFile=this._currentUISourceCode?this._currentUISourceCode.scriptFile():null;if(this._skipExecutionLineRevealing)
-return;this._skipExecutionLineRevealing=true;var sourceFrame=this._showFile(uiSourceCode);sourceFrame.revealLine(uiLocation.lineNumber);this._historyManager.pushNewState();if(sourceFrame.canEditSource())
-sourceFrame.setSelection(WebInspector.TextRange.createFromLocation(uiLocation.lineNumber,0));sourceFrame.focus();},_callFrameSelected:function(event)
+{this._debuggerResumed();this.sidebarPanes.watchExpressions.reset();delete this._skipExecutionLineRevealing;},get visibleView()
+{return this._sourcesView.visibleView();},showUISourceCode:function(uiSourceCode,lineNumber,columnNumber,forceShowInPanel)
+{this._showEditor(forceShowInPanel);this._sourcesView.showSourceLocation(uiSourceCode,lineNumber,columnNumber);},_showEditor:function(forceShowInPanel)
+{if(this._sourcesView.isShowing())
+return;if(this._shouldShowEditorInDrawer()&&!forceShowInPanel)
+this._drawerEditor()._show();else
+WebInspector.inspectorView.showPanel("sources");},showUILocation:function(uiLocation,forceShowInPanel)
+{this.showUISourceCode(uiLocation.uiSourceCode,uiLocation.lineNumber,uiLocation.columnNumber,forceShowInPanel);},_shouldShowEditorInDrawer:function()
+{return WebInspector.experimentsSettings.showEditorInDrawer.isEnabled()&&WebInspector.settings.showEditorInDrawer.get()&&WebInspector.inspectorView.isDrawerEditorShown();},_revealInNavigator:function(uiSourceCode)
+{this._navigator.revealUISourceCode(uiSourceCode);},_executionLineChanged:function(uiLocation)
+{this._sourcesView.clearCurrentExecutionLine();this._sourcesView.setExecutionLine(uiLocation);if(this._skipExecutionLineRevealing)
+return;this._skipExecutionLineRevealing=true;this._sourcesView.showSourceLocation(uiLocation.uiSourceCode,uiLocation.lineNumber,0,undefined,true);},_callFrameSelected:function(event)
 {var callFrame=event.data;if(!callFrame)
-return;this.sidebarPanes.scopechain.update(callFrame);this.sidebarPanes.watchExpressions.refreshExpressions();this.sidebarPanes.callstack.setSelectedCallFrame(callFrame);callFrame.createLiveLocation(this._executionLineChanged.bind(this));},_editorClosed:function(event)
-{this._navigatorController.hideNavigatorOverlay();var uiSourceCode=(event.data);this._historyManager.removeHistoryForSourceCode(uiSourceCode);if(this._currentUISourceCode===uiSourceCode)
-delete this._currentUISourceCode;this._updateScriptViewStatusBarItems();this._searchableView.resetSearch();},_editorSelected:function(event)
-{var 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._navigatorController.hideNavigatorOverlay();if(!this._navigatorController.isNavigatorPinned())
-sourceFrame.focus();this._searchableView.setReplaceable(!!sourceFrame&&sourceFrame.canEditSource());this._searchableView.resetSearch();},_sourceSelected:function(event)
-{var uiSourceCode=(event.data.uiSourceCode);var shouldUseHistoryManager=uiSourceCode!==this._currentUISourceCode;if(shouldUseHistoryManager)
-this._historyManager.updateCurrentState();var sourceFrame=this._showFile(uiSourceCode);if(shouldUseHistoryManager)
-this._historyManager.pushNewState();this._navigatorController.hideNavigatorOverlay();if(sourceFrame&&(!this._navigatorController.isNavigatorPinned()||event.data.focusSource))
-sourceFrame.focus();},_itemSearchStarted:function(event)
-{var searchText=(event.data);WebInspector.OpenResourceDialog.show(this,this.editorView.mainElement(),searchText);},_createPauseOnExceptionOptions:function()
-{this._pauseOnExceptionButton.title=this._pauseOnExceptionStateTitle(this._pauseOnExceptionButton.state);var excludedOption=this._pauseOnExceptionButton.state;var pauseStates=WebInspector.SourcesPanel.PauseOnExceptionsStates.slice(0);var options=[];for(var i=0;i<pauseStates.length;++i){if(pauseStates[i]===excludedOption)
-continue;var button=new WebInspector.StatusBarButton("","scripts-pause-on-exceptions-status-bar-item",3);button.addEventListener("click",this._togglePauseOnExceptions,this);button.state=pauseStates[i];button.title=this._pauseOnExceptionStateTitle(pauseStates[i]);options.push(button);}
-return options;},_pauseOnExceptionStateChanged:function()
-{var state=WebInspector.settings.pauseOnExceptionStateString.get();var nextState;if(state===WebInspector.DebuggerModel.PauseOnExceptionsState.DontPauseOnExceptions)
-nextState=WebInspector.settings.lastPauseOnExceptionState.get();else
-nextState=WebInspector.DebuggerModel.PauseOnExceptionsState.DontPauseOnExceptions;this._pauseOnExceptionButton.title=this._pauseOnExceptionStateTitle(state,nextState);this._pauseOnExceptionButton.state=state;},_pauseOnExceptionStateTitle:function(state,nextState)
-{var states=WebInspector.DebuggerModel.PauseOnExceptionsState;var stateDescription;if(state===states.DontPauseOnExceptions){stateDescription=WebInspector.UIString("Don't pause on exceptions.");}else if(state===states.PauseOnAllExceptions){stateDescription=WebInspector.UIString("Pause on exceptions, including caught exceptions.");}else if(state===states.PauseOnUncaughtExceptions){stateDescription=WebInspector.UIString("Pause on exceptions.");}else{throw"Unexpected state: "+state;}
-var nextStateDescription;if(nextState===states.DontPauseOnExceptions){nextStateDescription=WebInspector.UIString("Click to Not pause on exceptions.");}else if(nextState===states.PauseOnAllExceptions){nextStateDescription=WebInspector.UIString("Click to Pause on exceptions, including caught exceptions.");}else if(nextState===states.PauseOnUncaughtExceptions){nextStateDescription=WebInspector.UIString("Click to Pause on exceptions.");}
-return nextState?String.sprintf("%s\n%s",stateDescription,nextStateDescription):stateDescription;},_updateDebuggerButtons:function()
+return;this.sidebarPanes.scopechain.update(callFrame);this.sidebarPanes.watchExpressions.refreshExpressions();this.sidebarPanes.callstack.setSelectedCallFrame(callFrame);callFrame.createLiveLocation(this._executionLineChanged.bind(this));},_sourceSelected:function(event)
+{var uiSourceCode=(event.data.uiSourceCode);this._sourcesView.showSourceLocation(uiSourceCode,undefined,undefined,!event.data.focusSource)},_sourceRenamed:function(event)
+{var uiSourceCode=(event.data);this._sourcesView.sourceRenamed(uiSourceCode);},_pauseOnExceptionEnabledChanged:function()
+{var enabled=WebInspector.settings.pauseOnExceptionEnabled.get();this._pauseOnExceptionButton.toggled=enabled;this._pauseOnExceptionButton.title=WebInspector.UIString(enabled?"Don't pause on exceptions.":"Pause on exceptions.");this._debugToolbarDrawer.classList.toggle("expanded",enabled);},_updateDebuggerButtons:function()
 {if(this._paused){this._updateButtonTitle(this._pauseButton,WebInspector.UIString("Resume script execution (%s)."))
 this._pauseButton.state=true;this._pauseButton.setLongClickOptionsEnabled((function(){return[this._longResumeButton]}).bind(this));this._pauseButton.setEnabled(true);this._stepOverButton.setEnabled(true);this._stepIntoButton.setEnabled(true);this._stepOutButton.setEnabled(true);}else{this._updateButtonTitle(this._pauseButton,WebInspector.UIString("Pause script execution (%s)."))
 this._pauseButton.state=false;this._pauseButton.setLongClickOptionsEnabled(null);this._pauseButton.setEnabled(!this._waitingToPause);this._stepOverButton.setEnabled(false);this._stepIntoButton.setEnabled(false);this._stepOutButton.setEnabled(false);}},_clearInterface:function()
-{this.sidebarPanes.callstack.update(null,null);this.sidebarPanes.scopechain.update(null);this.sidebarPanes.jsBreakpoints.clearBreakpointHighlight();WebInspector.domBreakpointsSidebarPane.clearBreakpointHighlight();this.sidebarPanes.eventListenerBreakpoints.clearBreakpointHighlight();this.sidebarPanes.xhrBreakpoints.clearBreakpointHighlight();this._clearCurrentExecutionLine();this._updateDebuggerButtons();},_togglePauseOnExceptions:function(e)
-{var target=(e.target);var state=(target.state);var toggle=!e.data;var stateEnum=WebInspector.DebuggerModel.PauseOnExceptionsState;if(toggle){if(state!==stateEnum.DontPauseOnExceptions)
-state=stateEnum.DontPauseOnExceptions
-else
-state=WebInspector.settings.lastPauseOnExceptionState.get();}
-if(state!==stateEnum.DontPauseOnExceptions)
-WebInspector.settings.lastPauseOnExceptionState.set(state);WebInspector.settings.pauseOnExceptionStateString.set(state);},_runSnippet:function()
-{if(this._currentUISourceCode.project().type()!==WebInspector.projectTypes.Snippets)
-return false;WebInspector.scriptSnippetModel.evaluateScriptSnippet(this._currentUISourceCode);return true;},_togglePause:function()
-{if(this._paused){delete this._skipExecutionLineRevealing;this._paused=false;this._waitingToPause=false;WebInspector.debuggerModel.resume();}else{this._stepping=false;this._waitingToPause=true;WebInspector.debuggerModel.skipAllPauses(false);DebuggerAgent.pause();}
+{this.sidebarPanes.callstack.update(null,null);this.sidebarPanes.scopechain.update(null);this.sidebarPanes.jsBreakpoints.clearBreakpointHighlight();WebInspector.domBreakpointsSidebarPane.clearBreakpointHighlight();this.sidebarPanes.eventListenerBreakpoints.clearBreakpointHighlight();this.sidebarPanes.xhrBreakpoints.clearBreakpointHighlight();this._sourcesView.clearCurrentExecutionLine();this._updateDebuggerButtons();},_togglePauseOnExceptions:function()
+{WebInspector.settings.pauseOnExceptionEnabled.set(!this._pauseOnExceptionButton.toggled);},_runSnippet:function()
+{var uiSourceCode=this._sourcesView.currentUISourceCode();if(uiSourceCode.project().type()!==WebInspector.projectTypes.Snippets)
+return false;WebInspector.scriptSnippetModel.evaluateScriptSnippet(uiSourceCode);return true;},_editorSelected:function(event)
+{var uiSourceCode=(event.data);this._editorChanged(uiSourceCode);},_editorClosed:function(event)
+{var wasSelected=(event.data.wasSelected);if(wasSelected)
+this._editorChanged(null);},_editorChanged:function(uiSourceCode)
+{var isSnippet=uiSourceCode&&uiSourceCode.project().type()===WebInspector.projectTypes.Snippets;this._runSnippetButton.element.classList.toggle("hidden",!isSnippet);},_togglePause:function()
+{if(this._paused){delete this._skipExecutionLineRevealing;this._paused=false;this._waitingToPause=false;WebInspector.debuggerModel.resume();}else{this._waitingToPause=true;WebInspector.debuggerModel.skipAllPauses(false);DebuggerAgent.pause();}
 this._clearInterface();return true;},_longResume:function()
 {if(!this._paused)
 return true;this._paused=false;this._waitingToPause=false;WebInspector.debuggerModel.skipAllPausesUntilReloadOrTimeout(500);WebInspector.debuggerModel.resume();this._clearInterface();return true;},_stepOverClicked:function()
 {if(!this._paused)
-return true;delete this._skipExecutionLineRevealing;this._paused=false;this._stepping=true;this._clearInterface();WebInspector.debuggerModel.stepOver();return true;},_stepIntoClicked:function()
-{if(!this._paused)
-return true;delete this._skipExecutionLineRevealing;this._paused=false;this._stepping=true;this._clearInterface();WebInspector.debuggerModel.stepInto();return true;},_stepIntoSelectionClicked:function(event)
-{if(!this._paused)
-return true;if(this._executionSourceFrame){var stepIntoMarkup=this._executionSourceFrame.stepIntoMarkup();if(stepIntoMarkup)
-stepIntoMarkup.iterateSelection(event.shiftKey);}
-return true;},doStepIntoSelection:function(rawLocation)
+return true;delete this._skipExecutionLineRevealing;this._paused=false;this._clearInterface();WebInspector.debuggerModel.stepOver();return true;},_stepIntoClicked:function()
 {if(!this._paused)
-return;delete this._skipExecutionLineRevealing;this._paused=false;this._stepping=true;this._clearInterface();WebInspector.debuggerModel.stepIntoSelection(rawLocation);},_stepOutClicked:function()
+return true;delete this._skipExecutionLineRevealing;this._paused=false;this._clearInterface();WebInspector.debuggerModel.stepInto();return true;},_stepOutClicked:function()
 {if(!this._paused)
-return true;delete this._skipExecutionLineRevealing;this._paused=false;this._stepping=true;this._clearInterface();WebInspector.debuggerModel.stepOut();return true;},_callFrameSelectedInSidebar:function(event)
+return true;delete this._skipExecutionLineRevealing;this._paused=false;this._clearInterface();WebInspector.debuggerModel.stepOut();return true;},_callFrameSelectedInSidebar:function(event)
 {var callFrame=(event.data);delete this._skipExecutionLineRevealing;WebInspector.debuggerModel.setSelectedCallFrame(callFrame);},_callFrameRestartedInSidebar:function()
 {delete this._skipExecutionLineRevealing;},continueToLocation:function(rawLocation)
 {if(!this._paused)
-return;delete this._skipExecutionLineRevealing;this._paused=false;this._stepping=true;this._clearInterface();WebInspector.debuggerModel.continueToLocation(rawLocation);},_toggleBreakpointsClicked:function(event)
+return;delete this._skipExecutionLineRevealing;this._paused=false;this._clearInterface();WebInspector.debuggerModel.continueToLocation(rawLocation);},_toggleBreakpointsClicked:function(event)
 {WebInspector.debuggerModel.setBreakpointsActive(!WebInspector.debuggerModel.breakpointsActive());},_breakpointsActiveStateChanged:function(event)
-{var active=event.data;this._toggleBreakpointsButton.toggled=!active;if(active){this._toggleBreakpointsButton.title=WebInspector.UIString("Deactivate breakpoints.");this._editorContainer.view.element.classList.remove("breakpoints-deactivated");this.sidebarPanes.jsBreakpoints.listElement.classList.remove("breakpoints-list-deactivated");}else{this._toggleBreakpointsButton.title=WebInspector.UIString("Activate breakpoints.");this._editorContainer.view.element.classList.add("breakpoints-deactivated");this.sidebarPanes.jsBreakpoints.listElement.classList.add("breakpoints-list-deactivated");}},_createDebugToolbar:function()
-{var debugToolbar=document.createElement("div");debugToolbar.className="status-bar";debugToolbar.id="scripts-debug-toolbar";var title,handler;var platformSpecificModifier=WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta;title=WebInspector.UIString("Run snippet (%s).");handler=this._runSnippet.bind(this);this._runSnippetButton=this._createButtonAndRegisterShortcuts("scripts-run-snippet",title,handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.RunSnippet);debugToolbar.appendChild(this._runSnippetButton.element);this._runSnippetButton.element.classList.add("hidden");handler=this._togglePause.bind(this);this._pauseButton=this._createButtonAndRegisterShortcuts("scripts-pause","",handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PauseContinue);debugToolbar.appendChild(this._pauseButton.element);title=WebInspector.UIString("Resume with all pauses blocked for 500 ms");this._longResumeButton=new WebInspector.StatusBarButton(title,"scripts-long-resume");this._longResumeButton.addEventListener("click",this._longResume.bind(this),this);title=WebInspector.UIString("Step over next function call (%s).");handler=this._stepOverClicked.bind(this);this._stepOverButton=this._createButtonAndRegisterShortcuts("scripts-step-over",title,handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepOver);debugToolbar.appendChild(this._stepOverButton.element);title=WebInspector.UIString("Step into next function call (%s).");handler=this._stepIntoClicked.bind(this);this._stepIntoButton=this._createButtonAndRegisterShortcuts("scripts-step-into",title,handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepInto);debugToolbar.appendChild(this._stepIntoButton.element);this.registerShortcuts(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepIntoSelection,this._stepIntoSelectionClicked.bind(this))
-title=WebInspector.UIString("Step out of current function (%s).");handler=this._stepOutClicked.bind(this);this._stepOutButton=this._createButtonAndRegisterShortcuts("scripts-step-out",title,handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepOut);debugToolbar.appendChild(this._stepOutButton.element);this._toggleBreakpointsButton=new WebInspector.StatusBarButton(WebInspector.UIString("Deactivate breakpoints."),"scripts-toggle-breakpoints");this._toggleBreakpointsButton.toggled=false;this._toggleBreakpointsButton.addEventListener("click",this._toggleBreakpointsClicked,this);debugToolbar.appendChild(this._toggleBreakpointsButton.element);this._pauseOnExceptionButton=new WebInspector.StatusBarButton("","scripts-pause-on-exceptions-status-bar-item",3);this._pauseOnExceptionButton.addEventListener("click",this._togglePauseOnExceptions,this);this._pauseOnExceptionButton.setLongClickOptionsEnabled(this._createPauseOnExceptionOptions.bind(this));debugToolbar.appendChild(this._pauseOnExceptionButton.element);return debugToolbar;},_updateButtonTitle:function(button,buttonTitle)
+{var active=event.data;this._toggleBreakpointsButton.toggled=!active;this.sidebarPanes.jsBreakpoints.listElement.classList.toggle("breakpoints-list-deactivated",!active);this._sourcesView.toggleBreakpointsActiveState(active);if(active)
+this._toggleBreakpointsButton.title=WebInspector.UIString("Deactivate breakpoints.");else
+this._toggleBreakpointsButton.title=WebInspector.UIString("Activate breakpoints.");},_createDebugToolbar:function()
+{var debugToolbar=document.createElement("div");debugToolbar.className="scripts-debug-toolbar";var title,handler;var platformSpecificModifier=WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta;title=WebInspector.UIString("Run snippet (%s).");handler=this._runSnippet.bind(this);this._runSnippetButton=this._createButtonAndRegisterShortcuts("scripts-run-snippet",title,handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.RunSnippet);debugToolbar.appendChild(this._runSnippetButton.element);this._runSnippetButton.element.classList.add("hidden");handler=this._togglePause.bind(this);this._pauseButton=this._createButtonAndRegisterShortcuts("scripts-pause","",handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PauseContinue);debugToolbar.appendChild(this._pauseButton.element);title=WebInspector.UIString("Resume with all pauses blocked for 500 ms");this._longResumeButton=new WebInspector.StatusBarButton(title,"scripts-long-resume");this._longResumeButton.addEventListener("click",this._longResume.bind(this),this);title=WebInspector.UIString("Step over next function call (%s).");handler=this._stepOverClicked.bind(this);this._stepOverButton=this._createButtonAndRegisterShortcuts("scripts-step-over",title,handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepOver);debugToolbar.appendChild(this._stepOverButton.element);title=WebInspector.UIString("Step into next function call (%s).");handler=this._stepIntoClicked.bind(this);this._stepIntoButton=this._createButtonAndRegisterShortcuts("scripts-step-into",title,handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepInto);debugToolbar.appendChild(this._stepIntoButton.element);title=WebInspector.UIString("Step out of current function (%s).");handler=this._stepOutClicked.bind(this);this._stepOutButton=this._createButtonAndRegisterShortcuts("scripts-step-out",title,handler,WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepOut);debugToolbar.appendChild(this._stepOutButton.element);this._toggleBreakpointsButton=new WebInspector.StatusBarButton(WebInspector.UIString("Deactivate breakpoints."),"scripts-toggle-breakpoints");this._toggleBreakpointsButton.toggled=false;this._toggleBreakpointsButton.addEventListener("click",this._toggleBreakpointsClicked,this);debugToolbar.appendChild(this._toggleBreakpointsButton.element);this._pauseOnExceptionButton=new WebInspector.StatusBarButton("","scripts-pause-on-exceptions-status-bar-item");this._pauseOnExceptionButton.addEventListener("click",this._togglePauseOnExceptions,this);debugToolbar.appendChild(this._pauseOnExceptionButton.element);return debugToolbar;},_createDebugToolbarDrawer:function()
+{var debugToolbarDrawer=document.createElement("div");debugToolbarDrawer.className="scripts-debug-toolbar-drawer";var label=WebInspector.UIString("Pause On Caught Exceptions");var setting=WebInspector.settings.pauseOnCaughtException;debugToolbarDrawer.appendChild(WebInspector.SettingsUI.createSettingCheckbox(label,setting,true));return debugToolbarDrawer;},_updateButtonTitle:function(button,buttonTitle)
 {var hasShortcuts=button.shortcuts&&button.shortcuts.length;if(hasShortcuts)
 button.title=String.vsprintf(buttonTitle,[button.shortcuts[0].name]);else
 button.title=buttonTitle;},_createButtonAndRegisterShortcuts:function(buttonId,buttonTitle,handler,shortcuts)
-{var button=new WebInspector.StatusBarButton(buttonTitle,buttonId);button.element.addEventListener("click",handler,false);button.shortcuts=shortcuts;this._updateButtonTitle(button,buttonTitle);this.registerShortcuts(shortcuts,handler);return button;},searchCanceled:function()
-{if(this._searchView)
-this._searchView.searchCanceled();delete this._searchView;delete this._searchQuery;},performSearch:function(query,shouldJump)
-{this._searchableView.updateSearchMatchesCount(0);if(!this.visibleView)
-return;this._searchView=this.visibleView;this._searchQuery=query;function finishedCallback(view,searchMatches)
-{if(!searchMatches)
-return;this._searchableView.updateSearchMatchesCount(searchMatches);}
-function currentMatchChanged(currentMatchIndex)
-{this._searchableView.updateCurrentMatchIndex(currentMatchIndex);}
-function searchResultsChanged()
-{this._searchableView.cancelSearch();}
-this._searchView.performSearch(query,shouldJump,finishedCallback.bind(this),currentMatchChanged.bind(this),searchResultsChanged.bind(this));},jumpToNextSearchResult:function()
-{if(!this._searchView)
-return;if(this._searchView!==this.visibleView){this.performSearch(this._searchQuery,true);return;}
-this._searchView.jumpToNextSearchResult();},jumpToPreviousSearchResult:function()
-{if(!this._searchView)
-return;if(this._searchView!==this.visibleView){this.performSearch(this._searchQuery,true);if(this._searchView)
-this._searchView.jumpToLastSearchResult();return;}
-this._searchView.jumpToPreviousSearchResult();},replaceSelectionWith:function(text)
-{var view=(this.visibleView);view.replaceSelectionWith(text);},replaceAllWith:function(query,text)
-{var view=(this.visibleView);view.replaceAllWith(query,text);},_onKeyDown:function(event)
-{if(event.keyCode!==WebInspector.KeyboardShortcut.Keys.CtrlOrMeta.code)
-return;if(!this._paused||!this._executionSourceFrame)
-return;var stepIntoMarkup=this._executionSourceFrame.stepIntoMarkup();if(stepIntoMarkup)
-stepIntoMarkup.startIteratingSelection();},_onKeyUp:function(event)
-{if(event.keyCode!==WebInspector.KeyboardShortcut.Keys.CtrlOrMeta.code)
-return;if(!this._paused||!this._executionSourceFrame)
-return;var stepIntoMarkup=this._executionSourceFrame.stepIntoMarkup();if(!stepIntoMarkup)
-return;var currentPosition=stepIntoMarkup.getSelectedItemIndex();if(typeof currentPosition==="undefined"){stepIntoMarkup.stopIteratingSelection();}else{var rawLocation=stepIntoMarkup.getRawPosition(currentPosition);this.doStepIntoSelection(rawLocation);}},_toggleFormatSource:function()
-{delete this._skipExecutionLineRevealing;this._toggleFormatSourceButton.toggled=!this._toggleFormatSourceButton.toggled;var uiSourceCodes=this._workspace.uiSourceCodes();for(var i=0;i<uiSourceCodes.length;++i)
-uiSourceCodes[i].setFormatted(this._toggleFormatSourceButton.toggled);var currentFile=this._editorContainer.currentFile();WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.TogglePrettyPrint,enabled:this._toggleFormatSourceButton.toggled,url:currentFile?currentFile.originURL():null});},addToWatch:function(expression)
-{this.sidebarPanes.watchExpressions.addExpression(expression);},_toggleBreakpoint:function()
-{var sourceFrame=this.visibleView;if(!sourceFrame)
-return false;if(sourceFrame instanceof WebInspector.JavaScriptSourceFrame){var javaScriptSourceFrame=(sourceFrame);javaScriptSourceFrame.toggleBreakpointOnCurrentLine();return true;}
-return false;},_showOutlineDialog:function(event)
-{var uiSourceCode=this._editorContainer.currentFile();if(!uiSourceCode)
-return false;switch(uiSourceCode.contentType()){case WebInspector.resourceTypes.Document:case WebInspector.resourceTypes.Script:WebInspector.JavaScriptOutlineDialog.show(this.visibleView,uiSourceCode,this.highlightPosition.bind(this));return true;case WebInspector.resourceTypes.Stylesheet:WebInspector.StyleSheetOutlineDialog.show(this.visibleView,uiSourceCode,this.highlightPosition.bind(this));return true;}
-return false;},_installDebuggerSidebarController:function()
-{this._toggleDebuggerSidebarButton=new WebInspector.StatusBarButton("","right-sidebar-show-hide-button scripts-debugger-show-hide-button",3);this._toggleDebuggerSidebarButton.addEventListener("click",clickHandler,this);if(this.splitView.isVertical()){this.editorView.element.appendChild(this._toggleDebuggerSidebarButton.element);this.splitView.mainElement().appendChild(this._debugSidebarResizeWidgetElement);}else{this._statusBarContainerElement.appendChild(this._debugSidebarResizeWidgetElement);this._statusBarContainerElement.appendChild(this._toggleDebuggerSidebarButton.element);}
-this._enableDebuggerSidebar(!WebInspector.settings.debuggerSidebarHidden.get());function clickHandler()
-{this._enableDebuggerSidebar(this._toggleDebuggerSidebarButton.state==="left");}},_enableDebuggerSidebar:function(show)
-{this._toggleDebuggerSidebarButton.state=show?"right":"left";this._toggleDebuggerSidebarButton.title=show?WebInspector.UIString("Hide debugger"):WebInspector.UIString("Show debugger");if(show)
-this.splitView.showSidebarElement();else
-this.splitView.hideSidebarElement();this._debugSidebarResizeWidgetElement.enableStyleClass("hidden",!show);WebInspector.settings.debuggerSidebarHidden.set(!show);},_itemCreationRequested:function(event)
-{var project=event.data.project;var path=event.data.path;var uiSourceCodeToCopy=event.data.uiSourceCode;var filePath;var shouldHideNavigator;var uiSourceCode;function contentLoaded(content)
-{createFile.call(this,content||"");}
-if(uiSourceCodeToCopy)
-uiSourceCodeToCopy.requestContent(contentLoaded.bind(this));else
-createFile.call(this);function createFile(content)
-{project.createFile(path,null,content||"",fileCreated.bind(this));}
-function fileCreated(path)
-{if(!path)
-return;filePath=path;uiSourceCode=project.uiSourceCode(filePath);this._showSourceLocation(uiSourceCode);shouldHideNavigator=!this._navigatorController.isNavigatorPinned();if(this._navigatorController.isNavigatorHidden())
-this._navigatorController.showNavigatorOverlay();this._navigator.rename(uiSourceCode,callback.bind(this));}
-function callback(committed)
-{if(shouldHideNavigator)
-this._navigatorController.hideNavigatorOverlay();if(!committed){project.deleteFile(uiSourceCode);return;}
-this._recreateSourceFrameIfNeeded(uiSourceCode);this._navigator.updateIcon(uiSourceCode);this._showSourceLocation(uiSourceCode);}},_itemRenamingRequested:function(event)
-{var uiSourceCode=(event.data);var shouldHideNavigator=!this._navigatorController.isNavigatorPinned();if(this._navigatorController.isNavigatorHidden())
-this._navigatorController.showNavigatorOverlay();this._navigator.rename(uiSourceCode,callback.bind(this));function callback(committed)
-{if(shouldHideNavigator&&committed)
-this._navigatorController.hideNavigatorOverlay();this._recreateSourceFrameIfNeeded(uiSourceCode);this._navigator.updateIcon(uiSourceCode);this._showSourceLocation(uiSourceCode);}},_showLocalHistory:function(uiSourceCode)
+{var button=new WebInspector.StatusBarButton(buttonTitle,buttonId);button.element.addEventListener("click",handler,false);button.shortcuts=shortcuts;this._updateButtonTitle(button,buttonTitle);this.registerShortcuts(shortcuts,handler);return button;},addToWatch:function(expression)
+{this.sidebarPanes.watchExpressions.addExpression(expression);},_installDebuggerSidebarController:function()
+{this._toggleNavigatorSidebarButton=this.editorView.createShowHideSidebarButton("navigator","scripts-navigator-show-hide-button");this.editorView.mainElement().appendChild(this._toggleNavigatorSidebarButton.element);this._toggleDebuggerSidebarButton=this._splitView.createShowHideSidebarButton("debugger","scripts-debugger-show-hide-button");this._splitView.mainElement().appendChild(this._toggleDebuggerSidebarButton.element);this._splitView.mainElement().appendChild(this._debugSidebarResizeWidgetElement);},_updateDebugSidebarResizeWidget:function()
+{this._debugSidebarResizeWidgetElement.classList.toggle("hidden",this._splitView.showMode()!==WebInspector.SplitView.ShowMode.Both);},_showLocalHistory:function(uiSourceCode)
 {WebInspector.RevisionHistoryView.showHistory(uiSourceCode);},appendApplicableItems:function(event,contextMenu,target)
-{this._appendUISourceCodeItems(contextMenu,target);this._appendFunctionItems(contextMenu,target);},_mapFileSystemToNetwork:function(uiSourceCode)
+{this._appendUISourceCodeItems(event,contextMenu,target);this._appendRemoteObjectItems(contextMenu,target);},_suggestReload:function()
+{if(window.confirm(WebInspector.UIString("It is recommended to restart inspector after making these changes. Would you like to restart it?")))
+WebInspector.reload();},_mapFileSystemToNetwork:function(uiSourceCode)
 {WebInspector.SelectUISourceCodeForProjectTypeDialog.show(uiSourceCode.name(),WebInspector.projectTypes.Network,mapFileSystemToNetwork.bind(this),this.editorView.mainElement())
 function mapFileSystemToNetwork(networkUISourceCode)
-{this._workspace.addMapping(networkUISourceCode,uiSourceCode,WebInspector.fileSystemWorkspaceProvider);}},_removeNetworkMapping:function(uiSourceCode)
-{if(confirm(WebInspector.UIString("Are you sure you want to remove network mapping?")))
-this._workspace.removeMapping(uiSourceCode);},_mapNetworkToFileSystem:function(networkUISourceCode)
+{this._workspace.addMapping(networkUISourceCode,uiSourceCode,WebInspector.fileSystemWorkspaceProvider);this._suggestReload();}},_removeNetworkMapping:function(uiSourceCode)
+{if(confirm(WebInspector.UIString("Are you sure you want to remove network mapping?"))){this._workspace.removeMapping(uiSourceCode);this._suggestReload();}},_mapNetworkToFileSystem:function(networkUISourceCode)
 {WebInspector.SelectUISourceCodeForProjectTypeDialog.show(networkUISourceCode.name(),WebInspector.projectTypes.FileSystem,mapNetworkToFileSystem.bind(this),this.editorView.mainElement())
 function mapNetworkToFileSystem(uiSourceCode)
 {this._workspace.addMapping(networkUISourceCode,uiSourceCode,WebInspector.fileSystemWorkspaceProvider);}},_appendUISourceCodeMappingItems:function(contextMenu,uiSourceCode)
@@ -1359,52 +1421,82 @@ function filterProject(project)
 {return project.type()===WebInspector.projectTypes.FileSystem;}
 if(uiSourceCode.project().type()===WebInspector.projectTypes.Network){if(!this._workspace.projects().filter(filterProject).length)
 return;if(this._workspace.uiSourceCodeForURL(uiSourceCode.url)===uiSourceCode)
-contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Map to file system resource\u2026":"Map to File System Resource\u2026"),this._mapNetworkToFileSystem.bind(this,uiSourceCode));}},_appendUISourceCodeItems:function(contextMenu,target)
+contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Map to file system resource\u2026":"Map to File System Resource\u2026"),this._mapNetworkToFileSystem.bind(this,uiSourceCode));}},_appendUISourceCodeItems:function(event,contextMenu,target)
 {if(!(target instanceof WebInspector.UISourceCode))
-return;var uiSourceCode=(target);contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Local modifications\u2026":"Local Modifications\u2026"),this._showLocalHistory.bind(this,uiSourceCode));if(WebInspector.isolatedFileSystemManager.supportsFileSystems())
-this._appendUISourceCodeMappingItems(contextMenu,uiSourceCode);},_appendFunctionItems:function(contextMenu,target)
+return;var uiSourceCode=(target);contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Local modifications\u2026":"Local Modifications\u2026"),this._showLocalHistory.bind(this,uiSourceCode));this._appendUISourceCodeMappingItems(contextMenu,uiSourceCode);if(!event.target.isSelfOrDescendant(this.editorView.sidebarElement())){contextMenu.appendSeparator();contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Reveal in navigator":"Reveal in Navigator"),this._handleContextMenuReveal.bind(this,uiSourceCode));}},_handleContextMenuReveal:function(uiSourceCode)
+{this.editorView.showBoth();this._revealInNavigator(uiSourceCode);},_appendRemoteObjectItems:function(contextMenu,target)
 {if(!(target instanceof WebInspector.RemoteObject))
-return;var remoteObject=(target);if(remoteObject.type!=="function")
-return;function didGetDetails(error,response)
+return;var remoteObject=(target);contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Store as global variable":"Store as Global Variable"),this._saveToTempVariable.bind(this,remoteObject));if(remoteObject.type==="function")
+contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Show function definition":"Show Function Definition"),this._showFunctionDefinition.bind(this,remoteObject));},_saveToTempVariable:function(remoteObject)
+{WebInspector.runtimeModel.evaluate("window","",false,true,false,false,didGetGlobalObject);function didGetGlobalObject(global,wasThrown)
+{function remoteFunction(value)
+{var prefix="temp";var index=1;while((prefix+index)in this)
+++index;var name=prefix+index;this[name]=value;return name;}
+if(wasThrown||!global)
+failedToSave(global);else
+global.callFunction(remoteFunction,[WebInspector.RemoteObject.toCallArgument(remoteObject)],didSave.bind(null,global));}
+function didSave(global,result,wasThrown)
+{global.release();if(wasThrown||!result||result.type!=="string")
+failedToSave(result);else
+WebInspector.console.evaluate(result.value);}
+function failedToSave(result)
+{var message=WebInspector.UIString("Failed to save to temp variable.");if(result){message+=" "+result.description;result.release();}
+WebInspector.console.showErrorMessage(message)}},_showFunctionDefinition:function(remoteObject)
+{function didGetFunctionDetails(error,response)
 {if(error){console.error(error);return;}
 var uiLocation=WebInspector.debuggerModel.rawLocationToUILocation(response.location);if(!uiLocation)
 return;this.showUILocation(uiLocation,true);}
-function revealFunction()
-{DebuggerAgent.getFunctionDetails(remoteObject.objectId,didGetDetails.bind(this));}
-contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Show function definition":"Show Function Definition"),revealFunction.bind(this));},showGoToSourceDialog:function()
-{var uiSourceCodes=this._editorContainer.historyUISourceCodes();var defaultScores=new Map();for(var i=1;i<uiSourceCodes.length;++i)
-defaultScores.put(uiSourceCodes[i],uiSourceCodes.length-i);WebInspector.OpenResourceDialog.show(this,this.editorView.mainElement(),undefined,defaultScores);},_dockSideChanged:function()
-{var dockSide=WebInspector.dockController.dockSide();var vertically=dockSide===WebInspector.DockController.State.DockedToRight&&WebInspector.settings.splitVerticallyWhenDockedToRight.get();this._splitVertically(vertically);},_splitVertically:function(vertically)
-{if(this.sidebarPaneView&&vertically===!this.splitView.isVertical())
+DebuggerAgent.getFunctionDetails(remoteObject.objectId,didGetFunctionDetails.bind(this));},showGoToSourceDialog:function()
+{this._sourcesView.showOpenResourceDialog();},_dockSideChanged:function()
+{var vertically=WebInspector.dockController.isVertical()&&WebInspector.settings.splitVerticallyWhenDockedToRight.get();this._splitVertically(vertically);},_splitVertically:function(vertically)
+{if(this.sidebarPaneView&&vertically===!this._splitView.isVertical())
 return;if(this.sidebarPaneView)
-this.sidebarPaneView.detach();this.splitView.setVertical(!vertically);if(!vertically){this.splitView.uninstallResizer(this._statusBarContainerElement);this.sidebarPaneView=new WebInspector.SidebarPaneStack();for(var pane in this.sidebarPanes)
-this.sidebarPaneView.addPane(this.sidebarPanes[pane]);this._extensionSidebarPanesContainer=this.sidebarPaneView;this.splitView.sidebarElement().appendChild(this.debugToolbar);this.editorView.element.appendChild(this._toggleDebuggerSidebarButton.element);this.splitView.mainElement().appendChild(this._debugSidebarResizeWidgetElement);}else{this.splitView.installResizer(this._statusBarContainerElement);this.sidebarPaneView=new WebInspector.SplitView(true,this.name+"PanelSplitSidebarRatio",0.5);var group1=new WebInspector.SidebarPaneStack();this.sidebarPaneView.setFirstView(group1);group1.element.id="scripts-sidebar-stack-pane";group1.addPane(this.sidebarPanes.callstack);group1.addPane(this.sidebarPanes.jsBreakpoints);group1.addPane(this.sidebarPanes.domBreakpoints);group1.addPane(this.sidebarPanes.xhrBreakpoints);group1.addPane(this.sidebarPanes.eventListenerBreakpoints);if(this.sidebarPanes.workerList)
-group1.addPane(this.sidebarPanes.workerList);var group2=new WebInspector.SidebarTabbedPane();this.sidebarPaneView.setSecondView(group2);group2.addPane(this.sidebarPanes.scopechain);group2.addPane(this.sidebarPanes.watchExpressions);this._extensionSidebarPanesContainer=group2;this.sidebarPaneView.firstElement().appendChild(this.debugToolbar);this._statusBarContainerElement.appendChild(this._debugSidebarResizeWidgetElement);this._statusBarContainerElement.appendChild(this._toggleDebuggerSidebarButton.element)}
+this.sidebarPaneView.detach();this._splitView.setVertical(!vertically);if(!vertically)
+this._splitView.uninstallResizer(this._sourcesView.statusBarContainerElement());else
+this._splitView.installResizer(this._sourcesView.statusBarContainerElement());var vbox=new WebInspector.VBox();vbox.element.appendChild(this._debugToolbarDrawer);vbox.element.appendChild(this.debugToolbar);vbox.element.appendChild(this.threadsToolbar.element);vbox.setMinimumSize(WebInspector.SourcesPanel.minToolbarWidth,25);var sidebarPaneStack=new WebInspector.SidebarPaneStack();sidebarPaneStack.element.classList.add("flex-auto");sidebarPaneStack.show(vbox.element);if(!vertically){for(var pane in this.sidebarPanes)
+sidebarPaneStack.addPane(this.sidebarPanes[pane]);this._extensionSidebarPanesContainer=sidebarPaneStack;this.sidebarPaneView=vbox;}else{var splitView=new WebInspector.SplitView(true,true,"sourcesPanelDebuggerSidebarSplitViewState",0.5);vbox.show(splitView.mainElement());sidebarPaneStack.addPane(this.sidebarPanes.callstack);sidebarPaneStack.addPane(this.sidebarPanes.jsBreakpoints);sidebarPaneStack.addPane(this.sidebarPanes.domBreakpoints);sidebarPaneStack.addPane(this.sidebarPanes.xhrBreakpoints);sidebarPaneStack.addPane(this.sidebarPanes.eventListenerBreakpoints);if(this.sidebarPanes.workerList)
+sidebarPaneStack.addPane(this.sidebarPanes.workerList);var tabbedPane=new WebInspector.SidebarTabbedPane();tabbedPane.show(splitView.sidebarElement());tabbedPane.addPane(this.sidebarPanes.scopechain);tabbedPane.addPane(this.sidebarPanes.watchExpressions);this._extensionSidebarPanesContainer=tabbedPane;this.sidebarPaneView=splitView;}
 for(var i=0;i<this._extensionSidebarPanes.length;++i)
-this._extensionSidebarPanesContainer.addPane(this._extensionSidebarPanes[i]);this.sidebarPaneView.element.id="scripts-debug-sidebar-contents";this.splitView.setSidebarView(this.sidebarPaneView);this.sidebarPanes.scopechain.expand();this.sidebarPanes.jsBreakpoints.expand();this.sidebarPanes.callstack.expand();if(WebInspector.settings.watchExpressions.get().length>0)
-this.sidebarPanes.watchExpressions.expand();},canHighlightPosition:function()
-{return this.visibleView&&this.visibleView.canHighlightPosition();},highlightPosition:function(line,column)
-{if(!this.canHighlightPosition())
-return;this._historyManager.updateCurrentState();this.visibleView.highlightPosition(line,column);this._historyManager.pushNewState();},addExtensionSidebarPane:function(id,pane)
-{this._extensionSidebarPanes.push(pane);this._extensionSidebarPanesContainer.addPane(pane);this.setHideOnDetach();},get tabbedEditorContainer()
-{return this._editorContainer;},__proto__:WebInspector.Panel.prototype}
-WebInspector.SourcesView=function()
-{WebInspector.View.call(this);this.registerRequiredCSS("sourcesView.css");this.element.id="sources-panel-sources-view";this.element.classList.add("vbox");this.element.addEventListener("dragenter",this._onDragEnter.bind(this),true);this.element.addEventListener("dragover",this._onDragOver.bind(this),true);}
-WebInspector.SourcesView.dragAndDropFilesType="Files";WebInspector.SourcesView.prototype={_onDragEnter:function(event)
-{if(event.dataTransfer.types.indexOf(WebInspector.SourcesView.dragAndDropFilesType)===-1)
+this._extensionSidebarPanesContainer.addPane(this._extensionSidebarPanes[i]);this.sidebarPaneView.show(this._splitView.sidebarElement());this.sidebarPanes.scopechain.expand();this.sidebarPanes.jsBreakpoints.expand();this.sidebarPanes.callstack.expand();if(WebInspector.settings.watchExpressions.get().length>0)
+this.sidebarPanes.watchExpressions.expand();},addExtensionSidebarPane:function(id,pane)
+{this._extensionSidebarPanes.push(pane);this._extensionSidebarPanesContainer.addPane(pane);this.setHideOnDetach();},sourcesView:function()
+{return this._sourcesView;},__proto__:WebInspector.Panel.prototype}
+WebInspector.UpgradeFileSystemDropTarget=function(element)
+{element.addEventListener("dragenter",this._onDragEnter.bind(this),true);element.addEventListener("dragover",this._onDragOver.bind(this),true);this._element=element;}
+WebInspector.UpgradeFileSystemDropTarget.dragAndDropFilesType="Files";WebInspector.UpgradeFileSystemDropTarget.prototype={_onDragEnter:function(event)
+{if(event.dataTransfer.types.indexOf(WebInspector.UpgradeFileSystemDropTarget.dragAndDropFilesType)===-1)
 return;event.consume(true);},_onDragOver:function(event)
-{if(event.dataTransfer.types.indexOf(WebInspector.SourcesView.dragAndDropFilesType)===-1)
-return;event.consume(true);if(this._dragMaskElement)
-return;this._dragMaskElement=this.element.createChild("div","fill drag-mask");this._dragMaskElement.addEventListener("drop",this._onDrop.bind(this),true);this._dragMaskElement.addEventListener("dragleave",this._onDragLeave.bind(this),true);},_onDrop:function(event)
+{if(event.dataTransfer.types.indexOf(WebInspector.UpgradeFileSystemDropTarget.dragAndDropFilesType)===-1)
+return;event.dataTransfer.dropEffect="copy";event.consume(true);if(this._dragMaskElement)
+return;this._dragMaskElement=this._element.createChild("div","fill drag-mask");this._dragMaskElement.createChild("div","fill drag-mask-inner").textContent=WebInspector.UIString("Drop workspace folder here");this._dragMaskElement.addEventListener("drop",this._onDrop.bind(this),true);this._dragMaskElement.addEventListener("dragleave",this._onDragLeave.bind(this),true);},_onDrop:function(event)
 {event.consume(true);this._removeMask();var items=(event.dataTransfer.items);if(!items.length)
 return;var entry=items[0].webkitGetAsEntry();if(!entry.isDirectory)
 return;InspectorFrontendHost.upgradeDraggedFileSystemPermissions(entry.filesystem);},_onDragLeave:function(event)
 {event.consume(true);this._removeMask();},_removeMask:function()
-{this._dragMaskElement.remove();delete this._dragMaskElement;},__proto__:WebInspector.View.prototype}
-WebInspector.DrawerEditorView=function()
-{WebInspector.View.call(this);this.element.id="drawer-editor-view";this.element.classList.add("vbox");}
-WebInspector.DrawerEditorView.prototype={__proto__:WebInspector.View.prototype}
+{this._dragMaskElement.remove();delete this._dragMaskElement;}}
+WebInspector.SourcesPanel.DrawerEditor=function()
+{this._panel=WebInspector.inspectorView.panel("sources");}
+WebInspector.SourcesPanel.DrawerEditor.prototype={view:function()
+{return this._panel._drawerEditorView;},installedIntoDrawer:function()
+{if(this._panel.isShowing())
+this._panelWasShown();else
+this._panelWillHide();},_panelWasShown:function()
+{WebInspector.inspectorView.setDrawerEditorAvailable(false);WebInspector.inspectorView.hideDrawerEditor();},_panelWillHide:function()
+{WebInspector.inspectorView.setDrawerEditorAvailable(true);if(WebInspector.inspectorView.isDrawerEditorShown())
+WebInspector.inspectorView.showDrawerEditor();},_show:function()
+{WebInspector.inspectorView.showDrawerEditor();},}
+WebInspector.SourcesPanel.DrawerEditorView=function()
+{WebInspector.VBox.call(this);this.element.id="drawer-editor-view";}
+WebInspector.SourcesPanel.DrawerEditorView.prototype={__proto__:WebInspector.VBox.prototype}
 WebInspector.SourcesPanel.ContextMenuProvider=function()
 {}
 WebInspector.SourcesPanel.ContextMenuProvider.prototype={appendApplicableItems:function(event,contextMenu,target)
-{WebInspector.panel("sources").appendApplicableItems(event,contextMenu,target);}}
\ No newline at end of file
+{WebInspector.inspectorView.panel("sources").appendApplicableItems(event,contextMenu,target);}}
+WebInspector.SourcesPanel.UILocationRevealer=function()
+{}
+WebInspector.SourcesPanel.UILocationRevealer.prototype={reveal:function(uiLocation)
+{if(uiLocation instanceof WebInspector.UILocation)
+(WebInspector.inspectorView.panel("sources")).showUILocation(uiLocation);}}
+WebInspector.SourcesPanel.ShowGoToSourceDialogActionDelegate=function(){}
+WebInspector.SourcesPanel.ShowGoToSourceDialogActionDelegate.prototype={handleAction:function()
+{(WebInspector.inspectorView.showPanel("sources")).showGoToSourceDialog();return true;}}
\ No newline at end of file