Index: components/web_contents_delegate_android/validation_message_bubble_android.cc |
diff --git a/components/web_contents_delegate_android/validation_message_bubble_android.cc b/components/web_contents_delegate_android/validation_message_bubble_android.cc |
index 2f15a5e5c688fe346e6ea5494964c856c2a63df6..edfb81d0f1ef8f21d35c29ac4f3580e706dddc5c 100644 |
--- a/components/web_contents_delegate_android/validation_message_bubble_android.cc |
+++ b/components/web_contents_delegate_android/validation_message_bubble_android.cc |
@@ -14,13 +14,6 @@ |
using base::android::ConvertUTF16ToJavaString; |
namespace { |
- |
-gfx::Rect ScaleToRoundedRect(const gfx::Rect& rect, float scale) { |
- gfx::RectF scaledRect(rect); |
- scaledRect.Scale(scale); |
- return ToNearestRect(scaledRect); |
-} |
- |
gfx::Size ScaleToRoundedSize(const gfx::SizeF& size, float scale) { |
return gfx::ToRoundedSize(gfx::ScaleSize(size, scale)); |
} |
@@ -55,7 +48,9 @@ void ValidationMessageBubbleAndroid::ShowAtPositionRelativeToAnchor( |
// Convert to physical unit before passing to Java. |
float scale = view->GetDipScale() * view->page_scale(); |
- gfx::Rect anchor = ScaleToRoundedRect(anchor_in_screen, scale); |
+ gfx::RectF anchor_f = gfx::RectF(anchor_in_screen); |
+ anchor_f.Scale(scale); |
+ gfx::Rect anchor = ToNearestRect(anchor_f); |
gfx::Size viewport = ScaleToRoundedSize(view->viewport_size(), scale); |
JNIEnv* env = base::android::AttachCurrentThread(); |