From 3689604fc92dca580602379ccdbde80899a22fdf Mon Sep 17 00:00:00 2001 From: Leon Scroggins <> Date: Thu, 26 Mar 2009 10:38:14 -0700 Subject: Automated import from //branches/cupcake/...@142939,142939 --- WebKit/android/nav/WebView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- cgit v1.1