From 63d76a0f88b631ed7398e818dba51482626b58be Mon Sep 17 00:00:00 2001 From: "praveen.ks" Date: Tue, 2 Apr 2013 19:22:54 +0530 Subject: [PATCH] When saved mht file is opened progress bar is stuck [Title] Saved mht file does not finish load if it has external resource in it [Issue#] TD-9485 [Problem] When saved mht file is loaded the progress bar gets stuck and loading never finishes [Cause] It happens when external resources i.e. resources not present in the mht resource file are included. Webkit tries to fail the load for such sub resources but this does not clear the sub resource loaders since didFail is never called and in the process checkLoadComplete is never called thereby keeping the load in an unfinished state infinitely. [Solution] Allow external resources to be downloaded from network so as not to have a broken page. If external resources cannot be fetched didFail will be properly called and load will finish. [Developer] Praveen (praveen.ks@samsung.com) --- Source/WTF/wtf/Platform.h | 2 ++ Source/WebCore/loader/DocumentLoader.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 507a5a2..d7bf256 100755 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -791,6 +791,8 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/ #define ENABLE_TIZEN_FIND_STRING 1 /* Jinwoo Song(jinwoo7.song@samsung.com) : Fix the bug to enable searching the web page which has the 'webkit-user-select: none' CSS property and value. */ +#define ENABLE_TIZEN_GET_EXTERNAL_RESOURCES_IN_MHTML_FROM_NETWORK 1 /* Praveen(praveen.ks@samsung.com) : Allow external resources in MHTML file to be fetched from network rather than failing them */ + #endif /* OS(TIZEN) */ /* ==== OS() - underlying operating system; only to be used for mandated low-level services like diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp index 94ab624..e273829 100644 --- a/Source/WebCore/loader/DocumentLoader.cpp +++ b/Source/WebCore/loader/DocumentLoader.cpp @@ -751,8 +751,12 @@ bool DocumentLoader::scheduleArchiveLoad(ResourceLoader* loader, const ResourceR #endif #if ENABLE(MHTML) case Archive::MHTML: +#if ENABLE(TIZEN_GET_EXTERNAL_RESOURCES_IN_MHTML_FROM_NETWORK) + return false; +#else return true; // Always fail the load for resources not included in the MHTML. #endif +#endif default: return false; } -- 2.7.4