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

Unified Diff: chrome/browser/resources/chromeos/login/login_common.js

Issue 399613002: Anti-shelf-overlapping fixes for several menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 5 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: chrome/browser/resources/chromeos/login/login_common.js
diff --git a/chrome/browser/resources/chromeos/login/login_common.js b/chrome/browser/resources/chromeos/login/login_common.js
index e1032bb06ed55945f31678410127353ec6c26231..8a5ec108719cc7304c0f7c50e9ebbde5fb1ec5d2 100644
--- a/chrome/browser/resources/chromeos/login/login_common.js
+++ b/chrome/browser/resources/chromeos/login/login_common.js
@@ -327,6 +327,19 @@ cr.define('cr.ui', function() {
Oobe.getInstance().setClientAreaSize(width, height);
};
+ /**
+ * Computes max-height for an element so that it doesn't overlap shelf.
+ * @param {element} DOM element
+ */
+ Oobe.getMaxHeightBeforeShelfOverlapping = function(element) {
+ var maxAllowedHeight =
+ $('outer-container').offsetHeight -
+ element.getBoundingClientRect().top -
+ parseInt(window.getComputedStyle(element).marginTop) -
+ parseInt(window.getComputedStyle(element).marginBottom);
+ return maxAllowedHeight;
+ };
+
// Export
return {
Oobe: Oobe
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/network_dropdown.js » ('j') | ui/login/account_picker/user_pod_row.css » ('J')

Powered by Google App Engine
This is Rietveld 408576698