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

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

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: Created 4 years, 1 month 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.Widget} 7 * @extends {WebInspector.Widget}
8 */ 8 */
9 WebInspector.InspectedPagePlaceholder = function() 9 WebInspector.InspectedPagePlaceholder = function()
10 { 10 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 widget = parent; 43 widget = parent;
44 } 44 }
45 } 45 }
46 46
47 if (this._margins.top !== margins.top || this._margins.left !== margins. left || this._margins.right !== margins.right || this._margins.bottom !== margin s.bottom) { 47 if (this._margins.top !== margins.top || this._margins.left !== margins. left || this._margins.right !== margins.right || this._margins.bottom !== margin s.bottom) {
48 this._margins = margins; 48 this._margins = margins;
49 this._scheduleUpdate(); 49 this._scheduleUpdate();
50 } 50 }
51 }, 51 },
52 52
53 /**
54 * @override
55 */
53 onResize: function() 56 onResize: function()
54 { 57 {
55 this._findMargins(); 58 this._findMargins();
56 this._scheduleUpdate(); 59 this._scheduleUpdate();
57 }, 60 },
58 61
59 _scheduleUpdate: function() 62 _scheduleUpdate: function()
60 { 63 {
61 if (this._updateId) 64 if (this._updateId)
62 this.element.window().cancelAnimationFrame(this._updateId); 65 this.element.window().cancelAnimationFrame(this._updateId);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 update: function() 97 update: function()
95 { 98 {
96 delete this._updateId; 99 delete this._updateId;
97 var rect = this._dipPageRect(); 100 var rect = this._dipPageRect();
98 var bounds = { x: Math.round(rect.x), y: Math.round(rect.y), height: Mat h.max(1, Math.round(rect.height)), width: Math.max(1, Math.round(rect.width)) }; 101 var bounds = { x: Math.round(rect.x), y: Math.round(rect.y), height: Mat h.max(1, Math.round(rect.height)), width: Math.max(1, Math.round(rect.width)) };
99 this.dispatchEventToListeners(WebInspector.InspectedPagePlaceholder.Even ts.Update, bounds); 102 this.dispatchEventToListeners(WebInspector.InspectedPagePlaceholder.Even ts.Update, bounds);
100 }, 103 },
101 104
102 __proto__: WebInspector.Widget.prototype 105 __proto__: WebInspector.Widget.prototype
103 }; 106 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698