summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/WebView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/nav/WebView.cpp')
-rw-r--r--WebKit/android/nav/WebView.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index 683c2a3..28babc0 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -1022,8 +1022,8 @@ static const ScrollableLayerAndroid* findScrollableLayer(
x -= bounds.fLeft;
y -= bounds.fTop;
int count = parent->countChildren();
- for (int i = 0; i < count; i++) {
- const LayerAndroid* child = parent->getChild(i);
+ while (count--) {
+ const LayerAndroid* child = parent->getChild(count);
const ScrollableLayerAndroid* result = findScrollableLayer(child, x, y,
foundBounds);
if (result) {