Fix for issue where the cursor would dissappear on a non 100% zoom levels.

Essentially what was happening was the browser was applying some scaling
factor to the font sizes, so 13px would become 13.xxxxxxx, etc.
However, this number would be truncated, and so when doing the pixel math to
calculate the number of rows that are above the fold, instead of getting whole
numbers we would get a number barely smaller than a whole number.  For example,
instead of getting 4 we would calculate 3.99999812, and then floor this value.
This would mess up the calculations, and so hterm wouldn't show the bottom row
when it should.

The fix rounds up these values when they are incredibly close to the next whole
number.

Change-Id: I6c786c01b96073ee7cf2c694a3b9ad4395e826b7
Reviewed-on: https://chromium-review.googlesource.com/243992
Reviewed-by: Rob Ginda <rginda@chromium.org>
Tested-by: Rob Ginda <rginda@chromium.org>
diff --git a/hterm/js/hterm_terminal.js b/hterm/js/hterm_terminal.js
index 52832ea..b4f42fa 100644
--- a/hterm/js/hterm_terminal.js
+++ b/hterm/js/hterm_terminal.js
@@ -5,7 +5,7 @@
 'use strict';
 
 lib.rtdep('lib.colors', 'lib.PreferenceManager', 'lib.resource', 'lib.wc',
-          'hterm.Keyboard', 'hterm.Options', 'hterm.PreferenceManager',
+          'lib.f', 'hterm.Keyboard', 'hterm.Options', 'hterm.PreferenceManager',
           'hterm.Screen', 'hterm.ScrollPort', 'hterm.Size',
           'hterm.TextAttributes', 'hterm.VT');
 
@@ -2864,7 +2864,7 @@
 hterm.Terminal.prototype.onResize_ = function() {
   var columnCount = Math.floor(this.scrollPort_.getScreenWidth() /
                                this.scrollPort_.characterSize.width);
-  var rowCount = Math.floor(this.scrollPort_.getScreenHeight() /
+  var rowCount = lib.f.smartFloorDivide(this.scrollPort_.getScreenHeight(),
                             this.scrollPort_.characterSize.height);
 
   if (columnCount <= 0 || rowCount <= 0) {