Fix a bug in find.

Make setContentScrollBy return a boolean.
Necessary so that a caller of setContentScrollBy in WebView.cpp
can find out whether the page scrolled.  Requires a change in
external/webkit/
This commit is contained in:
Leon Scroggins
2009-07-31 15:05:42 -04:00
parent c479198536
commit 4c94304508

View File

@@ -2292,13 +2292,13 @@ public class WebView extends AbsoluteLayout
// Scale from content to view coordinates, and pin.
// Also called by jni webview.cpp
private void setContentScrollBy(int cx, int cy, boolean animate) {
private boolean setContentScrollBy(int cx, int cy, boolean animate) {
if (mDrawHistory) {
// disallow WebView to change the scroll position as History Picture
// is used in the view system.
// TODO: as we switchOutDrawHistory when trackball or navigation
// keys are hit, this should be safe. Right?
return;
return false;
}
cx = contentToView(cx);
cy = contentToView(cy);
@@ -2315,11 +2315,9 @@ public class WebView extends AbsoluteLayout
// FIXME: Why do we only scroll horizontally if there is no
// vertical scroll?
// Log.d(LOGTAG, "setContentScrollBy cy=" + cy);
if (cy == 0 && cx != 0) {
pinScrollBy(cx, 0, animate, 0);
}
return cy == 0 && cx != 0 && pinScrollBy(cx, 0, animate, 0);
} else {
pinScrollBy(cx, cy, animate, 0);
return pinScrollBy(cx, cy, animate, 0);
}
}