summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/FindCanvas.cpp
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-03-03 08:35:20 -0500
committerCary Clark <cary@android.com>2010-03-03 10:42:12 -0500
commitafa40c89b27e6edbc28a5ad400eb8bb9176a88a8 (patch)
tree56e2d8a96b856b0b509719ba06ce1b422a8f49dc /WebKit/android/nav/FindCanvas.cpp
parentcf9d0b9a12d2ae509c2a3075c4edb0fe38dc17a7 (diff)
downloadexternal_webkit-afa40c89b27e6edbc28a5ad400eb8bb9176a88a8.zip
external_webkit-afa40c89b27e6edbc28a5ad400eb8bb9176a88a8.tar.gz
external_webkit-afa40c89b27e6edbc28a5ad400eb8bb9176a88a8.tar.bz2
refactor find state and scrolling
Separate out state when find is up and is empty. Request a scroll when setting a match, rather than when drawing. Don't draw if there's no match. Companion fix in frameworks/base http://b/2370069
Diffstat (limited to 'WebKit/android/nav/FindCanvas.cpp')
-rw-r--r--WebKit/android/nav/FindCanvas.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/WebKit/android/nav/FindCanvas.cpp b/WebKit/android/nav/FindCanvas.cpp
index 3a0ef33..139bd2c 100644
--- a/WebKit/android/nav/FindCanvas.cpp
+++ b/WebKit/android/nav/FindCanvas.cpp
@@ -537,7 +537,7 @@ void FindOnPage::storeCurrentMatchLocation() {
#define MAX_NUMBER_OF_MATCHES_TO_DRAW 101
void FindOnPage::draw(SkCanvas* canvas, LayerAndroid* layer) {
- if (!m_matches || !m_matches->size())
+ if (!m_hasCurrentLocation || !m_matches || !m_matches->size())
return;
int layerId = layer->uniqueId();
if (m_findIndex >= m_matches->size())