In browser.js were two pieces of code that determined whether or not the CSS viewport
size should include the margins. These two pieces of code were inconsistent in that
one used rounding while the other used a fuzz. Also, one of them subtracted gViewportMargins
from gScreenHeight while the other added them. This patch makes the two pieces of code
consistent, and updates them to use a fuzz so that the CSS viewport is enlarged only
when dealing with pages that are equal to or larger than the screen (with the toolbar hidden).
The problematic scenario is when the page is exactly the height of the screen
(with dynamic toolbar not visible). In this case, the scrollable() function in
Axis.java returns false on the vertical axis, and so the JavaPanZoomController
never does any scrolling. This in turns means that the scrollBy code in
LayerMarginsAnimator never gets to run, so you can never drag the toolbar back
into being visible. The patch ensures that scrollable() returns true when some
or all of the margins are not visible, ensuring that in these scenarios the
user can still scroll the toolbar back onto the screen. This patch also adds
some comments/asserts to verify the new code is threadsafe.
The plugin code was returning a rect in LayoutDevicePixels whereas Java
was treating it as a CSS-pixel rect. This patch makes the types more
explicit and adds a conversion in AndroidBridge to convert from the
LayoutDevicePixels to CSSPixel rects.
Hawk is an HTTP authentication scheme using a message authentication
code (MAC) algorithm to provide partial HTTP request cryptographic
verification. Hawk is the successor to the HMAC authentication
scheme. The Hawk scheme is descripted at
https://github.com/hueniverse/hawk
Hawk is under-specified; this implementation interoperates with the
git hash at
871cc59797
We use two different "pageWidth" calculations in browser.js, and the
regressing change switched from using one definition to the other. This
caused an infinite remeasure loop.