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; |
} |