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

Unified Diff: Source/devtools/front_end/DOMExtension.js

Issue 180733003: DevTools: fix console to tail messages on devtools with zoomfactor != 1 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add comment Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/DOMExtension.js
diff --git a/Source/devtools/front_end/DOMExtension.js b/Source/devtools/front_end/DOMExtension.js
index 5fd139bfa2dd6cce6a2709d4657200278855370d..e1401f9fb9185d8e4c7e3b6f7b038f739d3ee896 100644
--- a/Source/devtools/front_end/DOMExtension.js
+++ b/Source/devtools/front_end/DOMExtension.js
@@ -175,8 +175,10 @@ Element.prototype.positionAt = function(x, y, relativeTo)
Element.prototype.isScrolledToBottom = function()
{
- // This code works only for 0-width border
- return this.scrollTop + this.clientHeight === this.scrollHeight;
+ // This code works only for 0-width border.
+ // Both clientHeight and scrollHeight are rounded to integer values, so we tolerate
+ // one pixel error.
+ return Math.abs(this.scrollTop + this.clientHeight - this.scrollHeight) <= 1;
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698