diff options
author | Steve Block <steveblock@google.com> | 2010-09-29 17:32:26 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-29 17:35:08 +0100 |
commit | 68513a70bcd92384395513322f1b801e7bf9c729 (patch) | |
tree | 161b50f75a5921d61731bb25e730005994fcec85 /WebKit/efl/WebCoreSupport | |
parent | fd5c6425ce58eb75211be7718d5dee960842a37e (diff) | |
download | external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.zip external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.gz external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.bz2 |
Merge WebKit at r67908: Initial merge by Git
Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
Diffstat (limited to 'WebKit/efl/WebCoreSupport')
-rw-r--r-- | WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp | 63 | ||||
-rw-r--r-- | WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h | 2 |
2 files changed, 20 insertions, 45 deletions
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp index 8ec783a..056687c 100644 --- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp @@ -67,7 +67,6 @@ namespace WebCore { FrameLoaderClientEfl::FrameLoaderClientEfl(Evas_Object *view) : m_view(view) , m_frame(0) - , m_firstData(false) , m_userAgent("") , m_customUserAgent("") , m_pluginView(0) @@ -182,20 +181,10 @@ void FrameLoaderClientEfl::dispatchWillSubmitForm(FramePolicyFunction function, callPolicyFunction(function, PolicyUse); } - void FrameLoaderClientEfl::committedLoad(DocumentLoader* loader, const char* data, int length) { - if (!m_pluginView) { - if (!m_frame) - return; - - FrameLoader* fl = loader->frameLoader(); - if (m_firstData) { - fl->writer()->setEncoding(m_response.textEncodingName(), false); - m_firstData = false; - } - fl->addData(data, length); - } + if (!m_pluginView) + loader->commitData(data, length); // We re-check here as the plugin can have been created if (m_pluginView) { @@ -325,7 +314,6 @@ void FrameLoaderClientEfl::frameLoaderDestroyed() void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader*, unsigned long, const ResourceResponse& response) { m_response = response; - m_firstData = true; } void FrameLoaderClientEfl::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String& MIMEType, const ResourceRequest&) @@ -690,6 +678,12 @@ bool FrameLoaderClientEfl::canHandleRequest(const ResourceRequest&) const return true; } +bool FrameLoaderClientEfl::canShowMIMETypeAsHTML(const String& MIMEType) const +{ + notImplemented(); + return false; +} + bool FrameLoaderClientEfl::canShowMIMEType(const String& MIMEType) const { if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)) @@ -719,17 +713,11 @@ String FrameLoaderClientEfl::generatedMIMETypeForURLScheme(const String&) const void FrameLoaderClientEfl::finishedLoading(DocumentLoader* loader) { - if (!m_pluginView) { - if (m_firstData) { - FrameLoader* fl = loader->frameLoader(); - fl->writer()->setEncoding(m_response.textEncodingName(), false); - m_firstData = false; - } - } else { - m_pluginView->didFinishLoading(); - m_pluginView = 0; - m_hasSentResponseToPlugin = false; - } + if (!m_pluginView) + return; + m_pluginView->didFinishLoading(); + m_pluginView = 0; + m_hasSentResponseToPlugin = false; } @@ -765,15 +753,7 @@ void FrameLoaderClientEfl::dispatchDidFinishLoading(DocumentLoader*, unsigned lo void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& err) { - if (!shouldFallBack(err)) - return; - - if (m_firstData) { - FrameLoader* fl = loader->frameLoader(); - fl->writer()->setEncoding(m_response.textEncodingName(), false); - m_firstData = false; - } - + notImplemented(); } bool FrameLoaderClientEfl::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length) @@ -904,16 +884,11 @@ void FrameLoaderClientEfl::dispatchUnableToImplementPolicy(const ResourceError&) void FrameLoaderClientEfl::setMainDocumentError(DocumentLoader* loader, const ResourceError& error) { - if (!m_pluginView) { - if (m_firstData) { - loader->frameLoader()->writer()->setEncoding(m_response.textEncodingName(), false); - m_firstData = false; - } - } else { - m_pluginView->didFail(error); - m_pluginView = 0; - m_hasSentResponseToPlugin = false; - } + if (!m_pluginView) + return; + m_pluginView->didFail(error); + m_pluginView = 0; + m_hasSentResponseToPlugin = false; } void FrameLoaderClientEfl::startDownload(const ResourceRequest&) diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h index bd105cd..68f145d 100644 --- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h @@ -181,6 +181,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient { virtual bool canHandleRequest(const ResourceRequest&) const; virtual bool canShowMIMEType(const String&) const; + virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const; virtual bool representationExistsForURLScheme(const String&) const; virtual String generatedMIMETypeForURLScheme(const String&) const; @@ -209,7 +210,6 @@ class FrameLoaderClientEfl : public FrameLoaderClient { Evas_Object *m_frame; ResourceResponse m_response; - bool m_firstData; String m_userAgent; String m_customUserAgent; |