Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js

Issue 2335783002: [DevTools] Remove TreeOutline from IDBDatabaseView. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/resources/indexedDBViews.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 * @param {!WebInspector.IndexedDBModel.Database} database 34 * @param {!WebInspector.IndexedDBModel.Database} database
35 */ 35 */
36 WebInspector.IDBDatabaseView = function(database) 36 WebInspector.IDBDatabaseView = function(database)
37 { 37 {
38 WebInspector.VBox.call(this); 38 WebInspector.VBox.call(this);
39 this.registerRequiredCSS("resources/indexedDBViews.css"); 39 this.registerRequiredCSS("resources/indexedDBViews.css");
40 40
41 this.element.classList.add("indexed-db-database-view"); 41 this.element.classList.add("indexed-db-database-view");
42 this.element.classList.add("storage-view"); 42 this.element.classList.add("storage-view");
43 43
44 this._headersTreeOutline = new TreeOutline(); 44 this._securityOriginElement = this.element.createChild("div", "header-row");
45 this._headersTreeOutline.element.classList.add("outline-disclosure"); 45 this._nameElement = this.element.createChild("div", "header-row");
46 this.element.appendChild(this._headersTreeOutline.element); 46 this._versionElement = this.element.createChild("div", "header-row");
47 this._headersTreeOutline.expandTreeElementsWhenArrowing = true;
48
49 this._securityOriginTreeElement = new TreeElement();
50 this._securityOriginTreeElement.selectable = false;
51 this._headersTreeOutline.appendChild(this._securityOriginTreeElement);
52
53 this._nameTreeElement = new TreeElement();
54 this._nameTreeElement.selectable = false;
55 this._headersTreeOutline.appendChild(this._nameTreeElement);
56
57 this._versionTreeElement = new TreeElement();
58 this._versionTreeElement.selectable = false;
59 this._headersTreeOutline.appendChild(this._versionTreeElement);
60 47
61 this.update(database); 48 this.update(database);
62 } 49 }
63 50
64 WebInspector.IDBDatabaseView.prototype = { 51 WebInspector.IDBDatabaseView.prototype = {
65 /** 52 /**
53 * @param {!Element} element
66 * @param {string} name 54 * @param {string} name
67 * @param {string} value 55 * @param {string} value
68 */ 56 */
69 _formatHeader: function(name, value) 57 _formatHeader: function(element, name, value)
70 { 58 {
71 var fragment = createDocumentFragment(); 59 element.removeChildren();
72 fragment.createChild("div", "attribute-name").textContent = name + ":"; 60 element.createChild("div", "attribute-name").textContent = name + ":";
73 fragment.createChild("div", "attribute-value source-code").textContent = value; 61 element.createChild("div", "attribute-value source-code").textContent = value;
74
75 return fragment;
76 }, 62 },
77 63
78 _refreshDatabase: function() 64 _refreshDatabase: function()
79 { 65 {
80 this._securityOriginTreeElement.title = this._formatHeader(WebInspector. UIString("Security origin"), this._database.databaseId.securityOrigin); 66 this._formatHeader(this._securityOriginElement, WebInspector.UIString("S ecurity origin"), this._database.databaseId.securityOrigin);
81 this._nameTreeElement.title = this._formatHeader(WebInspector.UIString(" Name"), this._database.databaseId.name); 67 this._formatHeader(this._nameElement, WebInspector.UIString("Name"), thi s._database.databaseId.name);
82 this._versionTreeElement.title = this._formatHeader(WebInspector.UIStrin g("Version"), this._database.version); 68 this._formatHeader(this._versionElement, WebInspector.UIString("Version" ), this._database.version);
83 }, 69 },
84 70
85 /** 71 /**
86 * @param {!WebInspector.IndexedDBModel.Database} database 72 * @param {!WebInspector.IndexedDBModel.Database} database
87 */ 73 */
88 update: function(database) 74 update: function(database)
89 { 75 {
90 this._database = database; 76 this._database = database;
91 this._refreshDatabase(); 77 this._refreshDatabase();
92 }, 78 },
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 cell.appendChild(objectElement); 367 cell.appendChild(objectElement);
382 break; 368 break;
383 default: 369 default:
384 } 370 }
385 371
386 return cell; 372 return cell;
387 }, 373 },
388 374
389 __proto__: WebInspector.DataGridNode.prototype 375 __proto__: WebInspector.DataGridNode.prototype
390 } 376 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/resources/indexedDBViews.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698