diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/JavaScriptCore/wtf/Platform.h | 8 | ||||
-rw-r--r-- | Source/WebCore/loader/DocumentLoader.cpp | 21 | ||||
-rw-r--r-- | Source/WebCore/loader/DocumentLoader.h | 20 | ||||
-rw-r--r-- | Source/WebCore/loader/FrameLoader.cpp | 48 | ||||
-rw-r--r-- | Source/WebCore/loader/FrameLoader.h | 5 | ||||
-rw-r--r-- | Source/WebCore/loader/ResourceLoader.cpp | 4 | ||||
-rw-r--r-- | Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp | 4 | ||||
-rw-r--r-- | Source/WebCore/platform/MIMETypeRegistry.cpp | 10 | ||||
-rw-r--r-- | Source/WebKit/android/jni/WebCoreFrameBridge.cpp | 13 |
9 files changed, 13 insertions, 120 deletions
diff --git a/Source/JavaScriptCore/wtf/Platform.h b/Source/JavaScriptCore/wtf/Platform.h index 18f481d..98eee7f 100644 --- a/Source/JavaScriptCore/wtf/Platform.h +++ b/Source/JavaScriptCore/wtf/Platform.h @@ -684,6 +684,7 @@ #if !defined(ENABLE_JIT) && !ENABLE(ANDROID_JSC_JIT) #define ENABLE_JIT 0 #endif +#define ENABLE_WEB_ARCHIVE 1 #endif #if PLATFORM(WIN) && !OS(WINCE) @@ -962,13 +963,6 @@ #define ENABLE_COMPOSITED_FIXED_ELEMENTS 0 #endif -// ENABLE_ARCHIVE is an Android addition. We need this default value to allow -// us to build on Mac. -// FIXME: Upstream to webkit.org. -#if !defined(ENABLE_ARCHIVE) -#define ENABLE_ARCHIVE 1 -#endif - #if !defined(ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL) #define ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL 0 #endif diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp index 3ae23fa..e8a7c41 100644 --- a/Source/WebCore/loader/DocumentLoader.cpp +++ b/Source/WebCore/loader/DocumentLoader.cpp @@ -295,11 +295,7 @@ void DocumentLoader::commitLoad(const char* data, int length) FrameLoader* frameLoader = DocumentLoader::frameLoader(); if (!frameLoader) return; -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 if (ArchiveFactory::isArchiveMimeType(response().mimeType())) return; #endif @@ -359,11 +355,7 @@ void DocumentLoader::setupForReplaceByMIMEType(const String& newMIMEType) stopLoadingSubresources(); stopLoadingPlugIns(); -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 clearArchiveResources(); #endif } @@ -453,11 +445,7 @@ bool DocumentLoader::isLoadingInAPISense() const return frameLoader()->subframeIsLoading(); } -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 void DocumentLoader::addAllArchiveResources(Archive* archive) { if (!m_archiveResourceCollection) @@ -564,7 +552,6 @@ void DocumentLoader::getSubresources(Vector<PassRefPtr<ArchiveResource> >& subre return; } -#endif void DocumentLoader::deliverSubstituteResourcesAfterDelay() { @@ -623,11 +610,7 @@ void DocumentLoader::cancelPendingSubstituteLoad(ResourceLoader* loader) m_substituteResourceDeliveryTimer.stop(); } -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 bool DocumentLoader::scheduleArchiveLoad(ResourceLoader* loader, const ResourceRequest& request, const KURL& originalURL) { ArchiveResource* resource = 0; @@ -648,11 +631,7 @@ bool DocumentLoader::scheduleArchiveLoad(ResourceLoader* loader, const ResourceR return true; } -<<<<<<< HEAD -#endif -======= #endif // ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 void DocumentLoader::addResponse(const ResourceResponse& r) { diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h index 38127c1..b92b384 100644 --- a/Source/WebCore/loader/DocumentLoader.h +++ b/Source/WebCore/loader/DocumentLoader.h @@ -44,16 +44,11 @@ namespace WebCore { class ApplicationCacheHost; -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 class Archive; #endif class ArchiveResource; class ArchiveResourceCollection; -#endif class Frame; class FrameLoader; class MainResourceLoader; @@ -134,11 +129,7 @@ namespace WebCore { void unschedule(SchedulePair*); #endif -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 void addAllArchiveResources(Archive*); void addArchiveResource(PassRefPtr<ArchiveResource>); @@ -159,14 +150,8 @@ namespace WebCore { // pulling from the ArchiveResourceCollection PassRefPtr<ArchiveResource> subresource(const KURL&) const; void getSubresources(Vector<PassRefPtr<ArchiveResource> >&) const; -<<<<<<< HEAD - - bool scheduleArchiveLoad(ResourceLoader*, const ResourceRequest&, const KURL&); -#endif -======= ->>>>>>> webkit.org at r78450 #ifndef NDEBUG bool isSubstituteLoadPending(ResourceLoader*) const; #endif @@ -328,12 +313,7 @@ namespace WebCore { typedef HashMap<RefPtr<ResourceLoader>, RefPtr<SubstituteResource> > SubstituteResourceMap; SubstituteResourceMap m_pendingSubstituteResources; Timer<DocumentLoader> m_substituteResourceDeliveryTimer; -<<<<<<< HEAD - -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= ->>>>>>> webkit.org at r78450 OwnPtr<ArchiveResourceCollection> m_archiveResourceCollection; #if ENABLE(WEB_ARCHIVE) RefPtr<SharedBuffer> m_parsedArchiveData; diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp index 22c59ad..2a8d6ad 100644 --- a/Source/WebCore/loader/FrameLoader.cpp +++ b/Source/WebCore/loader/FrameLoader.cpp @@ -34,13 +34,6 @@ #include "FrameLoader.h" #include "ApplicationCacheHost.h" -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -#include "Archive.h" -#include "ArchiveFactory.h" -#endif -======= ->>>>>>> webkit.org at r78450 #include "BackForwardController.h" #include "BeforeUnloadEvent.h" #include "MemoryCache.h" @@ -118,15 +111,14 @@ #include "SVGViewSpec.h" #endif -<<<<<<< HEAD -#ifdef ANDROID_INSTRUMENT -#include "TimeCounter.h" -#include "RenderArena.h" -======= #if ENABLE(WEB_ARCHIVE) #include "Archive.h" #include "ArchiveFactory.h" ->>>>>>> webkit.org at r78450 +#endif + +#ifdef ANDROID_INSTRUMENT +#include "TimeCounter.h" +#include "RenderArena.h" #endif namespace WebCore { @@ -930,21 +922,13 @@ void FrameLoader::loadURLIntoChildFrame(const KURL& url, const String& referer, { ASSERT(childFrame); -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 RefPtr<Archive> subframeArchive = activeDocumentLoader()->popArchiveForSubframe(childFrame->tree()->uniqueName()); if (subframeArchive) { childFrame->loader()->loadArchive(subframeArchive.release()); return; } -<<<<<<< HEAD -#endif -======= #endif // ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 HistoryItem* parentItem = history()->currentItem(); // If we're moving in the back/forward list, we might want to replace the content @@ -960,11 +944,7 @@ void FrameLoader::loadURLIntoChildFrame(const KURL& url, const String& referer, childFrame->loader()->loadURL(url, referer, String(), false, FrameLoadTypeRedirectWithLockedBackForwardList, 0, 0); } -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 void FrameLoader::loadArchive(PassRefPtr<Archive> prpArchive) { RefPtr<Archive> archive = prpArchive; @@ -985,11 +965,7 @@ void FrameLoader::loadArchive(PassRefPtr<Archive> prpArchive) documentLoader->addAllArchiveResources(archive.get()); load(documentLoader.get()); } -<<<<<<< HEAD -#endif -======= #endif // ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const String& mimeTypeIn) { @@ -1754,11 +1730,7 @@ void FrameLoader::stopAllLoaders(DatabasePolicy databasePolicy, ClearProvisional setProvisionalDocumentLoader(0); -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 if (m_documentLoader) m_documentLoader->clearArchiveResources(); #endif @@ -2277,8 +2249,6 @@ void FrameLoader::finishedLoadingDocument(DocumentLoader* loader) return; #endif -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size - #if !ENABLE(WEB_ARCHIVE) m_client->finishedLoading(loader); #else @@ -2304,17 +2274,9 @@ void FrameLoader::finishedLoadingDocument(DocumentLoader* loader) ASSERT(m_frame->document()); String userChosenEncoding = documentLoader()->overrideEncoding(); bool encodingIsUserChosen = !userChosenEncoding.isNull(); -<<<<<<< HEAD - writer()->setEncoding(encodingIsUserChosen ? userChosenEncoding : mainResource->textEncoding(), encodingIsUserChosen); - writer()->addData(mainResource->data()->data(), mainResource->data()->size()); -#else - m_client->finishedLoading(loader); -#endif // ARCHIVE -======= loader->writer()->setEncoding(encodingIsUserChosen ? userChosenEncoding : mainResource->textEncoding(), encodingIsUserChosen); loader->writer()->addData(mainResource->data()->data(), mainResource->data()->size()); #endif // ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 } bool FrameLoader::isReplacing() const diff --git a/Source/WebCore/loader/FrameLoader.h b/Source/WebCore/loader/FrameLoader.h index fd0f595..bb605e7 100644 --- a/Source/WebCore/loader/FrameLoader.h +++ b/Source/WebCore/loader/FrameLoader.h @@ -116,13 +116,8 @@ public: void load(const ResourceRequest&, bool lockHistory); // Called by WebFrame, calls load(ResourceRequest, SubstituteData). void load(const ResourceRequest&, const SubstituteData&, bool lockHistory); // Called both by WebFrame and internally, calls load(DocumentLoader*). void load(const ResourceRequest&, const String& frameName, bool lockHistory); // Called by WebPluginController. -<<<<<<< HEAD - -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 void loadArchive(PassRefPtr<Archive>); #endif diff --git a/Source/WebCore/loader/ResourceLoader.cpp b/Source/WebCore/loader/ResourceLoader.cpp index 1dab6b2..78c86d9 100644 --- a/Source/WebCore/loader/ResourceLoader.cpp +++ b/Source/WebCore/loader/ResourceLoader.cpp @@ -145,11 +145,7 @@ void ResourceLoader::start() ASSERT(!m_request.isNull()); ASSERT(m_deferredRequest.isNull()); -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 if (m_documentLoader->scheduleArchiveLoad(this, m_request, m_request.url())) return; #endif diff --git a/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp b/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp index fbb0aec..55d7cec 100644 --- a/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp +++ b/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp @@ -28,7 +28,7 @@ #include "config.h" #include "WebArchiveAndroid.h" -#if ENABLE(ARCHIVE) +#if ENABLE(WEB_ARCHIVE) #include "Base64.h" #include <libxml/encoding.h> @@ -470,4 +470,4 @@ bool WebArchiveAndroid::saveWebArchive(xmlTextWriterPtr writer) } -#endif // ENABLE(ARCHIVE) +#endif // ENABLE(WEB_ARCHIVE) diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp index 8017c90..4f9be57 100644 --- a/Source/WebCore/platform/MIMETypeRegistry.cpp +++ b/Source/WebCore/platform/MIMETypeRegistry.cpp @@ -27,12 +27,6 @@ #include "config.h" #include "MIMETypeRegistry.h" -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -#include "ArchiveFactory.h" -#endif -======= ->>>>>>> webkit.org at r78450 #include "MediaPlayer.h" #include <wtf/HashMap.h> #include <wtf/HashSet.h> @@ -256,11 +250,7 @@ static void initializeSupportedNonImageMimeTypes() for (size_t i = 0; i < WTF_ARRAY_LENGTH(types); ++i) supportedNonImageMIMETypes->add(types[i]); -<<<<<<< HEAD -#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size -======= #if ENABLE(WEB_ARCHIVE) ->>>>>>> webkit.org at r78450 ArchiveFactory::registerKnownArchiveMIMETypes(); #endif } diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp index 21ac8ef..5caf633 100644 --- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -78,6 +78,7 @@ #include "SubstituteData.h" #include "UrlInterceptResponse.h" #include "UserGestureIndicator.h" +#include "WebArchiveAndroid.h" #include "WebCache.h" #include "WebCoreJni.h" #include "WebCoreResourceLoader.h" @@ -119,10 +120,6 @@ #include "TimeCounter.h" #endif -#if ENABLE(ARCHIVE) -#include "WebArchiveAndroid.h" -#endif - #if ENABLE(WEB_AUTOFILL) #include "autofill/WebAutoFill.h" #endif @@ -1422,7 +1419,7 @@ static void StopLoading(JNIEnv *env, jobject obj) pFrame->loader()->stopForUserCancel(); } -#if ENABLE(ARCHIVE) +#if ENABLE(WEB_ARCHIVE) static String saveArchiveAutoname(String basename, String name, String extension) { if (name.isNull() || name.isEmpty()) { name = String("index"); @@ -1458,11 +1455,11 @@ static String saveArchiveAutoname(String basename, String name, String extension return String(); } -#endif +#endif // ENABLE(WEB_ARCHIVE) static jstring SaveWebArchive(JNIEnv *env, jobject obj, jstring basename, jboolean autoname) { -#if ENABLE(ARCHIVE) +#if ENABLE(WEB_ARCHIVE) WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); LOG_ASSERT(pFrame, "nativeSaveWebArchive must take a valid frame pointer!"); String mimeType = pFrame->loader()->documentLoader()->mainResource()->mimeType(); @@ -1504,7 +1501,7 @@ static jstring SaveWebArchive(JNIEnv *env, jobject obj, jstring basename, jboole if (result) return wtfStringToJstring(env, filename); -#endif +#endif // ENABLE(WEB_ARCHIVE) return NULL; } |