summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2011-01-07 10:01:03 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-07 10:01:03 -0800
commit45a8f6360a851a7c7d75a7e2fa11cc71f778ce89 (patch)
tree7dd7569bf61f46bab97cdba9faa3d89721824eef
parent7d9279bfeb8c2e16692d261f88891ec41f354f1f (diff)
parentc1416369812a7eeaebe4a39a2d3fc2ffab03139d (diff)
downloadexternal_webkit-45a8f6360a851a7c7d75a7e2fa11cc71f778ce89.zip
external_webkit-45a8f6360a851a7c7d75a7e2fa11cc71f778ce89.tar.gz
external_webkit-45a8f6360a851a7c7d75a7e2fa11cc71f778ce89.tar.bz2
Merge "Not set max decoded image size in WebCore." into honeycomb
-rw-r--r--WebKit/android/jni/WebSettings.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp
index c971493..e4b30c3 100644
--- a/WebKit/android/jni/WebSettings.cpp
+++ b/WebKit/android/jni/WebSettings.cpp
@@ -452,8 +452,15 @@ public:
flag = env->GetBooleanField(obj, gFieldIds->mShrinksStandaloneImagesToFit);
s->setShrinksStandaloneImagesToFit(flag);
jlong maxImage = env->GetLongField(obj, gFieldIds->mMaximumDecodedImageSize);
- if (maxImage == 0)
- maxImage = computeMaxBitmapSizeForCache();
+ // Since in ImageSourceAndroid.cpp, the image will always not exceed
+ // MAX_SIZE_BEFORE_SUBSAMPLE, there's no need to pass the max value to
+ // WebCore, which checks (image_width * image_height * 4) as an
+ // estimation against the max value, which is done in CachedImage.cpp.
+ // And there're cases where the decoded image size will not
+ // exceed the max, but the WebCore estimation will. So the following
+ // code is commented out to fix those cases.
+ // if (maxImage == 0)
+ // maxImage = computeMaxBitmapSizeForCache();
s->setMaximumDecodedImageSize(maxImage);
flag = env->GetBooleanField(obj, gFieldIds->mPrivateBrowsingEnabled);