| 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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 callSiteStackLabel = WebInspector.UIString("First layout invalidation"); | 692 callSiteStackLabel = WebInspector.UIString("First layout invalidation"); |
| 693 stackLabel = WebInspector.UIString("Layout forced"); | 693 stackLabel = WebInspector.UIString("Layout forced"); |
| 694 break; | 694 break; |
| 695 } | 695 } |
| 696 | 696 |
| 697 // Direct cause. | 697 // Direct cause. |
| 698 if (event.stackTrace) | 698 if (event.stackTrace) |
| 699 contentHelper.appendStackTrace(stackLabel || WebInspector.UIString("Stac
k trace"), event.stackTrace); | 699 contentHelper.appendStackTrace(stackLabel || WebInspector.UIString("Stac
k trace"), event.stackTrace); |
| 700 | 700 |
| 701 // Indirect causes. | 701 // Indirect causes. |
| 702 if (event.invalidationTrackingEvents) { // Full invalidation tracking (exper
imental). | 702 if (event.invalidationTrackingEvents && target) { // Full invalidation track
ing (experimental). |
| 703 WebInspector.TimelineUIUtils._generateInvalidations(event, target, conte
ntHelper); | 703 WebInspector.TimelineUIUtils._generateInvalidations(event, target, conte
ntHelper); |
| 704 } else if (initiator && initiator.stackTrace) { // Partial invalidation trac
king. | 704 } else if (initiator && initiator.stackTrace) { // Partial invalidation trac
king. |
| 705 contentHelper.appendStackTrace(callSiteStackLabel || WebInspector.UIStri
ng("First invalidated"), initiator.stackTrace); | 705 contentHelper.appendStackTrace(callSiteStackLabel || WebInspector.UIStri
ng("First invalidated"), initiator.stackTrace); |
| 706 } | 706 } |
| 707 } | 707 } |
| 708 | 708 |
| 709 /** | 709 /** |
| 710 * @param {!WebInspector.TracingModel.Event} event | 710 * @param {!WebInspector.TracingModel.Event} event |
| 711 * @param {?WebInspector.Target} target | 711 * @param {!WebInspector.Target} target |
| 712 * @param {!WebInspector.TimelineDetailsContentHelper} contentHelper | 712 * @param {!WebInspector.TimelineDetailsContentHelper} contentHelper |
| 713 */ | 713 */ |
| 714 WebInspector.TimelineUIUtils._generateInvalidations = function(event, target, co
ntentHelper) | 714 WebInspector.TimelineUIUtils._generateInvalidations = function(event, target, co
ntentHelper) |
| 715 { | 715 { |
| 716 if (!event.invalidationTrackingEvents) | 716 if (!event.invalidationTrackingEvents) |
| 717 return; | 717 return; |
| 718 | 718 |
| 719 var invalidations = {}; | 719 var invalidations = {}; |
| 720 event.invalidationTrackingEvents.forEach(function(invalidation) { | 720 event.invalidationTrackingEvents.forEach(function(invalidation) { |
| 721 if (!invalidations[invalidation.type]) | 721 if (!invalidations[invalidation.type]) |
| 722 invalidations[invalidation.type] = [invalidation]; | 722 invalidations[invalidation.type] = [invalidation]; |
| 723 else | 723 else |
| 724 invalidations[invalidation.type].push(invalidation); | 724 invalidations[invalidation.type].push(invalidation); |
| 725 }); | 725 }); |
| 726 | 726 |
| 727 Object.keys(invalidations).forEach(function(type) { | 727 Object.keys(invalidations).forEach(function(type) { |
| 728 WebInspector.TimelineUIUtils._generateInvalidationsForType( | 728 WebInspector.TimelineUIUtils._generateInvalidationsForType( |
| 729 type, target, invalidations[type], contentHelper); | 729 type, target, invalidations[type], contentHelper); |
| 730 }); | 730 }); |
| 731 } | 731 } |
| 732 | 732 |
| 733 /** | 733 /** |
| 734 * @param {string} type | 734 * @param {string} type |
| 735 * @param {?WebInspector.Target} target | 735 * @param {!WebInspector.Target} target |
| 736 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations | 736 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations |
| 737 * @param {!WebInspector.TimelineDetailsContentHelper} contentHelper | 737 * @param {!WebInspector.TimelineDetailsContentHelper} contentHelper |
| 738 */ | 738 */ |
| 739 WebInspector.TimelineUIUtils._generateInvalidationsForType = function(type, targ
et, invalidations, contentHelper) | 739 WebInspector.TimelineUIUtils._generateInvalidationsForType = function(type, targ
et, invalidations, contentHelper) |
| 740 { | 740 { |
| 741 var title; | 741 var title; |
| 742 switch (type) { | 742 switch (type) { |
| 743 case WebInspector.TimelineModel.RecordType.StyleRecalcInvalidationTracking: | 743 case WebInspector.TimelineModel.RecordType.StyleRecalcInvalidationTracking: |
| 744 title = WebInspector.UIString("Style invalidations"); | 744 title = WebInspector.UIString("Style invalidations"); |
| 745 break; | 745 break; |
| 746 case WebInspector.TimelineModel.RecordType.LayoutInvalidationTracking: | 746 case WebInspector.TimelineModel.RecordType.LayoutInvalidationTracking: |
| 747 title = WebInspector.UIString("Layout invalidations"); | 747 title = WebInspector.UIString("Layout invalidations"); |
| 748 break; | 748 break; |
| 749 default: | 749 default: |
| 750 title = WebInspector.UIString("Other invalidations"); | 750 title = WebInspector.UIString("Other invalidations"); |
| 751 break; | 751 break; |
| 752 } | 752 } |
| 753 | 753 |
| 754 var detailsNode = createElementWithClass("div", "timeline-details-view-row")
; | 754 var detailsNode = createElementWithClass("div", "timeline-details-view-row")
; |
| 755 var titleElement = detailsNode.createChild("span", "timeline-details-view-ro
w-title"); | 755 var titleElement = detailsNode.createChild("span", "timeline-details-view-ro
w-title"); |
| 756 titleElement.textContent = WebInspector.UIString("%s: ", title); | 756 titleElement.textContent = WebInspector.UIString("%s: ", title); |
| 757 var eventsList = detailsNode.createChild("div", "timeline-details-view-row-v
alue"); | 757 |
| 758 var invalidationsTreeOutline = new TreeOutlineInShadow(); |
| 759 invalidationsTreeOutline.registerRequiredCSS("timeline/invalidationsTree.css
"); |
| 760 invalidationsTreeOutline.element.classList.add("timeline-details-view-row-va
lue", "invalidations-tree"); |
| 761 detailsNode.appendChild(invalidationsTreeOutline.element); |
| 762 |
| 758 var invalidationGroups = groupInvalidationsByCause(invalidations); | 763 var invalidationGroups = groupInvalidationsByCause(invalidations); |
| 759 invalidationGroups.forEach(function(group) { | 764 invalidationGroups.forEach(function(group) { |
| 760 appendInvalidationGroup(eventsList, group); | 765 var groupElement = new WebInspector.TimelineUIUtils.InvalidationsGroupEl
ement(target, contentHelper, group); |
| 766 invalidationsTreeOutline.appendChild(groupElement); |
| 761 }); | 767 }); |
| 762 contentHelper.element.appendChild(detailsNode); | 768 contentHelper.element.appendChild(detailsNode); |
| 763 | 769 |
| 764 /** | 770 /** |
| 765 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations | 771 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations |
| 766 */ | 772 */ |
| 767 function groupInvalidationsByCause(invalidations) | 773 function groupInvalidationsByCause(invalidations) |
| 768 { | 774 { |
| 769 var causeToInvalidationMap = {}; | 775 var causeToInvalidationMap = {}; |
| 770 for (var index = 0; index < invalidations.length; index++) { | 776 for (var index = 0; index < invalidations.length; index++) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 782 }); | 788 }); |
| 783 } | 789 } |
| 784 | 790 |
| 785 if (causeToInvalidationMap[causeKey]) | 791 if (causeToInvalidationMap[causeKey]) |
| 786 causeToInvalidationMap[causeKey].push(invalidation); | 792 causeToInvalidationMap[causeKey].push(invalidation); |
| 787 else | 793 else |
| 788 causeToInvalidationMap[causeKey] = [ invalidation ]; | 794 causeToInvalidationMap[causeKey] = [ invalidation ]; |
| 789 } | 795 } |
| 790 return Object.values(causeToInvalidationMap); | 796 return Object.values(causeToInvalidationMap); |
| 791 } | 797 } |
| 798 } |
| 799 |
| 800 /** |
| 801 * @param {!Set<number>} nodeIds |
| 802 * @param {!WebInspector.InvalidationTrackingEvent} invalidations |
| 803 */ |
| 804 WebInspector.TimelineUIUtils._collectInvalidationNodeIds = function(nodeIds, inv
alidations) |
| 805 { |
| 806 for (var i = 0; i < invalidations.length; ++i) { |
| 807 if (invalidations[i].nodeId) |
| 808 nodeIds.add(invalidations[i].nodeId); |
| 809 } |
| 810 } |
| 811 |
| 812 /** |
| 813 * @constructor |
| 814 * @param {!WebInspector.Target} target |
| 815 * @param {!WebInspector.TimelineDetailsContentHelper} contentHelper |
| 816 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations |
| 817 * @extends {TreeElement} |
| 818 */ |
| 819 WebInspector.TimelineUIUtils.InvalidationsGroupElement = function(target, conten
tHelper, invalidations) |
| 820 { |
| 821 TreeElement.call(this, "", true); |
| 822 |
| 823 this.listItemElement.classList.add("header"); |
| 824 this.selectable = false; |
| 825 this.toggleOnClick = true; |
| 826 |
| 827 this._contentHelper = contentHelper; |
| 828 this._invalidations = invalidations; |
| 829 this.title = this._createTitle(target); |
| 830 } |
| 831 |
| 832 WebInspector.TimelineUIUtils.InvalidationsGroupElement.prototype = { |
| 833 |
| 834 /** |
| 835 * @param {!WebInspector.Target} target |
| 836 * @return {!Element} |
| 837 */ |
| 838 _createTitle: function(target) |
| 839 { |
| 840 var first = this._invalidations[0]; |
| 841 var reason = first.cause.reason; |
| 842 var topFrame = first.cause.stackTrace && first.cause.stackTrace[0]; |
| 843 |
| 844 var title = createElement("span"); |
| 845 if (reason) |
| 846 title.createTextChild(WebInspector.UIString("%s for ", reason)); |
| 847 else |
| 848 title.createTextChild(WebInspector.UIString("Unknown cause for ")); |
| 849 |
| 850 this._appendTruncatedNodeList(title, this._invalidations); |
| 851 |
| 852 if (topFrame && this._contentHelper.linkifier()) { |
| 853 title.createTextChild(WebInspector.UIString(". ")); |
| 854 var stack = title.createChild("span", "monospace"); |
| 855 stack.createChild("span").textContent = WebInspector.beautifyFunctio
nName(topFrame.functionName); |
| 856 stack.createChild("span").textContent = " @ "; |
| 857 stack.createChild("span").appendChild(this._contentHelper.linkifier(
).linkifyConsoleCallFrame(target, topFrame)); |
| 858 } |
| 859 |
| 860 return title; |
| 861 }, |
| 862 |
| 863 /** |
| 864 * @override |
| 865 */ |
| 866 onpopulate: function() |
| 867 { |
| 868 var content = createElementWithClass("div", "content"); |
| 869 |
| 870 var first = this._invalidations[0]; |
| 871 if (first.cause.stackTrace) { |
| 872 var stack = content.createChild("div"); |
| 873 stack.createTextChild(WebInspector.UIString("Stack trace:")); |
| 874 this._contentHelper.createChildStackTraceElement(stack, first.cause.
stackTrace); |
| 875 } |
| 876 |
| 877 content.createTextChild(this._invalidations.length > 1 ? WebInspector.UI
String("Nodes:") : WebInspector.UIString("Node:")); |
| 878 var nodeList = content.createChild("div", "node-list"); |
| 879 var firstNode = true; |
| 880 for (var i = 0; i < this._invalidations.length; i++) { |
| 881 var invalidation = this._invalidations[i]; |
| 882 var invalidationNode = this._createInvalidationNode(invalidation, tr
ue); |
| 883 if (invalidationNode) { |
| 884 if (!firstNode) |
| 885 nodeList.createTextChild(WebInspector.UIString(", ")); |
| 886 firstNode = false; |
| 887 |
| 888 nodeList.appendChild(invalidationNode); |
| 889 |
| 890 var extraData = invalidation.extraData ? ", " + invalidation.ext
raData : ""; |
| 891 if (invalidation.changedId) |
| 892 nodeList.createTextChild(WebInspector.UIString("(changed id
to \"%s\"%s)", invalidation.changedId, extraData)); |
| 893 else if (invalidation.changedClass) |
| 894 nodeList.createTextChild(WebInspector.UIString("(changed cla
ss to \"%s\"%s)", invalidation.changedClass, extraData)); |
| 895 else if (invalidation.changedAttribute) |
| 896 nodeList.createTextChild(WebInspector.UIString("(changed att
ribute to \"%s\"%s)", invalidation.changedAttribute, extraData)); |
| 897 else if (invalidation.changedPseudo) |
| 898 nodeList.createTextChild(WebInspector.UIString("(changed pes
udo to \"%s\"%s)", invalidation.changedPseudo, extraData)); |
| 899 else if (invalidation.selectorPart) |
| 900 nodeList.createTextChild(WebInspector.UIString("(changed \"%
s\"%s)", invalidation.selectorPart, extraData)); |
| 901 } |
| 902 } |
| 903 |
| 904 var contentTreeElement = new TreeElement(content, false); |
| 905 contentTreeElement.selectable = false; |
| 906 this.appendChild(contentTreeElement); |
| 907 }, |
| 792 | 908 |
| 793 /** | 909 /** |
| 794 * @param {!Element} parentElement | 910 * @param {!Element} parentElement |
| 795 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations | 911 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations |
| 796 */ | 912 */ |
| 797 function appendInvalidationGroup(parentElement, invalidations) | 913 _appendTruncatedNodeList: function(parentElement, invalidations) |
| 798 { | |
| 799 if (!target) | |
| 800 return; | |
| 801 | |
| 802 var row = parentElement.createChild("div", "invalidations-group section"
); | |
| 803 var header = row.createChild("div", "header"); | |
| 804 header.addEventListener("click", function() { | |
| 805 toggleDetails(header, invalidations); | |
| 806 }); | |
| 807 | |
| 808 var first = invalidations[0]; | |
| 809 var reason = first.cause.reason; | |
| 810 var topFrame = first.cause.stackTrace && first.cause.stackTrace[0]; | |
| 811 | |
| 812 if (reason) | |
| 813 header.createTextChild(WebInspector.UIString("%s for ", reason)); | |
| 814 else | |
| 815 header.createTextChild(WebInspector.UIString("Unknown cause for ")); | |
| 816 | |
| 817 appendTruncatedNodeList(header, invalidations); | |
| 818 | |
| 819 if (topFrame && contentHelper.linkifier()) { | |
| 820 header.createTextChild(WebInspector.UIString(". ")); | |
| 821 var stack = header.createChild("span", "monospace"); | |
| 822 | |
| 823 stack.createChild("span").textContent = WebInspector.beautifyFunctio
nName(topFrame.functionName); | |
| 824 stack.createChild("span").textContent = " @ "; | |
| 825 stack.createChild("span").appendChild(contentHelper.linkifier().link
ifyConsoleCallFrame(target, topFrame)); | |
| 826 } | |
| 827 } | |
| 828 | |
| 829 /** | |
| 830 * @param {!WebInspector.InvalidationTrackingEvent} invalidation | |
| 831 * @param {boolean} showUnknownNodes | |
| 832 */ | |
| 833 function createInvalidationNode(invalidation, showUnknownNodes) | |
| 834 { | |
| 835 var node = contentHelper.nodeForBackendId(invalidation.nodeId); | |
| 836 if (node) | |
| 837 return WebInspector.DOMPresentationUtils.linkifyNodeReference(node); | |
| 838 if (invalidation.nodeName) { | |
| 839 var nodeSpan = createElement("span"); | |
| 840 nodeSpan.textContent = WebInspector.UIString("[ %s ]", invalidation.
nodeName); | |
| 841 return nodeSpan; | |
| 842 } | |
| 843 if (showUnknownNodes) { | |
| 844 var nodeSpan = createElement("span"); | |
| 845 return nodeSpan.createTextChild(WebInspector.UIString("[ unknown nod
e ]")); | |
| 846 } | |
| 847 } | |
| 848 | |
| 849 /** | |
| 850 * @param {!Element} parentElement | |
| 851 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations | |
| 852 */ | |
| 853 function appendTruncatedNodeList(parentElement, invalidations) | |
| 854 { | 914 { |
| 855 var invalidationNodes = []; | 915 var invalidationNodes = []; |
| 856 var invalidationNodeIdMap = {}; | 916 var invalidationNodeIdMap = {}; |
| 857 for (var i = 0; i < invalidations.length; i++) { | 917 for (var i = 0; i < invalidations.length; i++) { |
| 858 var invalidation = invalidations[i]; | 918 var invalidation = invalidations[i]; |
| 859 var invalidationNode = createInvalidationNode(invalidation, false); | 919 var invalidationNode = this._createInvalidationNode(invalidation, fa
lse); |
| 920 invalidationNode.addEventListener("click", consumeEvent, false); |
| 860 if (invalidationNode && !invalidationNodeIdMap[invalidation.nodeId])
{ | 921 if (invalidationNode && !invalidationNodeIdMap[invalidation.nodeId])
{ |
| 861 invalidationNodes.push(invalidationNode); | 922 invalidationNodes.push(invalidationNode); |
| 862 invalidationNodeIdMap[invalidation.nodeId] = true; | 923 invalidationNodeIdMap[invalidation.nodeId] = true; |
| 863 } | 924 } |
| 864 } | 925 } |
| 865 | 926 |
| 866 if (invalidationNodes.length === 1) { | 927 if (invalidationNodes.length === 1) { |
| 867 parentElement.appendChild(invalidationNodes[0]); | 928 parentElement.appendChild(invalidationNodes[0]); |
| 868 } else if (invalidationNodes.length === 2) { | 929 } else if (invalidationNodes.length === 2) { |
| 869 parentElement.appendChild(invalidationNodes[0]); | 930 parentElement.appendChild(invalidationNodes[0]); |
| 870 parentElement.createTextChild(WebInspector.UIString(" and ")); | 931 parentElement.createTextChild(WebInspector.UIString(" and ")); |
| 871 parentElement.appendChild(invalidationNodes[1]); | 932 parentElement.appendChild(invalidationNodes[1]); |
| 872 } else if (invalidationNodes.length >= 3) { | 933 } else if (invalidationNodes.length >= 3) { |
| 873 parentElement.appendChild(invalidationNodes[0]); | 934 parentElement.appendChild(invalidationNodes[0]); |
| 874 parentElement.createTextChild(WebInspector.UIString(", ")); | 935 parentElement.createTextChild(WebInspector.UIString(", ")); |
| 875 parentElement.appendChild(invalidationNodes[1]); | 936 parentElement.appendChild(invalidationNodes[1]); |
| 876 parentElement.createTextChild(WebInspector.UIString(", and %s others
", invalidationNodes.length - 2)); | 937 parentElement.createTextChild(WebInspector.UIString(", and %s others
", invalidationNodes.length - 2)); |
| 877 } | 938 } |
| 878 } | 939 }, |
| 879 | 940 |
| 880 /** | 941 /** |
| 881 * @param {!Element} header | 942 * @param {!WebInspector.InvalidationTrackingEvent} invalidation |
| 882 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations | 943 * @param {boolean} showUnknownNodes |
| 883 */ | 944 */ |
| 884 function toggleDetails(header, invalidations) | 945 _createInvalidationNode: function(invalidation, showUnknownNodes) |
| 885 { | 946 { |
| 886 var wasExpanded = header.classList.contains("expanded"); | 947 var node = this._contentHelper.nodeForBackendId(invalidation.nodeId); |
| 887 header.classList.toggle("expanded", !wasExpanded); | 948 if (node) |
| 888 header.parentElement.classList.toggle("expanded", !wasExpanded); | 949 return WebInspector.DOMPresentationUtils.linkifyNodeReference(node); |
| 950 if (invalidation.nodeName) { |
| 951 var nodeSpan = createElement("span"); |
| 952 nodeSpan.textContent = WebInspector.UIString("[ %s ]", invalidation.
nodeName); |
| 953 return nodeSpan; |
| 954 } |
| 955 if (showUnknownNodes) { |
| 956 var nodeSpan = createElement("span"); |
| 957 return nodeSpan.createTextChild(WebInspector.UIString("[ unknown nod
e ]")); |
| 958 } |
| 959 }, |
| 889 | 960 |
| 890 if (wasExpanded) { | 961 __proto__: TreeElement.prototype |
| 891 var content = header.nextElementSibling; | |
| 892 if (content) | |
| 893 content.remove(); | |
| 894 } else { | |
| 895 createInvalidationGroupDetails(header.parentElement, invalidations); | |
| 896 } | |
| 897 } | |
| 898 | |
| 899 /** | |
| 900 * @param {!Element} parentElement | |
| 901 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations | |
| 902 */ | |
| 903 function createInvalidationGroupDetails(parentElement, invalidations) | |
| 904 { | |
| 905 var content = parentElement.createChild("div", "content"); | |
| 906 | |
| 907 var first = invalidations[0]; | |
| 908 if (first.cause.stackTrace) { | |
| 909 var stack = content.createChild("div"); | |
| 910 stack.createTextChild(WebInspector.UIString("Stack trace:")); | |
| 911 contentHelper.createChildStackTraceElement(stack, first.cause.stackT
race); | |
| 912 } | |
| 913 | |
| 914 content.createTextChild(invalidations.length > 1 ? WebInspector.UIString
("Nodes:") : WebInspector.UIString("Node:")); | |
| 915 var nodeList = content.createChild("div", "node-list timeline-details-vi
ew-row-stack-trace"); | |
| 916 appendDetailedNodeList(nodeList, invalidations); | |
| 917 } | |
| 918 | |
| 919 /** | |
| 920 * @param {!Element} parentElement | |
| 921 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations | |
| 922 */ | |
| 923 function appendDetailedNodeList(parentElement, invalidations) | |
| 924 { | |
| 925 var firstNode = true; | |
| 926 for (var i = 0; i < invalidations.length; i++) { | |
| 927 var invalidation = invalidations[i]; | |
| 928 var invalidationNode = createInvalidationNode(invalidation, true); | |
| 929 if (invalidationNode) { | |
| 930 if (!firstNode) | |
| 931 parentElement.createTextChild(WebInspector.UIString(", ")); | |
| 932 firstNode = false; | |
| 933 | |
| 934 parentElement.appendChild(invalidationNode); | |
| 935 | |
| 936 var extraData = invalidation.extraData ? ", " + invalidation.ext
raData : ""; | |
| 937 if (invalidation.changedId) { | |
| 938 parentElement.createTextChild(WebInspector.UIString("(change
d id to \"%s\"%s)", invalidation.changedId, extraData)); | |
| 939 } else if (invalidation.changedClass) { | |
| 940 parentElement.createTextChild(WebInspector.UIString("(change
d class to \"%s\"%s)", invalidation.changedClass, extraData)); | |
| 941 } else if (invalidation.changedAttribute) { | |
| 942 parentElement.createTextChild(WebInspector.UIString("(change
d attribute to \"%s\"%s)", invalidation.changedAttribute, extraData)); | |
| 943 } else if (invalidation.changedPseudo) { | |
| 944 parentElement.createTextChild(WebInspector.UIString("(change
d pesudo to \"%s\"%s)", invalidation.changedPseudo, extraData)); | |
| 945 } else if (invalidation.selectorPart) { | |
| 946 parentElement.createTextChild(WebInspector.UIString("(change
d \"%s\"%s)", invalidation.selectorPart, extraData)); | |
| 947 } | |
| 948 } | |
| 949 } | |
| 950 } | |
| 951 } | 962 } |
| 952 | 963 |
| 953 /** | 964 /** |
| 954 * @param {!Set<number>} nodeIds | |
| 955 * @param {!WebInspector.InvalidationTrackingEvent} invalidations | |
| 956 */ | |
| 957 WebInspector.TimelineUIUtils._collectInvalidationNodeIds = function(nodeIds, inv
alidations) | |
| 958 { | |
| 959 for (var i = 0; i < invalidations.length; ++i) { | |
| 960 if (invalidations[i].nodeId) | |
| 961 nodeIds.add(invalidations[i].nodeId); | |
| 962 } | |
| 963 } | |
| 964 | |
| 965 /** | |
| 966 * @param {!Object} total | 965 * @param {!Object} total |
| 967 * @param {!WebInspector.TimelineModel.Record} record | 966 * @param {!WebInspector.TimelineModel.Record} record |
| 968 */ | 967 */ |
| 969 WebInspector.TimelineUIUtils.aggregateTimeForRecord = function(total, record) | 968 WebInspector.TimelineUIUtils.aggregateTimeForRecord = function(total, record) |
| 970 { | 969 { |
| 971 var traceEvent = record.traceEvent(); | 970 var traceEvent = record.traceEvent(); |
| 972 var model = record.timelineModel(); | 971 var model = record.timelineModel(); |
| 973 WebInspector.TimelineUIUtils._aggregatedStatsForTraceEvent(total, model, tra
ceEvent); | 972 WebInspector.TimelineUIUtils._aggregatedStatsForTraceEvent(total, model, tra
ceEvent); |
| 974 } | 973 } |
| 975 | 974 |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1845 return; | 1844 return; |
| 1846 | 1845 |
| 1847 var stackTraceElement = parentElement.createChild("div", "timeline-detai
ls-view-row-value timeline-details-view-row-stack-trace monospace"); | 1846 var stackTraceElement = parentElement.createChild("div", "timeline-detai
ls-view-row-value timeline-details-view-row-stack-trace monospace"); |
| 1848 | 1847 |
| 1849 var callFrameElem = WebInspector.DOMPresentationUtils.buildStackTracePre
viewContents(this._target, this._linkifier, stackTrace); | 1848 var callFrameElem = WebInspector.DOMPresentationUtils.buildStackTracePre
viewContents(this._target, this._linkifier, stackTrace); |
| 1850 | 1849 |
| 1851 stackTraceElement.appendChild(callFrameElem); | 1850 stackTraceElement.appendChild(callFrameElem); |
| 1852 } | 1851 } |
| 1853 | 1852 |
| 1854 } | 1853 } |
| OLD | NEW |