Closed Bug 740539 Opened 9 years ago Closed 9 years ago

Java may get incorrect page size


(Firefox for Android Graveyard :: General, defect)

Not set


(firefox14 fixed, blocking-fennec1.0 beta+)

Firefox 14
Tracking Status
firefox14 --- fixed
blocking-fennec1.0 --- beta+


(Reporter: kats, Assigned: kats)



(Whiteboard: [viewport])


(1 file)

There's a possibility that the page size sent from gecko -> java in the Viewport:PageSize message is at a different zoom level than that currently in java. We need to account for this. Note that the setPageSize(float,float,float) method in GeckoLayerClient that is invoked by the compositor does this too; I just forgot it needs to happen in the Viewport:PageSize handler as well. This doesn't happen very often but it's visible in the dynamic-resolution strategy and makes the scrollbars change in size incorrectly. This is not easy to fix, unfortunately, since the zoom factor associated with the page size sent from browser.js is not necessarily the tab._zoom; it is really the resolution set on the cwu.
Whiteboard: [viewport]
Attached patch PatchSplinter Review
This patch is sort of what I had in mind, but it doesn't actually fix the problem I was seeing because the messageMetrics.getZoomFactor() is the zoom level stored in the tab in browser.js, not the display resolution on the pres shell (the two are the same unless we're using DynamicResolutionStrategy).
blocking-fennec1.0: --- → ?
Would this fix bug 735539 and/or bug 740005?
No, this bug never manifest in current builds; it's only an issue for code that is not yet turned on.
Oh wait, what I just said was wrong. It could manifest in current code as well, but still wouldn't cause the bugs you refer to.
Comment on attachment 610642 [details] [diff] [review]

I figure we might as well land this since it is technically a bug in current code.
Attachment #610642 - Flags: review?(
Comment on attachment 610642 [details] [diff] [review]

Review of attachment 610642 [details] [diff] [review]:

Looks good to me.
Attachment #610642 - Flags: review?( → review+
Closed: 9 years ago
Resolution: --- → FIXED
blocking-fennec1.0: ? → beta+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.