Browse Source

Remove overdraw and stop blocking DOM storage (breaks sites) in incognito mode

master
Anthony Restaino 10 years ago
parent
commit
c87c57661f
  1. 1
      src/acr/browser/lightning/BrowserActivity.java
  2. 13
      src/acr/browser/lightning/LightningView.java

1
src/acr/browser/lightning/BrowserActivity.java

@ -157,6 +157,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl @@ -157,6 +157,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
}
mActivity = this;
mClickHandler = new ClickHandler(this);
getWindow().setBackgroundDrawable(null);
mBrowserFrame = (FrameLayout) findViewById(R.id.content_frame);
mToolbarLayout = (LinearLayout) findViewById(R.id.toolbar_layout);
mPageLayout = (LinearLayout) findViewById(R.id.main_layout);

13
src/acr/browser/lightning/LightningView.java

@ -84,7 +84,9 @@ public class LightningView { @@ -84,7 +84,9 @@ public class LightningView {
mWebView.setFocusableInTouchMode(true);
mWebView.setFocusable(true);
mWebView.setAnimationCacheEnabled(false);
mWebView.setDrawingCacheEnabled(true);
mWebView.setDrawingCacheEnabled(false);
mWebView.setWillNotCacheDrawing(true);
mWebView.setAlwaysDrawnWithCacheEnabled(false);
mWebView.setBackgroundColor(activity.getResources().getColor(android.R.color.white));
if (API > 15) {
@ -93,8 +95,6 @@ public class LightningView { @@ -93,8 +95,6 @@ public class LightningView {
} else if (mWebView.getRootView() != null) {
mWebView.getRootView().setBackgroundDrawable(null);
}
mWebView.setWillNotCacheDrawing(false);
mWebView.setAlwaysDrawnWithCacheEnabled(true);
mWebView.setScrollbarFadingEnabled(true);
mWebView.setSaveEnabled(true);
mWebView.setWebChromeClient(new LightningChromeClient(activity));
@ -366,12 +366,7 @@ public class LightningView { @@ -366,12 +366,7 @@ public class LightningView {
// We're in Incognito mode, reject
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_NEVER_ALLOW);
}
// TODO
if (!mBrowserController.isIncognito()) {
settings.setDomStorageEnabled(true);
} else {
settings.setDomStorageEnabled(false);
}
settings.setDomStorageEnabled(true);
settings.setAppCacheEnabled(true);
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
settings.setDatabaseEnabled(true);

Loading…
Cancel
Save