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

Unified Diff: chrome/browser/resources/about_memory.js

Issue 68723003: Make chrome/ be documentElement/body agnostic with regards to scrollTop/Left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_305800
Patch Set: Make chrome/ be documentElement/body agnostic with regards to scrollTop/Left Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/extensions/extension_list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/about_memory.js
diff --git a/chrome/browser/resources/about_memory.js b/chrome/browser/resources/about_memory.js
index e3a6871753b197f341c9781f12970c95bbc44671..0e4c62bf4a14cf41c943b78fc8e78401b4841d9a 100644
--- a/chrome/browser/resources/about_memory.js
+++ b/chrome/browser/resources/about_memory.js
@@ -42,12 +42,14 @@ function handleHelpTooltipMouseOver(event) {
var width = el.offsetWidth;
var height = el.offsetHeight;
- if (event.pageX - width - 50 + document.documentElement.scrollLeft >= 0)
+ var scrollLeft = scrollLeftForDocument(document);
+ if (event.pageX - width - 50 + scrollLeft >= 0)
el.style.left = (event.pageX - width - 20) + 'px';
else
el.style.left = (event.pageX + 20) + 'px';
- if (event.pageY - height - 50 + document.documentElement.scrollTop >= 0)
+ var scrollTop = scrollTopForDocument(document);
+ if (event.pageY - height - 50 + scrollTop >= 0)
el.style.top = (event.pageY - height - 20) + 'px';
else
el.style.top = (event.pageY + 20) + 'px';
« no previous file with comments | « no previous file | chrome/browser/resources/extensions/extension_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698