Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.HBox} | 7 * @extends {WebInspector.HBox} |
| 8 */ | 8 */ |
| 9 WebInspector.ElementsBreadcrumbs = function() | 9 WebInspector.ElementsBreadcrumbs = function() |
| 10 { | 10 { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 break; | 170 break; |
| 171 | 171 |
| 172 default: | 172 default: |
| 173 crumbTitle = current.nodeNameInCorrectCase(); | 173 crumbTitle = current.nodeNameInCorrectCase(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 if (!crumb.childNodes.length) { | 176 if (!crumb.childNodes.length) { |
| 177 var nameElement = createElement("span"); | 177 var nameElement = createElement("span"); |
| 178 nameElement.textContent = crumbTitle; | 178 nameElement.textContent = crumbTitle; |
| 179 crumb.appendChild(nameElement); | 179 crumb.appendChild(nameElement); |
| 180 crumb.title = crumbTitle; | |
|
paulirish
2015/07/30 07:20:49
since the breadcrumb list is often "div > div > di
samli
2015/07/30 08:02:33
DOMPresentationUtils is the one you're looking at.
samli
2015/08/06 03:51:16
Reverted.
| |
| 181 } | 180 } |
| 182 | 181 |
| 183 if (current === currentDOMNode) | 182 if (current === currentDOMNode) |
| 184 crumb.classList.add("selected"); | 183 crumb.classList.add("selected"); |
| 185 crumbs.insertBefore(crumb, crumbs.firstChild); | 184 crumbs.insertBefore(crumb, crumbs.firstChild); |
| 186 } | 185 } |
| 187 | 186 |
| 188 this.updateSizes(); | 187 this.updateSizes(); |
| 189 }, | 188 }, |
| 190 | 189 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 427 compact(selectedCrumb); | 426 compact(selectedCrumb); |
| 428 if (crumbsAreSmallerThanContainer()) | 427 if (crumbsAreSmallerThanContainer()) |
| 429 return; | 428 return; |
| 430 | 429 |
| 431 // Collapse the selected crumb as a last resort. Pass true to prevent co alescing. | 430 // Collapse the selected crumb as a last resort. Pass true to prevent co alescing. |
| 432 collapse(selectedCrumb, true); | 431 collapse(selectedCrumb, true); |
| 433 }, | 432 }, |
| 434 | 433 |
| 435 __proto__: WebInspector.HBox.prototype | 434 __proto__: WebInspector.HBox.prototype |
| 436 } | 435 } |
| OLD | NEW |