Remove overdraw and stop blocking DOM storage (breaks sites) in incognito mode
This commit is contained in:
parent
4699b583f0
commit
c87c57661f
@ -157,6 +157,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
}
|
}
|
||||||
mActivity = this;
|
mActivity = this;
|
||||||
mClickHandler = new ClickHandler(this);
|
mClickHandler = new ClickHandler(this);
|
||||||
|
getWindow().setBackgroundDrawable(null);
|
||||||
mBrowserFrame = (FrameLayout) findViewById(R.id.content_frame);
|
mBrowserFrame = (FrameLayout) findViewById(R.id.content_frame);
|
||||||
mToolbarLayout = (LinearLayout) findViewById(R.id.toolbar_layout);
|
mToolbarLayout = (LinearLayout) findViewById(R.id.toolbar_layout);
|
||||||
mPageLayout = (LinearLayout) findViewById(R.id.main_layout);
|
mPageLayout = (LinearLayout) findViewById(R.id.main_layout);
|
||||||
|
@ -84,7 +84,9 @@ public class LightningView {
|
|||||||
mWebView.setFocusableInTouchMode(true);
|
mWebView.setFocusableInTouchMode(true);
|
||||||
mWebView.setFocusable(true);
|
mWebView.setFocusable(true);
|
||||||
mWebView.setAnimationCacheEnabled(false);
|
mWebView.setAnimationCacheEnabled(false);
|
||||||
mWebView.setDrawingCacheEnabled(true);
|
mWebView.setDrawingCacheEnabled(false);
|
||||||
|
mWebView.setWillNotCacheDrawing(true);
|
||||||
|
mWebView.setAlwaysDrawnWithCacheEnabled(false);
|
||||||
mWebView.setBackgroundColor(activity.getResources().getColor(android.R.color.white));
|
mWebView.setBackgroundColor(activity.getResources().getColor(android.R.color.white));
|
||||||
|
|
||||||
if (API > 15) {
|
if (API > 15) {
|
||||||
@ -93,8 +95,6 @@ public class LightningView {
|
|||||||
} else if (mWebView.getRootView() != null) {
|
} else if (mWebView.getRootView() != null) {
|
||||||
mWebView.getRootView().setBackgroundDrawable(null);
|
mWebView.getRootView().setBackgroundDrawable(null);
|
||||||
}
|
}
|
||||||
mWebView.setWillNotCacheDrawing(false);
|
|
||||||
mWebView.setAlwaysDrawnWithCacheEnabled(true);
|
|
||||||
mWebView.setScrollbarFadingEnabled(true);
|
mWebView.setScrollbarFadingEnabled(true);
|
||||||
mWebView.setSaveEnabled(true);
|
mWebView.setSaveEnabled(true);
|
||||||
mWebView.setWebChromeClient(new LightningChromeClient(activity));
|
mWebView.setWebChromeClient(new LightningChromeClient(activity));
|
||||||
@ -366,12 +366,7 @@ public class LightningView {
|
|||||||
// We're in Incognito mode, reject
|
// We're in Incognito mode, reject
|
||||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_NEVER_ALLOW);
|
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_NEVER_ALLOW);
|
||||||
}
|
}
|
||||||
// TODO
|
|
||||||
if (!mBrowserController.isIncognito()) {
|
|
||||||
settings.setDomStorageEnabled(true);
|
settings.setDomStorageEnabled(true);
|
||||||
} else {
|
|
||||||
settings.setDomStorageEnabled(false);
|
|
||||||
}
|
|
||||||
settings.setAppCacheEnabled(true);
|
settings.setAppCacheEnabled(true);
|
||||||
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||||
settings.setDatabaseEnabled(true);
|
settings.setDatabaseEnabled(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user