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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/Dialog.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 { 175 {
176 if (!this.element.isSelfOrAncestor(/** @type {?Node} */ (event.target))) 176 if (!this.element.isSelfOrAncestor(/** @type {?Node} */ (event.target)))
177 this.detach(); 177 this.detach();
178 }, 178 },
179 179
180 _position: function() 180 _position: function()
181 { 181 {
182 var container = WebInspector.Dialog._modalHostView.element; 182 var container = WebInspector.Dialog._modalHostView.element;
183 183
184 var width = container.offsetWidth - 10; 184 var width = container.offsetWidth - 10;
185 var height = container.offsetHeight- 10; 185 var height = container.offsetHeight - 10;
186 186
187 if (this._wrapsContent) { 187 if (this._wrapsContent) {
188 width = Math.min(width, this.contentElement.offsetWidth); 188 width = Math.min(width, this.contentElement.offsetWidth);
189 height = Math.min(height, this.contentElement.offsetHeight); 189 height = Math.min(height, this.contentElement.offsetHeight);
190 } 190 }
191 191
192 if (this._maxSize) { 192 if (this._maxSize) {
193 width = Math.min(width, this._maxSize.width); 193 width = Math.min(width, this._maxSize.width);
194 height = Math.min(height, this._maxSize.height); 194 height = Math.min(height, this._maxSize.height);
195 } 195 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 { 251 {
252 return WebInspector.Dialog._modalHostView; 252 return WebInspector.Dialog._modalHostView;
253 }; 253 };
254 254
255 WebInspector.Dialog.modalHostRepositioned = function() 255 WebInspector.Dialog.modalHostRepositioned = function()
256 { 256 {
257 if (WebInspector.Dialog._instance) 257 if (WebInspector.Dialog._instance)
258 WebInspector.Dialog._instance._position(); 258 WebInspector.Dialog._instance._position();
259 }; 259 };
260 260
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698