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

Unified Diff: Source/devtools/front_end/ui/DOMExtension.js

Issue 660463002: DevTools: follow up to r183724, mark all floating components as roots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/Popover.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/DOMExtension.js
diff --git a/Source/devtools/front_end/ui/DOMExtension.js b/Source/devtools/front_end/ui/DOMExtension.js
index 77b5856ecbe0493f3c3d7b9c488065b36194913f..d862f94212839c823b06dc74b64cd0f377d55f74 100644
--- a/Source/devtools/front_end/ui/DOMExtension.js
+++ b/Source/devtools/front_end/ui/DOMExtension.js
@@ -284,10 +284,17 @@ Element.prototype.measurePreferredSize = function(containerElement)
{
containerElement = containerElement || document.body;
containerElement.appendChild(this);
+ var fakingComponentRoot = false;
+ if (!this.classList.contains("component-root")) {
+ fakingComponentRoot = true;
+ this.classList.add("component-root");
+ }
this.positionAt(0, 0);
var result = new Size(this.offsetWidth, this.offsetHeight);
this.positionAt(undefined, undefined);
this.remove();
+ if (fakingComponentRoot)
+ this.classList.remove("component-root");
return result;
}
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/Popover.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698