mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809199 - Update offsetViewportBy to take dx/dy instead of PointF. r=Cwiiis
This commit is contained in:
parent
1659b1784a
commit
3c21360542
@ -152,8 +152,8 @@ public class ImmutableViewportMetrics {
|
||||
newZoomFactor);
|
||||
}
|
||||
|
||||
public ImmutableViewportMetrics offsetViewportBy(PointF delta) {
|
||||
return setViewportOrigin(viewportRectLeft + delta.x, viewportRectTop + delta.y);
|
||||
public ImmutableViewportMetrics offsetViewportBy(float dx, float dy) {
|
||||
return setViewportOrigin(viewportRectLeft + dx, viewportRectTop + dy);
|
||||
}
|
||||
|
||||
public ImmutableViewportMetrics setPageRect(RectF pageRect, RectF cssPageRect) {
|
||||
|
@ -480,8 +480,8 @@ public class PanZoomController
|
||||
updatePosition();
|
||||
}
|
||||
|
||||
private void scrollBy(PointF point) {
|
||||
ImmutableViewportMetrics scrolled = getMetrics().offsetViewportBy(point);
|
||||
private void scrollBy(float dx, float dy) {
|
||||
ImmutableViewportMetrics scrolled = getMetrics().offsetViewportBy(dx, dy);
|
||||
mTarget.setViewportMetrics(scrolled);
|
||||
}
|
||||
|
||||
@ -575,7 +575,7 @@ public class PanZoomController
|
||||
}
|
||||
if (! mSubscroller.scrollBy(displacement)) {
|
||||
synchronized (mTarget.getLock()) {
|
||||
scrollBy(displacement);
|
||||
scrollBy(displacement.x, displacement.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -886,8 +886,8 @@ public class PanZoomController
|
||||
newZoomFactor = maxZoomFactor + excessZoom;
|
||||
}
|
||||
|
||||
scrollBy(new PointF(mLastZoomFocus.x - detector.getFocusX(),
|
||||
mLastZoomFocus.y - detector.getFocusY()));
|
||||
scrollBy(mLastZoomFocus.x - detector.getFocusX(),
|
||||
mLastZoomFocus.y - detector.getFocusY());
|
||||
PointF focus = new PointF(detector.getFocusX(), detector.getFocusY());
|
||||
scaleWithFocus(newZoomFactor, focus);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user