summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-09-15 11:29:20 -0400
committerCary Clark <cary@android.com>2010-09-15 11:29:20 -0400
commit1441f89dceb65cbe25d23b1b90005e51d3ed28bd (patch)
tree09027bbfe679b077f3e08474178e93a0a1a6057d /WebKit/android
parente3a33d1e0c60357ad9f36df6e16799ddb5942917 (diff)
downloadexternal_webkit-1441f89dceb65cbe25d23b1b90005e51d3ed28bd.zip
external_webkit-1441f89dceb65cbe25d23b1b90005e51d3ed28bd.tar.gz
external_webkit-1441f89dceb65cbe25d23b1b90005e51d3ed28bd.tar.bz2
Do not merge -- restrict text selection to the main layer
Gmail causes layers to appear as a message is scrolled. This confuses the text selection logic. To workaround this in Gingerbread, text selection is only allowed to be drawn in the main layer. Change-Id: Idd814bcb5dfeef2fc12d6b0d586a63f711351d96 http://b/2998882
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/nav/SelectText.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp
index e303d2b..5ffb1e3 100644
--- a/WebKit/android/nav/SelectText.cpp
+++ b/WebKit/android/nav/SelectText.cpp
@@ -1244,6 +1244,12 @@ 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)