diff options
| author | George Mount <mount@google.com> | 2011-10-31 13:49:03 -0700 |
|---|---|---|
| committer | George Mount <mount@google.com> | 2011-11-09 14:43:55 -0800 |
| commit | e263bc1a36c539d0d0f16a17b23cb862742e0bf0 (patch) | |
| tree | 8e3fef79ecd4d352458c7e278fb024fa64c445ba /core/java/android/webkit/BrowserFrame.java | |
| parent | 75f9808e5544c69254ea6cf374469a3dd9042b7d (diff) | |
Set the initial scroll position for RTL.
Bug 5268793
Webkit knows about the correct initial position for web pages.
On initial show, scroll to the webkit position.
External WebKit CL: I6a91b97f
Change-Id: I2537b84a30a26a79a8a0f23fe62b9ed757f9c5a4
Diffstat (limited to 'core/java/android/webkit/BrowserFrame.java')
| -rw-r--r-- | core/java/android/webkit/BrowserFrame.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java index 388920c38d12..c1945599d337 100644 --- a/core/java/android/webkit/BrowserFrame.java +++ b/core/java/android/webkit/BrowserFrame.java @@ -1404,4 +1404,17 @@ class BrowserFrame extends Handler { native void nativeSslClientCert(int handle, byte[] pkcs8EncodedPrivateKey, byte[][] asn1DerEncodedCertificateChain); + + /** + * Returns true when the contents of the frame is an RTL or vertical-rl + * page. This is used for determining whether a frame should be initially + * scrolled right-most as opposed to left-most. + * @return true when the frame should be initially scrolled right-most + * based on the text direction and writing mode. + */ + /* package */ boolean getShouldStartScrolledRight() { + return nativeGetShouldStartScrolledRight(mNativeFrame); + } + + private native boolean nativeGetShouldStartScrolledRight(int nativeBrowserFrame); } |
