Changeset 143159 in webkit
- Timestamp:
- Feb 17, 2013 11:51:52 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r143157 r143159 1 2013-02-15 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: Introduce ProfilesPanelDescriptor. 4 https://bugs.webkit.org/show_bug.cgi?id=109906 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/profiler/heap-snapshot-test.js: Adopted changes. 9 1 10 2013-02-17 Takashi Toyoshima <toyoshim@chromium.org> 2 11 -
trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js
r142460 r143159 723 723 var profileType = WebInspector.panels.profiles.getProfileType(WebInspector.HeapSnapshotProfileType.TypeId); 724 724 var profile = profileType.createProfile({ 725 title: UserInitiatedProfileName + "." + uid,725 title: WebInspector.ProfilesPanelDescriptor.UserInitiatedProfileName + "." + uid, 726 726 uid: uid, 727 727 maxJSObjectId: snapshot.maxJSObjectId -
trunk/Source/WebCore/ChangeLog
r143152 r143159 1 2013-02-15 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: Introduce ProfilesPanelDescriptor. 4 https://bugs.webkit.org/show_bug.cgi?id=109906 5 6 Reviewed by Pavel Feldman. 7 8 Some constants/methods should be accesible before ProfilesPanel 9 is instantiated. 10 11 Extracted methods to check if profile is "user-initiated" and what is 12 its index. 13 14 Also profile URL regexp moved to ProfilesPanelDescriptor. 15 16 * inspector/front-end/ProfilesPanelDescriptor.js: Added. 17 * WebCore.gypi: Added ProfilesPanelDescriptor.js 18 * WebCore.vcproj/WebCore.vcproj: Ditto. 19 * inspector/compile-front-end.py: Ditto. 20 * inspector/front-end/WebKit.qrc: Ditto. 21 * inspector/front-end/inspector.html: Ditto. 22 * inspector/front-end/HeapSnapshotView.js: Adopted changes. 23 * inspector/front-end/ProfilesPanel.js: Ditto. 24 * inspector/front-end/externs.js: Ditto. 25 * inspector/front-end/inspector.js: Ditto. 26 1 27 2013-02-17 Dimitri Glazkov <dglazkov@chromium.org> 2 28 -
trunk/Source/WebCore/WebCore.gypi
r143136 r143159 5255 5255 'inspector/front-end/Popover.js', 5256 5256 'inspector/front-end/PresentationConsoleMessageHelper.js', 5257 'inspector/front-end/ProfilesPanelDescriptor.js', 5257 5258 'inspector/front-end/Progress.js', 5258 5259 'inspector/front-end/ProgressIndicator.js', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r143090 r143159 77627 77627 </File> 77628 77628 <File 77629 RelativePath="..\inspector\front-end\ProfilesPanelDescriptor.js" 77630 > 77631 </File> 77632 <File 77629 77633 RelativePath="..\inspector\front-end\Progress.js" 77630 77634 > -
trunk/Source/WebCore/inspector/compile-front-end.py
r142976 r143159 349 349 "ProfileDataGridTree.js", 350 350 "ProfilesPanel.js", 351 "ProfilesPanelDescriptor.js", 351 352 "ProfileLauncherView.js", 352 353 "TopDownProfileDataGridTree.js", -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js
r142870 r143159 699 699 var baseOption = document.createElement("option"); 700 700 var title = list[i].title; 701 if ( !title.indexOf(UserInitiatedProfileName))702 title = WebInspector.UIString("Snapshot %d", title.substring(UserInitiatedProfileName.length + 1));701 if (WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(title)) 702 title = WebInspector.UIString("Snapshot %d", WebInspector.ProfilesPanelDescriptor.userInitiatedProfileIndex(title)); 703 703 baseOption.label = title; 704 704 this.baseSelectElement.appendChild(baseOption); … … 725 725 var filterOption = document.createElement("option"); 726 726 var title = list[i].title; 727 if (!title.indexOf(UserInitiatedProfileName)) { 727 if (WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(title)) { 728 var profileIndex = WebInspector.ProfilesPanelDescriptor.userInitiatedProfileIndex(title); 728 729 if (!i) 729 title = WebInspector.UIString("Objects allocated before Snapshot %d", title.substring(UserInitiatedProfileName.length + 1));730 title = WebInspector.UIString("Objects allocated before Snapshot %d", profileIndex); 730 731 else 731 title = WebInspector.UIString("Objects allocated between Snapshots %d and %d", title.substring(UserInitiatedProfileName.length + 1) - 1, title.substring(UserInitiatedProfileName.length + 1));732 title = WebInspector.UIString("Objects allocated between Snapshots %d and %d", profileIndex - 1, profileIndex); 732 733 } 733 734 filterOption.label = title; -
trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js
r142870 r143159 341 341 342 342 var profileType = this.getProfileType(WebInspector.HeapSnapshotProfileType.TypeId); 343 var temporaryProfile = profileType.createTemporaryProfile( UserInitiatedProfileName + "." + file.name);343 var temporaryProfile = profileType.createTemporaryProfile(WebInspector.ProfilesPanelDescriptor.UserInitiatedProfileName + "." + file.name); 344 344 this.addProfileHeader(temporaryProfile); 345 345 … … 557 557 this._profilesIdMap[this._makeKey(profile.uid, typeId)] = profile; 558 558 559 if (! profile.title.startsWith(UserInitiatedProfileName)) {559 if (!WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(profile.title)) { 560 560 var profileTitleKey = this._makeTitleKey(profile.title, typeId); 561 561 if (!(profileTitleKey in this._profileGroups)) … … 790 790 showProfileForURL: function(url) 791 791 { 792 var match = url.match(WebInspector.Profile URLRegExp);792 var match = url.match(WebInspector.ProfilesPanelDescriptor.ProfileURLRegExp); 793 793 if (!match) 794 794 return; … … 1396 1396 this._titleFormat = titleFormat; 1397 1397 1398 if ( this.profile.title.startsWith(UserInitiatedProfileName))1399 this._profileNumber = this.profile.title.substring(UserInitiatedProfileName.length + 1);1398 if (WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(this.profile.title)) 1399 this._profileNumber = WebInspector.ProfilesPanelDescriptor.userInitiatedProfileIndex(this.profile.title); 1400 1400 1401 1401 WebInspector.SidebarTreeElement.call(this, className, "", "", profile, false); … … 1421 1421 if (this._mainTitle) 1422 1422 return this._mainTitle; 1423 if ( this.profile.title.startsWith(UserInitiatedProfileName))1423 if (WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(this.profile.title)) 1424 1424 return WebInspector.UIString(this._titleFormat, this._profileNumber); 1425 1425 return this.profile.title; -
trunk/Source/WebCore/inspector/front-end/WebKit.qrc
r142862 r143159 140 140 <file>ProfileLauncherView.js</file> 141 141 <file>ProfilesPanel.js</file> 142 <file>ProfilesPanelDescriptor.js</file> 142 143 <file>Progress.js</file> 143 144 <file>ProgressIndicator.js</file> -
trunk/Source/WebCore/inspector/front-end/externs.js
r143000 r143159 330 330 WebInspector.CodeMirrorTextEditor = function(url, delegate) { } 331 331 332 WebInspector.ProfileURLRegExp = "";333 334 335 332 /** @type {boolean} */ 336 333 window.dispatchStandaloneTestRunnerMessages; -
trunk/Source/WebCore/inspector/front-end/inspector.html
r142610 r143159 178 178 <script type="text/javascript" src="ElementsPanelDescriptor.js"></script> 179 179 <script type="text/javascript" src="NetworkPanelDescriptor.js"></script> 180 <script type="text/javascript" src="ProfilesPanelDescriptor.js"></script> 180 181 <script type="text/javascript" src="ScriptsPanelDescriptor.js"></script> 181 182 <script type="text/javascript" src="TimelinePanelDescriptor.js"></script> -
trunk/Source/WebCore/inspector/front-end/inspector.js
r142614 r143159 43 43 var scripts = new WebInspector.ScriptsPanelDescriptor(); 44 44 var timeline = new WebInspector.TimelinePanelDescriptor(); 45 var profiles = new WebInspector.P anelDescriptor("profiles", WebInspector.UIString("Profiles"), "ProfilesPanel", "ProfilesPanel.js");45 var profiles = new WebInspector.ProfilesPanelDescriptor(); 46 46 var audits = new WebInspector.PanelDescriptor("audits", WebInspector.UIString("Audits"), "AuditsPanel", "AuditsPanel.js"); 47 47 var console = new WebInspector.PanelDescriptor("console", WebInspector.UIString("Console"), "ConsolePanel"); … … 275 275 _profilesLinkifier: function(title) 276 276 { 277 var profileStringMatches = WebInspector.Profile URLRegExp.exec(title);277 var profileStringMatches = WebInspector.ProfilesPanelDescriptor.ProfileURLRegExp.exec(title); 278 278 if (profileStringMatches) { 279 279 var profilesPanel = /** @ type {WebInspector.ProfilesPanel} */ WebInspector.panel("profiles"); … … 583 583 { 584 584 var anchor = event.target.enclosingNodeOrSelfWithNodeName("a"); 585 if (!anchor || (anchor.target === "_blank" && !WebInspector.Profile URLRegExp.exec(anchor.href)))585 if (!anchor || (anchor.target === "_blank" && !WebInspector.ProfilesPanelDescriptor.ProfileURLRegExp.exec(anchor.href))) 586 586 return; 587 587 … … 594 594 return; 595 595 596 const profileMatch = WebInspector.Profile URLRegExp.exec(anchor.href);596 const profileMatch = WebInspector.ProfilesPanelDescriptor.ProfileURLRegExp.exec(anchor.href); 597 597 if (profileMatch) { 598 598 WebInspector.showProfileForURL(anchor.href); … … 1005 1005 } 1006 1006 1007 WebInspector.ProfileURLRegExp = /webkit-profile:\/\/(.+)\/(.+)#([0-9]+)/;1008 1009 1007 WebInspector.Zoom = { 1010 1008 Table: [0.25, 0.33, 0.5, 0.66, 0.75, 0.9, 1, 1.1, 1.25, 1.5, 1.75, 2, 2.5, 3, 4, 5],
Note: See TracChangeset
for help on using the changeset viewer.