mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 704950 - Remove java guess to reset viewport [r=Cwiiis]
This removes the "mNewContent" java-side guess as to when gecko has loaded new content.
This commit is contained in:
parent
710acf764f
commit
0d69c9733d
@ -906,7 +906,6 @@ abstract public class GeckoApp
|
||||
final Tab tab = Tabs.getInstance().addTab(tabId, uri);
|
||||
if (selected) {
|
||||
Tabs.getInstance().selectTab(tabId);
|
||||
mSoftwareLayerClient.geckoLoadedNewContent();
|
||||
}
|
||||
|
||||
mMainHandler.post(new Runnable() {
|
||||
@ -939,8 +938,6 @@ abstract public class GeckoApp
|
||||
if (tab == null)
|
||||
return;
|
||||
|
||||
mSoftwareLayerClient.geckoLoadedNewContent();
|
||||
|
||||
mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
if (Tabs.getInstance().isSelectedTab(tab)) {
|
||||
@ -1016,8 +1013,6 @@ abstract public class GeckoApp
|
||||
if (Tabs.getInstance().isSelectedTab(tab))
|
||||
mBrowserToolbar.setTitle(tab.getDisplayTitle());
|
||||
onTabsChanged(tab);
|
||||
|
||||
mSoftwareLayerClient.geckoLoadedNewContent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -78,11 +78,6 @@ public class GeckoSoftwareLayerClient extends LayerClient {
|
||||
/* The viewport rect that Gecko is currently displaying. */
|
||||
private ViewportMetrics mGeckoViewport;
|
||||
|
||||
/* Gecko has loaded new content, let its viewport metrics completely
|
||||
* override the LayerController on the next draw.
|
||||
*/
|
||||
private boolean mNewContent;
|
||||
|
||||
private CairoImage mCairoImage;
|
||||
|
||||
private static final long MIN_VIEWPORT_CHANGE_DELAY = 350L;
|
||||
@ -97,7 +92,6 @@ public class GeckoSoftwareLayerClient extends LayerClient {
|
||||
mFormat = CairoImage.FORMAT_RGB16_565;
|
||||
|
||||
mScreenSize = new IntSize(1, 1);
|
||||
mNewContent = true;
|
||||
|
||||
mBuffer = ByteBuffer.allocateDirect(mWidth * mHeight * 2);
|
||||
|
||||
@ -151,15 +145,10 @@ public class GeckoSoftwareLayerClient extends LayerClient {
|
||||
controller.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mNewContent) {
|
||||
mNewContent = false;
|
||||
controller.setViewportMetrics(mGeckoViewport);
|
||||
} else {
|
||||
// Don't adjust page size when zooming unless zoom levels are
|
||||
// approximately equal.
|
||||
if (FloatUtils.fuzzyEquals(controller.getZoomFactor(), mGeckoViewport.getZoomFactor()))
|
||||
controller.setPageSize(mGeckoViewport.getPageSize());
|
||||
}
|
||||
// Don't adjust page size when zooming unless zoom levels are
|
||||
// approximately equal.
|
||||
if (FloatUtils.fuzzyEquals(controller.getZoomFactor(), mGeckoViewport.getZoomFactor()))
|
||||
controller.setPageSize(mGeckoViewport.getPageSize());
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -181,10 +170,6 @@ public class GeckoSoftwareLayerClient extends LayerClient {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void geckoLoadedNewContent() {
|
||||
mNewContent = true;
|
||||
}
|
||||
|
||||
/** Returns the back buffer. This function is for Gecko to use. */
|
||||
public ByteBuffer lockBuffer() {
|
||||
return mBuffer;
|
||||
|
Loading…
Reference in New Issue
Block a user