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/wx/WebKitSupport | |
| 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/wx/WebKitSupport')
| -rw-r--r-- | WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp | 22 | ||||
| -rw-r--r-- | WebKit/wx/WebKitSupport/FrameLoaderClientWx.h | 3 | ||||
| -rw-r--r-- | WebKit/wx/WebKitSupport/FrameNetworkingContextWx.h | 51 |
3 files changed, 70 insertions, 6 deletions
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp index 5b708c2..facb387 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp @@ -55,6 +55,7 @@ #include <stdio.h> +#include "FrameNetworkingContextWx.h" #include "WebFrame.h" #include "WebFramePrivate.h" #include "WebView.h" @@ -445,7 +446,13 @@ void FrameLoaderClientWx::finishedLoading(DocumentLoader* loader) } } +bool FrameLoaderClientWx::canShowMIMETypeAsHTML(const String& MIMEType) const +{ + notImplemented(); + return true; +} + bool FrameLoaderClientWx::canShowMIMEType(const String& MIMEType) const { notImplemented(); @@ -612,16 +619,14 @@ void FrameLoaderClientWx::setMainDocumentError(WebCore::DocumentLoader* loader, } } +// FIXME: This function should be moved into WebCore. void FrameLoaderClientWx::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) { if (!m_webFrame) return; - if (!m_pluginView) { - FrameLoader* fl = loader->frameLoader(); - fl->writer()->setEncoding(m_response.textEncodingName(), 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) { if (!m_hasSentResponseToPlugin) { @@ -965,4 +970,9 @@ bool FrameLoaderClientWx::shouldUsePluginDocument(const String &mimeType) const return false; } +PassRefPtr<FrameNetworkingContext> FrameLoaderClientWx::createNetworkingContext() +{ + return FrameNetworkingContextWx::create(m_frame); +} + } diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h index 0dee4bf..20b50d3 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h @@ -131,6 +131,7 @@ namespace WebCore { virtual void finishedLoading(DocumentLoader*); virtual bool canShowMIMEType(const String& MIMEType) const; + virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const; virtual bool representationExistsForURLScheme(const String& URLScheme) const; virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const; @@ -220,6 +221,8 @@ namespace WebCore { virtual void registerForIconNotification(bool listen = true); virtual bool shouldUsePluginDocument(const String &mimeType) const; + + virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext(); private: wxWebFrame *m_webFrame; diff --git a/WebKit/wx/WebKitSupport/FrameNetworkingContextWx.h b/WebKit/wx/WebKitSupport/FrameNetworkingContextWx.h new file mode 100644 index 0000000..3aa2374 --- /dev/null +++ b/WebKit/wx/WebKitSupport/FrameNetworkingContextWx.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2010 Kevin Ollivier <kevino@theolliviers.com> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FrameNetworkingContextWx_h +#define FrameNetworkingContextWx_h + +#include "FrameNetworkingContext.h" + +namespace WebCore { + +class FrameNetworkingContextWx : public WebCore::FrameNetworkingContext { +public: + static PassRefPtr<FrameNetworkingContextWx> create(WebCore::Frame* frame) + { + return adoptRef(new FrameNetworkingContextWx(frame)); + } + + WebCore::Frame* coreFrame() const { return frame(); } + +private: + FrameNetworkingContextWx(WebCore::Frame* frame) + : WebCore::FrameNetworkingContext(frame) + { + } +}; + +} + +#endif |
