Loading api/current.xml +24 −0 Original line number Diff line number Diff line Loading @@ -200811,6 +200811,17 @@ deprecated="not deprecated" visibility="public" > <method name="enableSmoothTransition" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getAllowFileAccess" return="boolean" abstract="false" Loading Loading @@ -201426,6 +201437,19 @@ <parameter name="flag" type="boolean"> </parameter> </method> <method name="setEnableSmoothTransition" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="enable" type="boolean"> </parameter> </method> <method name="setFantasyFontFamily" return="void" abstract="false" core/java/android/webkit/WebSettings.java +20 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,7 @@ public class WebSettings { private boolean mBuiltInZoomControls = false; private boolean mAllowFileAccess = true; private boolean mLoadWithOverviewMode = false; private boolean mEnableSmoothTransition = false; // private WebSettings, not accessible by the host activity static private int mDoubleTapToastCount = 3; Loading Loading @@ -522,6 +523,25 @@ public class WebSettings { return mLoadWithOverviewMode; } /** * Set whether the WebView will enable smooth transition while panning or * zooming. If it is true, WebView will choose a solution to maximize the * performance. e.g. the WebView's content may not be updated during the * transition. If it is false, WebView will keep its fidelity. The default * value is false. */ public void setEnableSmoothTransition(boolean enable) { mEnableSmoothTransition = enable; } /** * Returns true if the WebView enables smooth transition while panning or * zooming. */ public boolean enableSmoothTransition() { return mEnableSmoothTransition; } /** * Store whether the WebView is saving form data. */ Loading core/java/android/webkit/WebViewCore.java +6 −0 Original line number Diff line number Diff line Loading @@ -1871,6 +1871,8 @@ final class WebViewCore { // called from UI thread while WEBKIT_DRAW is just pulled out of the // queue in WebCore thread to be executed. Then update won't be blocked. if (core != null) { if (!core.getSettings().enableSmoothTransition()) return; synchronized (core) { core.mDrawIsPaused = true; if (core.mDrawIsScheduled) { Loading @@ -1883,6 +1885,10 @@ final class WebViewCore { static void resumeUpdatePicture(WebViewCore core) { if (core != null) { // if mDrawIsPaused is true, ignore the setting, continue to resume if (!core.mDrawIsPaused && !core.getSettings().enableSmoothTransition()) return; synchronized (core) { core.mDrawIsPaused = false; if (core.mDrawIsScheduled) { Loading Loading
api/current.xml +24 −0 Original line number Diff line number Diff line Loading @@ -200811,6 +200811,17 @@ deprecated="not deprecated" visibility="public" > <method name="enableSmoothTransition" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getAllowFileAccess" return="boolean" abstract="false" Loading Loading @@ -201426,6 +201437,19 @@ <parameter name="flag" type="boolean"> </parameter> </method> <method name="setEnableSmoothTransition" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="enable" type="boolean"> </parameter> </method> <method name="setFantasyFontFamily" return="void" abstract="false"
core/java/android/webkit/WebSettings.java +20 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,7 @@ public class WebSettings { private boolean mBuiltInZoomControls = false; private boolean mAllowFileAccess = true; private boolean mLoadWithOverviewMode = false; private boolean mEnableSmoothTransition = false; // private WebSettings, not accessible by the host activity static private int mDoubleTapToastCount = 3; Loading Loading @@ -522,6 +523,25 @@ public class WebSettings { return mLoadWithOverviewMode; } /** * Set whether the WebView will enable smooth transition while panning or * zooming. If it is true, WebView will choose a solution to maximize the * performance. e.g. the WebView's content may not be updated during the * transition. If it is false, WebView will keep its fidelity. The default * value is false. */ public void setEnableSmoothTransition(boolean enable) { mEnableSmoothTransition = enable; } /** * Returns true if the WebView enables smooth transition while panning or * zooming. */ public boolean enableSmoothTransition() { return mEnableSmoothTransition; } /** * Store whether the WebView is saving form data. */ Loading
core/java/android/webkit/WebViewCore.java +6 −0 Original line number Diff line number Diff line Loading @@ -1871,6 +1871,8 @@ final class WebViewCore { // called from UI thread while WEBKIT_DRAW is just pulled out of the // queue in WebCore thread to be executed. Then update won't be blocked. if (core != null) { if (!core.getSettings().enableSmoothTransition()) return; synchronized (core) { core.mDrawIsPaused = true; if (core.mDrawIsScheduled) { Loading @@ -1883,6 +1885,10 @@ final class WebViewCore { static void resumeUpdatePicture(WebViewCore core) { if (core != null) { // if mDrawIsPaused is true, ignore the setting, continue to resume if (!core.mDrawIsPaused && !core.getSettings().enableSmoothTransition()) return; synchronized (core) { core.mDrawIsPaused = false; if (core.mDrawIsScheduled) { Loading