summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/WebCoreSupport')
-rw-r--r--WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp5
-rw-r--r--WebKit/android/WebCoreSupport/ChromeClientAndroid.h2
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp17
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h8
4 files changed, 27 insertions, 5 deletions
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index c258d79..6d912fd 100644
--- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -492,6 +492,11 @@ void ChromeClientAndroid::runOpenPanel(Frame* frame,
core->openFileChooser(chooser);
}
+void ChromeClientAndroid::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>)
+{
+ notImplemented();
+}
+
bool ChromeClientAndroid::setCursor(PlatformCursorHandle)
{
notImplemented();
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.h b/WebKit/android/WebCoreSupport/ChromeClientAndroid.h
index 68cac24..0e4d5c9 100644
--- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.h
+++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.h
@@ -151,6 +151,7 @@ namespace android {
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual bool setCursor(PlatformCursorHandle);
+ virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>);
// Notification that the given form element has changed. This function
// will be called frequently, so handling should be very fast.
@@ -160,6 +161,7 @@ namespace android {
// Android-specific
void setWebFrame(android::WebFrame* webframe);
+ android::WebFrame* webFrame() { return m_webFrame; }
void wakeUpMainThreadWithNewQuota(long newQuota);
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index 9112afe..a0b8475 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -32,6 +32,8 @@
#include "CString.h"
#include "CachedFrame.h"
#include "CachedFramePlatformDataAndroid.h"
+#include "Chrome.h"
+#include "ChromeClientAndroid.h"
#include "DOMImplementation.h"
#include "Document.h"
#include "DocumentLoader.h"
@@ -1215,6 +1217,21 @@ WTF::PassRefPtr<Widget> FrameLoaderClientAndroid::createJavaAppletWidget(const I
return 0;
}
+void FrameLoaderClientAndroid::didTransferChildFrameToNewDocument()
+{
+ ASSERT(m_frame);
+ // m_webFrame points to the WebFrame for the page that our frame previosuly
+ // belonged to. If the frame now belongs to a new page, we need to update
+ // m_webFrame to point to the WebFrame for the new page.
+ Page* newPage = m_frame->page();
+ if (newPage != m_webFrame->page()) {
+ ChromeClientAndroid* chromeClient = static_cast<ChromeClientAndroid*>(newPage->chrome()->client());
+ Release(m_webFrame);
+ m_webFrame = chromeClient->webFrame();
+ Retain(m_webFrame);
+ }
+}
+
// This function is used by the <OBJECT> element to determine the type of
// the contents and work out if it can render it.
ObjectContentType FrameLoaderClientAndroid::objectContentType(const KURL& url,
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
index 3b754b8..fe58124 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
@@ -176,11 +176,9 @@ namespace android {
virtual bool canCachePage() const;
virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&);
- virtual WTF::PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
- const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
- virtual WTF::PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&,
- const WTF::Vector<String>&, const WTF::Vector<String>&,
- const String&, bool loadManually);
+ virtual WTF::PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
+ virtual void didTransferChildFrameToNewDocument();
+ virtual WTF::PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const WTF::Vector<String>&, const WTF::Vector<String>&, const String&, bool loadManually);
virtual void redirectDataToPlugin(Widget* pluginWidget);
virtual WTF::PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues);