summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Scroggins <>2009-03-26 10:38:14 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-26 10:38:14 -0700
commit3689604fc92dca580602379ccdbde80899a22fdf (patch)
tree683f62b34f7c5c10821783892c2313c1b7c25777
parent7eb038ed96d39653c81d6734c04cf8f5709ede93 (diff)
downloadexternal_webkit-3689604fc92dca580602379ccdbde80899a22fdf.zip
external_webkit-3689604fc92dca580602379ccdbde80899a22fdf.tar.gz
external_webkit-3689604fc92dca580602379ccdbde80899a22fdf.tar.bz2
Automated import from //branches/cupcake/...@142939,142939
-rw-r--r--WebKit/android/nav/WebView.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index 8b6dd5a..0657a81 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -2135,9 +2135,11 @@ static int nativeFindAll(JNIEnv *env, jobject obj, jstring findLower,
checkException(env);
return 0;
}
-
+ static const int MAX_16_BIT_INT = 65535;
int width = root->documentWidth();
+ if (width > MAX_16_BIT_INT) width = MAX_16_BIT_INT;
int height = root->documentHeight();
+ if (height > MAX_16_BIT_INT) height = MAX_16_BIT_INT;
// Create a FindCanvas, which allows us to fake draw into it so we can
// figure out where our search string is rendered (and how many times).
FindCanvas canvas(width, height, (const UChar*) findLowerChars,