Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: ui/android/view_android.cc

Issue 2219823002: Move content offset to ViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/android/view_android.h ('k') | ui/android/window_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/view_android.cc
diff --git a/ui/android/view_android.cc b/ui/android/view_android.cc
index 96e56495886dd26d8807a5847a0d6f0e12894295..52859edaba8294fd7b6f6e5f5d792f8fc839fb06 100644
--- a/ui/android/view_android.cc
+++ b/ui/android/view_android.cc
@@ -140,10 +140,7 @@ void ViewAndroid::SetAnchorRect(const JavaRef<jobject>& anchor,
->GetDisplayNearestWindow(this)
.device_scale_factor();
int left_margin = std::round(bounds.x() * scale);
- // TODO(jinsukkim): Move content_offset() to ViewAndroid, since it's
- // specific to a given web contents/render widget.
- int top_margin = std::round(
- (GetWindowAndroid()->content_offset().y() + bounds.y()) * scale);
+ int top_margin = std::round((content_offset().y() + bounds.y()) * scale);
JNIEnv* env = base::android::AttachCurrentThread();
Java_ViewAndroidDelegate_setViewPosition(
env, delegate, anchor, bounds.x(), bounds.y(), bounds.width(),
« no previous file with comments | « ui/android/view_android.h ('k') | ui/android/window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698