mozilla-b2g/gaia — pull request #6676 by asutherland (2012-11-28 10:33:27+00:00)
Title: Bug 813841 - HTML scrolling fix (alternate impl)

@steveck-chung Here's what I've got so far, as mentioned on https://github.com/mozilla-b2g/gaia/pull/6628

I believe I have addressed the scrolling problem and zooming should work for newsletter-mode, but the centering logic for zooming is currently pretty broken. Visible in the patch is my ugly hackery that shows how sleepy I am right now. Such things are best done with a clear head!

The key thing in this patch is that we try and make the iframe entirely seamless, but we do keep it inside a viewport that simply exists to clip the excess off. Namely, when we have used transform to scale the iframe to display at 0.5x, the iframe's size is still 1x, so we need the viewport that holds it to size itself to 0.5x to clip down so scrolling does not get messed up.

I did have to disable pointer-events again, so for link purposes, we will probably want to use document.elementFromPoint.