|
|
@ -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
|
|
|
|
settings.setDomStorageEnabled(true); |
|
|
|
if (!mBrowserController.isIncognito()) { |
|
|
|
|
|
|
|
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); |
|
|
|