Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2606013002: DevTools: Preserve the selection in StylesSideBar more often (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.isComponentSel ectionCollapsed())
einbinder 2016/12/29 08:58:45 This feels pretty magical. Ideally we would have a
dgozman 2016/12/29 19:02:58 Does shadow dom v1 solve that? I think that we onl
dgozman 2016/12/30 00:42:33 if (this.propertiesTreeOutline.element.shadowRoot.
einbinder 2016/12/30 02:17:37 Done.
1244 return;
1245
1243 if (this._checkWillCancelEditing()) 1246 if (this._checkWillCancelEditing())
1244 return; 1247 return;
1245 1248
1246 if (event.target.classList.contains('header') || this.element.classList.cont ains('read-only') || 1249 if (event.target.classList.contains('header') || this.element.classList.cont ains('read-only') ||
1247 event.target.enclosingNodeOrSelfWithClass('media')) { 1250 event.target.enclosingNodeOrSelfWithClass('media')) {
1248 event.consume(); 1251 event.consume();
1249 return; 1252 return;
1250 } 1253 }
1251 this.addNewBlankProperty().startEditing(); 1254 this.addNewBlankProperty().startEditing();
1252 event.consume(true); 1255 event.consume(true);
(...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 } 3079 }
3077 3080
3078 /** 3081 /**
3079 * @override 3082 * @override
3080 * @return {!UI.ToolbarItem} 3083 * @return {!UI.ToolbarItem}
3081 */ 3084 */
3082 item() { 3085 item() {
3083 return this._button; 3086 return this._button;
3084 } 3087 }
3085 }; 3088 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698