diff options
author | George Mount <mount@google.com> | 2012-06-01 14:26:57 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2012-06-01 14:30:09 -0700 |
commit | 2d66db6bf0f6f3687361cce7d9280de47ed591ee (patch) | |
tree | 6923caafd73ce6d7441cedf416316090d8d6d22b /Source/WebKit/android/nav/SelectText.h | |
parent | be480525e35fed411698c2a58200b5d010f5ecde (diff) | |
download | external_webkit-2d66db6bf0f6f3687361cce7d9280de47ed591ee.zip external_webkit-2d66db6bf0f6f3687361cce7d9280de47ed591ee.tar.gz external_webkit-2d66db6bf0f6f3687361cce7d9280de47ed591ee.tar.bz2 |
Change from left/right to base/extent for selection handles.
Bug 6557816
This is a step in preparation to fix text area selection.
It moves selection from left/right to base/extent. left/right
can cause problems when dragging cursors -- it is sometimes
difficult to tell which cursor should be dragged, the left or
right, but we can always keep the base/extent constant.
Framework Change: I2f9b963e93bb1ab86a9b26518fca52449b56d5d9
Change-Id: I5609d07ea2ee67fc08d15cfcad31f49302f33297
Diffstat (limited to 'Source/WebKit/android/nav/SelectText.h')
-rw-r--r-- | Source/WebKit/android/nav/SelectText.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/WebKit/android/nav/SelectText.h b/Source/WebKit/android/nav/SelectText.h index aaaf3bb..8f7592d 100644 --- a/Source/WebKit/android/nav/SelectText.h +++ b/Source/WebKit/android/nav/SelectText.h @@ -35,8 +35,13 @@ namespace android { class SelectText : public RegionLayerDrawExtra { public: enum HandleId { + BaseHandle = 0, + ExtentHandle = 1, + }; + enum HandleType { LeftHandle = 0, - RightHandle = 1, + CenterHandle = 1, + RightHandle = 2, }; IntRect& caretRect(HandleId id) { return m_caretRects[id]; } @@ -48,11 +53,14 @@ public: void setText(const String& text) { m_text = text.threadsafeCopy(); } String& getText() { return m_text; } + HandleType getHandleType(HandleId id) { return m_handleType[id]; } + void setHandleType(HandleId id, HandleType type) { m_handleType[id] = type; } private: IntRect m_caretRects[2]; IntRect m_textRects[2]; int m_caretLayerId[2]; + HandleType m_handleType[2]; String m_text; }; |