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)) |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 {var type=value.subtype||value.type;var contents=cell.createChild("div","source-
code console-formatted-"+type);switch(type){case"object":case"array":var section
=new WebInspector.ObjectPropertiesSection(value,value.description) | 179 {var type=value.subtype||value.type;var contents=cell.createChild("div","source-
code console-formatted-"+type);switch(type){case"object":case"array":var section
=new WebInspector.ObjectPropertiesSection(value,value.description) |
180 section.editable=false;section.skipProto=true;contents.appendChild(section.eleme
nt);break;case"string":contents.addStyleClass("primitive-value");contents.append
Child(document.createTextNode("\""+value.description+"\""));break;default:conten
ts.addStyleClass("primitive-value");contents.appendChild(document.createTextNode
(value.description));}},__proto__:WebInspector.DataGridNode.prototype};WebInspec
tor.FileContentView=function(file) | 180 section.editable=false;section.skipProto=true;contents.appendChild(section.eleme
nt);break;case"string":contents.addStyleClass("primitive-value");contents.append
Child(document.createTextNode("\""+value.description+"\""));break;default:conten
ts.addStyleClass("primitive-value");contents.appendChild(document.createTextNode
(value.description));}},__proto__:WebInspector.DataGridNode.prototype};WebInspec
tor.FileContentView=function(file) |
181 {WebInspector.View.call(this);this._innerView=(null);this._file=file;this._conte
nt=null;} | 181 {WebInspector.View.call(this);this._innerView=(null);this._file=file;this._conte
nt=null;} |
182 WebInspector.FileContentView.prototype={wasShown:function() | 182 WebInspector.FileContentView.prototype={wasShown:function() |
183 {if(!this._innerView){if(this._file.isTextFile) | 183 {if(!this._innerView){if(this._file.isTextFile) |
184 this._innerView=new WebInspector.EmptyView("");else | 184 this._innerView=new WebInspector.EmptyView("");else |
185 this._innerView=new WebInspector.EmptyView(WebInspector.UIString("Binary File"))
;this.refresh();} | 185 this._innerView=new WebInspector.EmptyView(WebInspector.UIString("Binary File"))
;this.refresh();} |
186 this._innerView.show(this.element);},_metadataReceived:function(errorCode,metada
ta) | 186 this._innerView.show(this.element);},_metadataReceived:function(errorCode,metada
ta) |
187 {if(errorCode||!metadata) | 187 {if(errorCode||!metadata) |
188 return;if(this._content){if(!this._content.updateMetadata(metadata)) | 188 return;if(this._content){if(!this._content.updateMetadata(metadata)) |
189 return;var sourceFrame=(this._innerView);this._content.requestContent(sourceFram
e.setContent.bind(sourceFrame));}else{this._innerView.detach();this._content=new
WebInspector.FileContentView.FileContentProvider(this._file,metadata);this._inn
erView=new WebInspector.SourceFrame(this._content);this._innerView.show(this.ele
ment);}},refresh:function() | 189 return;var sourceFrame=(this._innerView);this._content.requestContent(sourceFram
e.setContent.bind(sourceFrame));}else{this._innerView.detach();this._content=new
WebInspector.FileContentView.FileContentProvider(this._file,metadata);var sourc
eFrame=new WebInspector.SourceFrame(this._content);sourceFrame.setHighlighterTyp
e(this._file.resourceType.canonicalMimeType());this._innerView=sourceFrame;this.
_innerView.show(this.element);}},refresh:function() |
190 {if(!this._innerView) | 190 {if(!this._innerView) |
191 return;if(this._file.isTextFile) | 191 return;if(this._file.isTextFile) |
192 this._file.requestMetadata(this._metadataReceived.bind(this));},__proto__:WebIns
pector.View.prototype} | 192 this._file.requestMetadata(this._metadataReceived.bind(this));},__proto__:WebIns
pector.View.prototype} |
193 WebInspector.FileContentView.FileContentProvider=function(file,metadata) | 193 WebInspector.FileContentView.FileContentProvider=function(file,metadata) |
194 {this._file=file;this._metadata=metadata;} | 194 {this._file=file;this._metadata=metadata;} |
195 WebInspector.FileContentView.FileContentProvider.prototype={contentURL:function(
) | 195 WebInspector.FileContentView.FileContentProvider.prototype={contentURL:function(
) |
196 {return this._file.url;},contentType:function() | 196 {return this._file.url;},contentType:function() |
197 {return this._file.resourceType;},requestContent:function(callback) | 197 {return this._file.resourceType;},requestContent:function(callback) |
198 {var size=(this._metadata.size);this._file.requestFileContent(true,0,size,this._
charset||"",this._fileContentReceived.bind(this,callback));},_fileContentReceive
d:function(callback,errorCode,content,base64Encoded,charset) | 198 {var size=(this._metadata.size);this._file.requestFileContent(true,0,size,this._
charset||"",this._fileContentReceived.bind(this,callback));},_fileContentReceive
d:function(callback,errorCode,content,base64Encoded,charset) |
199 {if(errorCode||!content){callback(null,false,"");return;} | 199 {if(errorCode||!content){callback(null);return;} |
200 this._charset=charset;callback(content,false,this.contentType().canonicalMimeTyp
e());},searchInContent:function(query,caseSensitive,isRegex,callback) | 200 this._charset=charset;callback(content);},searchInContent:function(query,caseSen
sitive,isRegex,callback) |
201 {setTimeout(callback.bind(null,[]),0);},updateMetadata:function(metadata) | 201 {setTimeout(callback.bind(null,[]),0);},updateMetadata:function(metadata) |
202 {if(this._metadata.modificationTime>=metadata.modificationTime) | 202 {if(this._metadata.modificationTime>=metadata.modificationTime) |
203 return false;this._metadata=metadata.modificationTime;return true;}};WebInspecto
r.FileSystemView=function(fileSystem) | 203 return false;this._metadata=metadata.modificationTime;return true;}};WebInspecto
r.FileSystemView=function(fileSystem) |
204 {WebInspector.SidebarView.call(this,WebInspector.SidebarView.SidebarPosition.Sta
rt,"FileSystemViewSidebarWidth");this.element.addStyleClass("file-system-view");
this.element.addStyleClass("storage-view");var directoryTreeElement=this.element
.createChild("ol","filesystem-directory-tree");this._directoryTree=new TreeOutli
ne(directoryTreeElement);this.sidebarElement.appendChild(directoryTreeElement);t
his.sidebarElement.addStyleClass("outline-disclosure");this.sidebarElement.addSt
yleClass("sidebar");var rootItem=new WebInspector.FileSystemView.EntryTreeElemen
t(this,fileSystem.root);rootItem.expanded=true;this._directoryTree.appendChild(r
ootItem);this._visibleView=null;this._refreshButton=new WebInspector.StatusBarBu
tton(WebInspector.UIString("Refresh"),"refresh-storage-status-bar-item");this._r
efreshButton.visible=true;this._refreshButton.addEventListener("click",this._ref
resh,this);this._deleteButton=new WebInspector.StatusBarButton(WebInspector.UISt
ring("Delete"),"delete-storage-status-bar-item");this._deleteButton.visible=true
;this._deleteButton.addEventListener("click",this._confirmDelete,this);} | 204 {WebInspector.SidebarView.call(this,WebInspector.SidebarView.SidebarPosition.Sta
rt,"FileSystemViewSidebarWidth");this.element.addStyleClass("file-system-view");
this.element.addStyleClass("storage-view");var directoryTreeElement=this.element
.createChild("ol","filesystem-directory-tree");this._directoryTree=new TreeOutli
ne(directoryTreeElement);this.sidebarElement.appendChild(directoryTreeElement);t
his.sidebarElement.addStyleClass("outline-disclosure");this.sidebarElement.addSt
yleClass("sidebar");var rootItem=new WebInspector.FileSystemView.EntryTreeElemen
t(this,fileSystem.root);rootItem.expanded=true;this._directoryTree.appendChild(r
ootItem);this._visibleView=null;this._refreshButton=new WebInspector.StatusBarBu
tton(WebInspector.UIString("Refresh"),"refresh-storage-status-bar-item");this._r
efreshButton.visible=true;this._refreshButton.addEventListener("click",this._ref
resh,this);this._deleteButton=new WebInspector.StatusBarButton(WebInspector.UISt
ring("Delete"),"delete-storage-status-bar-item");this._deleteButton.visible=true
;this._deleteButton.addEventListener("click",this._confirmDelete,this);} |
205 WebInspector.FileSystemView.prototype={get statusBarItems() | 205 WebInspector.FileSystemView.prototype={get statusBarItems() |
206 {return[this._refreshButton.element,this._deleteButton.element];},get visibleVie
w() | 206 {return[this._refreshButton.element,this._deleteButton.element];},get visibleVie
w() |
207 {return this._visibleView;},showView:function(view) | 207 {return this._visibleView;},showView:function(view) |
208 {if(this._visibleView===view) | 208 {if(this._visibleView===view) |
209 return;if(this._visibleView) | 209 return;if(this._visibleView) |
210 this._visibleView.detach();this._visibleView=view;view.show(this.mainElement);},
_refresh:function() | 210 this._visibleView.detach();this._visibleView=view;view.show(this.mainElement);},
_refresh:function() |
(...skipping 20 matching lines...) Expand all Loading... |
231 this.removeChildAtIndex(currentTreeItem);++oldChildIndex;} | 231 this.removeChildAtIndex(currentTreeItem);++oldChildIndex;} |
232 for(;newEntryIndex<entries.length;++newEntryIndex) | 232 for(;newEntryIndex<entries.length;++newEntryIndex) |
233 this.appendChild(new WebInspector.FileSystemView.EntryTreeElement(this._fileSyst
emView,entries[newEntryIndex]));for(;oldChildIndex<oldChildren.length;++oldChild
Index) | 233 this.appendChild(new WebInspector.FileSystemView.EntryTreeElement(this._fileSyst
emView,entries[newEntryIndex]));for(;oldChildIndex<oldChildren.length;++oldChild
Index) |
234 this.removeChild(oldChildren[oldChildIndex]);},refresh:function() | 234 this.removeChild(oldChildren[oldChildIndex]);},refresh:function() |
235 {if(!this._entry.isDirectory){if(this._view&&this._view===this._fileSystemView.v
isibleView){var fileContentView=(this._view);fileContentView.refresh();}}else | 235 {if(!this._entry.isDirectory){if(this._view&&this._view===this._fileSystemView.v
isibleView){var fileContentView=(this._view);fileContentView.refresh();}}else |
236 this._entry.requestDirectoryContent(this._directoryContentReceived.bind(this));}
,deleteEntry:function() | 236 this._entry.requestDirectoryContent(this._directoryContentReceived.bind(this));}
,deleteEntry:function() |
237 {this._entry.deleteEntry(this._deletionCompleted.bind(this));},_deletionComplete
d:function() | 237 {this._entry.deleteEntry(this._deletionCompleted.bind(this));},_deletionComplete
d:function() |
238 {if(this._entry!=this._entry.fileSystem.root) | 238 {if(this._entry!=this._entry.fileSystem.root) |
239 this.parent.refresh();},__proto__:TreeElement.prototype};WebInspector.ResourcesP
anel=function(database) | 239 this.parent.refresh();},__proto__:TreeElement.prototype};WebInspector.ResourcesP
anel=function(database) |
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);} | 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);} |
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() | 241 var mainElement=this.splitView.mainElement;this.storageViews=mainElement.createC
hild("div","resources-main");var statusBarContainer=mainElement.createChild("div
","resources-status-bar");this.storageViewStatusBarItemsContainer=statusBarConta
iner.createChild("div","status-bar");this.storageViews.addStyleClass("diff-conta
iner");this._databaseTableViews=new Map();this._databaseQueryViews=new Map();thi
s._databaseTreeElements=new Map();this._domStorageViews=new Map();this._domStora
geTreeElements=new Map();this._cookieViews={};this._domains={};this.sidebarEleme
nt.addEventListener("mousemove",this._onmousemove.bind(this),false);this.sidebar
Element.addEventListener("mouseout",this._onmouseout.bind(this),false);function
viewGetter() |
242 {return this.visibleView;} | 242 {return this.visibleView;} |
243 WebInspector.GoToLineDialog.install(this,viewGetter.bind(this));if(WebInspector.
resourceTreeModel.cachedResourcesLoaded()) | 243 WebInspector.GoToLineDialog.install(this,viewGetter.bind(this));if(WebInspector.
resourceTreeModel.cachedResourcesLoaded()) |
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);} | 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);} |
245 WebInspector.ResourcesPanel.prototype={get statusBarItems() | 245 WebInspector.ResourcesPanel.prototype={canSearch:function() |
246 {return[this.storageViewStatusBarItemsContainer];},wasShown:function() | 246 {return false;},wasShown:function() |
247 {WebInspector.Panel.prototype.wasShown.call(this);this._initialize();},_initiali
ze:function() | 247 {WebInspector.Panel.prototype.wasShown.call(this);this._initialize();},_initiali
ze: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()) | 248 {if(!this._initialized&&this.isShowing()&&this._cachedResourcesWereLoaded){this.
_populateResourceTree();this._populateDOMStorageTree();this._populateApplication
CacheTree();this.indexedDBListTreeElement._initialize();if(WebInspector.experime
ntsSettings.fileSystemInspection.isEnabled()) |
249 this.fileSystemListTreeElement._initialize();this._initDefaultSelection();this._
initialized=true;}},_loadEventFired:function() | 249 this.fileSystemListTreeElement._initialize();this._initDefaultSelection();this._
initialized=true;}},_loadEventFired:function() |
250 {this._initDefaultSelection();},_initDefaultSelection:function() | 250 {this._initDefaultSelection();},_initDefaultSelection:function() |
251 {if(!this._initialized) | 251 {if(!this._initialized) |
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;}}} | 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;}}} |
253 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) |
254 this.showResource(mainResource);},_resetWithFrames:function() | 254 this.showResource(mainResource);},_resetWithFrames:function() |
255 {this.resourcesListTreeElement.removeChildren();this._treeElementForFrameId={};t
his._reset();},_reset:function() | 255 {this.resourcesListTreeElement.removeChildren();this._treeElementForFrameId={};t
his._reset();},_reset:function() |
256 {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) |
(...skipping 25 matching lines...) Expand all Loading... |
282 return;var domain=parsedURL.host;if(!this._domains[domain]){this._domains[domain
]=true;var cookieDomainTreeElement=new WebInspector.CookieTreeElement(this,domai
n);this.cookieListTreeElement.appendChild(cookieDomainTreeElement);}},_domStorag
eAdded:function(event) | 282 return;var domain=parsedURL.host;if(!this._domains[domain]){this._domains[domain
]=true;var cookieDomainTreeElement=new WebInspector.CookieTreeElement(this,domai
n);this.cookieListTreeElement.appendChild(cookieDomainTreeElement);}},_domStorag
eAdded:function(event) |
283 {var domStorage=(event.data);this._addDOMStorage(domStorage);},_addDOMStorage:fu
nction(domStorage) | 283 {var domStorage=(event.data);this._addDOMStorage(domStorage);},_addDOMStorage:fu
nction(domStorage) |
284 {console.assert(!this._domStorageTreeElements.get(domStorage));var domStorageTre
eElement=new WebInspector.DOMStorageTreeElement(this,domStorage,(domStorage.isLo
calStorage?"local-storage":"session-storage"));this._domStorageTreeElements.put(
domStorage,domStorageTreeElement);if(domStorage.isLocalStorage) | 284 {console.assert(!this._domStorageTreeElements.get(domStorage));var domStorageTre
eElement=new WebInspector.DOMStorageTreeElement(this,domStorage,(domStorage.isLo
calStorage?"local-storage":"session-storage"));this._domStorageTreeElements.put(
domStorage,domStorageTreeElement);if(domStorage.isLocalStorage) |
285 this.localStorageListTreeElement.appendChild(domStorageTreeElement);else | 285 this.localStorageListTreeElement.appendChild(domStorageTreeElement);else |
286 this.sessionStorageListTreeElement.appendChild(domStorageTreeElement);},_domStor
ageRemoved:function(event) | 286 this.sessionStorageListTreeElement.appendChild(domStorageTreeElement);},_domStor
ageRemoved:function(event) |
287 {var domStorage=(event.data);this._removeDOMStorage(domStorage);},_removeDOMStor
age:function(domStorage) | 287 {var domStorage=(event.data);this._removeDOMStorage(domStorage);},_removeDOMStor
age:function(domStorage) |
288 {var treeElement=this._domStorageTreeElements.get(domStorage);if(!treeElement) | 288 {var treeElement=this._domStorageTreeElements.get(domStorage);if(!treeElement) |
289 return;var wasSelected=treeElement.selected;var parentListTreeElement=treeElemen
t.parent;parentListTreeElement.removeChild(treeElement);if(wasSelected) | 289 return;var wasSelected=treeElement.selected;var parentListTreeElement=treeElemen
t.parent;parentListTreeElement.removeChild(treeElement);if(wasSelected) |
290 parentListTreeElement.select();this._domStorageTreeElements.remove(treeElement);
this._domStorageViews.remove(domStorage);},selectDatabase:function(database) | 290 parentListTreeElement.select();this._domStorageTreeElements.remove(treeElement);
this._domStorageViews.remove(domStorage);},selectDatabase:function(database) |
291 {if(database){this._showDatabase(database);this._databaseTreeElements.get(databa
se).select();}},selectDOMStorage:function(domStorage) | 291 {if(database){this._showDatabase(database);this._databaseTreeElements.get(databa
se).select();}},selectDOMStorage:function(domStorage) |
292 {if(domStorage){this._showDOMStorage(domStorage);this._domStorageTreeElements.ge
t(domStorage).select();}},canShowAnchorLocation:function(anchor) | 292 {if(domStorage){this._showDOMStorage(domStorage);this._domStorageTreeElements.ge
t(domStorage).select();}},showAnchorLocation:function(anchor) |
293 {return!!WebInspector.resourceForURL(anchor.href);},showAnchorLocation:function(
anchor) | 293 {var resource=WebInspector.resourceForURL(anchor.href);if(!resource) |
294 {var resource=WebInspector.resourceForURL(anchor.href);this.showResource(resourc
e,anchor.lineNumber);},showResource:function(resource,line,column) | 294 return false;this.showResource(resource,anchor.lineNumber);WebInspector.inspecto
rView.setCurrentPanel(this);return true;},showResource:function(resource,line,co
lumn) |
295 {var resourceTreeElement=this._findTreeElementForResource(resource);if(resourceT
reeElement) | 295 {var resourceTreeElement=this._findTreeElementForResource(resource);if(resourceT
reeElement) |
296 resourceTreeElement.revealAndSelect(true);if(typeof line==="number"){var view=th
is._resourceViewForResource(resource);if(view.canHighlightPosition()) | 296 resourceTreeElement.revealAndSelect(true);if(typeof line==="number"){var view=th
is._resourceViewForResource(resource);if(view.canHighlightPosition()) |
297 view.highlightPosition(line,column);} | 297 view.highlightPosition(line,column);} |
298 return true;},_showResourceView:function(resource) | 298 return true;},_showResourceView:function(resource) |
299 {var view=this._resourceViewForResource(resource);if(!view){this.visibleView.det
ach();return;} | 299 {var view=this._resourceViewForResource(resource);if(!view){this.visibleView.det
ach();return;} |
300 if(view.searchCanceled) | 300 this._innerShowView(view);},_resourceViewForResource:function(resource) |
301 view.searchCanceled();this._innerShowView(view);},_resourceViewForResource:funct
ion(resource) | |
302 {if(WebInspector.ResourceView.hasTextContent(resource)){var treeElement=this._fi
ndTreeElementForResource(resource);if(!treeElement) | 301 {if(WebInspector.ResourceView.hasTextContent(resource)){var treeElement=this._fi
ndTreeElementForResource(resource);if(!treeElement) |
303 return null;return treeElement.sourceView();} | 302 return null;return treeElement.sourceView();} |
304 return WebInspector.ResourceView.nonSourceViewForResource(resource);},_showDatab
ase:function(database,tableName) | 303 return WebInspector.ResourceView.nonSourceViewForResource(resource);},_showDatab
ase:function(database,tableName) |
305 {if(!database) | 304 {if(!database) |
306 return;var view;if(tableName){var tableViews=this._databaseTableViews.get(databa
se);if(!tableViews){tableViews=({});this._databaseTableViews.put(database,tableV
iews);} | 305 return;var view;if(tableName){var tableViews=this._databaseTableViews.get(databa
se);if(!tableViews){tableViews=({});this._databaseTableViews.put(database,tableV
iews);} |
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);}} | 306 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);}} |
308 this._innerShowView(view);},showIndexedDB:function(view) | 307 this._innerShowView(view);},showIndexedDB:function(view) |
309 {this._innerShowView(view);},_showDOMStorage:function(domStorage) | 308 {this._innerShowView(view);},_showDOMStorage:function(domStorage) |
310 {if(!domStorage) | 309 {if(!domStorage) |
311 return;var view;view=this._domStorageViews.get(domStorage);if(!view){view=new We
bInspector.DOMStorageItemsView(domStorage);this._domStorageViews.put(domStorage,
view);} | 310 return;var view;view=this._domStorageViews.get(domStorage);if(!view){view=new We
bInspector.DOMStorageItemsView(domStorage);this._domStorageViews.put(domStorage,
view);} |
(...skipping 26 matching lines...) Expand all Loading... |
338 var manifestTreeElement=this._applicationCacheManifestElements[manifestURL] | 337 var manifestTreeElement=this._applicationCacheManifestElements[manifestURL] |
339 if(!manifestTreeElement){manifestTreeElement=new WebInspector.ApplicationCacheMa
nifestTreeElement(this,manifestURL);this.applicationCacheListTreeElement.appendC
hild(manifestTreeElement);this._applicationCacheManifestElements[manifestURL]=ma
nifestTreeElement;} | 338 if(!manifestTreeElement){manifestTreeElement=new WebInspector.ApplicationCacheMa
nifestTreeElement(this,manifestURL);this.applicationCacheListTreeElement.appendC
hild(manifestTreeElement);this._applicationCacheManifestElements[manifestURL]=ma
nifestTreeElement;} |
340 var frameTreeElement=new WebInspector.ApplicationCacheFrameTreeElement(this,fram
eId,manifestURL);manifestTreeElement.appendChild(frameTreeElement);manifestTreeE
lement.expand();this._applicationCacheFrameElements[frameId]=frameTreeElement;},
_applicationCacheFrameManifestRemoved:function(event) | 339 var frameTreeElement=new WebInspector.ApplicationCacheFrameTreeElement(this,fram
eId,manifestURL);manifestTreeElement.appendChild(frameTreeElement);manifestTreeE
lement.expand();this._applicationCacheFrameElements[frameId]=frameTreeElement;},
_applicationCacheFrameManifestRemoved:function(event) |
341 {var frameId=event.data;var frameTreeElement=this._applicationCacheFrameElements
[frameId];if(!frameTreeElement) | 340 {var frameId=event.data;var frameTreeElement=this._applicationCacheFrameElements
[frameId];if(!frameTreeElement) |
342 return;var manifestURL=frameTreeElement.manifestURL;delete this._applicationCach
eFrameElements[frameId];delete this._applicationCacheViews[frameId];frameTreeEle
ment.parent.removeChild(frameTreeElement);var manifestTreeElement=this._applicat
ionCacheManifestElements[manifestURL];if(manifestTreeElement.children.length!==0
) | 341 return;var manifestURL=frameTreeElement.manifestURL;delete this._applicationCach
eFrameElements[frameId];delete this._applicationCacheViews[frameId];frameTreeEle
ment.parent.removeChild(frameTreeElement);var manifestTreeElement=this._applicat
ionCacheManifestElements[manifestURL];if(manifestTreeElement.children.length!==0
) |
343 return;delete this._applicationCacheManifestElements[manifestURL];manifestTreeEl
ement.parent.removeChild(manifestTreeElement);},_applicationCacheFrameManifestSt
atusChanged:function(event) | 342 return;delete this._applicationCacheManifestElements[manifestURL];manifestTreeEl
ement.parent.removeChild(manifestTreeElement);},_applicationCacheFrameManifestSt
atusChanged:function(event) |
344 {var frameId=event.data;var status=this._applicationCacheModel.frameManifestStat
us(frameId) | 343 {var frameId=event.data;var status=this._applicationCacheModel.frameManifestStat
us(frameId) |
345 if(this._applicationCacheViews[frameId]) | 344 if(this._applicationCacheViews[frameId]) |
346 this._applicationCacheViews[frameId].updateStatus(status);},_applicationCacheNet
workStateChanged:function(event) | 345 this._applicationCacheViews[frameId].updateStatus(status);},_applicationCacheNet
workStateChanged:function(event) |
347 {var isNowOnline=event.data;for(var manifestURL in this._applicationCacheViews) | 346 {var isNowOnline=event.data;for(var manifestURL in this._applicationCacheViews) |
348 this._applicationCacheViews[manifestURL].updateNetworkState(isNowOnline);},sideb
arResized:function(event) | 347 this._applicationCacheViews[manifestURL].updateNetworkState(isNowOnline);},_forA
llResourceTreeElements:function(callback) |
349 {var width=event.data;this.storageViewStatusBarItemsContainer.style.left=width+"
px";},performSearch:function(query,shouldJump) | |
350 {this._resetSearchResults();var regex=WebInspector.SourceFrame.createSearchRegex
(query);var totalMatchesCount=0;function addMatchesToResource(resource,matchesCo
unt) | |
351 {this._findTreeElementForResource(resource).searchMatchesFound(matchesCount);tot
alMatchesCount+=matchesCount;} | |
352 function searchInResourcesCallback(error,result) | |
353 {if(error) | |
354 return;for(var i=0;i<result.length;i++){var searchResult=result[i];var frameTree
Element=this._treeElementForFrameId[searchResult.frameId];if(!frameTreeElement) | |
355 continue;var resource=frameTreeElement.resourceByURL(searchResult.url);if(!resou
rce) | |
356 continue;addMatchesToResource.call(this,resource,searchResult.matchesCount)} | |
357 if(!--callbacksLeft) | |
358 searchFinished.call(this);} | |
359 function searchInContentCallback(resource,result) | |
360 {addMatchesToResource.call(this,resource,result.length);if(!--callbacksLeft) | |
361 searchFinished.call(this);} | |
362 function searchFinished() | |
363 {WebInspector.searchController.updateSearchMatchesCount(totalMatchesCount,this);
this._searchController=new WebInspector.ResourcesSearchController(this.resources
ListTreeElement,totalMatchesCount);if(shouldJump&&this.sidebarTree.selectedTreeE
lement&&this.sidebarTree.selectedTreeElement.searchMatchesCount) | |
364 this.jumpToNextSearchResult();} | |
365 var frames=WebInspector.resourceTreeModel.frames();var callbacksLeft=1+frames.le
ngth;for(var i=0;i<frames.length;++i){var mainResource=frames[i].mainResource;ma
inResource.searchInContent(regex.source,!regex.ignoreCase,true,searchInContentCa
llback.bind(this,mainResource));} | |
366 PageAgent.searchInResources(regex.source,!regex.ignoreCase,true,searchInResource
sCallback.bind(this));},_ensureViewSearchPerformed:function(callback) | |
367 {function viewSearchPerformedCallback(searchId) | |
368 {if(searchId!==this._lastViewSearchId) | |
369 return;this._viewSearchInProgress=false;callback();} | |
370 if(!this._viewSearchInProgress){if(!this.visibleView.hasSearchResults()){this._l
astViewSearchId=this._lastViewSearchId?this._lastViewSearchId+1:0;this._viewSear
chInProgress=true;this.visibleView.performSearch(this.currentQuery,false,viewSea
rchPerformedCallback.bind(this,this._lastViewSearchId));}else | |
371 callback();}},_showSearchResult:function(searchResult) | |
372 {this._lastSearchResultIndex=searchResult.index;this._lastSearchResultTreeElemen
t=searchResult.treeElement;if(searchResult.treeElement!==this.sidebarTree.select
edTreeElement) | |
373 this.showResource(searchResult.treeElement.representedObject);function callback(
searchId) | |
374 {if(this.sidebarTree.selectedTreeElement!==this._lastSearchResultTreeElement) | |
375 return;if(this._lastSearchResultIndex!=-1) | |
376 this.visibleView.jumpToSearchResult(this._lastSearchResultIndex);WebInspector.se
archController.updateCurrentMatchIndex(searchResult.currentMatchIndex-1,this);} | |
377 this._ensureViewSearchPerformed(callback.bind(this));},_resetSearchResults:funct
ion() | |
378 {function callback(resourceTreeElement) | |
379 {resourceTreeElement._resetSearchResults();} | |
380 this._forAllResourceTreeElements(callback);if(this.visibleView&&this.visibleView
.searchCanceled) | |
381 this.visibleView.searchCanceled();this._lastSearchResultTreeElement=null;this._l
astSearchResultIndex=-1;this._viewSearchInProgress=false;},searchCanceled:functi
on() | |
382 {function callback(resourceTreeElement) | |
383 {resourceTreeElement._updateErrorsAndWarningsBubbles();} | |
384 WebInspector.searchController.updateSearchMatchesCount(0,this);this._resetSearch
Results();this._forAllResourceTreeElements(callback);},jumpToNextSearchResult:fu
nction() | |
385 {if(!this.currentSearchMatches) | |
386 return;var currentTreeElement=this.sidebarTree.selectedTreeElement;var nextSearc
hResult=this._searchController.nextSearchResult(currentTreeElement);this._showSe
archResult(nextSearchResult);},jumpToPreviousSearchResult:function() | |
387 {if(!this.currentSearchMatches) | |
388 return;var currentTreeElement=this.sidebarTree.selectedTreeElement;var previousS
earchResult=this._searchController.previousSearchResult(currentTreeElement);this
._showSearchResult(previousSearchResult);},_forAllResourceTreeElements:function(
callback) | |
389 {var stop=false;for(var treeElement=this.resourcesListTreeElement;!stop&&treeEle
ment;treeElement=treeElement.traverseNextTreeElement(false,this.resourcesListTre
eElement,true)){if(treeElement instanceof WebInspector.FrameResourceTreeElement) | 348 {var stop=false;for(var treeElement=this.resourcesListTreeElement;!stop&&treeEle
ment;treeElement=treeElement.traverseNextTreeElement(false,this.resourcesListTre
eElement,true)){if(treeElement instanceof WebInspector.FrameResourceTreeElement) |
390 stop=callback(treeElement);}},_findTreeElementForResource:function(resource) | 349 stop=callback(treeElement);}},_findTreeElementForResource:function(resource) |
391 {function isAncestor(ancestor,object) | 350 {function isAncestor(ancestor,object) |
392 {return false;} | 351 {return false;} |
393 function getParent(object) | 352 function getParent(object) |
394 {return null;} | 353 {return null;} |
395 return this.sidebarTree.findTreeElement(resource,isAncestor,getParent);},showVie
w:function(view) | 354 return this.sidebarTree.findTreeElement(resource,isAncestor,getParent);},showVie
w:function(view) |
396 {if(view) | 355 {if(view) |
397 this.showResource(view.resource);},_onmousemove:function(event) | 356 this.showResource(view.resource);},_onmousemove:function(event) |
398 {var nodeUnderMouse=document.elementFromPoint(event.pageX,event.pageY);if(!nodeU
nderMouse) | 357 {var nodeUnderMouse=document.elementFromPoint(event.pageX,event.pageY);if(!nodeU
nderMouse) |
(...skipping 18 matching lines...) Expand all Loading... |
417 return;if(this._subtitleText){if(!this._subtitleElement){this._subtitleElement=d
ocument.createElement("span");this._subtitleElement.className="base-storage-tree
-element-subtitle";this.titleElement.appendChild(this._subtitleElement);} | 376 return;if(this._subtitleText){if(!this._subtitleElement){this._subtitleElement=d
ocument.createElement("span");this._subtitleElement.className="base-storage-tree
-element-subtitle";this.titleElement.appendChild(this._subtitleElement);} |
418 this._subtitleElement.textContent="("+this._subtitleText+")";}else if(this._subt
itleElement){this.titleElement.removeChild(this._subtitleElement);delete this._s
ubtitleElement;}},onselect:function(selectedByUser) | 377 this._subtitleElement.textContent="("+this._subtitleText+")";}else if(this._subt
itleElement){this.titleElement.removeChild(this._subtitleElement);delete this._s
ubtitleElement;}},onselect:function(selectedByUser) |
419 {if(!selectedByUser) | 378 {if(!selectedByUser) |
420 return;var itemURL=this.itemURL;if(itemURL) | 379 return;var itemURL=this.itemURL;if(itemURL) |
421 WebInspector.settings.resourcesLastSelectedItem.set(itemURL);},onreveal:function
() | 380 WebInspector.settings.resourcesLastSelectedItem.set(itemURL);},onreveal:function
() |
422 {if(this.listItemElement) | 381 {if(this.listItemElement) |
423 this.listItemElement.scrollIntoViewIfNeeded(false);},get titleText() | 382 this.listItemElement.scrollIntoViewIfNeeded(false);},get titleText() |
424 {return this._titleText;},set titleText(titleText) | 383 {return this._titleText;},set titleText(titleText) |
425 {this._titleText=titleText;this._updateTitle();},get subtitleText() | 384 {this._titleText=titleText;this._updateTitle();},get subtitleText() |
426 {return this._subtitleText;},set subtitleText(subtitleText) | 385 {return this._subtitleText;},set subtitleText(subtitleText) |
427 {this._subtitleText=subtitleText;this._updateSubtitle();},get searchMatchesCount
() | 386 {this._subtitleText=subtitleText;this._updateSubtitle();},__proto__:TreeElement.
prototype} |
428 {return 0;},__proto__:TreeElement.prototype} | |
429 WebInspector.StorageCategoryTreeElement=function(storagePanel,categoryName,setti
ngsKey,iconClasses,noIcon) | 387 WebInspector.StorageCategoryTreeElement=function(storagePanel,categoryName,setti
ngsKey,iconClasses,noIcon) |
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;} | 388 {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;} |
431 WebInspector.StorageCategoryTreeElement.prototype={get itemURL() | 389 WebInspector.StorageCategoryTreeElement.prototype={get itemURL() |
432 {return"category://"+this._categoryName;},onselect:function(selectedByUser) | 390 {return"category://"+this._categoryName;},onselect:function(selectedByUser) |
433 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel.showCategoryView(this._categoryName);},onattach:function() | 391 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel.showCategoryView(this._categoryName);},onattach:function() |
434 {WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);if(WebInspect
or.settings[this._expandedSettingKey].get()) | 392 {WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);if(WebInspect
or.settings[this._expandedSettingKey].get()) |
435 this.expand();},onexpand:function() | 393 this.expand();},onexpand:function() |
436 {WebInspector.settings[this._expandedSettingKey].set(true);},oncollapse:function
() | 394 {WebInspector.settings[this._expandedSettingKey].set(true);},oncollapse:function
() |
437 {WebInspector.settings[this._expandedSettingKey].set(false);},__proto__:WebInspe
ctor.BaseStorageTreeElement.prototype} | 395 {WebInspector.settings[this._expandedSettingKey].set(false);},__proto__:WebInspe
ctor.BaseStorageTreeElement.prototype} |
438 WebInspector.FrameTreeElement=function(storagePanel,frame) | 396 WebInspector.FrameTreeElement=function(storagePanel,frame) |
(...skipping 25 matching lines...) Expand all Loading... |
464 WebInspector.FrameResourceTreeElement.prototype={get itemURL() | 422 WebInspector.FrameResourceTreeElement.prototype={get itemURL() |
465 {return this._resource.url;},onselect:function(selectedByUser) | 423 {return this._resource.url;},onselect:function(selectedByUser) |
466 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel._showResourceView(this._resource);},ondblclick:function(eve
nt) | 424 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel._showResourceView(this._resource);},ondblclick:function(eve
nt) |
467 {InspectorFrontendHost.openInNewTab(this._resource.url);},onattach:function() | 425 {InspectorFrontendHost.openInNewTab(this._resource.url);},onattach:function() |
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);} | 426 {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);} |
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) | 427 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) |
470 {event.dataTransfer.setData("text/plain",this._resource.content);event.dataTrans
fer.effectAllowed="copy";return true;},_handleContextMenuEvent:function(event) | 428 {event.dataTransfer.setData("text/plain",this._resource.content);event.dataTrans
fer.effectAllowed="copy";return true;},_handleContextMenuEvent:function(event) |
471 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendApplicabl
eItems(this._resource);contextMenu.show();},_setBubbleText:function(x) | 429 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendApplicabl
eItems(this._resource);contextMenu.show();},_setBubbleText:function(x) |
472 {if(!this._bubbleElement){this._bubbleElement=document.createElement("div");this
._bubbleElement.className="bubble";this._statusElement.appendChild(this._bubbleE
lement);} | 430 {if(!this._bubbleElement){this._bubbleElement=document.createElement("div");this
._bubbleElement.className="bubble";this._statusElement.appendChild(this._bubbleE
lement);} |
473 this._bubbleElement.textContent=x;},_resetBubble:function() | 431 this._bubbleElement.textContent=x;},_resetBubble:function() |
474 {if(this._bubbleElement){this._bubbleElement.textContent="";this._bubbleElement.
removeStyleClass("search-matches");this._bubbleElement.removeStyleClass("warning
");this._bubbleElement.removeStyleClass("error");}},_resetSearchResults:function
() | 432 {if(this._bubbleElement){this._bubbleElement.textContent="";this._bubbleElement.
removeStyleClass("warning");this._bubbleElement.removeStyleClass("error");}},_up
dateErrorsAndWarningsBubbles:function() |
475 {this._resetBubble();this._searchMatchesCount=0;},get searchMatchesCount() | |
476 {return this._searchMatchesCount;},searchMatchesFound:function(matchesCount) | |
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) | |
478 currentAncestor.expand();currentAncestor=currentAncestor.parent;}},_updateErrors
AndWarningsBubbles:function() | |
479 {if(this._storagePanel.currentQuery) | 433 {if(this._storagePanel.currentQuery) |
480 return;this._resetBubble();if(this._resource.warnings||this._resource.errors) | 434 return;this._resetBubble();if(this._resource.warnings||this._resource.errors) |
481 this._setBubbleText(this._resource.warnings+this._resource.errors);if(this._reso
urce.warnings) | 435 this._setBubbleText(this._resource.warnings+this._resource.errors);if(this._reso
urce.warnings) |
482 this._bubbleElement.addStyleClass("warning");if(this._resource.errors) | 436 this._bubbleElement.addStyleClass("warning");if(this._resource.errors) |
483 this._bubbleElement.addStyleClass("error");},_consoleMessagesCleared:function() | 437 this._bubbleElement.addStyleClass("error");},_consoleMessagesCleared:function() |
484 {if(this._sourceView) | 438 {if(this._sourceView) |
485 this._sourceView.clearMessages();this._updateErrorsAndWarningsBubbles();},_conso
leMessageAdded:function(event) | 439 this._sourceView.clearMessages();this._updateErrorsAndWarningsBubbles();},_conso
leMessageAdded:function(event) |
486 {var msg=event.data;if(this._sourceView) | 440 {var msg=event.data;if(this._sourceView) |
487 this._sourceView.addMessage(msg);this._updateErrorsAndWarningsBubbles();},source
View:function() | 441 this._sourceView.addMessage(msg);this._updateErrorsAndWarningsBubbles();},source
View:function() |
488 {if(!this._sourceView){this._sourceView=new WebInspector.ResourceSourceFrame(thi
s._resource);if(this._resource.messages){for(var i=0;i<this._resource.messages.l
ength;i++) | 442 {if(!this._sourceView){var sourceFrame=new WebInspector.ResourceSourceFrame(this
._resource);sourceFrame.setHighlighterType(this._resource.canonicalMimeType());t
his._sourceView=sourceFrame;if(this._resource.messages){for(var i=0;i<this._reso
urce.messages.length;i++) |
489 this._sourceView.addMessage(this._resource.messages[i]);}} | 443 this._sourceView.addMessage(this._resource.messages[i]);}} |
490 return this._sourceView;},__proto__:WebInspector.BaseStorageTreeElement.prototyp
e} | 444 return this._sourceView;},__proto__:WebInspector.BaseStorageTreeElement.prototyp
e} |
491 WebInspector.DatabaseTreeElement=function(storagePanel,database) | 445 WebInspector.DatabaseTreeElement=function(storagePanel,database) |
492 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,null,database.name,[
"database-storage-tree-item"],true);this._database=database;} | 446 {WebInspector.BaseStorageTreeElement.call(this,storagePanel,null,database.name,[
"database-storage-tree-item"],true);this._database=database;} |
493 WebInspector.DatabaseTreeElement.prototype={get itemURL() | 447 WebInspector.DatabaseTreeElement.prototype={get itemURL() |
494 {return"database://"+encodeURI(this._database.name);},onselect:function(selected
ByUser) | 448 {return"database://"+encodeURI(this._database.name);},onselect:function(selected
ByUser) |
495 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel._showDatabase(this._database);},onexpand:function() | 449 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._storagePanel._showDatabase(this._database);},onexpand:function() |
496 {this._updateChildren();},_updateChildren:function() | 450 {this._updateChildren();},_updateChildren:function() |
497 {this.removeChildren();function tableNamesCallback(tableNames) | 451 {this.removeChildren();function tableNamesCallback(tableNames) |
498 {var tableNamesLength=tableNames.length;for(var i=0;i<tableNamesLength;++i) | 452 {var tableNamesLength=tableNames.length;for(var i=0;i<tableNamesLength;++i) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 {var displayName=fileSystem.type+" - "+fileSystem.origin;WebInspector.BaseStorag
eTreeElement.call(this,storagePanel,null,displayName,["file-system-storage-tree-
item"]);this._fileSystem=fileSystem;} | 580 {var displayName=fileSystem.type+" - "+fileSystem.origin;WebInspector.BaseStorag
eTreeElement.call(this,storagePanel,null,displayName,["file-system-storage-tree-
item"]);this._fileSystem=fileSystem;} |
627 WebInspector.FileSystemTreeElement.prototype={get fileSystemName() | 581 WebInspector.FileSystemTreeElement.prototype={get fileSystemName() |
628 {return this._fileSystem.name;},get itemURL() | 582 {return this._fileSystem.name;},get itemURL() |
629 {return"filesystem://"+this._fileSystem.name;},onselect:function(selectedByUser) | 583 {return"filesystem://"+this._fileSystem.name;},onselect:function(selectedByUser) |
630 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._fileSystemView=new WebInspector.FileSystemView(this._fileSystem);this._s
toragePanel.showFileSystem(this._fileSystemView);},clear:function() | 584 {WebInspector.BaseStorageTreeElement.prototype.onselect.call(this,selectedByUser
);this._fileSystemView=new WebInspector.FileSystemView(this._fileSystem);this._s
toragePanel.showFileSystem(this._fileSystemView);},clear:function() |
631 {if(this.fileSystemView&&this._storagePanel.visibleView===this.fileSystemView) | 585 {if(this.fileSystemView&&this._storagePanel.visibleView===this.fileSystemView) |
632 this._storagePanel.closeVisibleView();},__proto__:WebInspector.BaseStorageTreeEl
ement.prototype} | 586 this._storagePanel.closeVisibleView();},__proto__:WebInspector.BaseStorageTreeEl
ement.prototype} |
633 WebInspector.StorageCategoryView=function() | 587 WebInspector.StorageCategoryView=function() |
634 {WebInspector.View.call(this);this.element.addStyleClass("storage-view");this._e
mptyView=new WebInspector.EmptyView("");this._emptyView.show(this.element);} | 588 {WebInspector.View.call(this);this.element.addStyleClass("storage-view");this._e
mptyView=new WebInspector.EmptyView("");this._emptyView.show(this.element);} |
635 WebInspector.StorageCategoryView.prototype={setText:function(text) | 589 WebInspector.StorageCategoryView.prototype={setText:function(text) |
636 {this._emptyView.text=text;},__proto__:WebInspector.View.prototype} | 590 {this._emptyView.text=text;},__proto__:WebInspector.View.prototype} |
637 WebInspector.ResourcesSearchController=function(rootElement,matchesCount) | |
638 {this._root=rootElement;this._matchesCount=matchesCount;this._traverser=new WebI
nspector.SearchResultsTreeElementsTraverser(rootElement);this._lastTreeElement=n
ull;this._lastIndex=-1;} | |
639 WebInspector.ResourcesSearchController.prototype={nextSearchResult:function(curr
entTreeElement) | |
640 {if(!currentTreeElement) | |
641 return this._searchResult(this._traverser.first(),0,1);if(!currentTreeElement.se
archMatchesCount) | |
642 return this._searchResult(this._traverser.next(currentTreeElement),0);if(this._l
astTreeElement!==currentTreeElement||this._lastIndex===-1) | |
643 return this._searchResult(currentTreeElement,0);if(this._lastIndex===currentTree
Element.searchMatchesCount-1) | |
644 return this._searchResult(this._traverser.next(currentTreeElement),0,this._curre
ntMatchIndex%this._matchesCount+1);return this._searchResult(currentTreeElement,
this._lastIndex+1,this._currentMatchIndex+1);},previousSearchResult:function(cur
rentTreeElement) | |
645 {if(!currentTreeElement){var treeElement=this._traverser.last();return this._sea
rchResult(treeElement,treeElement.searchMatchesCount-1,this._matchesCount);} | |
646 if(currentTreeElement.searchMatchesCount&&this._lastTreeElement===currentTreeEle
ment){if(this._lastIndex>0) | |
647 return this._searchResult(currentTreeElement,this._lastIndex-1,this._currentMatc
hIndex-1);else{var treeElement=this._traverser.previous(currentTreeElement);var
currentMatchIndex=this._currentMatchIndex-1?this._currentMatchIndex-1:this._matc
hesCount;return this._searchResult(treeElement,treeElement.searchMatchesCount-1,
currentMatchIndex);}} | |
648 var treeElement=this._traverser.previous(currentTreeElement) | |
649 return this._searchResult(treeElement,treeElement.searchMatchesCount-1);},_searc
hResult:function(treeElement,index,currentMatchIndex) | |
650 {this._lastTreeElement=treeElement;this._lastIndex=index;if(!currentMatchIndex) | |
651 currentMatchIndex=this._traverser.matchIndex(treeElement,index);this._currentMat
chIndex=currentMatchIndex;return{treeElement:treeElement,index:index,currentMatc
hIndex:currentMatchIndex};}} | |
652 WebInspector.SearchResultsTreeElementsTraverser=function(rootElement) | |
653 {this._root=rootElement;} | |
654 WebInspector.SearchResultsTreeElementsTraverser.prototype={first:function() | |
655 {return this.next(this._root);},last:function() | |
656 {return this.previous(this._root);},next: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) | |
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) | |
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) | |
660 return 0;} | |
661 return matchIndex+index;},_elementSearchMatchesCount:function(treeElement) | |
662 {return treeElement.searchMatchesCount;},_traverseNext:function(treeElement) | |
663 {return(treeElement.traverseNextTreeElement(false,this._root,true));},_traverseP
revious:function(treeElement) | |
664 {return(treeElement.traversePreviousTreeElement(false,true));},_lastTreeElement:
function() | |
665 {var treeElement=this._root;var nextTreeElement;while(nextTreeElement=this._trav
erseNext(treeElement)) | |
666 treeElement=nextTreeElement;return treeElement;}} | |
OLD | NEW |