diff options
author | Leon Scroggins <scroggo@google.com> | 2010-11-12 14:39:06 -0500 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-11-12 15:03:29 -0500 |
commit | 3a3b28707d2d6a06afe9f3137e9bedc07246d600 (patch) | |
tree | 941ecc05653298bf10a5cedaa0960000494823d2 /WebKit/android | |
parent | 1833a7fa5cd5a19afd4cba9cfc4e103e44ded8eb (diff) | |
download | external_webkit-3a3b28707d2d6a06afe9f3137e9bedc07246d600.zip external_webkit-3a3b28707d2d6a06afe9f3137e9bedc07246d600.tar.gz external_webkit-3a3b28707d2d6a06afe9f3137e9bedc07246d600.tar.bz2 |
Return a float for text size.
Bug:3085564
Requires a change in frameworks/base: https://android-git.corp.google.com/g/#change,79591
Change-Id: Iaf3ebc405fca349e23bebb113228c4b550e6b88e
Diffstat (limited to 'WebKit/android')
-rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 2 | ||||
-rw-r--r-- | WebKit/android/nav/CachedInput.cpp | 2 | ||||
-rw-r--r-- | WebKit/android/nav/CachedInput.h | 6 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index 1643a0d..22b449a 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -1308,7 +1308,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame, RenderStyle* style = nodeRenderer->style(); if (style) { isUnclipped |= !style->hasAppearance(); - cachedInput.setTextSize(style->fontSize()); + cachedInput.setTextSize(style->font().size()); cachedInput.setIsRtlText(style->direction() == RTL || style->textAlign() == WebCore::RIGHT || style->textAlign() == WebCore::WEBKIT_RIGHT); diff --git a/WebKit/android/nav/CachedInput.cpp b/WebKit/android/nav/CachedInput.cpp index 6ba3f2e..03a2fba 100644 --- a/WebKit/android/nav/CachedInput.cpp +++ b/WebKit/android/nav/CachedInput.cpp @@ -86,7 +86,7 @@ void CachedInput::Debug::print() const DUMP_NAV_LOGD("// int mPaddingTop=%d;\n", b->mPaddingTop); DUMP_NAV_LOGD("// int mPaddingRight=%d;\n", b->mPaddingRight); DUMP_NAV_LOGD("// int mPaddingBottom=%d;\n", b->mPaddingBottom); - DUMP_NAV_LOGD("// int mTextSize=%d;\n", b->mTextSize); + DUMP_NAV_LOGD("// float mTextSize=%f;\n", b->mTextSize); DUMP_NAV_LOGD("// Type mType=%d;\n", b->mType); DEBUG_PRINT_BOOL(mIsRtlText); DEBUG_PRINT_BOOL(mIsTextField); diff --git a/WebKit/android/nav/CachedInput.h b/WebKit/android/nav/CachedInput.h index cbcc1fb..4f8777c 100644 --- a/WebKit/android/nav/CachedInput.h +++ b/WebKit/android/nav/CachedInput.h @@ -74,8 +74,8 @@ public: void setPaddingLeft(int left) { mPaddingLeft = left; } void setPaddingRight(int right) { mPaddingRight = right; } void setPaddingTop(int top) { mPaddingTop = top; } - void setTextSize(int textSize) { mTextSize = textSize; } - int textSize() const { return mTextSize; } + void setTextSize(float textSize) { mTextSize = textSize; } + float textSize() const { return mTextSize; } private: @@ -86,7 +86,7 @@ private: int mPaddingLeft; int mPaddingRight; int mPaddingTop; - int mTextSize; + float mTextSize; Type mType; bool mIsRtlText : 1; bool mIsTextField : 1; diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 9579509..ef68bf5 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -1718,10 +1718,10 @@ static jobject nativeFocusCandidateText(JNIEnv *env, jobject obj) return WtfStringToJstring(env, value); } -static jint nativeFocusCandidateTextSize(JNIEnv *env, jobject obj) +static jfloat nativeFocusCandidateTextSize(JNIEnv *env, jobject obj) { const CachedInput* input = getInputCandidate(env, obj); - return input ? input->textSize() : 0; + return input ? input->textSize() : 0.f; } static int nativeFocusCandidateType(JNIEnv *env, jobject obj) @@ -2281,7 +2281,7 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeFocusCandidatePointer }, { "nativeFocusCandidateText", "()Ljava/lang/String;", (void*) nativeFocusCandidateText }, - { "nativeFocusCandidateTextSize", "()I", + { "nativeFocusCandidateTextSize", "()F", (void*) nativeFocusCandidateTextSize }, { "nativeFocusCandidateType", "()I", (void*) nativeFocusCandidateType }, |