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

Unified Diff: Source/devtools/front_end/settings/FrameworkBlackboxDialog.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/FrameworkBlackboxDialog.js
diff --git a/Source/devtools/front_end/settings/FrameworkBlackboxDialog.js b/Source/devtools/front_end/settings/FrameworkBlackboxDialog.js
index 17e7b1624b2115595b1f01562c90bb333ba23b41..c7a581b38122ca1664f547b5f0bc5941d7288ed7 100644
--- a/Source/devtools/front_end/settings/FrameworkBlackboxDialog.js
+++ b/Source/devtools/front_end/settings/FrameworkBlackboxDialog.js
@@ -52,10 +52,10 @@ WebInspector.FrameworkBlackboxDialog = function()
this.element.tabIndex = 0;
}
-WebInspector.FrameworkBlackboxDialog.show = function(element)
+WebInspector.FrameworkBlackboxDialog.show = function()
{
var dialog = new WebInspector.FrameworkBlackboxDialog();
- WebInspector.Dialog.show(element, dialog);
+ WebInspector.Dialog.show(dialog);
var glassPane = dialog.element.ownerDocument.getElementById("glass-pane");
glassPane.classList.add("settings-glass-pane");
}
@@ -74,29 +74,29 @@ WebInspector.FrameworkBlackboxDialog.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/settings/EditFileSystemDialog.js ('k') | Source/devtools/front_end/settings/SettingsScreen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698