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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 2352143002: Keep ContentViewCore selection rectangle in DIP (Closed)
Patch Set: Dropped Dip suffix to names and added Pix suffix where dimension is pixels Created 4 years, 3 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 | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index a7f92639fa22c313db88252bc64615f8ebf06c4a..7bde3d0edafb2d4f8bb37d4a0379612ac90e2434 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -646,13 +646,10 @@ void ContentViewCoreImpl::OnSelectionEvent(ui::SelectionEventType event,
if (j_obj.is_null())
return;
- gfx::PointF selection_anchor_pix =
- gfx::ScalePoint(selection_anchor, dpi_scale());
- gfx::RectF selection_rect_pix = gfx::ScaleRect(selection_rect, dpi_scale());
Java_ContentViewCore_onSelectionEvent(
- env, j_obj, event, selection_anchor_pix.x(), selection_anchor_pix.y(),
- selection_rect_pix.x(), selection_rect_pix.y(),
- selection_rect_pix.right(), selection_rect_pix.bottom());
+ env, j_obj, event, selection_anchor.x(), selection_anchor.y(),
+ selection_rect.x(), selection_rect.y(), selection_rect.right(),
+ selection_rect.bottom());
}
bool ContentViewCoreImpl::ShowPastePopup(int x_dip, int y_dip) {
@@ -666,9 +663,8 @@ bool ContentViewCoreImpl::ShowPastePopup(int x_dip, int y_dip) {
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())
return false;
- return Java_ContentViewCore_showPastePopupWithFeedback(
- env, obj, static_cast<jint>(x_dip * dpi_scale()),
- static_cast<jint>(y_dip * dpi_scale()));
+ return Java_ContentViewCore_showPastePopupWithFeedback(env, obj, x_dip,
+ y_dip);
}
void ContentViewCoreImpl::StartContentIntent(const GURL& content_url,
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698