| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 _addWelcomeMessage: function(profileType) | 256 _addWelcomeMessage: function(profileType) |
| 257 { | 257 { |
| 258 var message = profileType.welcomeMessage; | 258 var message = profileType.welcomeMessage; |
| 259 // Message text is supposed to have a '%s' substring as a placeholder | 259 // Message text is supposed to have a '%s' substring as a placeholder |
| 260 // for a status bar button. If it is there, we split the message in two | 260 // for a status bar button. If it is there, we split the message in two |
| 261 // parts, and insert the button between them. | 261 // parts, and insert the button between them. |
| 262 var buttonPos = message.indexOf("%s"); | 262 var buttonPos = message.indexOf("%s"); |
| 263 if (buttonPos > -1) { | 263 if (buttonPos > -1) { |
| 264 var container = document.createDocumentFragment(); | 264 var container = document.createDocumentFragment(); |
| 265 var part1 = document.createElement("span"); | 265 var part1 = document.createElement("span"); |
| 266 part1.innerHTML = message.substr(0, buttonPos); | 266 part1.textContent = message.substr(0, buttonPos); |
| 267 container.appendChild(part1); | 267 container.appendChild(part1); |
| 268 | 268 |
| 269 var button = new WebInspector.StatusBarButton(profileType.buttonTool
tip, profileType.buttonStyle, profileType.buttonCaption); | 269 var button = new WebInspector.StatusBarButton(profileType.buttonTool
tip, profileType.buttonStyle, profileType.buttonCaption); |
| 270 container.appendChild(button.element); | 270 container.appendChild(button.element); |
| 271 | 271 |
| 272 var part2 = document.createElement("span"); | 272 var part2 = document.createElement("span"); |
| 273 part2.innerHTML = message.substr(buttonPos + 2); | 273 part2.textContent = message.substr(buttonPos + 2); |
| 274 container.appendChild(part2); | 274 container.appendChild(part2); |
| 275 this.welcomeView.addMessage(container); | 275 this.welcomeView.addMessage(container); |
| 276 } else | 276 } else |
| 277 this.welcomeView.addMessage(message); | 277 this.welcomeView.addMessage(message); |
| 278 }, | 278 }, |
| 279 | 279 |
| 280 _makeKey: function(text, profileTypeId) | 280 _makeKey: function(text, profileTypeId) |
| 281 { | 281 { |
| 282 return escape(text) + '/' + escape(profileTypeId); | 282 return escape(text) + '/' + escape(profileTypeId); |
| 283 }, | 283 }, |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 | 906 |
| 907 WebInspector.ProfileGroupSidebarTreeElement.prototype = { | 907 WebInspector.ProfileGroupSidebarTreeElement.prototype = { |
| 908 onselect: function() | 908 onselect: function() |
| 909 { | 909 { |
| 910 if (this.children.length > 0) | 910 if (this.children.length > 0) |
| 911 WebInspector.panels.profiles.showProfile(this.children[this.children
.length - 1].profile); | 911 WebInspector.panels.profiles.showProfile(this.children[this.children
.length - 1].profile); |
| 912 } | 912 } |
| 913 } | 913 } |
| 914 | 914 |
| 915 WebInspector.ProfileGroupSidebarTreeElement.prototype.__proto__ = WebInspector.S
idebarTreeElement.prototype; | 915 WebInspector.ProfileGroupSidebarTreeElement.prototype.__proto__ = WebInspector.S
idebarTreeElement.prototype; |
| OLD | NEW |