From e933faefa1e899dbd5bf371f499cc682aff46c83 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Fri, 9 Jan 2009 17:51:23 -0800 Subject: auto import from //branches/cupcake/...@125939 --- WebCore/loader/CachedCSSStyleSheet.cpp | 2 +- WebCore/loader/CachedScript.cpp | 2 +- WebCore/loader/icon/IconDatabase.cpp | 18 ++---------------- 3 files changed, 4 insertions(+), 18 deletions(-) (limited to 'WebCore/loader') diff --git a/WebCore/loader/CachedCSSStyleSheet.cpp b/WebCore/loader/CachedCSSStyleSheet.cpp index ace938b..9059f25 100644 --- a/WebCore/loader/CachedCSSStyleSheet.cpp +++ b/WebCore/loader/CachedCSSStyleSheet.cpp @@ -76,7 +76,7 @@ void CachedCSSStyleSheet::data(PassRefPtr data, bool allDataReceiv if (m_data.get()) { m_sheet = m_decoder->decode(m_data->data(), encodedSize()); m_sheet += m_decoder->flush(); -#ifdef ANDROID_FIX +#ifdef ANDROID_FIX // FIXME Newer webkit makes decode temporary; remove on webkit update // report decoded size too setDecodedSize(m_sheet.length() * sizeof(UChar)); #endif diff --git a/WebCore/loader/CachedScript.cpp b/WebCore/loader/CachedScript.cpp index 9666eea..c8caea8 100644 --- a/WebCore/loader/CachedScript.cpp +++ b/WebCore/loader/CachedScript.cpp @@ -79,7 +79,7 @@ void CachedScript::data(PassRefPtr data, bool allDataReceived) setEncodedSize(m_data.get() ? m_data->size() : 0); if (m_data.get()) m_script = m_encoding.decode(m_data->data(), encodedSize()); -#ifdef ANDROID_FIX +#ifdef ANDROID_FIX // FIXME Newer webkit calls setDecodedSize in CachedScript::script(); remove on webkit update // report decoded size too setDecodedSize(m_script.length() * sizeof(UChar)); #endif diff --git a/WebCore/loader/icon/IconDatabase.cpp b/WebCore/loader/icon/IconDatabase.cpp index a47fb08..72e57fe 100644 --- a/WebCore/loader/icon/IconDatabase.cpp +++ b/WebCore/loader/icon/IconDatabase.cpp @@ -1356,28 +1356,14 @@ void* IconDatabase::syncThreadMainLoop() bool didAnyWork = true; while (didAnyWork) { -#ifdef ANDROID_FIX - // We should write the pending icons to the database before trying - // to read any requested icons to ensure that a requested icon has - // the correct data. bool didWrite = writeToDatabase(); if (shouldStopThreadActivity()) break; - - didAnyWork = readFromDatabase(); - if (shouldStopThreadActivity()) - break; -#else + didAnyWork = readFromDatabase(); if (shouldStopThreadActivity()) break; - - bool didWrite = writeToDatabase(); - if (shouldStopThreadActivity()) - break; -#endif - - + // Prune unretained icons after the first time we sync anything out to the database // This way, pruning won't be the only operation we perform to the database by itself // We also don't want to bother doing this if the thread should be terminating (the user is quitting) -- cgit v1.1