Update text webcore thread's text generation number.

When the user edits text in a textfield, we increase a generation
number so we can mark changes from webkit to be out of date.  With
this change, update webcore's notion of the text generation number
in deleteSelection and replaceTextfieldText, in addition to
passToJs.  Requires a change in frameworks/base.
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 57d324c..c83a465 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -1438,7 +1438,7 @@
     setFocusControllerActive(true);
 }
 
-void WebViewCore::deleteSelection(int start, int end)
+void WebViewCore::deleteSelection(int start, int end, int textGeneration)
 {
     setSelection(start, end);
     if (start == end)
@@ -1447,10 +1447,12 @@
     if (!focus)
         return;
     WebCore::TypingCommand::deleteSelection(focus->document());
+    m_textGeneration = textGeneration;
 }
 
 void WebViewCore::replaceTextfieldText(int oldStart,
-        int oldEnd, const WebCore::String& replace, int start, int end)
+        int oldEnd, const WebCore::String& replace, int start, int end,
+        int textGeneration)
 {
     WebCore::Node* focus = currentFocus();
     if (!focus)
@@ -1459,6 +1461,7 @@
     WebCore::TypingCommand::insertText(focus->document(), replace,
         false);
     setSelection(start, end);
+    m_textGeneration = textGeneration;
 }
 
 void WebViewCore::passToJs(int generation, const WebCore::String& current,
@@ -2085,13 +2088,14 @@
         reinterpret_cast<WebCore::Node*>(nodePtr));
 }
 
-static void DeleteSelection(JNIEnv *env, jobject obj, jint start, jint end)
+static void DeleteSelection(JNIEnv *env, jobject obj, jint start, jint end,
+        jint textGeneration)
 {
 #ifdef ANDROID_INSTRUMENT
     TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
 #endif
     WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
-    viewImpl->deleteSelection(start, end);
+    viewImpl->deleteSelection(start, end, textGeneration);
 }
 
 static void SetSelection(JNIEnv *env, jobject obj, jint start, jint end)
@@ -2105,7 +2109,8 @@
 
 
 static void ReplaceTextfieldText(JNIEnv *env, jobject obj,
-    jint oldStart, jint oldEnd, jstring replace, jint start, jint end)
+    jint oldStart, jint oldEnd, jstring replace, jint start, jint end,
+    jint textGeneration)
 {
 #ifdef ANDROID_INSTRUMENT
     TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
@@ -2113,7 +2118,7 @@
     WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
     WebCore::String webcoreString = to_string(env, replace);
     viewImpl->replaceTextfieldText(oldStart,
-            oldEnd, webcoreString, start, end);
+            oldEnd, webcoreString, start, end, textGeneration);
 }
 
 static void PassToJs(JNIEnv *env, jobject obj,
@@ -2547,9 +2552,9 @@
         (void*) SetGlobalBounds },
     { "nativeSetSelection", "(II)V",
         (void*) SetSelection } ,
-    { "nativeDeleteSelection", "(II)V",
+    { "nativeDeleteSelection", "(III)V",
         (void*) DeleteSelection } ,
-    { "nativeReplaceTextfieldText", "(IILjava/lang/String;II)V",
+    { "nativeReplaceTextfieldText", "(IILjava/lang/String;III)V",
         (void*) ReplaceTextfieldText } ,
     { "nativeMoveMouse", "(III)V",
         (void*) MoveMouse },
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h
index fe1caa2..2af849f 100644
--- a/WebKit/android/jni/WebViewCore.h
+++ b/WebKit/android/jni/WebViewCore.h
@@ -248,7 +248,7 @@
          *  If there is no focus, silently fail.
          *  If start and end are out of order, swap them.
          */
-        void deleteSelection(int start, int end);
+        void deleteSelection(int start, int end, int textGeneration);
 
         /**
          *  Set the selection of the currently focused textfield to (start, end).
@@ -261,7 +261,8 @@
          *  and set the selection to (start, end).
          */
         void replaceTextfieldText(int oldStart,
-            int oldEnd, const WebCore::String& replace, int start, int end);
+            int oldEnd, const WebCore::String& replace, int start, int end,
+            int textGeneration);
         void passToJs(int generation,
             const WebCore::String& , const WebCore::PlatformKeyboardEvent& );
         void setFocusControllerActive(bool active);