Changeset 100894 in webkit
- Timestamp:
- Nov 21, 2011 2:22:00 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r100893 r100894 1 2011-11-21 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: ApplicationCache view should show navigator.onLine indicator. 4 https://bugs.webkit.org/show_bug.cgi?id=72618 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/InspectorApplicationCacheAgent.cpp: 9 (WebCore::InspectorApplicationCacheAgent::enable): 10 * inspector/front-end/ApplicationCacheItemsView.js: 11 (WebInspector.ApplicationCacheItemsView): 12 (WebInspector.ApplicationCacheItemsView.prototype.wasShown): 13 * inspector/front-end/ApplicationCacheModel.js: 14 (WebInspector.ApplicationCacheModel): 15 (WebInspector.ApplicationCacheModel.prototype.get onLine): 16 (WebInspector.ApplicationCacheModel.prototype._networkStateUpdated): 17 * inspector/front-end/ResourcesPanel.js: 18 (WebInspector.ResourcesPanel.prototype.showApplicationCache): 19 (WebInspector.ResourcesPanel.prototype._applicationCacheNetworkStateChanged): 20 1 21 2011-11-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 22 -
trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
r99988 r100894 80 80 m_state->setBoolean(ApplicationCacheAgentState::applicationCacheAgentEnabled, true); 81 81 m_instrumentingAgents->setInspectorApplicationCacheAgent(this); 82 83 // We need to pass initial navigator.onOnline. 84 networkStateChanged(); 82 85 } 83 86 -
trunk/Source/WebCore/inspector/front-end/ApplicationCacheItemsView.js
r100635 r100894 28 28 * @extends {WebInspector.View} 29 29 */ 30 WebInspector.ApplicationCacheItemsView = function(model, frameId , status)30 WebInspector.ApplicationCacheItemsView = function(model, frameId) 31 31 { 32 32 WebInspector.View.call(this); … … 65 65 66 66 this._markDirty(); 67 68 var status = this._model.frameManifestStatus(frameId); 67 69 this.updateStatus(status); 70 71 this.updateNetworkState(this._model.onLine); 68 72 69 73 // FIXME: Status bar items don't work well enough yet, so they are being hidden. 70 74 // http://webkit.org/b/41637 Web Inspector: Give Semantics to "Refresh" and "Delete" Buttons in ApplicationCache DataGrid 71 // http://webkit.org/b/72618 Web Inspector: ApplicationCache view should show navigator.onLine indicator.72 75 this.deleteButton.element.style.display = "none"; 73 this.connectivityIcon.style.display = "none";74 this.connectivityMessage.style.display = "none";75 this.divider.style.display = "none";76 76 } 77 77 … … 88 88 wasShown: function() 89 89 { 90 this.updateNetworkState(navigator.onLine);91 90 this._maybeUpdate(); 92 91 }, -
trunk/Source/WebCore/inspector/front-end/ApplicationCacheModel.js
r99878 r100894 43 43 44 44 this._mainFrameNavigated(); 45 46 this._onLine = true; 45 47 } 46 48 … … 168 170 { 169 171 return this._statuses[frameId] || applicationCache.UNCACHED; 172 }, 173 174 /** 175 * @return {number} 176 */ 177 get onLine() 178 { 179 return this._onLine; 170 180 }, 171 181 … … 205 215 _networkStateUpdated: function(isNowOnline) 206 216 { 217 this._onLine = isNowOnline; 207 218 this.dispatchEventToListeners(WebInspector.ApplicationCacheModel.EventTypes.NetworkStateChanged, isNowOnline); 208 219 } -
trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js
r99965 r100894 480 480 showApplicationCache: function(frameId) 481 481 { 482 var status = this._applicationCacheModel.frameManifestStatus(frameId) 483 484 if (!this._applicationCacheViews[frameId]) { 485 this._applicationCacheViews[frameId] = new WebInspector.ApplicationCacheItemsView(this._applicationCacheModel, frameId, status); 486 487 // FIXME: Make sure this._cachedApplicationCacheNetworkState is always set and is always up to date. 488 if (typeof(this._cachedApplicationCacheNetworkState) === "number") 489 this._applicationCacheViews[frameId].updateNetworkState(this._cachedApplicationCacheNetworkState); 490 } 482 if (!this._applicationCacheViews[frameId]) 483 this._applicationCacheViews[frameId] = new WebInspector.ApplicationCacheItemsView(this._applicationCacheModel, frameId); 491 484 492 485 this._innerShowView(this._applicationCacheViews[frameId]); … … 632 625 var isNowOnline = event.data; 633 626 634 this._cachedApplicationCacheNetworkState = isNowOnline;635 627 for (var manifestURL in this._applicationCacheViews) 636 628 this._applicationCacheViews[manifestURL].updateNetworkState(isNowOnline);
Note: See TracChangeset
for help on using the changeset viewer.