| OLD | NEW |
| 1 WebInspector.ApplicationCacheItemsView=function(model,frameId) | 1 WebInspector.ApplicationCacheItemsView=function(model,frameId) |
| 2 {WebInspector.View.call(this);this._model=model;this.element.addStyleClass("stor
age-view");this.element.addStyleClass("table");this.deleteButton=new WebInspecto
r.StatusBarButton(WebInspector.UIString("Delete"),"delete-storage-status-bar-ite
m");this.deleteButton.visible=false;this.deleteButton.addEventListener("click",t
his._deleteButtonClicked,this);this.connectivityIcon=document.createElement("div
");this.connectivityMessage=document.createElement("span");this.connectivityMess
age.className="storage-application-cache-connectivity";this.connectivityMessage.
textContent="";this.divider=document.createElement("span");this.divider.classNam
e="status-bar-item status-bar-divider";this.statusIcon=document.createElement("d
iv");this.statusMessage=document.createElement("span");this.statusMessage.classN
ame="storage-application-cache-status";this.statusMessage.textContent="";this._f
rameId=frameId;this._emptyView=new WebInspector.EmptyView(WebInspector.UIString(
"No Application Cache information available."));this._emptyView.show(this.elemen
t);this._markDirty();var status=this._model.frameManifestStatus(frameId);this.up
dateStatus(status);this.updateNetworkState(this._model.onLine);this.deleteButton
.element.style.display="none";} | 2 {WebInspector.View.call(this);this._model=model;this.element.addStyleClass("stor
age-view");this.element.addStyleClass("table");this.deleteButton=new WebInspecto
r.StatusBarButton(WebInspector.UIString("Delete"),"delete-storage-status-bar-ite
m");this.deleteButton.visible=false;this.deleteButton.addEventListener("click",t
his._deleteButtonClicked,this);this.connectivityIcon=document.createElement("div
");this.connectivityMessage=document.createElement("span");this.connectivityMess
age.className="storage-application-cache-connectivity";this.connectivityMessage.
textContent="";this.divider=document.createElement("span");this.divider.classNam
e="status-bar-item status-bar-divider";this.statusIcon=document.createElement("d
iv");this.statusMessage=document.createElement("span");this.statusMessage.classN
ame="storage-application-cache-status";this.statusMessage.textContent="";this._f
rameId=frameId;this._emptyView=new WebInspector.EmptyView(WebInspector.UIString(
"No Application Cache information available."));this._emptyView.show(this.elemen
t);this._markDirty();var status=this._model.frameManifestStatus(frameId);this.up
dateStatus(status);this.updateNetworkState(this._model.onLine);this.deleteButton
.element.style.display="none";} |
| 3 WebInspector.ApplicationCacheItemsView.prototype={get statusBarItems() | 3 WebInspector.ApplicationCacheItemsView.prototype={get statusBarItems() |
| 4 {return[this.deleteButton.element,this.connectivityIcon,this.connectivityMessage
,this.divider,this.statusIcon,this.statusMessage];},wasShown:function() | 4 {return[this.deleteButton.element,this.connectivityIcon,this.connectivityMessage
,this.divider,this.statusIcon,this.statusMessage];},wasShown:function() |
| 5 {this._maybeUpdate();},willHide:function() | 5 {this._maybeUpdate();},willHide:function() |
| 6 {this.deleteButton.visible=false;},_maybeUpdate:function() | 6 {this.deleteButton.visible=false;},_maybeUpdate:function() |
| 7 {if(!this.isShowing()||!this._viewDirty) | 7 {if(!this.isShowing()||!this._viewDirty) |
| 8 return;this._update();this._viewDirty=false;},_markDirty:function() | 8 return;this._update();this._viewDirty=false;},_markDirty:function() |
| 9 {this._viewDirty=true;},updateStatus:function(status) | 9 {this._viewDirty=true;},updateStatus:function(status) |
| 10 {var oldStatus=this._status;this._status=status;var statusInformation={};statusI
nformation[applicationCache.UNCACHED]={className:"red-ball",text:"UNCACHED"};sta
tusInformation[applicationCache.IDLE]={className:"green-ball",text:"IDLE"};statu
sInformation[applicationCache.CHECKING]={className:"orange-ball",text:"CHECKING"
};statusInformation[applicationCache.DOWNLOADING]={className:"orange-ball",text:
"DOWNLOADING"};statusInformation[applicationCache.UPDATEREADY]={className:"green
-ball",text:"UPDATEREADY"};statusInformation[applicationCache.OBSOLETE]={classNa
me:"red-ball",text:"OBSOLETE"};var info=statusInformation[status]||statusInforma
tion[applicationCache.UNCACHED];this.statusIcon.className="storage-application-c
ache-status-icon "+info.className;this.statusMessage.textContent=info.text;if(th
is.isShowing()&&this._status===applicationCache.IDLE&&(oldStatus===applicationCa
che.UPDATEREADY||!this._resources)) | 10 {var oldStatus=this._status;this._status=status;var statusInformation={};statusI
nformation[applicationCache.UNCACHED]={className:"red-ball",text:"UNCACHED"};sta
tusInformation[applicationCache.IDLE]={className:"green-ball",text:"IDLE"};statu
sInformation[applicationCache.CHECKING]={className:"orange-ball",text:"CHECKING"
};statusInformation[applicationCache.DOWNLOADING]={className:"orange-ball",text:
"DOWNLOADING"};statusInformation[applicationCache.UPDATEREADY]={className:"green
-ball",text:"UPDATEREADY"};statusInformation[applicationCache.OBSOLETE]={classNa
me:"red-ball",text:"OBSOLETE"};var info=statusInformation[status]||statusInforma
tion[applicationCache.UNCACHED];this.statusIcon.className="storage-application-c
ache-status-icon "+info.className;this.statusMessage.textContent=info.text;if(th
is.isShowing()&&this._status===applicationCache.IDLE&&(oldStatus===applicationCa
che.UPDATEREADY||!this._resources)) |
| 11 this._markDirty();this._maybeUpdate();},updateNetworkState:function(isNowOnline) | 11 this._markDirty();this._maybeUpdate();},updateNetworkState:function(isNowOnline) |
| 12 {if(isNowOnline){this.connectivityIcon.className="storage-application-cache-conn
ectivity-icon green-ball";this.connectivityMessage.textContent=WebInspector.UISt
ring("Online");}else{this.connectivityIcon.className="storage-application-cache-
connectivity-icon red-ball";this.connectivityMessage.textContent=WebInspector.UI
String("Offline");}},_update:function() | 12 {if(isNowOnline){this.connectivityIcon.className="storage-application-cache-conn
ectivity-icon green-ball";this.connectivityMessage.textContent=WebInspector.UISt
ring("Online");}else{this.connectivityIcon.className="storage-application-cache-
connectivity-icon red-ball";this.connectivityMessage.textContent=WebInspector.UI
String("Offline");}},_update:function() |
| 13 {this._model.requestApplicationCache(this._frameId,this._updateCallback.bind(thi
s));},_updateCallback:function(applicationCache) | 13 {this._model.requestApplicationCache(this._frameId,this._updateCallback.bind(thi
s));},_updateCallback:function(applicationCache) |
| 14 {if(!applicationCache||!applicationCache.manifestURL){delete this._manifest;dele
te this._creationTime;delete this._updateTime;delete this._size;delete this._res
ources;this._emptyView.show(this.element);this.deleteButton.visible=false;if(thi
s._dataGrid) | 14 {if(!applicationCache||!applicationCache.manifestURL){delete this._manifest;dele
te this._creationTime;delete this._updateTime;delete this._size;delete this._res
ources;this._emptyView.show(this.element);this.deleteButton.visible=false;if(thi
s._dataGrid) |
| 15 this._dataGrid.element.addStyleClass("hidden");return;} | 15 this._dataGrid.element.addStyleClass("hidden");return;} |
| 16 this._manifest=applicationCache.manifestURL;this._creationTime=applicationCache.
creationTime;this._updateTime=applicationCache.updateTime;this._size=application
Cache.size;this._resources=applicationCache.resources;if(!this._dataGrid) | 16 this._manifest=applicationCache.manifestURL;this._creationTime=applicationCache.
creationTime;this._updateTime=applicationCache.updateTime;this._size=application
Cache.size;this._resources=applicationCache.resources;if(!this._dataGrid) |
| 17 this._createDataGrid();this._populateDataGrid();this._dataGrid.autoSizeColumns(2
0,80);this._dataGrid.element.removeStyleClass("hidden");this._emptyView.detach()
;this.deleteButton.visible=true;},_createDataGrid:function() | 17 this._createDataGrid();this._populateDataGrid();this._dataGrid.autoSizeColumns(2
0,80);this._dataGrid.element.removeStyleClass("hidden");this._emptyView.detach()
;this.deleteButton.visible=true;},_createDataGrid:function() |
| 18 {var columns=[{title:WebInspector.UIString("Resource"),sort:WebInspector.DataGri
d.Order.Ascending,sortable:true},{title:WebInspector.UIString("Type"),sortable:t
rue},{title:WebInspector.UIString("Size"),align:WebInspector.DataGrid.Align.Righ
t,sortable:true}];this._dataGrid=new WebInspector.DataGrid(columns);this._dataGr
id.show(this.element);this._dataGrid.addEventListener(WebInspector.DataGrid.Even
ts.SortingChanged,this._populateDataGrid,this);},_populateDataGrid:function() | 18 {var columns=[{title:WebInspector.UIString("Resource"),sort:WebInspector.DataGri
d.Order.Ascending,sortable:true},{title:WebInspector.UIString("Type"),sortable:t
rue},{title:WebInspector.UIString("Size"),align:WebInspector.DataGrid.Align.Righ
t,sortable:true}];this._dataGrid=new WebInspector.DataGrid(columns);this._dataGr
id.show(this.element);this._dataGrid.addEventListener(WebInspector.DataGrid.Even
ts.SortingChanged,this._populateDataGrid,this);},_populateDataGrid:function() |
| 19 {var selectedResource=this._dataGrid.selectedNode?this._dataGrid.selectedNode.re
source:null;var sortDirection=this._dataGrid.isSortOrderAscending()?1:-1;functio
n numberCompare(field,resource1,resource2) | 19 {var selectedResource=this._dataGrid.selectedNode?this._dataGrid.selectedNode.re
source:null;var sortDirection=this._dataGrid.isSortOrderAscending()?1:-1;functio
n numberCompare(field,resource1,resource2) |
| 20 {return sortDirection*(resource1[field]-resource2[field]);} | 20 {return sortDirection*(resource1[field]-resource2[field]);} |
| 21 function localeCompare(field,resource1,resource2) | 21 function localeCompare(field,resource1,resource2) |
| 22 {return sortDirection*(resource1[field]+"").localeCompare(resource2[field]+"")} | 22 {return sortDirection*(resource1[field]+"").localeCompare(resource2[field]+"")} |
| 23 var comparator;switch(parseInt(this._dataGrid.sortColumnIdentifier(),10)){case 0
:comparator=localeCompare.bind(this,"name");break;case 1:comparator=localeCompar
e.bind(this,"type");break;case 2:comparator=numberCompare.bind(this,"size");brea
k;default:localeCompare.bind(this,"resource");} | 23 var comparator;switch(parseInt(this._dataGrid.sortColumnIdentifier(),10)){case 0
:comparator=localeCompare.bind(this,"name");break;case 1:comparator=localeCompar
e.bind(this,"type");break;case 2:comparator=numberCompare.bind(this,"size");brea
k;default:localeCompare.bind(this,"resource");} |
| 24 this._resources.sort(comparator);this._dataGrid.rootNode().removeChildren();var
nodeToSelect;for(var i=0;i<this._resources.length;++i){var data={};var resource=
this._resources[i];data[0]=resource.url;data[1]=resource.type;data[2]=Number.byt
esToString(resource.size);var node=new WebInspector.DataGridNode(data);node.reso
urce=resource;node.selectable=true;this._dataGrid.rootNode().appendChild(node);i
f(resource===selectedResource){nodeToSelect=node;nodeToSelect.selected=true;}} | 24 this._resources.sort(comparator);this._dataGrid.rootNode().removeChildren();var
nodeToSelect;for(var i=0;i<this._resources.length;++i){var data={};var resource=
this._resources[i];data[0]=resource.url;data[1]=resource.type;data[2]=Number.byt
esToString(resource.size);var node=new WebInspector.DataGridNode(data);node.reso
urce=resource;node.selectable=true;this._dataGrid.rootNode().appendChild(node);i
f(resource===selectedResource){nodeToSelect=node;nodeToSelect.selected=true;}} |
| 25 if(!nodeToSelect&&this._dataGrid.rootNode().children.length) | 25 if(!nodeToSelect&&this._dataGrid.rootNode().children.length) |
| 26 this._dataGrid.rootNode().children[0].selected=true;},_deleteButtonClicked:funct
ion(event) | 26 this._dataGrid.rootNode().children[0].selected=true;},_deleteButtonClicked:funct
ion(event) |
| 27 {if(!this._dataGrid||!this._dataGrid.selectedNode) | 27 {if(!this._dataGrid||!this._dataGrid.selectedNode) |
| 28 return;this._deleteCallback(this._dataGrid.selectedNode);},_deleteCallback:funct
ion(node) | 28 return;this._deleteCallback(this._dataGrid.selectedNode);},_deleteCallback:funct
ion(node) |
| 29 {},__proto__:WebInspector.View.prototype};WebInspector.DOMStorageItemsView=funct
ion(domStorage,domStorageModel) | 29 {},__proto__:WebInspector.View.prototype};WebInspector.DOMStorageItemsView=funct
ion(domStorage) |
| 30 {WebInspector.View.call(this);this.domStorage=domStorage;this.domStorageModel=do
mStorageModel;this.element.addStyleClass("storage-view");this.element.addStyleCl
ass("table");this.deleteButton=new WebInspector.StatusBarButton(WebInspector.UIS
tring("Delete"),"delete-storage-status-bar-item");this.deleteButton.visible=fals
e;this.deleteButton.addEventListener("click",this._deleteButtonClicked,this);thi
s.refreshButton=new WebInspector.StatusBarButton(WebInspector.UIString("Refresh"
),"refresh-storage-status-bar-item");this.refreshButton.addEventListener("click"
,this._refreshButtonClicked,this);this.domStorageModel.addEventListener(WebInspe
ctor.DOMStorageModel.Events.DOMStorageItemsCleared,this._domStorageItemsCleared,
this);this.domStorageModel.addEventListener(WebInspector.DOMStorageModel.Events.
DOMStorageItemRemoved,this._domStorageItemRemoved,this);this.domStorageModel.add
EventListener(WebInspector.DOMStorageModel.Events.DOMStorageItemAdded,this._domS
torageItemAdded,this);this.domStorageModel.addEventListener(WebInspector.DOMStor
ageModel.Events.DOMStorageItemUpdated,this._domStorageItemUpdated,this);} | 30 {WebInspector.View.call(this);this.domStorage=domStorage;this.element.addStyleCl
ass("storage-view");this.element.addStyleClass("table");this.deleteButton=new We
bInspector.StatusBarButton(WebInspector.UIString("Delete"),"delete-storage-statu
s-bar-item");this.deleteButton.visible=false;this.deleteButton.addEventListener(
"click",this._deleteButtonClicked,this);this.refreshButton=new WebInspector.Stat
usBarButton(WebInspector.UIString("Refresh"),"refresh-storage-status-bar-item");
this.refreshButton.addEventListener("click",this._refreshButtonClicked,this);thi
s.domStorage.addEventListener(WebInspector.DOMStorage.Events.DOMStorageItemsClea
red,this._domStorageItemsCleared,this);this.domStorage.addEventListener(WebInspe
ctor.DOMStorage.Events.DOMStorageItemRemoved,this._domStorageItemRemoved,this);t
his.domStorage.addEventListener(WebInspector.DOMStorage.Events.DOMStorageItemAdd
ed,this._domStorageItemAdded,this);this.domStorage.addEventListener(WebInspector
.DOMStorage.Events.DOMStorageItemUpdated,this._domStorageItemUpdated,this);} |
| 31 WebInspector.DOMStorageItemsView.prototype={get statusBarItems() | 31 WebInspector.DOMStorageItemsView.prototype={get statusBarItems() |
| 32 {return[this.refreshButton.element,this.deleteButton.element];},wasShown:functio
n() | 32 {return[this.refreshButton.element,this.deleteButton.element];},wasShown:functio
n() |
| 33 {this._update();},willHide:function() | 33 {this._update();},willHide:function() |
| 34 {this.deleteButton.visible=false;},handleShortcut:function(event) | 34 {this.deleteButton.visible=false;},_domStorageItemsCleared:function(event) |
| 35 {if(WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event)&&!event.shiftKey&&ev
ent.keyIdentifier==="U+005A"){this.domStorage.undo();event.handled=true;return;} | |
| 36 var isRedoKey=WebInspector.isMac()?event.metaKey&&event.shiftKey&&event.keyIdent
ifier==="U+005A":event.ctrlKey&&event.keyIdentifier==="U+0059";if(isRedoKey){thi
s.domStorage.redo();event.handled=true;return;}},_domStorageItemsCleared:functio
n(event) | |
| 37 {if(!this.isShowing()||!this._dataGrid) | 35 {if(!this.isShowing()||!this._dataGrid) |
| 38 return;this._dataGrid.rootNode().removeChildren();this._dataGrid.addCreationNode
(false);this.deleteButton.visible=false;event.consume(true);},_domStorageItemRem
oved:function(event) | 36 return;this._dataGrid.rootNode().removeChildren();this._dataGrid.addCreationNode
(false);this.deleteButton.visible=false;event.consume(true);},_domStorageItemRem
oved:function(event) |
| 39 {if(!this.isShowing()||!this._dataGrid) | 37 {if(!this.isShowing()||!this._dataGrid) |
| 40 return;var storageData=event.data;var rootNode=this._dataGrid.rootNode();var chi
ldren=rootNode.children;event.consume(true);for(var i=0;i<children.length;++i){v
ar childNode=children[i];if(childNode.data.key===storageData.key){rootNode.remov
eChild(childNode);this.deleteButton.visible=(children.length>1);return;}}},_domS
torageItemAdded:function(event) | 38 return;var storageData=event.data;var rootNode=this._dataGrid.rootNode();var chi
ldren=rootNode.children;event.consume(true);for(var i=0;i<children.length;++i){v
ar childNode=children[i];if(childNode.data.key===storageData.key){rootNode.remov
eChild(childNode);this.deleteButton.visible=(children.length>1);return;}}},_domS
torageItemAdded:function(event) |
| 41 {if(!this.isShowing()||!this._dataGrid) | 39 {if(!this.isShowing()||!this._dataGrid) |
| 42 return;var storageData=event.data;var rootNode=this._dataGrid.rootNode();var chi
ldren=rootNode.children;event.consume(true);this.deleteButton.visible=true;for(v
ar i=0;i<children.length;++i) | 40 return;var storageData=event.data;var rootNode=this._dataGrid.rootNode();var chi
ldren=rootNode.children;event.consume(true);this.deleteButton.visible=true;for(v
ar i=0;i<children.length;++i) |
| 43 if(children[i].data.key===storageData.key) | 41 if(children[i].data.key===storageData.key) |
| 44 return;var childNode=new WebInspector.DataGridNode({key:storageData.key,value:st
orageData.newValue},false);rootNode.insertChild(childNode,children.length-1);},_
domStorageItemUpdated:function(event) | 42 return;var childNode=new WebInspector.DataGridNode({key:storageData.key,value:st
orageData.value},false);rootNode.insertChild(childNode,children.length-1);},_dom
StorageItemUpdated:function(event) |
| 45 {if(!this.isShowing()||!this._dataGrid) | 43 {if(!this.isShowing()||!this._dataGrid) |
| 46 return;var storageData=event.data;var rootNode=this._dataGrid.rootNode();var chi
ldren=rootNode.children;event.consume(true);var keyFound=false;for(var i=0;i<chi
ldren.length;++i){var childNode=children[i];if(childNode.data.key===storageData.
key){if(keyFound){rootNode.removeChild(childNode);return;} | 44 return;var storageData=event.data;var rootNode=this._dataGrid.rootNode();var chi
ldren=rootNode.children;event.consume(true);var keyFound=false;for(var i=0;i<chi
ldren.length;++i){var childNode=children[i];if(childNode.data.key===storageData.
key){if(keyFound){rootNode.removeChild(childNode);return;} |
| 47 keyFound=true;if(childNode.data.value!==storageData.newValue){childNode.data.val
ue=storageData.newValue;childNode.refresh();childNode.select();childNode.reveal(
);} | 45 keyFound=true;if(childNode.data.value!==storageData.value){childNode.data.value=
storageData.value;childNode.refresh();childNode.select();childNode.reveal();} |
| 48 this.deleteButton.visible=true;}}},_update:function() | 46 this.deleteButton.visible=true;}}},_update:function() |
| 49 {this.detachChildViews();this.domStorage.getItems(this._showDOMStorageItems.bind
(this));},_showDOMStorageItems:function(error,items) | 47 {this.detachChildViews();this.domStorage.getItems(this._showDOMStorageItems.bind
(this));},_showDOMStorageItems:function(error,items) |
| 50 {if(error) | 48 {if(error) |
| 51 return;this._dataGrid=this._dataGridForDOMStorageItems(items);this._dataGrid.sho
w(this.element);this.deleteButton.visible=(this._dataGrid.rootNode().children.le
ngth>1);},_dataGridForDOMStorageItems:function(items) | 49 return;this._dataGrid=this._dataGridForDOMStorageItems(items);this._dataGrid.sho
w(this.element);this.deleteButton.visible=(this._dataGrid.rootNode().children.le
ngth>1);},_dataGridForDOMStorageItems:function(items) |
| 52 {var columns=[{id:"key",title:WebInspector.UIString("Key"),editable:true,weight:
50},{id:"value",title:WebInspector.UIString("Value"),editable:true,weight:50}];v
ar nodes=[];var keys=[];var length=items.length;for(var i=0;i<items.length;i++){
var key=items[i][0];var value=items[i][1];var node=new WebInspector.DataGridNode
({key:key,value:value},false);node.selectable=true;nodes.push(node);keys.push(ke
y);} | 50 {var columns=[{id:"key",title:WebInspector.UIString("Key"),editable:true,weight:
50},{id:"value",title:WebInspector.UIString("Value"),editable:true,weight:50}];v
ar nodes=[];var keys=[];var length=items.length;for(var i=0;i<items.length;i++){
var key=items[i][0];var value=items[i][1];var node=new WebInspector.DataGridNode
({key:key,value:value},false);node.selectable=true;nodes.push(node);keys.push(ke
y);} |
| 53 var dataGrid=new WebInspector.DataGrid(columns,this._editingCallback.bind(this),
this._deleteCallback.bind(this));dataGrid.setName("DOMStorageItemsView");length=
nodes.length;for(var i=0;i<length;++i) | 51 var dataGrid=new WebInspector.DataGrid(columns,this._editingCallback.bind(this),
this._deleteCallback.bind(this));dataGrid.setName("DOMStorageItemsView");length=
nodes.length;for(var i=0;i<length;++i) |
| 54 dataGrid.rootNode().appendChild(nodes[i]);dataGrid.addCreationNode(false);if(len
gth>0) | 52 dataGrid.rootNode().appendChild(nodes[i]);dataGrid.addCreationNode(false);if(len
gth>0) |
| 55 nodes[0].selected=true;return dataGrid;},_deleteButtonClicked:function(event) | 53 nodes[0].selected=true;return dataGrid;},_deleteButtonClicked:function(event) |
| 56 {if(!this._dataGrid||!this._dataGrid.selectedNode) | 54 {if(!this._dataGrid||!this._dataGrid.selectedNode) |
| 57 return;this._deleteCallback(this._dataGrid.selectedNode);this._dataGrid.changeNo
deAfterDeletion();},_refreshButtonClicked:function(event) | 55 return;this._deleteCallback(this._dataGrid.selectedNode);this._dataGrid.changeNo
deAfterDeletion();},_refreshButtonClicked:function(event) |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 {this._entry.deleteEntry(this._deletionCompleted.bind(this));},_deletionComplete
d:function() | 237 {this._entry.deleteEntry(this._deletionCompleted.bind(this));},_deletionComplete
d:function() |
| 240 {if(this._entry!=this._entry.fileSystem.root) | 238 {if(this._entry!=this._entry.fileSystem.root) |
| 241 this.parent.refresh();},__proto__:TreeElement.prototype};WebInspector.ResourcesP
anel=function(database) | 239 this.parent.refresh();},__proto__:TreeElement.prototype};WebInspector.ResourcesP
anel=function(database) |
| 242 {WebInspector.Panel.call(this,"resources");this.registerRequiredCSS("resourcesPa
nel.css");WebInspector.settings.resourcesLastSelectedItem=WebInspector.settings.
createSetting("resourcesLastSelectedItem",{});this.createSidebarViewWithTree();t
his.sidebarElement.addStyleClass("outline-disclosure");this.sidebarElement.addSt
yleClass("filter-all");this.sidebarElement.addStyleClass("children");this.sideba
rElement.addStyleClass("small");this.sidebarTreeElement.removeStyleClass("sideba
r-tree");this.resourcesListTreeElement=new WebInspector.StorageCategoryTreeEleme
nt(this,WebInspector.UIString("Frames"),"Frames",["frame-storage-tree-item"]);th
is.sidebarTree.appendChild(this.resourcesListTreeElement);this.databasesListTree
Element=new WebInspector.StorageCategoryTreeElement(this,WebInspector.UIString("
Web SQL"),"Databases",["database-storage-tree-item"]);this.sidebarTree.appendChi
ld(this.databasesListTreeElement);this.indexedDBListTreeElement=new WebInspector
.IndexedDBTreeElement(this);this.sidebarTree.appendChild(this.indexedDBListTreeE
lement);this.localStorageListTreeElement=new WebInspector.StorageCategoryTreeEle
ment(this,WebInspector.UIString("Local Storage"),"LocalStorage",["domstorage-sto
rage-tree-item","local-storage"]);this.sidebarTree.appendChild(this.localStorage
ListTreeElement);this.sessionStorageListTreeElement=new WebInspector.StorageCate
goryTreeElement(this,WebInspector.UIString("Session Storage"),"SessionStorage",[
"domstorage-storage-tree-item","session-storage"]);this.sidebarTree.appendChild(
this.sessionStorageListTreeElement);this.cookieListTreeElement=new WebInspector.
StorageCategoryTreeElement(this,WebInspector.UIString("Cookies"),"Cookies",["coo
kie-storage-tree-item"]);this.sidebarTree.appendChild(this.cookieListTreeElement
);this.applicationCacheListTreeElement=new WebInspector.StorageCategoryTreeEleme
nt(this,WebInspector.UIString("Application Cache"),"ApplicationCache",["applicat
ion-cache-storage-tree-item"]);this.sidebarTree.appendChild(this.applicationCach
eListTreeElement);if(WebInspector.experimentsSettings.fileSystemInspection.isEna
bled()){this.fileSystemListTreeElement=new WebInspector.FileSystemListTreeElemen
t(this);this.sidebarTree.appendChild(this.fileSystemListTreeElement);} | 240 {WebInspector.Panel.call(this,"resources");this.registerRequiredCSS("resourcesPa
nel.css");WebInspector.settings.resourcesLastSelectedItem=WebInspector.settings.
createSetting("resourcesLastSelectedItem",{});this.createSidebarViewWithTree();t
his.sidebarElement.addStyleClass("outline-disclosure");this.sidebarElement.addSt
yleClass("filter-all");this.sidebarElement.addStyleClass("children");this.sideba
rElement.addStyleClass("small");this.sidebarTreeElement.removeStyleClass("sideba
r-tree");this.resourcesListTreeElement=new WebInspector.StorageCategoryTreeEleme
nt(this,WebInspector.UIString("Frames"),"Frames",["frame-storage-tree-item"]);th
is.sidebarTree.appendChild(this.resourcesListTreeElement);this.databasesListTree
Element=new WebInspector.StorageCategoryTreeElement(this,WebInspector.UIString("
Web SQL"),"Databases",["database-storage-tree-item"]);this.sidebarTree.appendChi
ld(this.databasesListTreeElement);this.indexedDBListTreeElement=new WebInspector
.IndexedDBTreeElement(this);this.sidebarTree.appendChild(this.indexedDBListTreeE
lement);this.localStorageListTreeElement=new WebInspector.StorageCategoryTreeEle
ment(this,WebInspector.UIString("Local Storage"),"LocalStorage",["domstorage-sto
rage-tree-item","local-storage"]);this.sidebarTree.appendChild(this.localStorage
ListTreeElement);this.sessionStorageListTreeElement=new WebInspector.StorageCate
goryTreeElement(this,WebInspector.UIString("Session Storage"),"SessionStorage",[
"domstorage-storage-tree-item","session-storage"]);this.sidebarTree.appendChild(
this.sessionStorageListTreeElement);this.cookieListTreeElement=new WebInspector.
StorageCategoryTreeElement(this,WebInspector.UIString("Cookies"),"Cookies",["coo
kie-storage-tree-item"]);this.sidebarTree.appendChild(this.cookieListTreeElement
);this.applicationCacheListTreeElement=new WebInspector.StorageCategoryTreeEleme
nt(this,WebInspector.UIString("Application Cache"),"ApplicationCache",["applicat
ion-cache-storage-tree-item"]);this.sidebarTree.appendChild(this.applicationCach
eListTreeElement);if(WebInspector.experimentsSettings.fileSystemInspection.isEna
bled()){this.fileSystemListTreeElement=new WebInspector.FileSystemListTreeElemen
t(this);this.sidebarTree.appendChild(this.fileSystemListTreeElement);} |
| 243 this.storageViews=this.splitView.mainElement;this.storageViews.addStyleClass("di
ff-container");this.storageViewStatusBarItemsContainer=document.createElement("d
iv");this.storageViewStatusBarItemsContainer.className="status-bar-items";this._
databaseTableViews=new Map();this._databaseQueryViews=new Map();this._databaseTr
eeElements=new Map();this._domStorageViews=new Map();this._domStorageTreeElement
s=new Map();this._cookieViews={};this._domains={};this.sidebarElement.addEventLi
stener("mousemove",this._onmousemove.bind(this),false);this.sidebarElement.addEv
entListener("mouseout",this._onmouseout.bind(this),false);function viewGetter() | 241 this.storageViews=this.splitView.mainElement;this.storageViews.addStyleClass("di
ff-container");this.storageViewStatusBarItemsContainer=document.createElement("d
iv");this.storageViewStatusBarItemsContainer.className="status-bar-items";this._
databaseTableViews=new Map();this._databaseQueryViews=new Map();this._databaseTr
eeElements=new Map();this._domStorageViews=new Map();this._domStorageTreeElement
s=new Map();this._cookieViews={};this._domains={};this.sidebarElement.addEventLi
stener("mousemove",this._onmousemove.bind(this),false);this.sidebarElement.addEv
entListener("mouseout",this._onmouseout.bind(this),false);function viewGetter() |
| 244 {return this.visibleView;} | 242 {return this.visibleView;} |
| 245 WebInspector.GoToLineDialog.install(this,viewGetter.bind(this));if(WebInspector.
resourceTreeModel.cachedResourcesLoaded()) | 243 WebInspector.GoToLineDialog.install(this,viewGetter.bind(this));if(WebInspector.
resourceTreeModel.cachedResourcesLoaded()) |
| 246 this._cachedResourcesLoaded();WebInspector.resourceTreeModel.addEventListener(We
bInspector.ResourceTreeModel.EventTypes.Load,this._loadEventFired,this);WebInspe
ctor.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventType
s.CachedResourcesLoaded,this._cachedResourcesLoaded,this);WebInspector.resourceT
reeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.WillLoadCach
edResources,this._resetWithFrames,this);WebInspector.databaseModel.databases().f
orEach(this._addDatabase.bind(this));WebInspector.databaseModel.addEventListener
(WebInspector.DatabaseModel.Events.DatabaseAdded,this._databaseAdded,this);} | 244 this._cachedResourcesLoaded();WebInspector.resourceTreeModel.addEventListener(We
bInspector.ResourceTreeModel.EventTypes.Load,this._loadEventFired,this);WebInspe
ctor.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventType
s.CachedResourcesLoaded,this._cachedResourcesLoaded,this);WebInspector.resourceT
reeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.WillLoadCach
edResources,this._resetWithFrames,this);WebInspector.databaseModel.databases().f
orEach(this._addDatabase.bind(this));WebInspector.databaseModel.addEventListener
(WebInspector.DatabaseModel.Events.DatabaseAdded,this._databaseAdded,this);} |
| 247 WebInspector.ResourcesPanel.prototype={get statusBarItems() | 245 WebInspector.ResourcesPanel.prototype={get statusBarItems() |
| 248 {return[this.storageViewStatusBarItemsContainer];},wasShown:function() | 246 {return[this.storageViewStatusBarItemsContainer];},wasShown:function() |
| 249 {WebInspector.Panel.prototype.wasShown.call(this);this._initialize();},handleSho
rtcut:function(event) | 247 {WebInspector.Panel.prototype.wasShown.call(this);this._initialize();},_initiali
ze:function() |
| 250 {if(this.visibleView&&typeof this.visibleView.handleShortcut==="function") | 248 {if(!this._initialized&&this.isShowing()&&this._cachedResourcesWereLoaded){this.
_populateResourceTree();this._populateDOMStorageTree();this._populateApplication
CacheTree();this.indexedDBListTreeElement._initialize();if(WebInspector.experime
ntsSettings.fileSystemInspection.isEnabled()) |
| 251 return this.visibleView.handleShortcut(event);},_initialize:function() | 249 this.fileSystemListTreeElement._initialize();this._initDefaultSelection();this._
initialized=true;}},_loadEventFired:function() |
| 252 {if(!this._initialized&&this.isShowing()&&this._cachedResourcesWereLoaded){this.
_populateResourceTree();this._populateDOMStorageTree();this._populateApplication
CacheTree();this._initDefaultSelection();this._initialized=true;}},_loadEventFir
ed:function() | |
| 253 {this._initDefaultSelection();},_initDefaultSelection:function() | 250 {this._initDefaultSelection();},_initDefaultSelection:function() |
| 254 {if(!this._initialized) | 251 {if(!this._initialized) |
| 255 return;var itemURL=WebInspector.settings.resourcesLastSelectedItem.get();if(item
URL){for(var treeElement=this.sidebarTree.children[0];treeElement;treeElement=tr
eeElement.traverseNextTreeElement(false,this.sidebarTree,true)){if(treeElement.i
temURL===itemURL){treeElement.revealAndSelect(true);return;}}} | 252 return;var itemURL=WebInspector.settings.resourcesLastSelectedItem.get();if(item
URL){for(var treeElement=this.sidebarTree.children[0];treeElement;treeElement=tr
eeElement.traverseNextTreeElement(false,this.sidebarTree,true)){if(treeElement.i
temURL===itemURL){treeElement.revealAndSelect(true);return;}}} |
| 256 var mainResource=WebInspector.inspectedPageURL&&this.resourcesListTreeElement&&t
his.resourcesListTreeElement.expanded&&WebInspector.resourceTreeModel.resourceFo
rURL(WebInspector.inspectedPageURL);if(mainResource) | 253 var mainResource=WebInspector.inspectedPageURL&&this.resourcesListTreeElement&&t
his.resourcesListTreeElement.expanded&&WebInspector.resourceTreeModel.resourceFo
rURL(WebInspector.inspectedPageURL);if(mainResource) |
| 257 this.showResource(mainResource);},_resetWithFrames:function() | 254 this.showResource(mainResource);},_resetWithFrames:function() |
| 258 {this.resourcesListTreeElement.removeChildren();this._treeElementForFrameId={};t
his._reset();},_reset:function() | 255 {this.resourcesListTreeElement.removeChildren();this._treeElementForFrameId={};t
his._reset();},_reset:function() |
| 259 {this._domains={};var queryViews=this._databaseQueryViews.values();for(var i=0;i
<queryViews.length;++i) | 256 {this._domains={};var queryViews=this._databaseQueryViews.values();for(var i=0;i
<queryViews.length;++i) |
| 260 queryViews[i].removeEventListener(WebInspector.DatabaseQueryView.Events.SchemaUp
dated,this._updateDatabaseTables,this);this._databaseTableViews.clear();this._da
tabaseQueryViews.clear();this._databaseTreeElements.clear();this._domStorageView
s.clear();this._domStorageTreeElements.clear();this._cookieViews={};this.databas
esListTreeElement.removeChildren();this.localStorageListTreeElement.removeChildr
en();this.sessionStorageListTreeElement.removeChildren();this.cookieListTreeElem
ent.removeChildren();if(this.visibleView&&!(this.visibleView instanceof WebInspe
ctor.StorageCategoryView)) | 257 queryViews[i].removeEventListener(WebInspector.DatabaseQueryView.Events.SchemaUp
dated,this._updateDatabaseTables,this);this._databaseTableViews.clear();this._da
tabaseQueryViews.clear();this._databaseTreeElements.clear();this._domStorageView
s.clear();this._domStorageTreeElements.clear();this._cookieViews={};this.databas
esListTreeElement.removeChildren();this.localStorageListTreeElement.removeChildr
en();this.sessionStorageListTreeElement.removeChildren();this.cookieListTreeElem
ent.removeChildren();if(this.visibleView&&!(this.visibleView instanceof WebInspe
ctor.StorageCategoryView)) |
| 261 this.visibleView.detach();this.storageViewStatusBarItemsContainer.removeChildren
();if(this.sidebarTree.selectedTreeElement) | 258 this.visibleView.detach();this.storageViewStatusBarItemsContainer.removeChildren
();if(this.sidebarTree.selectedTreeElement) |
| 262 this.sidebarTree.selectedTreeElement.deselect();},_populateResourceTree:function
() | 259 this.sidebarTree.selectedTreeElement.deselect();},_populateResourceTree:function
() |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 view.searchCanceled();this._innerShowView(view);},_resourceViewForResource:funct
ion(resource) | 301 view.searchCanceled();this._innerShowView(view);},_resourceViewForResource:funct
ion(resource) |
| 305 {if(WebInspector.ResourceView.hasTextContent(resource)){var treeElement=this._fi
ndTreeElementForResource(resource);if(!treeElement) | 302 {if(WebInspector.ResourceView.hasTextContent(resource)){var treeElement=this._fi
ndTreeElementForResource(resource);if(!treeElement) |
| 306 return null;return treeElement.sourceView();} | 303 return null;return treeElement.sourceView();} |
| 307 return WebInspector.ResourceView.nonSourceViewForResource(resource);},_showDatab
ase:function(database,tableName) | 304 return WebInspector.ResourceView.nonSourceViewForResource(resource);},_showDatab
ase:function(database,tableName) |
| 308 {if(!database) | 305 {if(!database) |
| 309 return;var view;if(tableName){var tableViews=this._databaseTableViews.get(databa
se);if(!tableViews){tableViews=({});this._databaseTableViews.put(database,tableV
iews);} | 306 return;var view;if(tableName){var tableViews=this._databaseTableViews.get(databa
se);if(!tableViews){tableViews=({});this._databaseTableViews.put(database,tableV
iews);} |
| 310 view=tableViews[tableName];if(!view){view=new WebInspector.DatabaseTableView(dat
abase,tableName);tableViews[tableName]=view;}}else{view=this._databaseQueryViews
.get(database);if(!view){view=new WebInspector.DatabaseQueryView(database);this.
_databaseQueryViews.put(database,view);view.addEventListener(WebInspector.Databa
seQueryView.Events.SchemaUpdated,this._updateDatabaseTables,this);}} | 307 view=tableViews[tableName];if(!view){view=new WebInspector.DatabaseTableView(dat
abase,tableName);tableViews[tableName]=view;}}else{view=this._databaseQueryViews
.get(database);if(!view){view=new WebInspector.DatabaseQueryView(database);this.
_databaseQueryViews.put(database,view);view.addEventListener(WebInspector.Databa
seQueryView.Events.SchemaUpdated,this._updateDatabaseTables,this);}} |
| 311 this._innerShowView(view);},showIndexedDB:function(view) | 308 this._innerShowView(view);},showIndexedDB:function(view) |
| 312 {this._innerShowView(view);},_showDOMStorage:function(domStorage) | 309 {this._innerShowView(view);},_showDOMStorage:function(domStorage) |
| 313 {if(!domStorage) | 310 {if(!domStorage) |
| 314 return;var view;view=this._domStorageViews.get(domStorage);if(!view){view=new We
bInspector.DOMStorageItemsView(domStorage,WebInspector.domStorageModel);this._do
mStorageViews.put(domStorage,view);} | 311 return;var view;view=this._domStorageViews.get(domStorage);if(!view){view=new We
bInspector.DOMStorageItemsView(domStorage);this._domStorageViews.put(domStorage,
view);} |
| 315 this._innerShowView(view);},showCookies:function(treeElement,cookieDomain) | 312 this._innerShowView(view);},showCookies:function(treeElement,cookieDomain) |
| 316 {var view=this._cookieViews[cookieDomain];if(!view){view=new WebInspector.Cookie
ItemsView(treeElement,cookieDomain);this._cookieViews[cookieDomain]=view;} | 313 {var view=this._cookieViews[cookieDomain];if(!view){view=new WebInspector.Cookie
ItemsView(treeElement,cookieDomain);this._cookieViews[cookieDomain]=view;} |
| 317 this._innerShowView(view);},clearCookies:function(cookieDomain) | 314 this._innerShowView(view);},clearCookies:function(cookieDomain) |
| 318 {this._cookieViews[cookieDomain].clear();},showApplicationCache:function(frameId
) | 315 {this._cookieViews[cookieDomain].clear();},showApplicationCache:function(frameId
) |
| 319 {if(!this._applicationCacheViews[frameId]) | 316 {if(!this._applicationCacheViews[frameId]) |
| 320 this._applicationCacheViews[frameId]=new WebInspector.ApplicationCacheItemsView(
this._applicationCacheModel,frameId);this._innerShowView(this._applicationCacheV
iews[frameId]);},showFileSystem:function(view) | 317 this._applicationCacheViews[frameId]=new WebInspector.ApplicationCacheItemsView(
this._applicationCacheModel,frameId);this._innerShowView(this._applicationCacheV
iews[frameId]);},showFileSystem:function(view) |
| 321 {this._innerShowView(view);},showCategoryView:function(categoryName) | 318 {this._innerShowView(view);},showCategoryView:function(categoryName) |
| 322 {if(!this._categoryView) | 319 {if(!this._categoryView) |
| 323 this._categoryView=new WebInspector.StorageCategoryView();this._categoryView.set
Text(categoryName);this._innerShowView(this._categoryView);},_innerShowView:func
tion(view) | 320 this._categoryView=new WebInspector.StorageCategoryView();this._categoryView.set
Text(categoryName);this._innerShowView(this._categoryView);},_innerShowView:func
tion(view) |
| 324 {if(this.visibleView===view) | 321 {if(this.visibleView===view) |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 return;var itemURL=this.itemURL;if(itemURL) | 420 return;var itemURL=this.itemURL;if(itemURL) |
| 424 WebInspector.settings.resourcesLastSelectedItem.set(itemURL);},onreveal:function
() | 421 WebInspector.settings.resourcesLastSelectedItem.set(itemURL);},onreveal:function
() |
| 425 {if(this.listItemElement) | 422 {if(this.listItemElement) |
| 426 this.listItemElement.scrollIntoViewIfNeeded(false);},get titleText() | 423 this.listItemElement.scrollIntoViewIfNeeded(false);},get titleText() |
| 427 {return this._titleText;},set titleText(titleText) | 424 {return this._titleText;},set titleText(titleText) |
| 428 {this._titleText=titleText;this._updateTitle();},get subtitleText() | 425 {this._titleText=titleText;this._updateTitle();},get subtitleText() |
| 429 {return this._subtitleText;},set subtitleText(subtitleText) | 426 {return this._subtitleText;},set subtitleText(subtitleText) |
| 430 {this._subtitleText=subtitleText;this._updateSubtitle();},get searchMatchesCount
() | 427 {this._subtitleText=subtitleText;this._updateSubtitle();},get searchMatchesCount
() |
| 431 {return 0;},__proto__:TreeElement.prototype} | 428 {return 0;},__proto__:TreeElement.prototype} |
| 432 WebInspector.StorageCategoryTreeElement=function(storagePanel,categoryName,setti
ngsKey,iconClasses,noIcon) | 429 WebInspector.StorageCategoryTreeElement=function(storagePanel,categoryName,setti
ngsKey,iconClasses,noIcon) |
| 433 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,null,categoryName,ic
onClasses,true,noIcon);this._expandedSettingKey="resources"+settingsKey+"Expande
d";WebInspector.settings[this._expandedSettingKey]=WebInspector.settings.createS
etting(this._expandedSettingKey,settingsKey==="Frames");this._categoryName=categ
oryName;} | 430 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,null,categoryName,ic
onClasses,false,noIcon);this._expandedSettingKey="resources"+settingsKey+"Expand
ed";WebInspector.settings[this._expandedSettingKey]=WebInspector.settings.create
Setting(this._expandedSettingKey,settingsKey==="Frames");this._categoryName=cate
goryName;} |
| 434 WebInspector.StorageCategoryTreeElement.prototype={get itemURL() | 431 WebInspector.StorageCategoryTreeElement.prototype={get itemURL() |
| 435 {return"category://"+this._categoryName;},onselect:function(selectedByUser) | 432 {return"category://"+this._categoryName;},onselect:function(selectedByUser) |
| 436 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel.showCategoryView(this._categoryName);},onattach:function() | 433 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel.showCategoryView(this._categoryName);},onattach:function() |
| 437 {WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);if(WebInspect
or.settings[this._expandedSettingKey].get()) | 434 {WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);if(WebInspect
or.settings[this._expandedSettingKey].get()) |
| 438 this.expand();},onexpand:function() | 435 this.expand();},onexpand:function() |
| 439 {WebInspector.settings[this._expandedSettingKey].set(true);},oncollapse:function
() | 436 {WebInspector.settings[this._expandedSettingKey].set(true);},oncollapse:function
() |
| 440 {WebInspector.settings[this._expandedSettingKey].set(false);},__proto__:WebInspe
ctor.BaseStorageTreeElement.prototype} | 437 {WebInspector.settings[this._expandedSettingKey].set(false);},__proto__:WebInspe
ctor.BaseStorageTreeElement.prototype} |
| 441 WebInspector.FrameTreeElement=function(storagePanel,frame) | 438 WebInspector.FrameTreeElement=function(storagePanel,frame) |
| 442 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,null,"",["frame-stor
age-tree-item"]);this._frame=frame;this.frameNavigated(frame);} | 439 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,null,"",["frame-stor
age-tree-item"]);this._frame=frame;this.frameNavigated(frame);} |
| 443 WebInspector.FrameTreeElement.prototype={frameNavigated:function(frame) | 440 WebInspector.FrameTreeElement.prototype={frameNavigated:function(frame) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 464 parentTreeElement.insertChild(childTreeElement,i);},__proto__:WebInspector.BaseS
torageTreeElement.prototype} | 461 parentTreeElement.insertChild(childTreeElement,i);},__proto__:WebInspector.BaseS
torageTreeElement.prototype} |
| 465 WebInspector.FrameResourceTreeElement=function(storagePanel,resource) | 462 WebInspector.FrameResourceTreeElement=function(storagePanel,resource) |
| 466 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,resource,resource.di
splayName,["resource-sidebar-tree-item","resources-type-"+resource.type.name()])
;this._resource=resource;this._resource.addEventListener(WebInspector.Resource.E
vents.MessageAdded,this._consoleMessageAdded,this);this._resource.addEventListen
er(WebInspector.Resource.Events.MessagesCleared,this._consoleMessagesCleared,thi
s);this.tooltip=resource.url;} | 463 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,resource,resource.di
splayName,["resource-sidebar-tree-item","resources-type-"+resource.type.name()])
;this._resource=resource;this._resource.addEventListener(WebInspector.Resource.E
vents.MessageAdded,this._consoleMessageAdded,this);this._resource.addEventListen
er(WebInspector.Resource.Events.MessagesCleared,this._consoleMessagesCleared,thi
s);this.tooltip=resource.url;} |
| 467 WebInspector.FrameResourceTreeElement.prototype={get itemURL() | 464 WebInspector.FrameResourceTreeElement.prototype={get itemURL() |
| 468 {return this._resource.url;},onselect:function(selectedByUser) | 465 {return this._resource.url;},onselect:function(selectedByUser) |
| 469 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel._showResourceView(this._resource);},ondblclick:function(eve
nt) | 466 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel._showResourceView(this._resource);},ondblclick:function(eve
nt) |
| 470 {InspectorFrontendHost.openInNewTab(this._resource.url);},onattach:function() | 467 {InspectorFrontendHost.openInNewTab(this._resource.url);},onattach:function() |
| 471 {WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);if(this._reso
urce.type===WebInspector.resourceTypes.Image){var previewImage=document.createEl
ement("img");previewImage.className="image-resource-icon-preview";this._resource
.populateImageSource(previewImage);var iconElement=document.createElement("div")
;iconElement.className="icon";iconElement.appendChild(previewImage);this.listIte
mElement.replaceChild(iconElement,this.imageElement);} | 468 {WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);if(this._reso
urce.type===WebInspector.resourceTypes.Image){var previewImage=document.createEl
ement("img");previewImage.className="image-resource-icon-preview";this._resource
.populateImageSource(previewImage);var iconElement=document.createElement("div")
;iconElement.className="icon";iconElement.appendChild(previewImage);this.listIte
mElement.replaceChild(iconElement,this.imageElement);} |
| 472 this._statusElement=document.createElement("div");this._statusElement.className=
"status";this.listItemElement.insertBefore(this._statusElement,this.titleElement
);this.listItemElement.draggable=true;this.listItemElement.addEventListener("dra
gstart",this._ondragstart.bind(this),false);this.listItemElement.addEventListene
r("contextmenu",this._handleContextMenuEvent.bind(this),true);this._updateErrors
AndWarningsBubbles();},_ondragstart:function(event) | 469 this._statusElement=document.createElement("div");this._statusElement.className=
"status";this.listItemElement.insertBefore(this._statusElement,this.titleElement
);this.listItemElement.draggable=true;this.listItemElement.addEventListener("dra
gstart",this._ondragstart.bind(this),false);this.listItemElement.addEventListene
r("contextmenu",this._handleContextMenuEvent.bind(this),true);this._updateErrors
AndWarningsBubbles();},_ondragstart:function(event) |
| 473 {event.dataTransfer.setData("text/plain",this._resource.content);event.dataTrans
fer.effectAllowed="copy";return true;},_handleContextMenuEvent:function(event) | 470 {event.dataTransfer.setData("text/plain",this._resource.content);event.dataTrans
fer.effectAllowed="copy";return true;},_handleContextMenuEvent:function(event) |
| 474 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendApplicabl
eItems(this._resource);if(this._resource.request) | 471 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendApplicabl
eItems(this._resource);contextMenu.show();},_setBubbleText:function(x) |
| 475 contextMenu.appendApplicableItems(this._resource.request);contextMenu.show();},_
setBubbleText:function(x) | |
| 476 {if(!this._bubbleElement){this._bubbleElement=document.createElement("div");this
._bubbleElement.className="bubble";this._statusElement.appendChild(this._bubbleE
lement);} | 472 {if(!this._bubbleElement){this._bubbleElement=document.createElement("div");this
._bubbleElement.className="bubble";this._statusElement.appendChild(this._bubbleE
lement);} |
| 477 this._bubbleElement.textContent=x;},_resetBubble:function() | 473 this._bubbleElement.textContent=x;},_resetBubble:function() |
| 478 {if(this._bubbleElement){this._bubbleElement.textContent="";this._bubbleElement.
removeStyleClass("search-matches");this._bubbleElement.removeStyleClass("warning
");this._bubbleElement.removeStyleClass("error");}},_resetSearchResults:function
() | 474 {if(this._bubbleElement){this._bubbleElement.textContent="";this._bubbleElement.
removeStyleClass("search-matches");this._bubbleElement.removeStyleClass("warning
");this._bubbleElement.removeStyleClass("error");}},_resetSearchResults:function
() |
| 479 {this._resetBubble();this._searchMatchesCount=0;},get searchMatchesCount() | 475 {this._resetBubble();this._searchMatchesCount=0;},get searchMatchesCount() |
| 480 {return this._searchMatchesCount;},searchMatchesFound:function(matchesCount) | 476 {return this._searchMatchesCount;},searchMatchesFound:function(matchesCount) |
| 481 {this._resetSearchResults();this._searchMatchesCount=matchesCount;this._setBubbl
eText(matchesCount);this._bubbleElement.addStyleClass("search-matches");var curr
entAncestor=this.parent;while(currentAncestor&&!currentAncestor.root){if(!curren
tAncestor.expanded) | 477 {this._resetSearchResults();this._searchMatchesCount=matchesCount;this._setBubbl
eText(matchesCount);this._bubbleElement.addStyleClass("search-matches");var curr
entAncestor=this.parent;while(currentAncestor&&!currentAncestor.root){if(!curren
tAncestor.expanded) |
| 482 currentAncestor.expand();currentAncestor=currentAncestor.parent;}},_updateErrors
AndWarningsBubbles:function() | 478 currentAncestor.expand();currentAncestor=currentAncestor.parent;}},_updateErrors
AndWarningsBubbles:function() |
| 483 {if(this._storagePanel.currentQuery) | 479 {if(this._storagePanel.currentQuery) |
| 484 return;this._resetBubble();if(this._resource.warnings||this._resource.errors) | 480 return;this._resetBubble();if(this._resource.warnings||this._resource.errors) |
| 485 this._setBubbleText(this._resource.warnings+this._resource.errors);if(this._reso
urce.warnings) | 481 this._setBubbleText(this._resource.warnings+this._resource.errors);if(this._reso
urce.warnings) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 502 {var tableNamesLength=tableNames.length;for(var i=0;i<tableNamesLength;++i) | 498 {var tableNamesLength=tableNames.length;for(var i=0;i<tableNamesLength;++i) |
| 503 this.appendChild(new WebInspector.DatabaseTableTreeElement(this._storagePanel,th
is._database,tableNames[i]));} | 499 this.appendChild(new WebInspector.DatabaseTableTreeElement(this._storagePanel,th
is._database,tableNames[i]));} |
| 504 this._database.getTableNames(tableNamesCallback.bind(this));},__proto__:WebInspe
ctor.BaseStorageTreeElement.prototype} | 500 this._database.getTableNames(tableNamesCallback.bind(this));},__proto__:WebInspe
ctor.BaseStorageTreeElement.prototype} |
| 505 WebInspector.DatabaseTableTreeElement=function(storagePanel,database,tableName) | 501 WebInspector.DatabaseTableTreeElement=function(storagePanel,database,tableName) |
| 506 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,null,tableName,["dat
abase-storage-tree-item"]);this._database=database;this._tableName=tableName;} | 502 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,null,tableName,["dat
abase-storage-tree-item"]);this._database=database;this._tableName=tableName;} |
| 507 WebInspector.DatabaseTableTreeElement.prototype={get itemURL() | 503 WebInspector.DatabaseTableTreeElement.prototype={get itemURL() |
| 508 {return"database://"+encodeURI(this._database.name)+"/"+encodeURI(this._tableNam
e);},onselect:function(selectedByUser) | 504 {return"database://"+encodeURI(this._database.name)+"/"+encodeURI(this._tableNam
e);},onselect:function(selectedByUser) |
| 509 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel._showDatabase(this._database,this._tableName);},__proto__:W
ebInspector.BaseStorageTreeElement.prototype} | 505 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel._showDatabase(this._database,this._tableName);},__proto__:W
ebInspector.BaseStorageTreeElement.prototype} |
| 510 WebInspector.IndexedDBTreeElement=function(storagePanel) | 506 WebInspector.IndexedDBTreeElement=function(storagePanel) |
| 511 {WebInspector.StorageCategoryTreeElement.call(this,storagePanel,WebInspector.UIS
tring("IndexedDB"),"IndexedDB",["indexed-db-storage-tree-item"]);} | 507 {WebInspector.StorageCategoryTreeElement.call(this,storagePanel,WebInspector.UIS
tring("IndexedDB"),"IndexedDB",["indexed-db-storage-tree-item"]);} |
| 512 WebInspector.IndexedDBTreeElement.prototype={onexpand:function() | 508 WebInspector.IndexedDBTreeElement.prototype={_initialize:function() |
| 513 {WebInspector.StorageCategoryTreeElement.prototype.onexpand.call(this);if(!this.
_indexedDBModel) | 509 {this._createIndexedDBModel();},onattach:function() |
| 514 this._createIndexedDBModel();},onattach:function() | |
| 515 {WebInspector.StorageCategoryTreeElement.prototype.onattach.call(this);this.list
ItemElement.addEventListener("contextmenu",this._handleContextMenuEvent.bind(thi
s),true);},_handleContextMenuEvent:function(event) | 510 {WebInspector.StorageCategoryTreeElement.prototype.onattach.call(this);this.list
ItemElement.addEventListener("contextmenu",this._handleContextMenuEvent.bind(thi
s),true);},_handleContextMenuEvent:function(event) |
| 516 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebI
nspector.UIString("Refresh IndexedDB"),this.refreshIndexedDB.bind(this));context
Menu.show();},_createIndexedDBModel:function() | 511 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebI
nspector.UIString("Refresh IndexedDB"),this.refreshIndexedDB.bind(this));context
Menu.show();},_createIndexedDBModel:function() |
| 517 {this._indexedDBModel=new WebInspector.IndexedDBModel();this._idbDatabaseTreeEle
ments=[];this._indexedDBModel.addEventListener(WebInspector.IndexedDBModel.Event
Types.DatabaseAdded,this._indexedDBAdded,this);this._indexedDBModel.addEventList
ener(WebInspector.IndexedDBModel.EventTypes.DatabaseRemoved,this._indexedDBRemov
ed,this);this._indexedDBModel.addEventListener(WebInspector.IndexedDBModel.Event
Types.DatabaseLoaded,this._indexedDBLoaded,this);},refreshIndexedDB:function() | 512 {this._indexedDBModel=new WebInspector.IndexedDBModel();this._idbDatabaseTreeEle
ments=[];this._indexedDBModel.addEventListener(WebInspector.IndexedDBModel.Event
Types.DatabaseAdded,this._indexedDBAdded,this);this._indexedDBModel.addEventList
ener(WebInspector.IndexedDBModel.EventTypes.DatabaseRemoved,this._indexedDBRemov
ed,this);this._indexedDBModel.addEventListener(WebInspector.IndexedDBModel.Event
Types.DatabaseLoaded,this._indexedDBLoaded,this);},refreshIndexedDB:function() |
| 518 {if(!this._indexedDBModel){this._createIndexedDBModel();return;} | 513 {if(!this._indexedDBModel){this._createIndexedDBModel();return;} |
| 519 this._indexedDBModel.refreshDatabaseNames();},_indexedDBAdded:function(event) | 514 this._indexedDBModel.refreshDatabaseNames();},_indexedDBAdded:function(event) |
| 520 {var databaseId=(event.data);var idbDatabaseTreeElement=new WebInspector.IDBData
baseTreeElement(this._storagePanel,this._indexedDBModel,databaseId);this._idbDat
abaseTreeElements.push(idbDatabaseTreeElement);this.appendChild(idbDatabaseTreeE
lement);this._indexedDBModel.refreshDatabase(databaseId);},_indexedDBRemoved:fun
ction(event) | 515 {var databaseId=(event.data);var idbDatabaseTreeElement=new WebInspector.IDBData
baseTreeElement(this._storagePanel,this._indexedDBModel,databaseId);this._idbDat
abaseTreeElements.push(idbDatabaseTreeElement);this.appendChild(idbDatabaseTreeE
lement);this._indexedDBModel.refreshDatabase(databaseId);},_indexedDBRemoved:fun
ction(event) |
| 521 {var databaseId=(event.data);var idbDatabaseTreeElement=this._idbDatabaseTreeEle
ment(databaseId) | 516 {var databaseId=(event.data);var idbDatabaseTreeElement=this._idbDatabaseTreeEle
ment(databaseId) |
| 522 if(!idbDatabaseTreeElement) | 517 if(!idbDatabaseTreeElement) |
| 523 return;idbDatabaseTreeElement.clear();this.removeChild(idbDatabaseTreeElement);t
his._idbDatabaseTreeElements.remove(idbDatabaseTreeElement);},_indexedDBLoaded:f
unction(event) | 518 return;idbDatabaseTreeElement.clear();this.removeChild(idbDatabaseTreeElement);t
his._idbDatabaseTreeElements.remove(idbDatabaseTreeElement);},_indexedDBLoaded:f
unction(event) |
| 524 {var database=(event.data);var idbDatabaseTreeElement=this._idbDatabaseTreeEleme
nt(database.databaseId) | 519 {var database=(event.data);var idbDatabaseTreeElement=this._idbDatabaseTreeEleme
nt(database.databaseId) |
| 525 if(!idbDatabaseTreeElement) | 520 if(!idbDatabaseTreeElement) |
| 526 return;idbDatabaseTreeElement.update(database);},_idbDatabaseTreeElement:functio
n(databaseId) | 521 return;idbDatabaseTreeElement.update(database);},_idbDatabaseTreeElement:functio
n(databaseId) |
| 527 {var index=-1;for(var i=0;i<this._idbDatabaseTreeElements.length;++i){if(this._i
dbDatabaseTreeElements[i]._databaseId.equals(databaseId)){index=i;break;}} | 522 {var index=-1;for(var i=0;i<this._idbDatabaseTreeElements.length;++i){if(this._i
dbDatabaseTreeElements[i]._databaseId.equals(databaseId)){index=i;break;}} |
| 528 if(index!==-1) | 523 if(index!==-1) |
| 529 return this._idbDatabaseTreeElements[i];return null;},__proto__:WebInspector.Sto
rageCategoryTreeElement.prototype} | 524 return this._idbDatabaseTreeElements[i];return null;},__proto__:WebInspector.Sto
rageCategoryTreeElement.prototype} |
| 530 WebInspector.FileSystemListTreeElement=function(storagePanel) | 525 WebInspector.FileSystemListTreeElement=function(storagePanel) |
| 531 {WebInspector.StorageCategoryTreeElement.call(this,storagePanel,WebInspector.UIS
tring("FileSystem"),"FileSystem",["file-system-storage-tree-item"]);} | 526 {WebInspector.StorageCategoryTreeElement.call(this,storagePanel,WebInspector.UIS
tring("FileSystem"),"FileSystem",["file-system-storage-tree-item"]);} |
| 532 WebInspector.FileSystemListTreeElement.prototype={onexpand:function() | 527 WebInspector.FileSystemListTreeElement.prototype={_initialize:function() |
| 533 {WebInspector.StorageCategoryTreeElement.prototype.onexpand.call(this);this._ref
reshFileSystem();},onattach:function() | 528 {this._refreshFileSystem();},onattach:function() |
| 534 {WebInspector.StorageCategoryTreeElement.prototype.onattach.call(this);this.list
ItemElement.addEventListener("contextmenu",this._handleContextMenuEvent.bind(thi
s),true);},_handleContextMenuEvent:function(event) | 529 {WebInspector.StorageCategoryTreeElement.prototype.onattach.call(this);this.list
ItemElement.addEventListener("contextmenu",this._handleContextMenuEvent.bind(thi
s),true);},_handleContextMenuEvent:function(event) |
| 535 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebI
nspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Refresh FileSystem list
":"Refresh FileSystem List"),this._refreshFileSystem.bind(this));contextMenu.sho
w();},_fileSystemAdded:function(event) | 530 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebI
nspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Refresh FileSystem list
":"Refresh FileSystem List"),this._refreshFileSystem.bind(this));contextMenu.sho
w();},_fileSystemAdded:function(event) |
| 536 {var fileSystem=(event.data);var fileSystemTreeElement=new WebInspector.FileSyst
emTreeElement(this._storagePanel,fileSystem);this.appendChild(fileSystemTreeElem
ent);},_fileSystemRemoved:function(event) | 531 {var fileSystem=(event.data);var fileSystemTreeElement=new WebInspector.FileSyst
emTreeElement(this._storagePanel,fileSystem);this.appendChild(fileSystemTreeElem
ent);},_fileSystemRemoved:function(event) |
| 537 {var fileSystem=(event.data);var fileSystemTreeElement=this._fileSystemTreeEleme
ntByName(fileSystem.name);if(!fileSystemTreeElement) | 532 {var fileSystem=(event.data);var fileSystemTreeElement=this._fileSystemTreeEleme
ntByName(fileSystem.name);if(!fileSystemTreeElement) |
| 538 return;fileSystemTreeElement.clear();this.removeChild(fileSystemTreeElement);},_
fileSystemTreeElementByName:function(fileSystemName) | 533 return;fileSystemTreeElement.clear();this.removeChild(fileSystemTreeElement);},_
fileSystemTreeElementByName:function(fileSystemName) |
| 539 {for(var i=0;i<this.children.length;++i){var child=(this.children[i]);if(child.f
ileSystemName===fileSystemName) | 534 {for(var i=0;i<this.children.length;++i){var child=(this.children[i]);if(child.f
ileSystemName===fileSystemName) |
| 540 return this.children[i];} | 535 return this.children[i];} |
| 541 return null;},_refreshFileSystem:function() | 536 return null;},_refreshFileSystem:function() |
| 542 {if(!this._fileSystemModel){this._fileSystemModel=new WebInspector.FileSystemMod
el();this._fileSystemModel.addEventListener(WebInspector.FileSystemModel.EventTy
pes.FileSystemAdded,this._fileSystemAdded,this);this._fileSystemModel.addEventLi
stener(WebInspector.FileSystemModel.EventTypes.FileSystemRemoved,this._fileSyste
mRemoved,this);} | 537 {if(!this._fileSystemModel){this._fileSystemModel=new WebInspector.FileSystemMod
el();this._fileSystemModel.addEventListener(WebInspector.FileSystemModel.EventTy
pes.FileSystemAdded,this._fileSystemAdded,this);this._fileSystemModel.addEventLi
stener(WebInspector.FileSystemModel.EventTypes.FileSystemRemoved,this._fileSyste
mRemoved,this);} |
| 543 this._fileSystemModel.refreshFileSystemList();},__proto__:WebInspector.StorageCa
tegoryTreeElement.prototype} | 538 this._fileSystemModel.refreshFileSystemList();},__proto__:WebInspector.StorageCa
tegoryTreeElement.prototype} |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 {var treeElement=startTreeElement;do{treeElement=this._traverseNext(treeElement)
||this._root;}while(treeElement!=startTreeElement&&!this._elementSearchMatchesCo
unt(treeElement));return treeElement;},previous:function(startTreeElement) | 657 {var treeElement=startTreeElement;do{treeElement=this._traverseNext(treeElement)
||this._root;}while(treeElement!=startTreeElement&&!this._elementSearchMatchesCo
unt(treeElement));return treeElement;},previous:function(startTreeElement) |
| 663 {var treeElement=startTreeElement;do{treeElement=this._traversePrevious(treeElem
ent)||this._lastTreeElement();}while(treeElement!=startTreeElement&&!this._eleme
ntSearchMatchesCount(treeElement));return treeElement;},matchIndex:function(star
tTreeElement,index) | 658 {var treeElement=startTreeElement;do{treeElement=this._traversePrevious(treeElem
ent)||this._lastTreeElement();}while(treeElement!=startTreeElement&&!this._eleme
ntSearchMatchesCount(treeElement));return treeElement;},matchIndex:function(star
tTreeElement,index) |
| 664 {var matchIndex=1;var treeElement=this._root;while(treeElement!=startTreeElement
){matchIndex+=this._elementSearchMatchesCount(treeElement);treeElement=this._tra
verseNext(treeElement)||this._root;if(treeElement===this._root) | 659 {var matchIndex=1;var treeElement=this._root;while(treeElement!=startTreeElement
){matchIndex+=this._elementSearchMatchesCount(treeElement);treeElement=this._tra
verseNext(treeElement)||this._root;if(treeElement===this._root) |
| 665 return 0;} | 660 return 0;} |
| 666 return matchIndex+index;},_elementSearchMatchesCount:function(treeElement) | 661 return matchIndex+index;},_elementSearchMatchesCount:function(treeElement) |
| 667 {return treeElement.searchMatchesCount;},_traverseNext:function(treeElement) | 662 {return treeElement.searchMatchesCount;},_traverseNext:function(treeElement) |
| 668 {return(treeElement.traverseNextTreeElement(false,this._root,true));},_traverseP
revious:function(treeElement) | 663 {return(treeElement.traverseNextTreeElement(false,this._root,true));},_traverseP
revious:function(treeElement) |
| 669 {return(treeElement.traversePreviousTreeElement(false,true));},_lastTreeElement:
function() | 664 {return(treeElement.traversePreviousTreeElement(false,true));},_lastTreeElement:
function() |
| 670 {var treeElement=this._root;var nextTreeElement;while(nextTreeElement=this._trav
erseNext(treeElement)) | 665 {var treeElement=this._root;var nextTreeElement;while(nextTreeElement=this._trav
erseNext(treeElement)) |
| 671 treeElement=nextTreeElement;return treeElement;}} | 666 treeElement=nextTreeElement;return treeElement;}} |
| OLD | NEW |