diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 25 | ||||
| -rw-r--r-- | core/java/android/webkit/WebViewCore.java | 5 |
2 files changed, 23 insertions, 7 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index f4fd551..7620a63 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -8405,9 +8405,9 @@ public class WebView extends AbsoluteLayout } } - // Called by JNI to invalidate the View, given rectangle coordinates in - // content space - private void pageSwapCallback() { + /** @hide Called by JNI when pages are swapped (only occurs with hardware + * acceleration) */ + protected void pageSwapCallback() { if (inEditingMode()) { didUpdateWebTextViewDimensions(ANYWHERE); } @@ -8426,11 +8426,11 @@ public class WebView extends AbsoluteLayout WebViewCore.ViewState viewState = draw.mViewState; boolean isPictureAfterFirstLayout = viewState != null; - // Request a callback on pageSwap (to reposition the webtextview) - boolean registerPageSwapCallback = - !mZoomManager.isFixedLengthAnimationInProgress() && inEditingMode(); - if (updateBaseLayer) { + // Request a callback on pageSwap (to reposition the webtextview) + boolean registerPageSwapCallback = + !mZoomManager.isFixedLengthAnimationInProgress() && inEditingMode(); + setBaseLayer(draw.mBaseLayer, draw.mInvalRegion, getSettings().getShowVisualIndicator(), isPictureAfterFirstLayout, registerPageSwapCallback); @@ -9084,6 +9084,16 @@ public class WebView extends AbsoluteLayout } } + /** @hide send content invalidate */ + protected void contentInvalidateAll() { + mWebViewCore.sendMessage(EventHub.CONTENT_INVALIDATE_ALL); + } + + /** @hide call pageSwapCallback upon next page swap */ + protected void registerPageSwapCallback() { + nativeRegisterPageSwapCallback(); + } + /** * Begin collecting per-tile profiling data * @@ -9245,6 +9255,7 @@ public class WebView extends AbsoluteLayout private native void nativeStopGL(); private native Rect nativeSubtractLayers(Rect content); private native int nativeTextGeneration(); + private native void nativeRegisterPageSwapCallback(); private native void nativeTileProfilingStart(); private native float nativeTileProfilingStop(); private native void nativeTileProfilingClear(); diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index 8d8023b..400cdbd 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -999,6 +999,7 @@ public final class WebViewCore { static final int DUMP_V8COUNTERS = 173; static final int SET_JS_FLAGS = 174; + static final int CONTENT_INVALIDATE_ALL = 175; // Geolocation static final int GEOLOCATION_PERMISSIONS_PROVIDE = 180; @@ -1503,6 +1504,10 @@ public final class WebViewCore { nativeSetJsFlags((String)msg.obj); break; + case CONTENT_INVALIDATE_ALL: + nativeContentInvalidateAll(); + break; + case SAVE_WEBARCHIVE: WebView.SaveWebArchiveMessage saveMessage = (WebView.SaveWebArchiveMessage)msg.obj; |
