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

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

Issue 1188083002: DevTools: Fix Element.positionAt (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/platform/DOMExtension.js
diff --git a/Source/devtools/front_end/platform/DOMExtension.js b/Source/devtools/front_end/platform/DOMExtension.js
index 842defdfcf4d5493dafc27139498489873df58b9..404ccf2d74e9fbd756dcded7be3531280f8c5826 100644
--- a/Source/devtools/front_end/platform/DOMExtension.js
+++ b/Source/devtools/front_end/platform/DOMExtension.js
@@ -160,6 +160,11 @@ Element.prototype.positionAt = function(x, y, relativeTo)
this.style.setProperty("top", (shift.y + y) + "px");
else
this.style.removeProperty("top");
+
+ if (typeof x === "number" || typeof y === "number")
+ this.style.setProperty("position", "absolute");
+ else
+ this.style.removeProperty("position");
}
/**
« 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