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

Unified Diff: Source/devtools/front_end/settings/EditFileSystemDialog.js

Issue 1356363002: [DevTools] Remove relativeToElement from Dialog. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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: Source/devtools/front_end/settings/EditFileSystemDialog.js
diff --git a/Source/devtools/front_end/settings/EditFileSystemDialog.js b/Source/devtools/front_end/settings/EditFileSystemDialog.js
index 6def2a469c2797afd3a73a937812710370147bc8..7b7de4e7672c49ae47b7b88fdd05da43dc0807b8 100644
--- a/Source/devtools/front_end/settings/EditFileSystemDialog.js
+++ b/Source/devtools/front_end/settings/EditFileSystemDialog.js
@@ -91,10 +91,10 @@ WebInspector.EditFileSystemDialog = function(fileSystemPath)
this._hasMappingChanges = false;
}
-WebInspector.EditFileSystemDialog.show = function(element, fileSystemPath)
+WebInspector.EditFileSystemDialog.show = function(fileSystemPath)
{
var dialog = new WebInspector.EditFileSystemDialog(fileSystemPath);
- WebInspector.Dialog.show(element, dialog);
+ WebInspector.Dialog.show(dialog);
var glassPane = dialog.element.ownerDocument.getElementById("glass-pane");
glassPane.classList.add("settings-glass-pane");
}
@@ -113,29 +113,29 @@ WebInspector.EditFileSystemDialog.prototype = {
_resize: function()
{
- if (!this._dialogElement || !this._relativeToElement)
+ if (!this._dialogElement || !this._container)
return;
const minWidth = 200;
const minHeight = 150;
- var maxHeight = this._relativeToElement.offsetHeight - 10;
+ var maxHeight = this._container.offsetHeight - 10;
maxHeight = Math.max(minHeight, maxHeight);
- var maxWidth = Math.min(540, this._relativeToElement.offsetWidth - 10);
+ var maxWidth = Math.min(540, this._container.offsetWidth - 10);
maxWidth = Math.max(minWidth, maxWidth);
this._dialogElement.style.maxHeight = maxHeight + "px";
this._dialogElement.style.width = maxWidth + "px";
- WebInspector.DialogDelegate.prototype.position(this._dialogElement, this._relativeToElement);
+ WebInspector.DialogDelegate.prototype.position(this._dialogElement, this._container);
},
/**
* @override
* @param {!Element} element
- * @param {!Element} relativeToElement
+ * @param {!Element} container
*/
- position: function(element, relativeToElement)
+ position: function(element, container)
{
- this._relativeToElement = relativeToElement;
+ this._container = container;
this._resize();
},
« no previous file with comments | « Source/devtools/front_end/devices/DevicesDialog.js ('k') | Source/devtools/front_end/settings/FrameworkBlackboxDialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698