OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 title = Common.UIString('Style Invalidations'); | 1186 title = Common.UIString('Style Invalidations'); |
1187 break; | 1187 break; |
1188 case TimelineModel.TimelineModel.RecordType.LayoutInvalidationTracking: | 1188 case TimelineModel.TimelineModel.RecordType.LayoutInvalidationTracking: |
1189 title = Common.UIString('Layout Invalidations'); | 1189 title = Common.UIString('Layout Invalidations'); |
1190 break; | 1190 break; |
1191 default: | 1191 default: |
1192 title = Common.UIString('Other Invalidations'); | 1192 title = Common.UIString('Other Invalidations'); |
1193 break; | 1193 break; |
1194 } | 1194 } |
1195 | 1195 |
1196 var invalidationsTreeOutline = new TreeOutlineInShadow(); | 1196 var invalidationsTreeOutline = new UI.TreeOutlineInShadow(); |
1197 invalidationsTreeOutline.registerRequiredCSS('timeline/invalidationsTree.css
'); | 1197 invalidationsTreeOutline.registerRequiredCSS('timeline/invalidationsTree.css
'); |
1198 invalidationsTreeOutline.element.classList.add('invalidations-tree'); | 1198 invalidationsTreeOutline.element.classList.add('invalidations-tree'); |
1199 | 1199 |
1200 var invalidationGroups = groupInvalidationsByCause(invalidations); | 1200 var invalidationGroups = groupInvalidationsByCause(invalidations); |
1201 invalidationGroups.forEach(function(group) { | 1201 invalidationGroups.forEach(function(group) { |
1202 var groupElement = | 1202 var groupElement = |
1203 new Timeline.TimelineUIUtils.InvalidationsGroupElement(target, related
NodesMap, contentHelper, group); | 1203 new Timeline.TimelineUIUtils.InvalidationsGroupElement(target, related
NodesMap, contentHelper, group); |
1204 invalidationsTreeOutline.appendChild(groupElement); | 1204 invalidationsTreeOutline.appendChild(groupElement); |
1205 }); | 1205 }); |
1206 contentHelper.appendElementRow(title, invalidationsTreeOutline.element, fals
e, true); | 1206 contentHelper.appendElementRow(title, invalidationsTreeOutline.element, fals
e, true); |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 Other: Symbol('Other') | 1791 Other: Symbol('Other') |
1792 }; | 1792 }; |
1793 | 1793 |
1794 | 1794 |
1795 Timeline.TimelineUIUtils._aggregatedStatsKey = Symbol('aggregatedStats'); | 1795 Timeline.TimelineUIUtils._aggregatedStatsKey = Symbol('aggregatedStats'); |
1796 | 1796 |
1797 | 1797 |
1798 /** | 1798 /** |
1799 * @unrestricted | 1799 * @unrestricted |
1800 */ | 1800 */ |
1801 Timeline.TimelineUIUtils.InvalidationsGroupElement = class extends TreeElement { | 1801 Timeline.TimelineUIUtils.InvalidationsGroupElement = class extends UI.TreeElemen
t { |
1802 /** | 1802 /** |
1803 * @param {!SDK.Target} target | 1803 * @param {!SDK.Target} target |
1804 * @param {?Map<number, ?SDK.DOMNode>} relatedNodesMap | 1804 * @param {?Map<number, ?SDK.DOMNode>} relatedNodesMap |
1805 * @param {!Timeline.TimelineDetailsContentHelper} contentHelper | 1805 * @param {!Timeline.TimelineDetailsContentHelper} contentHelper |
1806 * @param {!Array.<!TimelineModel.InvalidationTrackingEvent>} invalidations | 1806 * @param {!Array.<!TimelineModel.InvalidationTrackingEvent>} invalidations |
1807 */ | 1807 */ |
1808 constructor(target, relatedNodesMap, contentHelper, invalidations) { | 1808 constructor(target, relatedNodesMap, contentHelper, invalidations) { |
1809 super('', true); | 1809 super('', true); |
1810 | 1810 |
1811 this.listItemElement.classList.add('header'); | 1811 this.listItemElement.classList.add('header'); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1886 Common.UIString('(changed attribute to "%s"%s)', invalidation.chan
gedAttribute, extraData)); | 1886 Common.UIString('(changed attribute to "%s"%s)', invalidation.chan
gedAttribute, extraData)); |
1887 } else if (invalidation.changedPseudo) { | 1887 } else if (invalidation.changedPseudo) { |
1888 nodeList.createTextChild( | 1888 nodeList.createTextChild( |
1889 Common.UIString('(changed pesudo to "%s"%s)', invalidation.changed
Pseudo, extraData)); | 1889 Common.UIString('(changed pesudo to "%s"%s)', invalidation.changed
Pseudo, extraData)); |
1890 } else if (invalidation.selectorPart) { | 1890 } else if (invalidation.selectorPart) { |
1891 nodeList.createTextChild(Common.UIString('(changed "%s"%s)', invalidat
ion.selectorPart, extraData)); | 1891 nodeList.createTextChild(Common.UIString('(changed "%s"%s)', invalidat
ion.selectorPart, extraData)); |
1892 } | 1892 } |
1893 } | 1893 } |
1894 } | 1894 } |
1895 | 1895 |
1896 var contentTreeElement = new TreeElement(content, false); | 1896 var contentTreeElement = new UI.TreeElement(content, false); |
1897 contentTreeElement.selectable = false; | 1897 contentTreeElement.selectable = false; |
1898 this.appendChild(contentTreeElement); | 1898 this.appendChild(contentTreeElement); |
1899 } | 1899 } |
1900 | 1900 |
1901 /** | 1901 /** |
1902 * @param {!Element} parentElement | 1902 * @param {!Element} parentElement |
1903 * @param {!Array.<!TimelineModel.InvalidationTrackingEvent>} invalidations | 1903 * @param {!Array.<!TimelineModel.InvalidationTrackingEvent>} invalidations |
1904 */ | 1904 */ |
1905 _appendTruncatedNodeList(parentElement, invalidations) { | 1905 _appendTruncatedNodeList(parentElement, invalidations) { |
1906 var invalidationNodes = []; | 1906 var invalidationNodes = []; |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2235 /** | 2235 /** |
2236 * @param {!SDK.TracingModel.Event} event | 2236 * @param {!SDK.TracingModel.Event} event |
2237 * @param {string=} warningType | 2237 * @param {string=} warningType |
2238 */ | 2238 */ |
2239 appendWarningRow(event, warningType) { | 2239 appendWarningRow(event, warningType) { |
2240 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); | 2240 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); |
2241 if (warning) | 2241 if (warning) |
2242 this.appendElementRow(Common.UIString('Warning'), warning, true); | 2242 this.appendElementRow(Common.UIString('Warning'), warning, true); |
2243 } | 2243 } |
2244 }; | 2244 }; |
OLD | NEW |