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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPopoverHelper.js

Issue 2723623002: DevTools: fix object popover title (Closed)
Patch Set: Created 3 years, 9 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 this._resultHighlightedAsDOM = true; 150 this._resultHighlightedAsDOM = true;
151 } 151 }
152 152
153 if (result.customPreview()) { 153 if (result.customPreview()) {
154 var customPreviewComponent = new ObjectUI.CustomPreviewComponent(resul t); 154 var customPreviewComponent = new ObjectUI.CustomPreviewComponent(resul t);
155 customPreviewComponent.expandIfPossible(); 155 customPreviewComponent.expandIfPossible();
156 popoverContentElement = customPreviewComponent.element; 156 popoverContentElement = customPreviewComponent.element;
157 } else { 157 } else {
158 popoverContentElement = createElement('div'); 158 popoverContentElement = createElement('div');
159 UI.appendStyle(popoverContentElement, 'object_ui/objectPopover.css'); 159 UI.appendStyle(popoverContentElement, 'object_ui/objectPopover.css');
160 this._titleElement = popoverContentElement.createChild('div', 'monospa ce'); 160 this._titleElement = popoverContentElement.createChild('div', 'monospa ce object-popover-title');
161 this._titleElement.createChild('span', 'object-popover-title').textCon tent = description; 161 this._titleElement.createChild('span').textContent = description;
162 var section = new ObjectUI.ObjectPropertiesSection(result, '', this._l azyLinkifier()); 162 var section = new ObjectUI.ObjectPropertiesSection(result, '', this._l azyLinkifier());
163 section.element.classList.add('object-popover-tree'); 163 section.element.classList.add('object-popover-tree');
164 section.titleLessMode(); 164 section.titleLessMode();
165 popoverContentElement.appendChild(section.element); 165 popoverContentElement.appendChild(section.element);
166 } 166 }
167 var popoverWidth = 300; 167 var popoverWidth = 300;
168 var popoverHeight = 250; 168 var popoverHeight = 250;
169 popover.showForAnchor(popoverContentElement, anchorElement, popoverWidth , popoverHeight); 169 popover.showForAnchor(popoverContentElement, anchorElement, popoverWidth , popoverHeight);
170 } 170 }
171 } 171 }
(...skipping 23 matching lines...) Expand all
195 * @return {!Components.Linkifier} 195 * @return {!Components.Linkifier}
196 */ 196 */
197 _lazyLinkifier() { 197 _lazyLinkifier() {
198 if (!this._linkifier) 198 if (!this._linkifier)
199 this._linkifier = new Components.Linkifier(); 199 this._linkifier = new Components.Linkifier();
200 return this._linkifier; 200 return this._linkifier;
201 } 201 }
202 }; 202 };
203 203
204 ObjectUI.ObjectPopoverHelper.MaxPopoverTextLength = 10000; 204 ObjectUI.ObjectPopoverHelper.MaxPopoverTextLength = 10000;
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