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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Issue 2592433003: [DevTools] Replace ViewportControl with ListControl. (Closed)
Patch Set: tests Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
index 18305b016f0b03f2d6cb6cb127ee3d6198fb2034..53f32100c8c900e9760dee650a0f84a3b8e7c6b4 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
@@ -998,14 +998,14 @@ UI.measurePreferredSize = function(element, containerElement) {
containerElement = containerElement || element.ownerDocument.body;
containerElement.appendChild(element);
element.positionAt(0, 0);
- var result = new Size(element.offsetWidth, element.offsetHeight);
+ var result = element.getBoundingClientRect();
element.positionAt(undefined, undefined);
if (oldParent)
oldParent.insertBefore(element, oldNextSibling);
else
element.remove();
- return result;
+ return new Size(result.width, result.height);
};
/**

Powered by Google App Engine
This is Rietveld 408576698