| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 if (!this.editable) | 1233 if (!this.editable) |
| 1234 return; | 1234 return; |
| 1235 | 1235 |
| 1236 var targetElement = event.deepElementFromPoint(); | 1236 var targetElement = event.deepElementFromPoint(); |
| 1237 if (targetElement && !targetElement.isComponentSelectionCollapsed()) | 1237 if (targetElement && !targetElement.isComponentSelectionCollapsed()) |
| 1238 return; | 1238 return; |
| 1239 | 1239 |
| 1240 if (!event.target.isComponentSelectionCollapsed()) | 1240 if (!event.target.isComponentSelectionCollapsed()) |
| 1241 return; | 1241 return; |
| 1242 | 1242 |
| 1243 if (this.propertiesTreeOutline.element.shadowRoot.firstChild && |
| 1244 !this.propertiesTreeOutline.element.shadowRoot.firstChild.isComponentSel
ectionCollapsed()) |
| 1245 return; |
| 1246 |
| 1243 if (this._checkWillCancelEditing()) | 1247 if (this._checkWillCancelEditing()) |
| 1244 return; | 1248 return; |
| 1245 | 1249 |
| 1246 if (event.target.classList.contains('header') || this.element.classList.cont
ains('read-only') || | 1250 if (event.target.classList.contains('header') || this.element.classList.cont
ains('read-only') || |
| 1247 event.target.enclosingNodeOrSelfWithClass('media')) { | 1251 event.target.enclosingNodeOrSelfWithClass('media')) { |
| 1248 event.consume(); | 1252 event.consume(); |
| 1249 return; | 1253 return; |
| 1250 } | 1254 } |
| 1251 this.addNewBlankProperty().startEditing(); | 1255 this.addNewBlankProperty().startEditing(); |
| 1252 event.consume(true); | 1256 event.consume(true); |
| (...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3076 } | 3080 } |
| 3077 | 3081 |
| 3078 /** | 3082 /** |
| 3079 * @override | 3083 * @override |
| 3080 * @return {!UI.ToolbarItem} | 3084 * @return {!UI.ToolbarItem} |
| 3081 */ | 3085 */ |
| 3082 item() { | 3086 item() { |
| 3083 return this._button; | 3087 return this._button; |
| 3084 } | 3088 } |
| 3085 }; | 3089 }; |
| OLD | NEW |