This reverts commit 0c5d95c943.
Using those values is probably okay as long as we adjust for the
off-by-one errors which will follow in the next commit.
scroll measures failed a travis test where document.documentElement.offsetHeight and document.documentElement.scrollHeight diffed by one pixel when the browser zoomed. --> Removed offsetHeight.
It seems with document.documentElement.client{Height,Width} we
sometimes (e.g. without <!DOCTYPE html)...) get the full element height
instead of the viewport height.
Fixes#1821.
We now load the JS code as a QWebEngineScript, which sets up
window._qutebrowser with various "modules". That means we don't have to
pass the whole module every time we want to execute something.
With QtWebKit or QtWebEngine with Qt < 5.7, the functions end up in the
page's namespace. We can't easily avoid this, but at least we can name
them in a way which reduces conflicts.