| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 */ | 7 */ |
| 8 WebInspector.RemoteObjectPreviewFormatter = function() | 8 WebInspector.RemoteObjectPreviewFormatter = function() |
| 9 { | 9 { |
| 10 } | 10 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 { | 147 { |
| 148 var span = createElementWithClass("span", "object-value-" + (subtype ||
type)); | 148 var span = createElementWithClass("span", "object-value-" + (subtype ||
type)); |
| 149 description = description || ""; | 149 description = description || ""; |
| 150 | 150 |
| 151 if (type === "function") { | 151 if (type === "function") { |
| 152 span.textContent = "function"; | 152 span.textContent = "function"; |
| 153 return span; | 153 return span; |
| 154 } | 154 } |
| 155 | 155 |
| 156 if (type === "object" && subtype === "node" && description) { | 156 if (type === "object" && subtype === "node" && description) { |
| 157 span.classList.add("object-value-preview-node"); | |
| 158 WebInspector.DOMPresentationUtils.createSpansForNodeTitle(span, desc
ription); | 157 WebInspector.DOMPresentationUtils.createSpansForNodeTitle(span, desc
ription); |
| 159 return span; | 158 return span; |
| 160 } | 159 } |
| 161 | 160 |
| 162 if (type === "string") { | 161 if (type === "string") { |
| 163 span.createTextChildren("\"", description.replace(/\n/g, "\u21B5"),
"\""); | 162 span.createTextChildren("\"", description.replace(/\n/g, "\u21B5"),
"\""); |
| 164 return span; | 163 return span; |
| 165 } | 164 } |
| 166 | 165 |
| 167 if (type === "object" && !subtype) { | 166 if (type === "object" && !subtype) { |
| 168 span.textContent = this._abbreviateFullQualifiedClassName(descriptio
n); | 167 span.textContent = this._abbreviateFullQualifiedClassName(descriptio
n); |
| 169 return span; | 168 return span; |
| 170 } | 169 } |
| 171 | 170 |
| 172 span.textContent = description; | 171 span.textContent = description; |
| 173 return span; | 172 return span; |
| 174 } | 173 } |
| 175 } | 174 } |
| OLD | NEW |