diff options
author | John Reck <jreck@google.com> | 2011-06-17 10:51:19 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-06-17 10:51:19 -0700 |
commit | 38eac19d94363515f4ecefd9e37dcc2492fee1e5 (patch) | |
tree | d9536e5aedefab45571e9bef13d02206c5049939 | |
parent | 00196945f3d5ad4a36965abb046955e99e092ef3 (diff) | |
parent | 849e00858d5099fd739c7c717fbe9d933cf5a3e6 (diff) | |
download | external_webkit-38eac19d94363515f4ecefd9e37dcc2492fee1e5.zip external_webkit-38eac19d94363515f4ecefd9e37dcc2492fee1e5.tar.gz external_webkit-38eac19d94363515f4ecefd9e37dcc2492fee1e5.tar.bz2 |
Merge "Change mTextSize to be a percentage"
-rw-r--r-- | Source/WebKit/android/jni/WebSettings.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/WebKit/android/jni/WebSettings.cpp b/Source/WebKit/android/jni/WebSettings.cpp index 468e7b0..7ba5e96 100644 --- a/Source/WebKit/android/jni/WebSettings.cpp +++ b/Source/WebKit/android/jni/WebSettings.cpp @@ -67,8 +67,7 @@ struct FieldIds { FieldIds(JNIEnv* env, jclass clazz) { mLayoutAlgorithm = env->GetFieldID(clazz, "mLayoutAlgorithm", "Landroid/webkit/WebSettings$LayoutAlgorithm;"); - mTextSize = env->GetFieldID(clazz, "mTextSize", - "Landroid/webkit/WebSettings$TextSize;"); + mTextSize = env->GetFieldID(clazz, "mTextSize", "I"); mStandardFontFamily = env->GetFieldID(clazz, "mStandardFontFamily", "Ljava/lang/String;"); mFixedFontFamily = env->GetFieldID(clazz, "mFixedFontFamily", @@ -195,11 +194,6 @@ struct FieldIds { mOrdinal = env->GetMethodID(enumClass, "ordinal", "()I"); LOG_ASSERT(mOrdinal, "Could not find method ordinal"); env->DeleteLocalRef(enumClass); - - jclass textSizeClass = env->FindClass("android/webkit/WebSettings$TextSize"); - LOG_ASSERT(textSizeClass, "Could not find TextSize enum"); - mTextSizeValue = env->GetFieldID(textSizeClass, "value", "I"); - env->DeleteLocalRef(textSizeClass); } // Field ids @@ -347,8 +341,8 @@ public: } } #endif - jobject textSize = env->GetObjectField(obj, gFieldIds->mTextSize); - float zoomFactor = env->GetIntField(textSize, gFieldIds->mTextSizeValue) / 100.0f; + jint textSize = env->GetIntField(obj, gFieldIds->mTextSize); + float zoomFactor = textSize / 100.0f; if (pFrame->textZoomFactor() != zoomFactor) pFrame->setTextZoomFactor(zoomFactor); |