mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 740539 - Account for possible mismatch in zoom levels when handling Viewport:PageSize. r=Cwiiis
This commit is contained in:
parent
3519b46a3e
commit
7eeadaf018
@ -211,8 +211,12 @@ public class GeckoLayerClient implements GeckoEventResponder,
|
||||
mLayerController.abortPanZoomAnimation();
|
||||
break;
|
||||
case PAGE_SIZE:
|
||||
// adjust the page dimensions to account for differences in zoom
|
||||
// between the rendered content (which is what Gecko tells us)
|
||||
// and our zoom level (which may have diverged).
|
||||
float scaleFactor = oldMetrics.zoomFactor / messageMetrics.getZoomFactor();
|
||||
newMetrics = new ViewportMetrics(oldMetrics);
|
||||
newMetrics.setPageSize(messageMetrics.getPageSize());
|
||||
newMetrics.setPageSize(messageMetrics.getPageSize().scale(scaleFactor));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user