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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js

Issue 2703143002: [DevTools] Prepare to move Popover to shadow DOM. (Closed)
Patch Set: fix Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 4 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
5 * Copyright (C) 2009 Joseph Pecoraro 5 * Copyright (C) 2009 Joseph Pecoraro
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 /** 182 /**
183 * @param {?SDK.Resource} resource 183 * @param {?SDK.Resource} resource
184 * @return {boolean} 184 * @return {boolean}
185 */ 185 */
186 function isImageResource(resource) { 186 function isImageResource(resource) {
187 return !!resource && resource.resourceType() === Common.resourceTypes.Image; 187 return !!resource && resource.resourceType() === Common.resourceTypes.Image;
188 } 188 }
189 189
190 function buildContent() { 190 function buildContent() {
191 var container = createElement('table'); 191 var container = createElement('table');
192 UI.appendStyle(container, 'components/imagePreview.css');
192 container.className = 'image-preview-container'; 193 container.className = 'image-preview-container';
193 var naturalWidth = precomputedFeatures ? precomputedFeatures.naturalWidth : imageElement.naturalWidth; 194 var naturalWidth = precomputedFeatures ? precomputedFeatures.naturalWidth : imageElement.naturalWidth;
194 var naturalHeight = precomputedFeatures ? precomputedFeatures.naturalHeight : imageElement.naturalHeight; 195 var naturalHeight = precomputedFeatures ? precomputedFeatures.naturalHeight : imageElement.naturalHeight;
195 var offsetWidth = precomputedFeatures ? precomputedFeatures.offsetWidth : na turalWidth; 196 var offsetWidth = precomputedFeatures ? precomputedFeatures.offsetWidth : na turalWidth;
196 var offsetHeight = precomputedFeatures ? precomputedFeatures.offsetHeight : naturalHeight; 197 var offsetHeight = precomputedFeatures ? precomputedFeatures.offsetHeight : naturalHeight;
197 var description; 198 var description;
198 if (showDimensions) { 199 if (showDimensions) {
199 if (offsetHeight === naturalHeight && offsetWidth === naturalWidth) { 200 if (offsetHeight === naturalHeight && offsetWidth === naturalWidth) {
200 description = Common.UIString('%d \xd7 %d pixels', offsetWidth, offsetHe ight); 201 description = Common.UIString('%d \xd7 %d pixels', offsetWidth, offsetHe ight);
201 } else { 202 } else {
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 641
641 /** 642 /**
642 * @override 643 * @override
643 * @param {!SDK.DOMNode} node 644 * @param {!SDK.DOMNode} node
644 * @return {?{title: string, color: string}} 645 * @return {?{title: string, color: string}}
645 */ 646 */
646 decorate(node) { 647 decorate(node) {
647 return {title: this._title, color: this._color}; 648 return {title: this._title, color: this._color};
648 } 649 }
649 }; 650 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/BUILD.gn ('k') | third_party/WebKit/Source/devtools/front_end/components/imagePreview.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698