diff options
Diffstat (limited to 'WebKit/android/nav/SelectText.cpp')
| -rw-r--r-- | WebKit/android/nav/SelectText.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp index 25f9482..f691d47 100644 --- a/WebKit/android/nav/SelectText.cpp +++ b/WebKit/android/nav/SelectText.cpp @@ -44,7 +44,7 @@ #include "TextRun.h" #ifdef DEBUG_NAV_UI -#include "CString.h" +#include <wtf/text/CString.h> #endif #define VERBOSE_LOGGING 0 @@ -961,7 +961,7 @@ public: return false; } - WebCore::String text() { + WTF::String text() { if (mFlipped) finish(); // the text has been copied in visual order. Reverse as needed if @@ -977,7 +977,7 @@ public: break; } } - return WebCore::String(mSelectText.begin(), mSelectText.count()); + return WTF::String(mSelectText.begin(), mSelectText.count()); } protected: @@ -1166,7 +1166,7 @@ static SkIRect findRight(const SkPicture& picture, const SkIRect& area, return findEdge(picture, area, x, y, false, base); } -static WebCore::String text(const SkPicture& picture, const SkIRect& area, +static WTF::String text(const SkPicture& picture, const SkIRect& area, const SkIRect& start, int startBase, const SkIRect& end, int endBase, bool flipped) { @@ -1275,12 +1275,6 @@ SelectText::SelectText() void SelectText::draw(SkCanvas* canvas, LayerAndroid* layer) { - // Gmail makes layers appear dynamically the page scrolls. The picture - // recorded when the selection begins is confused by the pictures seen - // in subsequent layers. To work around this, only allow text selection - // in the main picture. - if (layer->uniqueId() != -1) - return; // FIXME: layer may not own the original selected picture m_picture = layer->picture(); if (!m_picture) @@ -1463,10 +1457,7 @@ bool SelectText::hitSelection(int x, int y) const int bottom = m_selEnd.fBottom + CONTROL_HEIGHT / 2; if (hitCorner(right, bottom, x, y)) return true; - SkIRect test; - test.set(x - CONTROL_WIDTH, y - CONTROL_HEIGHT, x + CONTROL_WIDTH, - y + CONTROL_HEIGHT); - return m_selRegion.intersects(test); + return m_selRegion.contains(x, y); } void SelectText::moveSelection(const SkPicture* picture, int x, int y) |
