зеркало из https://github.com/mozilla/gecko-dev.git
Bug 728369 - Fix non-OpenGL plugin positioning on Android r=blassey
This commit is contained in:
Родитель
6bc5b3e339
Коммит
85e3bf557d
|
@ -2709,8 +2709,8 @@ class PluginLayoutParams extends AbsoluteLayout.LayoutParams
|
||||||
public void reset(int aX, int aY, int aWidth, int aHeight, ImmutableViewportMetrics aViewport) {
|
public void reset(int aX, int aY, int aWidth, int aHeight, ImmutableViewportMetrics aViewport) {
|
||||||
PointF origin = aViewport.getOrigin();
|
PointF origin = aViewport.getOrigin();
|
||||||
|
|
||||||
x = mOriginalX = aX + (int)origin.x;
|
this.x = mOriginalX = aX;
|
||||||
y = mOriginalY = aY + (int)origin.y;
|
this.y = mOriginalY = aY;
|
||||||
width = mOriginalWidth = aWidth;
|
width = mOriginalWidth = aWidth;
|
||||||
height = mOriginalHeight = aHeight;
|
height = mOriginalHeight = aHeight;
|
||||||
mOriginalViewport = aViewport;
|
mOriginalViewport = aViewport;
|
||||||
|
@ -2720,8 +2720,8 @@ class PluginLayoutParams extends AbsoluteLayout.LayoutParams
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reposition(Point aOffset, float aResolution) {
|
private void reposition(Point aOffset, float aResolution) {
|
||||||
x = mOriginalX + aOffset.x;
|
this.x = mOriginalX + aOffset.x;
|
||||||
y = mOriginalY + aOffset.y;
|
this.y = mOriginalY + aOffset.y;
|
||||||
|
|
||||||
if (!FloatUtils.fuzzyEquals(mLastResolution, aResolution)) {
|
if (!FloatUtils.fuzzyEquals(mLastResolution, aResolution)) {
|
||||||
width = Math.round(aResolution * mOriginalWidth);
|
width = Math.round(aResolution * mOriginalWidth);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче