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; |
} |
/** |