summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav/FindCanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/nav/FindCanvas.cpp')
-rw-r--r--Source/WebKit/android/nav/FindCanvas.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/WebKit/android/nav/FindCanvas.cpp b/Source/WebKit/android/nav/FindCanvas.cpp
index 2d310b3..ca3cfba 100644
--- a/Source/WebKit/android/nav/FindCanvas.cpp
+++ b/Source/WebKit/android/nav/FindCanvas.cpp
@@ -532,9 +532,6 @@ IntRect FindOnPage::currentMatchBounds() const {
if (!m_matches || !m_matches->size())
return noBounds;
MatchInfo& info = (*m_matches)[m_findIndex];
- // FIXME: this should test if the match in the layer is visible
- if (info.isInLayer())
- return noBounds;
return info.getLocation().getBounds();
}
@@ -545,6 +542,10 @@ bool FindOnPage::currentMatchIsInLayer() const {
return info.isInLayer();
}
+int FindOnPage::currentMatchLayerId() const {
+ return (*m_matches)[m_findIndex].layerId();
+}
+
// This function is only used by findNext and setMatches. In it, we store
// upper left corner of the match specified by m_findIndex in
// m_currentMatchLocation.
@@ -597,7 +598,7 @@ void FindOnPage::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval) {
unsigned numberOfMatches = m_matches->size();
if (numberOfMatches > 1
&& numberOfMatches < MAX_NUMBER_OF_MATCHES_TO_DRAW) {
- for(unsigned i = 0; i < numberOfMatches; i++) {
+ for (unsigned i = 0; i < numberOfMatches; i++) {
// The current match has already been drawn
if (i == m_findIndex)
continue;