| Index: android_webview/native/aw_contents.cc
|
| diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
|
| index 8d726da2afbd400a57ef2123a8eca18634835f8a..bc9704fc8fd30c7f7fcafb18f28ec9f2d33f92a0 100644
|
| --- a/android_webview/native/aw_contents.cc
|
| +++ b/android_webview/native/aw_contents.cc
|
| @@ -649,19 +649,20 @@ bool AwContents::OnDraw(JNIEnv* env,
|
| jobject obj,
|
| jobject canvas,
|
| jboolean is_hardware_accelerated,
|
| - jint scroll_x,
|
| - jint scroll_y,
|
| + jint scroll_x_pix,
|
| + jint scroll_y_pix,
|
| jint clip_left,
|
| jint clip_top,
|
| jint clip_right,
|
| jint clip_bottom) {
|
| - return browser_view_renderer_->OnDraw(canvas,
|
| - is_hardware_accelerated,
|
| - gfx::Point(scroll_x, scroll_y),
|
| - gfx::Rect(clip_left,
|
| - clip_top,
|
| - clip_right - clip_left,
|
| - clip_bottom - clip_top));
|
| + return browser_view_renderer_->OnDraw(
|
| + canvas,
|
| + is_hardware_accelerated,
|
| + gfx::Vector2d(scroll_x_pix, scroll_y_pix),
|
| + gfx::Rect(clip_left,
|
| + clip_top,
|
| + clip_right - clip_left,
|
| + clip_bottom - clip_top));
|
| }
|
|
|
| void AwContents::SetPendingWebContentsForPopup(
|
| @@ -697,6 +698,19 @@ gfx::Point AwContents::GetLocationOnScreen() {
|
| return gfx::Point(location[0], location[1]);
|
| }
|
|
|
| +void AwContents::ScrollContainerViewTo(gfx::Vector2dF new_value_css) {
|
| + JNIEnv* env = AttachCurrentThread();
|
| + ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
|
| + if (obj.is_null())
|
| + return;
|
| + Java_AwContents_scrollContainerViewTo(
|
| + env, obj.obj(), new_value_css.x(), new_value_css.y());
|
| +}
|
| +
|
| +void AwContents::ScrollTo(JNIEnv* env, jobject obj, jint x, jint y) {
|
| + browser_view_renderer_->ScrollTo(gfx::Vector2dF(x, y));
|
| +}
|
| +
|
| void AwContents::OnPageScaleFactorChanged(float page_scale_factor) {
|
| JNIEnv* env = AttachCurrentThread();
|
| ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
|
|
|