diff options
Diffstat (limited to 'WebKit/gtk/WebCoreSupport')
4 files changed, 18 insertions, 7 deletions
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 93b4cc2..13401f5 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -601,8 +601,21 @@ PassRefPtr<Frame> FrameLoaderClient::createFrame(const KURL& url, const String& return childFrame.release(); } -void FrameLoaderClient::didTransferChildFrameToNewDocument() +void FrameLoaderClient::didTransferChildFrameToNewDocument(WebCore::Page*) { + ASSERT(m_frame); + + // Update the frame's webview to the new parent's webview. + Frame* coreFrame = core(m_frame); + WebKitWebView* webView = getViewFromFrame(m_frame); + + Frame* parentCoreFrame = coreFrame->tree()->parent(); + WebKitWebFrame* parentKitFrame = kit(parentCoreFrame); + WebKitWebView* parentWebView = getViewFromFrame(parentKitFrame); + if (webView != parentWebView) + m_frame->priv->webView = parentWebView; + + ASSERT(core(getViewFromFrame(m_frame)) == coreFrame->page()); } void FrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h index c5ffc6a..206e780 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h @@ -114,7 +114,7 @@ namespace WebKit { virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(WebCore::Page*); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WTF::String>&, const WTF::Vector<WTF::String>&, const WTF::String&, bool); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues); diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp index cf9a548..01bc03a 100644 --- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp +++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp @@ -175,7 +175,7 @@ void FullscreenVideoController::showHud(bool autoHide) // Show the cursor. GdkWindow* window = gtk_widget_get_window(m_window); - gdk_window_set_cursor(window, m_cursor.get()); + gdk_window_set_cursor(window, 0); // Update the progress bar immediately before showing the window. updateHudProgressBar(); @@ -210,7 +210,7 @@ void FullscreenVideoController::hideHud() } GdkWindow* window = gtk_widget_get_window(m_window); - GdkCursor* cursor = gdk_cursor_new(GDK_BLANK_CURSOR); + GdkCursor* cursor = blankCursor(); gdk_window_set_cursor(window, cursor); gtk_widget_hide_all(m_hudWindow); @@ -283,8 +283,7 @@ void FullscreenVideoController::enterFullscreen() gtk_widget_show_all(m_window); GdkWindow* window = gtk_widget_get_window(m_window); - GdkCursor* cursor = gdk_cursor_new(GDK_BLANK_CURSOR); - m_cursor = gdk_window_get_cursor(window); + GdkCursor* cursor = blankCursor(); gdk_window_set_cursor(window, cursor); gdk_cursor_unref(cursor); diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h index 9ff1e6a..d4bbea2 100644 --- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h +++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h @@ -82,7 +82,6 @@ private: guint m_volumeUpdateId; bool m_seekLock; GtkWidget* m_window; - PlatformRefPtr<GdkCursor> m_cursor; GtkWidget* m_hudWindow; GtkAction* m_playPauseAction; GtkAction* m_exitFullscreenAction; |