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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/devtools.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, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(window) { 5 (function(window) {
6 6
7 // DevToolsAPI ---------------------------------------------------------------- 7 // DevToolsAPI ----------------------------------------------------------------
8 8
9 /** 9 /**
10 * @constructor 10 * @constructor
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 DevToolsAPI.sendMessageToEmbedder("setIsDocked", [isDocked], callback); 393 DevToolsAPI.sendMessageToEmbedder("setIsDocked", [isDocked], callback);
394 }, 394 },
395 395
396 /** 396 /**
397 * Requests inspected page to be placed atop of the inspector frontend with specified bounds. 397 * Requests inspected page to be placed atop of the inspector frontend with specified bounds.
398 * @override 398 * @override
399 * @param {{x: number, y: number, width: number, height: number}} bounds 399 * @param {{x: number, y: number, width: number, height: number}} bounds
400 */ 400 */
401 setInspectedPageBounds: function(bounds) 401 setInspectedPageBounds: function(bounds)
402 { 402 {
403 var converted = { 403 DevToolsAPI.sendMessageToEmbedder("setInspectedPageBounds", [bounds], nu ll);
404 x: Math.round(DevToolsHost.convertLengthForEmbedder(bounds.x)),
405 y: Math.round(DevToolsHost.convertLengthForEmbedder(bounds.y)),
406 width: Math.round(DevToolsHost.convertLengthForEmbedder(bounds.width)) ,
407 height: Math.round(DevToolsHost.convertLengthForEmbedder(bounds.height ))
408 };
409 DevToolsAPI.sendMessageToEmbedder("setInspectedPageBounds", [converted], null);
410 }, 404 },
411 405
412 /** 406 /**
413 * @override 407 * @override
414 */ 408 */
415 inspectElementCompleted: function() 409 inspectElementCompleted: function()
416 { 410 {
417 DevToolsAPI.sendMessageToEmbedder("inspectElementCompleted", [], null); 411 DevToolsAPI.sendMessageToEmbedder("inspectElementCompleted", [], null);
418 }, 412 },
419 413
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 1053
1060 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { 1054 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) {
1061 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle; 1055 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle;
1062 DOMTokenList.prototype.toggle = function(token, force) 1056 DOMTokenList.prototype.toggle = function(token, force)
1063 { 1057 {
1064 if (arguments.length === 1) 1058 if (arguments.length === 1)
1065 force = !this.contains(token); 1059 force = !this.contains(token);
1066 return this.__originalDOMTokenListToggle(token, !!force); 1060 return this.__originalDOMTokenListToggle(token, !!force);
1067 } 1061 }
1068 } 1062 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/DevToolsHost.idl ('k') | third_party/WebKit/Source/devtools/front_end/externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698