Index: content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java b/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java |
index 56a74a86d02612a88f3eab310031a593996f1b4d..b961b050025a2c6f1bd6428eb9f3c45cec27c7b6 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java |
@@ -156,28 +156,78 @@ public class PopupTouchHandleDrawable extends View { |
switch (orientation) { |
case TouchHandleOrientation.LEFT: { |
- mDrawable = HandleViewResources.getLeftHandleDrawable(mContext); |
+ mDrawable = HandleViewResources.getLeftHandleDrawable(mContext, false); |
mHotspotX = (mDrawable.getIntrinsicWidth() * 3) / 4f; |
+ mHotspotY = 0; |
break; |
} |
case TouchHandleOrientation.RIGHT: { |
- mDrawable = HandleViewResources.getRightHandleDrawable(mContext); |
+ mDrawable = HandleViewResources.getRightHandleDrawable(mContext, false); |
mHotspotX = mDrawable.getIntrinsicWidth() / 4f; |
+ mHotspotY = 0; |
break; |
} |
case TouchHandleOrientation.CENTER: { |
- mDrawable = HandleViewResources.getCenterHandleDrawable(mContext); |
+ mDrawable = HandleViewResources.getCenterHandleDrawable(mContext, false); |
mHotspotX = mDrawable.getIntrinsicWidth() / 2f; |
+ mHotspotY = 0; |
break; |
} |
+ case TouchHandleOrientation.LEFT_INVERTED: { |
+ mDrawable = HandleViewResources.getRightHandleDrawable(mContext, true); |
+ mHotspotX = (mDrawable.getIntrinsicWidth() * 3) / 4f; |
+ mHotspotY = mDrawable.getIntrinsicHeight(); |
+ break; |
+ } |
+ |
+ case TouchHandleOrientation.RIGHT_INVERTED: { |
+ mDrawable = HandleViewResources.getLeftHandleDrawable(mContext, true); |
+ mHotspotX = mDrawable.getIntrinsicWidth() / 4f; |
+ mHotspotY = mDrawable.getIntrinsicHeight(); |
+ break; |
+ } |
+ |
+ case TouchHandleOrientation.LEFT_FLIPPED: { |
+ mDrawable = HandleViewResources.getRightHandleDrawable(mContext, false); |
+ mHotspotX = mDrawable.getIntrinsicWidth() / 4f; |
+ mHotspotY = 0; |
+ break; |
+ } |
+ |
+ case TouchHandleOrientation.RIGHT_FLIPPED: { |
+ mDrawable = HandleViewResources.getLeftHandleDrawable(mContext, false); |
+ mHotspotX = (mDrawable.getIntrinsicWidth() * 3) / 4f; |
+ mHotspotY = 0; |
+ break; |
+ } |
+ |
+ case TouchHandleOrientation.LEFT_FLIPPED_INVERTED: { |
+ mDrawable = HandleViewResources.getLeftHandleDrawable(mContext, true); |
+ mHotspotX = mDrawable.getIntrinsicWidth() / 4f; |
+ mHotspotY = mDrawable.getIntrinsicHeight(); |
+ break; |
+ } |
+ |
+ case TouchHandleOrientation.RIGHT_FLIPPED_INVERTED: { |
+ mDrawable = HandleViewResources.getRightHandleDrawable(mContext, true); |
+ mHotspotX = (mDrawable.getIntrinsicWidth() * 3) / 4f; |
+ mHotspotY = mDrawable.getIntrinsicHeight(); |
+ break; |
+ } |
+ |
+ case TouchHandleOrientation.CENTER_INVERTED: { |
+ mDrawable = HandleViewResources.getCenterHandleDrawable(mContext, true); |
+ mHotspotX = mDrawable.getIntrinsicWidth() / 2f; |
+ mHotspotY = mDrawable.getIntrinsicHeight(); |
+ break; |
+ } |
case TouchHandleOrientation.UNDEFINED: |
default: |
break; |
} |
- mHotspotY = 0; |
// Force handle repositioning to accommodate the new orientation's hotspot. |
if (hadValidOrientation) setFocus(oldAdjustedPositionX, oldAdjustedPositionY); |