This removes the hard-coded limit of 1024x2048 tile sizes, and allows for
arbitrary tile-sizes. It will still only allocate texture sizes in powers of
two, however. It replaces the tile size with a buffered-area size, which can be
re-allocated as the screen dimensions change.
This removes the hard-coded limit of 1024x2048 tile sizes, and allows for
arbitrary tile-sizes. It will still only allocate texture sizes in powers of
two, however. It replaces the tile size with a buffered-area size, which can be
re-allocated as the screen dimensions change.
Check more values in browser.js when updating the viewport, and restructure
the JSON conversion in Java so that it's easier to tell what value caused a
bad viewport if it comes from Java.
Some cleanup: ensure we abort and re-bounce the viewport
if the device is rotated during a double-tap zoom. Also
rename variables to be more appropriate
Scrollbars now have rounded endcaps, are a little smaller, and there
is a 1-pixel gap between the bar and the edge of the viewport. Just
generally making them look nicer.
If a scroll event comes in that changes the scroll coordinates
from those that were last set by user scrolling in Java, then
update the Java viewport with the new coordinates. Note that
this may occur in the middle of a draw, when Gecko already has
the transaction lock acquired on the tile buffer. Therefore we
need to delay the update until after the draw is complete.
Send an event to scroll to the focused input field when the
soft keyboard comes up. Ensure that this happens *after* the
viewport change event is sent to Gecko, so that Gecko actually
knows that browser viewport is smaller and doesn't just no-op
the scroll request.
Don't allow Gecko to set the viewport size because Java knows
this better. Allowing this behaviour could result in Bad Things(TM)
under certain race conditions such as described in bug 707285.
If the Java code is in the middle of a fling when Gecko sends
a viewport update, abort the fling, cancel the velocity, and
re-fling. The re-fling is purely to get the page snapped to an
edge if needed.
Missing pieces of the document resulted in pageWidth getting
assigned to NaN, which was serialized as null by JSON. This
resulted in an exception over in Java-land when deserialization
was attempted, and killed the viewport update entirely.
Set the render mode to RENDERMODE_WHEN_DIRTY and request a redraw when a layer
transaction ends and when the viewport in LayerController changes. This stops
us from drawing continuously.
If we sent a viewport to Gecko that causes no change in what's drawn on the
screen, we wouldn't receive a reply and this would cause us to deadlock until
a redraw happens for some other reason.
As viewport changes are throttled at max 1 per 350ms, just remove this check.
After IRC discussion, it was deemed unnecessary.
Earlier patches mistakenly removed the redraw hint. This restores it, and
alters its behaviour to work correctly with regards to the viewport. This
should help mitigate some checker-boarding and performance issues when panning
and zooming.
This patch reinstates pinch-zooming and adds CSS re-scaling so that after
zooming, the page is rendered at the scaled resolution and you get clear text.
--HG--
rename : mobile/android/base/gfx/IntSize.java => mobile/android/base/gfx/FloatSize.java
This patch refactors the code to make some of the value names and ownership
clearer, and to add the idea of a 'viewport' within a 'displayport'. The
displayport is the area of the page which is visible to the underlying buffer
and the viewport is the area of the page which is visible through the
application window.
--HG--
rename : mobile/android/base/ui/ViewportController.java => mobile/android/base/gfx/ViewportMetrics.java
During startup there is a race condition where the
LayerRenderer might request a paint of the root layer before
the root layer has successfully generated a texture.
This might happen if the transaction lock is already held
when the root layer attempts to generate the texture. Fix
by inserting a null guard that aborts the paint if the texture
has not been generated.