| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 this._detailsLinkifier = new WebInspector.Linkifier(); | 45 this._detailsLinkifier = new WebInspector.Linkifier(); |
| 46 this._windowStartTime = 0; | 46 this._windowStartTime = 0; |
| 47 this._windowEndTime = Infinity; | 47 this._windowEndTime = Infinity; |
| 48 | 48 |
| 49 // Create model. | 49 // Create model. |
| 50 this._tracingManager = new WebInspector.TracingManager(); | 50 this._tracingManager = new WebInspector.TracingManager(); |
| 51 this._tracingManager.addEventListener(WebInspector.TracingManager.Events.Buf
ferUsage, this._onTracingBufferUsage, this); | 51 this._tracingManager.addEventListener(WebInspector.TracingManager.Events.Buf
ferUsage, this._onTracingBufferUsage, this); |
| 52 | 52 |
| 53 this._tracingModel = new WebInspector.TracingModel(); | 53 this._tracingModel = new WebInspector.TracingModel(); |
| 54 this._uiUtils = new WebInspector.TracingTimelineUIUtils(); | 54 this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this._tra
cingManager, this._tracingModel, WebInspector.TimelineUIUtils.hiddenRecordsFilte
r()); |
| 55 this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this._tra
cingManager, this._tracingModel, this._uiUtils.hiddenRecordsFilter()); | |
| 56 this._model = this._tracingTimelineModel; | 55 this._model = this._tracingTimelineModel; |
| 57 | 56 |
| 58 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); | 57 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); |
| 59 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStop
ped, this._onRecordingStopped, this); | 58 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStop
ped, this._onRecordingStopped, this); |
| 60 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleare
d, this._onRecordsCleared, this); | 59 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleare
d, this._onRecordsCleared, this); |
| 61 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordFilterC
hanged, this._refreshViews, this); | 60 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordFilterC
hanged, this._refreshViews, this); |
| 62 | 61 |
| 63 this._categoryFilter = new WebInspector.TimelineCategoryFilter(this._uiUtils
); | 62 this._categoryFilter = new WebInspector.TimelineCategoryFilter(); |
| 64 this._durationFilter = new WebInspector.TimelineIsLongFilter(); | 63 this._durationFilter = new WebInspector.TimelineIsLongFilter(); |
| 65 this._textFilter = new WebInspector.TimelineTextFilter(this._uiUtils); | 64 this._textFilter = new WebInspector.TimelineTextFilter(); |
| 66 | 65 |
| 67 var hiddenEmptyRecordsFilter = this._uiUtils.hiddenEmptyRecordsFilter(); | 66 this._model.addFilter(new WebInspector.TimelineRecordHiddenEmptyTypeFilter([
WebInspector.TimelineModel.RecordType.EventDispatch])); |
| 68 if (hiddenEmptyRecordsFilter) | 67 this._model.addFilter(WebInspector.TimelineUIUtils.hiddenRecordsFilter()); |
| 69 this._model.addFilter(hiddenEmptyRecordsFilter); | |
| 70 this._model.addFilter(this._uiUtils.hiddenRecordsFilter()); | |
| 71 this._model.addFilter(this._categoryFilter); | 68 this._model.addFilter(this._categoryFilter); |
| 72 this._model.addFilter(this._durationFilter); | 69 this._model.addFilter(this._durationFilter); |
| 73 this._model.addFilter(this._textFilter); | 70 this._model.addFilter(this._textFilter); |
| 74 | 71 |
| 75 /** @type {!Array.<!WebInspector.TimelineModeView>} */ | 72 /** @type {!Array.<!WebInspector.TimelineModeView>} */ |
| 76 this._currentViews = []; | 73 this._currentViews = []; |
| 77 | 74 |
| 78 this._overviewModeSetting = WebInspector.settings.createSetting("timelineOve
rviewMode", WebInspector.TimelinePanel.OverviewMode.Frames); | 75 this._overviewModeSetting = WebInspector.settings.createSetting("timelineOve
rviewMode", WebInspector.TimelinePanel.OverviewMode.Frames); |
| 79 this._flameChartEnabledSetting = WebInspector.settings.createSetting("timeli
neFlameChartEnabled", true); | 76 this._flameChartEnabledSetting = WebInspector.settings.createSetting("timeli
neFlameChartEnabled", true); |
| 80 this._createStatusBarItems(); | 77 this._createStatusBarItems(); |
| 81 | 78 |
| 82 var topPaneElement = this.element.createChild("div", "hbox"); | 79 var topPaneElement = this.element.createChild("div", "hbox"); |
| 83 topPaneElement.id = "timeline-overview-panel"; | 80 topPaneElement.id = "timeline-overview-panel"; |
| 84 | 81 |
| 85 // Create top overview component. | 82 // Create top overview component. |
| 86 this._overviewPane = new WebInspector.TimelineOverviewPane(this._model, this
._uiUtils); | 83 this._overviewPane = new WebInspector.TimelineOverviewPane(this._model); |
| 87 this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events
.WindowChanged, this._onWindowChanged.bind(this)); | 84 this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events
.WindowChanged, this._onWindowChanged.bind(this)); |
| 88 this._overviewPane.show(topPaneElement); | 85 this._overviewPane.show(topPaneElement); |
| 89 | 86 |
| 90 this._createFileSelector(); | 87 this._createFileSelector(); |
| 91 this._registerShortcuts(); | 88 this._registerShortcuts(); |
| 92 | 89 |
| 93 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.WillReloadPage, this._willReloadPage, this); | 90 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.WillReloadPage, this._willReloadPage, this); |
| 94 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.Load, this._loadEventFired, this); | 91 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.Load, this._loadEventFired, this); |
| 95 | 92 |
| 96 // Create top level properties splitter. | 93 // Create top level properties splitter. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 230 } |
| 234 return this._lazyFrameModel; | 231 return this._lazyFrameModel; |
| 235 }, | 232 }, |
| 236 | 233 |
| 237 /** | 234 /** |
| 238 * @return {!WebInspector.TimelineView} | 235 * @return {!WebInspector.TimelineView} |
| 239 */ | 236 */ |
| 240 _timelineView: function() | 237 _timelineView: function() |
| 241 { | 238 { |
| 242 if (!this._lazyTimelineView) | 239 if (!this._lazyTimelineView) |
| 243 this._lazyTimelineView = new WebInspector.TimelineView(this, this._m
odel, this._uiUtils); | 240 this._lazyTimelineView = new WebInspector.TimelineView(this, this._m
odel); |
| 244 return this._lazyTimelineView; | 241 return this._lazyTimelineView; |
| 245 }, | 242 }, |
| 246 | 243 |
| 247 /** | 244 /** |
| 248 * @return {!WebInspector.View} | 245 * @return {!WebInspector.View} |
| 249 */ | 246 */ |
| 250 _layersView: function() | 247 _layersView: function() |
| 251 { | 248 { |
| 252 if (this._lazyLayersView) | 249 if (this._lazyLayersView) |
| 253 return this._lazyLayersView; | 250 return this._lazyLayersView; |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 { | 578 { |
| 582 this._stackView.detach(); | 579 this._stackView.detach(); |
| 583 | 580 |
| 584 var isFrameMode = this._overviewModeSetting.get() === WebInspector.Timel
inePanel.OverviewMode.Frames; | 581 var isFrameMode = this._overviewModeSetting.get() === WebInspector.Timel
inePanel.OverviewMode.Frames; |
| 585 this._removeAllModeViews(); | 582 this._removeAllModeViews(); |
| 586 this._overviewControls = []; | 583 this._overviewControls = []; |
| 587 | 584 |
| 588 if (isFrameMode) | 585 if (isFrameMode) |
| 589 this._overviewControls.push(new WebInspector.TimelineFrameOverview(t
his._model, this._frameModel())); | 586 this._overviewControls.push(new WebInspector.TimelineFrameOverview(t
his._model, this._frameModel())); |
| 590 else | 587 else |
| 591 this._overviewControls.push(new WebInspector.TimelineEventOverview(t
his._model, this._uiUtils)); | 588 this._overviewControls.push(new WebInspector.TimelineEventOverview(t
his._model)); |
| 592 | 589 |
| 593 if (this._flameChartEnabledSetting.get()) { | 590 if (this._flameChartEnabledSetting.get()) { |
| 594 this._filterBar.filterButton().setEnabled(false); | 591 this._filterBar.filterButton().setEnabled(false); |
| 595 this._filtersContainer.classList.toggle("hidden", true); | 592 this._filtersContainer.classList.toggle("hidden", true); |
| 596 this._addModeView(new WebInspector.TimelineFlameChart(this, this._tr
acingTimelineModel, this._frameModel())); | 593 this._addModeView(new WebInspector.TimelineFlameChart(this, this._tr
acingTimelineModel, this._frameModel())); |
| 597 } else { | 594 } else { |
| 598 this._filterBar.filterButton().setEnabled(true); | 595 this._filterBar.filterButton().setEnabled(true); |
| 599 this._filtersContainer.classList.toggle("hidden", !this._filterBar.f
iltersToggled()); | 596 this._filtersContainer.classList.toggle("hidden", !this._filterBar.f
iltersToggled()); |
| 600 this._addModeView(this._timelineView()); | 597 this._addModeView(this._timelineView()); |
| 601 } | 598 } |
| 602 | 599 |
| 603 if (this._captureMemorySetting.get()) { | 600 if (this._captureMemorySetting.get()) { |
| 604 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. | 601 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. |
| 605 this._overviewControls.push(new WebInspector.TimelineMemoryOverv
iew(this._model, this._uiUtils)); | 602 this._overviewControls.push(new WebInspector.TimelineMemoryOverv
iew(this._model)); |
| 606 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m
odel, this._uiUtils)); | 603 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m
odel)); |
| 607 } | 604 } |
| 608 | 605 |
| 609 if (this._capturePowerSetting && this._capturePowerSetting.get() && | 606 if (this._capturePowerSetting && this._capturePowerSetting.get() && |
| 610 WebInspector.targetManager.mainTarget().hasCapability(WebInspector.T
arget.Capabilities.CanProfilePower)) { | 607 WebInspector.targetManager.mainTarget().hasCapability(WebInspector.T
arget.Capabilities.CanProfilePower)) { |
| 611 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. | 608 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. |
| 612 this._overviewControls.push(new WebInspector.TimelinePowerOvervi
ew(this._model)); | 609 this._overviewControls.push(new WebInspector.TimelinePowerOvervi
ew(this._model)); |
| 613 this._addModeView(new WebInspector.TimelinePowerGraph(this, this._mo
del)); | 610 this._addModeView(new WebInspector.TimelinePowerGraph(this, this._mo
del)); |
| 614 } | 611 } |
| 615 | 612 |
| 616 if (this._lazyTimelineView) | 613 if (this._lazyTimelineView) |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 | 901 |
| 905 /** | 902 /** |
| 906 * @param {!WebInspector.TimelineModel.Record} record | 903 * @param {!WebInspector.TimelineModel.Record} record |
| 907 * @this {WebInspector.TimelinePanel} | 904 * @this {WebInspector.TimelinePanel} |
| 908 */ | 905 */ |
| 909 function processRecord(record) | 906 function processRecord(record) |
| 910 { | 907 { |
| 911 if (record.endTime() < this._windowStartTime || | 908 if (record.endTime() < this._windowStartTime || |
| 912 record.startTime() > this._windowEndTime) | 909 record.startTime() > this._windowEndTime) |
| 913 return; | 910 return; |
| 914 if (this._uiUtils.testContentMatching(record, searchRegExp)) | 911 if (WebInspector.TimelineUIUtils.testContentMatching(record, searchR
egExp)) |
| 915 matches.push(record); | 912 matches.push(record); |
| 916 } | 913 } |
| 917 this._model.forAllFilteredRecords(processRecord.bind(this)); | 914 this._model.forAllFilteredRecords(processRecord.bind(this)); |
| 918 | 915 |
| 919 var matchesCount = matches.length; | 916 var matchesCount = matches.length; |
| 920 if (matchesCount) { | 917 if (matchesCount) { |
| 921 this._searchResults = matches; | 918 this._searchResults = matches; |
| 922 this._searchableView.updateSearchMatchesCount(matchesCount); | 919 this._searchableView.updateSearchMatchesCount(matchesCount); |
| 923 | 920 |
| 924 var selectedIndex = matches.indexOf(this._selectedSearchResult); | 921 var selectedIndex = matches.indexOf(this._selectedSearchResult); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 954 | 951 |
| 955 _updateSelectionDetails: function() | 952 _updateSelectionDetails: function() |
| 956 { | 953 { |
| 957 if (!this._selection) | 954 if (!this._selection) |
| 958 this._selection = WebInspector.TimelineSelection.fromRange(this._win
dowStartTime, this._windowEndTime); | 955 this._selection = WebInspector.TimelineSelection.fromRange(this._win
dowStartTime, this._windowEndTime); |
| 959 | 956 |
| 960 switch (this._selection.type()) { | 957 switch (this._selection.type()) { |
| 961 case WebInspector.TimelineSelection.Type.Record: | 958 case WebInspector.TimelineSelection.Type.Record: |
| 962 var record = /** @type {!WebInspector.TimelineModel.Record} */ (this
._selection.object()); | 959 var record = /** @type {!WebInspector.TimelineModel.Record} */ (this
._selection.object()); |
| 963 var event = record.traceEvent(); | 960 var event = record.traceEvent(); |
| 964 this._uiUtils.generateDetailsContent(record, this._model, this._deta
ilsLinkifier, this._appendDetailsTabsForTraceEventAndShowDetails.bind(this, even
t)); | 961 WebInspector.TimelineUIUtils.buildTraceEventDetails(event, this._tra
cingTimelineModel, this._detailsLinkifier, this._appendDetailsTabsForTraceEventA
ndShowDetails.bind(this, event)); |
| 965 break; | 962 break; |
| 966 case WebInspector.TimelineSelection.Type.TraceEvent: | 963 case WebInspector.TimelineSelection.Type.TraceEvent: |
| 967 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s
election.object()); | 964 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s
election.object()); |
| 968 WebInspector.TracingTimelineUIUtils.buildTraceEventDetails(event, th
is._tracingTimelineModel, this._detailsLinkifier, this._appendDetailsTabsForTrac
eEventAndShowDetails.bind(this, event)); | 965 WebInspector.TimelineUIUtils.buildTraceEventDetails(event, this._tra
cingTimelineModel, this._detailsLinkifier, this._appendDetailsTabsForTraceEventA
ndShowDetails.bind(this, event)); |
| 969 break; | 966 break; |
| 970 case WebInspector.TimelineSelection.Type.Frame: | 967 case WebInspector.TimelineSelection.Type.Frame: |
| 971 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select
ion.object()); | 968 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select
ion.object()); |
| 972 this.showInDetails(WebInspector.TimelineUIUtils.generateDetailsConte
ntForFrame(this._lazyFrameModel, frame)); | 969 this.showInDetails(WebInspector.TimelineUIUtils.generateDetailsConte
ntForFrame(this._lazyFrameModel, frame)); |
| 973 if (frame.layerTree) { | 970 if (frame.layerTree) { |
| 974 var layersView = this._layersView(); | 971 var layersView = this._layersView(); |
| 975 layersView.showLayerTree(frame.layerTree, frame.paints); | 972 layersView.showLayerTree(frame.layerTree, frame.paints); |
| 976 this._detailsView.appendTab(WebInspector.TimelinePanel.DetailsTa
b.LayerViewer, WebInspector.UIString("Layers"), layersView); | 973 this._detailsView.appendTab(WebInspector.TimelinePanel.DetailsTa
b.LayerViewer, WebInspector.UIString("Layers"), layersView); |
| 977 } | 974 } |
| 978 break; | 975 break; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 paintProfilerView.setPicture(event.thread.target(), result["skp64"])
; | 1009 paintProfilerView.setPicture(event.thread.target(), result["skp64"])
; |
| 1013 } | 1010 } |
| 1014 }, | 1011 }, |
| 1015 | 1012 |
| 1016 /** | 1013 /** |
| 1017 * @param {number} startTime | 1014 * @param {number} startTime |
| 1018 * @param {number} endTime | 1015 * @param {number} endTime |
| 1019 */ | 1016 */ |
| 1020 _updateSelectedRangeStats: function(startTime, endTime) | 1017 _updateSelectedRangeStats: function(startTime, endTime) |
| 1021 { | 1018 { |
| 1022 var uiUtils = this._uiUtils; | |
| 1023 | |
| 1024 // Return early in case 0 selection window. | 1019 // Return early in case 0 selection window. |
| 1025 if (startTime < 0) | 1020 if (startTime < 0) |
| 1026 return; | 1021 return; |
| 1027 | 1022 |
| 1028 var aggregatedStats = {}; | 1023 var aggregatedStats = {}; |
| 1029 | 1024 |
| 1030 /** | 1025 /** |
| 1031 * @param {number} value | 1026 * @param {number} value |
| 1032 * @param {!WebInspector.TimelineModel.Record} task | 1027 * @param {!WebInspector.TimelineModel.Record} task |
| 1033 * @return {number} | 1028 * @return {number} |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1047 | 1042 |
| 1048 var childrenTime = 0; | 1043 var childrenTime = 0; |
| 1049 var children = record.children() || []; | 1044 var children = record.children() || []; |
| 1050 for (var i = 0; i < children.length; ++i) { | 1045 for (var i = 0; i < children.length; ++i) { |
| 1051 var child = children[i]; | 1046 var child = children[i]; |
| 1052 if (!child.endTime() || child.endTime() < startTime || child.sta
rtTime() > endTime) | 1047 if (!child.endTime() || child.endTime() < startTime || child.sta
rtTime() > endTime) |
| 1053 continue; | 1048 continue; |
| 1054 childrenTime += Math.min(endTime, child.endTime()) - Math.max(st
artTime, child.startTime()); | 1049 childrenTime += Math.min(endTime, child.endTime()) - Math.max(st
artTime, child.startTime()); |
| 1055 aggregateTimeForRecordWithinWindow(child); | 1050 aggregateTimeForRecordWithinWindow(child); |
| 1056 } | 1051 } |
| 1057 var categoryName = uiUtils.categoryForRecord(record).name; | 1052 var categoryName = WebInspector.TimelineUIUtils.categoryForRecord(re
cord).name; |
| 1058 var ownTime = Math.min(endTime, record.endTime()) - Math.max(startTi
me, record.startTime()) - childrenTime; | 1053 var ownTime = Math.min(endTime, record.endTime()) - Math.max(startTi
me, record.startTime()) - childrenTime; |
| 1059 aggregatedStats[categoryName] = (aggregatedStats[categoryName] || 0)
+ ownTime; | 1054 aggregatedStats[categoryName] = (aggregatedStats[categoryName] || 0)
+ ownTime; |
| 1060 } | 1055 } |
| 1061 | 1056 |
| 1062 var mainThreadTasks = this._model.mainThreadTasks(); | 1057 var mainThreadTasks = this._model.mainThreadTasks(); |
| 1063 var taskIndex = insertionIndexForObjectInListSortedByFunction(startTime,
mainThreadTasks, compareEndTime); | 1058 var taskIndex = insertionIndexForObjectInListSortedByFunction(startTime,
mainThreadTasks, compareEndTime); |
| 1064 for (; taskIndex < mainThreadTasks.length; ++taskIndex) { | 1059 for (; taskIndex < mainThreadTasks.length; ++taskIndex) { |
| 1065 var task = mainThreadTasks[taskIndex]; | 1060 var task = mainThreadTasks[taskIndex]; |
| 1066 if (task.startTime() > endTime) | 1061 if (task.startTime() > endTime) |
| 1067 break; | 1062 break; |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 | 1346 |
| 1352 /** | 1347 /** |
| 1353 * @param {!Node} node | 1348 * @param {!Node} node |
| 1354 */ | 1349 */ |
| 1355 showInDetails: function(node) {}, | 1350 showInDetails: function(node) {}, |
| 1356 } | 1351 } |
| 1357 | 1352 |
| 1358 /** | 1353 /** |
| 1359 * @constructor | 1354 * @constructor |
| 1360 * @extends {WebInspector.TimelineModel.Filter} | 1355 * @extends {WebInspector.TimelineModel.Filter} |
| 1361 * @param {!WebInspector.TimelineUIUtils} uiUtils | |
| 1362 */ | 1356 */ |
| 1363 WebInspector.TimelineCategoryFilter = function(uiUtils) | 1357 WebInspector.TimelineCategoryFilter = function() |
| 1364 { | 1358 { |
| 1365 WebInspector.TimelineModel.Filter.call(this); | 1359 WebInspector.TimelineModel.Filter.call(this); |
| 1366 this._uiUtils = uiUtils; | |
| 1367 } | 1360 } |
| 1368 | 1361 |
| 1369 WebInspector.TimelineCategoryFilter.prototype = { | 1362 WebInspector.TimelineCategoryFilter.prototype = { |
| 1370 /** | 1363 /** |
| 1371 * @param {!WebInspector.TimelineModel.Record} record | 1364 * @param {!WebInspector.TimelineModel.Record} record |
| 1372 * @return {boolean} | 1365 * @return {boolean} |
| 1373 */ | 1366 */ |
| 1374 accept: function(record) | 1367 accept: function(record) |
| 1375 { | 1368 { |
| 1376 return !this._uiUtils.categoryForRecord(record).hidden; | 1369 return !WebInspector.TimelineUIUtils.categoryForRecord(record).hidden; |
| 1377 }, | 1370 }, |
| 1378 | 1371 |
| 1379 __proto__: WebInspector.TimelineModel.Filter.prototype | 1372 __proto__: WebInspector.TimelineModel.Filter.prototype |
| 1380 } | 1373 } |
| 1381 | 1374 |
| 1382 /** | 1375 /** |
| 1383 * @constructor | 1376 * @constructor |
| 1384 * @extends {WebInspector.TimelineModel.Filter} | 1377 * @extends {WebInspector.TimelineModel.Filter} |
| 1385 */ | 1378 */ |
| 1386 WebInspector.TimelineIsLongFilter = function() | 1379 WebInspector.TimelineIsLongFilter = function() |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1408 return this._minimumRecordDuration ? ((record.endTime() - record.startTi
me()) >= this._minimumRecordDuration) : true; | 1401 return this._minimumRecordDuration ? ((record.endTime() - record.startTi
me()) >= this._minimumRecordDuration) : true; |
| 1409 }, | 1402 }, |
| 1410 | 1403 |
| 1411 __proto__: WebInspector.TimelineModel.Filter.prototype | 1404 __proto__: WebInspector.TimelineModel.Filter.prototype |
| 1412 | 1405 |
| 1413 } | 1406 } |
| 1414 | 1407 |
| 1415 /** | 1408 /** |
| 1416 * @constructor | 1409 * @constructor |
| 1417 * @extends {WebInspector.TimelineModel.Filter} | 1410 * @extends {WebInspector.TimelineModel.Filter} |
| 1418 * @param {!WebInspector.TimelineUIUtils} uiUtils | |
| 1419 */ | 1411 */ |
| 1420 WebInspector.TimelineTextFilter = function(uiUtils) | 1412 WebInspector.TimelineTextFilter = function() |
| 1421 { | 1413 { |
| 1422 WebInspector.TimelineModel.Filter.call(this); | 1414 WebInspector.TimelineModel.Filter.call(this); |
| 1423 this._uiUtils = uiUtils; | |
| 1424 } | 1415 } |
| 1425 | 1416 |
| 1426 WebInspector.TimelineTextFilter.prototype = { | 1417 WebInspector.TimelineTextFilter.prototype = { |
| 1427 /** | 1418 /** |
| 1428 * @return {boolean} | 1419 * @return {boolean} |
| 1429 */ | 1420 */ |
| 1430 isEmpty: function() | 1421 isEmpty: function() |
| 1431 { | 1422 { |
| 1432 return !this._regex; | 1423 return !this._regex; |
| 1433 }, | 1424 }, |
| 1434 | 1425 |
| 1435 /** | 1426 /** |
| 1436 * @param {?RegExp} regex | 1427 * @param {?RegExp} regex |
| 1437 */ | 1428 */ |
| 1438 setRegex: function(regex) | 1429 setRegex: function(regex) |
| 1439 { | 1430 { |
| 1440 this._regex = regex; | 1431 this._regex = regex; |
| 1441 this.notifyFilterChanged(); | 1432 this.notifyFilterChanged(); |
| 1442 }, | 1433 }, |
| 1443 | 1434 |
| 1444 /** | 1435 /** |
| 1445 * @param {!WebInspector.TimelineModel.Record} record | 1436 * @param {!WebInspector.TimelineModel.Record} record |
| 1446 * @return {boolean} | 1437 * @return {boolean} |
| 1447 */ | 1438 */ |
| 1448 accept: function(record) | 1439 accept: function(record) |
| 1449 { | 1440 { |
| 1450 return !this._regex || this._uiUtils.testContentMatching(record, this._r
egex); | 1441 return !this._regex || WebInspector.TimelineUIUtils.testContentMatching(
record, this._regex); |
| 1451 }, | 1442 }, |
| 1452 | 1443 |
| 1453 __proto__: WebInspector.TimelineModel.Filter.prototype | 1444 __proto__: WebInspector.TimelineModel.Filter.prototype |
| 1454 } | 1445 } |
| 1455 | 1446 |
| 1456 WebInspector.TimelinePanel.show = function() | 1447 WebInspector.TimelinePanel.show = function() |
| 1457 { | 1448 { |
| 1458 WebInspector.inspectorView.setCurrentPanel(WebInspector.TimelinePanel._insta
nce()); | 1449 WebInspector.inspectorView.setCurrentPanel(WebInspector.TimelinePanel._insta
nce()); |
| 1459 } | 1450 } |
| 1460 | 1451 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1478 | 1469 |
| 1479 WebInspector.TimelinePanelFactory.prototype = { | 1470 WebInspector.TimelinePanelFactory.prototype = { |
| 1480 /** | 1471 /** |
| 1481 * @return {!WebInspector.Panel} | 1472 * @return {!WebInspector.Panel} |
| 1482 */ | 1473 */ |
| 1483 createPanel: function() | 1474 createPanel: function() |
| 1484 { | 1475 { |
| 1485 return WebInspector.TimelinePanel._instance(); | 1476 return WebInspector.TimelinePanel._instance(); |
| 1486 } | 1477 } |
| 1487 } | 1478 } |
| OLD | NEW |