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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js

Issue 1737733002: [DevTools] Handle emulated device scale factor and original device scale factor properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js b/third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js
index 6b7c5e11d0feae9fd1fa94c3e6b44970f3d51d82..40844e32014326c0c6ebe3954bc12d677cfc8ce9 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js
@@ -78,7 +78,8 @@ WebInspector.InspectedPagePlaceholder.prototype = {
_dipPageRect: function()
{
- var zoomFactor = WebInspector.zoomManager.zoomFactor();
+ var windowToViewportRatio = 1000 / DevToolsHost.convertLengthForEmbedder(1000);
dgozman 2016/02/29 20:26:20 Looks like this compensates for similar call to co
oshima 2016/02/29 21:28:03 setInspectedPageBounds is also used by browser, wh
dgozman 2016/02/29 21:38:41 Not sure I'm following you. setInspectedPageBounds
oshima 2016/02/29 22:59:50 Sorry I seem to have wrong memory. I somehow thoug
+ var zoomFactor = WebInspector.zoomManager.zoomFactor() * windowToViewportRatio;
var rect = this.element.getBoundingClientRect();
var bodyRect = this.element.ownerDocument.body.getBoundingClientRect();

Powered by Google App Engine
This is Rietveld 408576698