...ign it to canvas
Fixes a bug where there was empty space above pdf page, when page
rotation is 90 or 270 degrees.
Testing: open pdf and try all rotations (0, 90, 180 and 270 degrees)
with various zoom levels (especially, max and min zoom levels), and make
sure that text layer is aligned properly to the canvas and there aren't
any unwanted blank spaces. Finally, repeat the same testing procedure
for landscape mode.
To check if text layer is aligned properly on debug builds, toggle text
layer visibility from menu or use chrome dev tools.
- js: use double quotes consistently
- js: use strict equality operator everywhere
- js: end all statements with semi colon
- css: remove redundant unit of measures
Newer pdf.js versions don't automatically rotate text layer based on
viewport's rotation, instead they now set the value of the attribute
"data-main-rotation" to value of rotation in degrees. So, we now apply
CSS transformation to the text layer depending on the value of that
attribute.
Also fixes an issue where text layer is not exactly on top of the canvas when
canvas width is less than screen width (which happens often in landscape mode or
when fully zoomed out)
Updating insets is no longer necessary because the layout reserves the
space for the top app bar and frees it up in full-screen mode so the
WebView can fill the entire screen.