| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 this.listElement.className = "breakpoint-list"; | 41 this.listElement.className = "breakpoint-list"; |
| 42 | 42 |
| 43 this.emptyElement = document.createElement("div"); | 43 this.emptyElement = document.createElement("div"); |
| 44 this.emptyElement.className = "info"; | 44 this.emptyElement.className = "info"; |
| 45 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints"); | 45 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints"); |
| 46 | 46 |
| 47 this.bodyElement.appendChild(this.emptyElement); | 47 this.bodyElement.appendChild(this.emptyElement); |
| 48 } | 48 } |
| 49 | 49 |
| 50 WebInspector.NativeBreakpointsSidebarPane.prototype = { | 50 WebInspector.NativeBreakpointsSidebarPane.prototype = { |
| 51 _addListElement: function(element, beforeElement) | 51 /** |
| 52 * @param {!Element} element |
| 53 * @param {?Element=} beforeElement |
| 54 */ |
| 55 addListElement: function(element, beforeElement) |
| 52 { | 56 { |
| 53 if (beforeElement) | 57 if (beforeElement) { |
| 54 this.listElement.insertBefore(element, beforeElement); | 58 this.listElement.insertBefore(element, beforeElement); |
| 55 else { | 59 } else { |
| 56 if (!this.listElement.firstChild) { | 60 if (!this.listElement.firstChild) { |
| 57 this.bodyElement.removeChild(this.emptyElement); | 61 this.bodyElement.removeChild(this.emptyElement); |
| 58 this.bodyElement.appendChild(this.listElement); | 62 this.bodyElement.appendChild(this.listElement); |
| 59 } | 63 } |
| 60 this.listElement.appendChild(element); | 64 this.listElement.appendChild(element); |
| 61 } | 65 } |
| 62 }, | 66 }, |
| 63 | 67 |
| 64 _removeListElement: function(element) | 68 /** |
| 69 * @param {!Element} element |
| 70 */ |
| 71 removeListElement: function(element) |
| 65 { | 72 { |
| 66 this.listElement.removeChild(element); | 73 this.listElement.removeChild(element); |
| 67 if (!this.listElement.firstChild) { | 74 if (!this.listElement.firstChild) { |
| 68 this.bodyElement.removeChild(this.listElement); | 75 this.bodyElement.removeChild(this.listElement); |
| 69 this.bodyElement.appendChild(this.emptyElement); | 76 this.bodyElement.appendChild(this.emptyElement); |
| 70 } | 77 } |
| 71 }, | 78 }, |
| 72 | 79 |
| 73 _reset: function() | 80 reset: function() |
| 74 { | 81 { |
| 75 this.listElement.removeChildren(); | 82 this.listElement.removeChildren(); |
| 76 if (this.listElement.parentElement) { | 83 if (this.listElement.parentElement) { |
| 77 this.bodyElement.removeChild(this.listElement); | 84 this.bodyElement.removeChild(this.listElement); |
| 78 this.bodyElement.appendChild(this.emptyElement); | 85 this.bodyElement.appendChild(this.emptyElement); |
| 79 } | 86 } |
| 80 }, | 87 }, |
| 81 | 88 |
| 82 __proto__: WebInspector.SidebarPane.prototype | 89 __proto__: WebInspector.SidebarPane.prototype |
| 83 } | 90 } |
| OLD | NEW |