[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

kov at webkit.org kov at webkit.org
Wed Dec 22 18:12:33 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2fa3a0c15dd6c49c9e470db4fa4b08a16cad09d5
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 8 20:29:03 2010 +0000

    2010-12-08  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
    
            Reviewed by Martin Robinson.
    
            [GTK] Split webkitprivate.{cpp,h} in more manageable chunks
            https://bugs.webkit.org/show_bug.cgi?id=50698
    
            Split private bits of WebKitWebView to its own private header, and
            to its implementation file. Take the opportunity to fix includes
            sorting to comply with the style guide.
    
            * WebCoreSupport/ChromeClientGtk.cpp:
            (WebKit::ChromeClient::enterFullscreenForNode):
            (WebKit::ChromeClient::exitFullscreenForNode):
            * WebCoreSupport/ContextMenuClientGtk.cpp:
            * WebCoreSupport/DragClientGtk.cpp:
            * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
            * WebCoreSupport/EditorClientGtk.cpp:
            * WebCoreSupport/FrameLoaderClientGtk.cpp:
            * WebCoreSupport/InspectorClientGtk.cpp:
            * WebCoreSupport/PasteboardHelperGtk.cpp:
            * webkit/webkitprivate.cpp:
            (webkit_init):
            * webkit/webkitprivate.h:
            * webkit/webkitwebbackforwardlist.cpp:
            * webkit/webkitwebdatasource.cpp:
            * webkit/webkitwebframe.cpp:
            * webkit/webkitwebview.cpp:
            (WebKit::core):
            (WebKit::kit):
            (WebKit::webViewEnterFullscreen):
            (WebKit::webViewExitFullscreen):
            * webkit/webkitwebviewprivate.h: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73539 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 580fe13..41b136e 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -49,6 +49,40 @@
 
 2010-12-08  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
+        Reviewed by Martin Robinson.
+
+        [GTK] Split webkitprivate.{cpp,h} in more manageable chunks
+        https://bugs.webkit.org/show_bug.cgi?id=50698
+
+        Split private bits of WebKitWebView to its own private header, and
+        to its implementation file. Take the opportunity to fix includes
+        sorting to comply with the style guide.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::enterFullscreenForNode):
+        (WebKit::ChromeClient::exitFullscreenForNode):
+        * WebCoreSupport/ContextMenuClientGtk.cpp:
+        * WebCoreSupport/DragClientGtk.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        * WebCoreSupport/EditorClientGtk.cpp:
+        * WebCoreSupport/FrameLoaderClientGtk.cpp:
+        * WebCoreSupport/InspectorClientGtk.cpp:
+        * WebCoreSupport/PasteboardHelperGtk.cpp:
+        * webkit/webkitprivate.cpp:
+        (webkit_init):
+        * webkit/webkitprivate.h:
+        * webkit/webkitwebbackforwardlist.cpp:
+        * webkit/webkitwebdatasource.cpp:
+        * webkit/webkitwebframe.cpp:
+        * webkit/webkitwebview.cpp:
+        (WebKit::core):
+        (WebKit::kit):
+        (WebKit::webViewEnterFullscreen):
+        (WebKit::webViewExitFullscreen):
+        * webkit/webkitwebviewprivate.h: Added.
+
+2010-12-08  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
+
         Reviewed by Xan Lopez.
 
         The storage for the subresources is a GHashTable which does not
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index 190ae9b..60c7880 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -27,37 +27,38 @@
 #include "Console.h"
 #include "DumpRenderTreeSupportGtk.h"
 #include "Element.h"
-#include "FileSystem.h"
 #include "FileChooser.h"
+#include "FileSystem.h"
 #include "FloatRect.h"
 #include "FrameLoadRequest.h"
 #include "FrameView.h"
 #include "GtkVersioning.h"
 #include "HTMLNames.h"
-#include "IntRect.h"
 #include "HitTestResult.h"
 #include "Icon.h"
+#include "IntRect.h"
 #include "KURL.h"
 #include "NavigationAction.h"
+#include "NotImplemented.h"
 #include "PlatformString.h"
 #include "PopupMenuClient.h"
 #include "PopupMenuGtk.h"
 #include "SearchPopupMenuGtk.h"
 #include "SecurityOrigin.h"
+#include "WindowFeatures.h"
 #include "webkitgeolocationpolicydecision.h"
-#include "webkitwebview.h"
 #include "webkitnetworkrequest.h"
 #include "webkitprivate.h"
-#include "NotImplemented.h"
-#include "WindowFeatures.h"
-#if ENABLE(DATABASE)
-#include "DatabaseTracker.h"
-#endif
-#include <wtf/text/CString.h>
-
+#include "webkitwebview.h"
+#include "webkitwebviewprivate.h"
 #include <glib.h>
 #include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(DATABASE)
+#include "DatabaseTracker.h"
+#endif
 
 using namespace WebCore;
 
@@ -668,7 +669,7 @@ void ChromeClient::enterFullscreenForNode(Node* node)
     WebCore::Frame* frame = node->document()->frame();
     WebKitWebFrame* webFrame = kit(frame);
     WebKitWebView* webView = getViewFromFrame(webFrame);
-    webkitWebViewEnterFullscreen(webView, node);
+    webViewEnterFullscreen(webView, node);
 }
 
 void ChromeClient::exitFullscreenForNode(Node* node)
@@ -676,7 +677,7 @@ void ChromeClient::exitFullscreenForNode(Node* node)
     WebCore::Frame* frame = node->document()->frame();
     WebKitWebFrame* webFrame = kit(frame);
     WebKitWebView* webView = getViewFromFrame(webFrame);
-    webkitWebViewExitFullscreen(webView);
+    webViewExitFullscreen(webView);
 }
 #endif
 
diff --git a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
index 28a3313..1237809 100644
--- a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
@@ -18,20 +18,20 @@
  */
 
 #include "config.h"
-#include "ContextMenu.h"
 #include "ContextMenuClientGtk.h"
-#include "ContextMenuController.h"
 
+#include "ContextMenu.h"
+#include "ContextMenuController.h"
 #include "HitTestResult.h"
 #include "KURL.h"
 #include "NotImplemented.h"
 #include "Page.h"
-#include <wtf/text/CString.h>
-
-#include <glib/gi18n-lib.h>
+#include "webkitprivate.h"
+#include "webkitwebviewprivate.h"
 #include <glib-object.h>
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
-#include "webkitprivate.h"
+#include <wtf/text/CString.h>
 
 using namespace WebCore;
 
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
index be0fb10..3f0710d 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
@@ -33,6 +33,7 @@
 #include "PasteboardHelper.h"
 #include "RenderObject.h"
 #include "webkitprivate.h"
+#include "webkitwebviewprivate.h"
 #include "webkitwebview.h"
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
diff --git a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
index 82aebc9..b455c1a 100644
--- a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -47,6 +47,7 @@
 #include "SVGSMILElement.h"
 #endif
 #include "webkitprivate.h"
+#include "webkitwebviewprivate.h"
 #include "webkitwebview.h"
 #include "webkitwebframe.h"
 #include <JavaScriptCore/APICast.h>
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index da07e56..6e31b03 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -46,6 +46,7 @@
 #include "WindowsKeyboardCodes.h"
 #include "webkitmarshal.h"
 #include "webkitprivate.h"
+#include "webkitwebviewprivate.h"
 #include <wtf/text/CString.h>
 
 // Arbitrary depth limit for the undo stack, to keep it from using
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 1de37f4..6834949 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -34,8 +34,8 @@
 #include "FormState.h"
 #include "FrameLoader.h"
 #include "FrameNetworkingContextGtk.h"
-#include "FrameView.h"
 #include "FrameTree.h"
+#include "FrameView.h"
 #include "GOwnPtr.h"
 #include "GRefPtr.h"
 #include "GtkPluginWidget.h"
@@ -45,6 +45,7 @@
 #include "HTMLFrameOwnerElement.h"
 #include "HTMLNames.h"
 #include "HTMLPlugInElement.h"
+#include "JSDOMBinding.h"
 #include "JSDOMWindow.h"
 #include "Language.h"
 #include "MIMETypeRegistry.h"
@@ -52,11 +53,10 @@
 #include "NotImplemented.h"
 #include "Page.h"
 #include "PluginDatabase.h"
+#include "ProgressTracker.h"
 #include "RenderPart.h"
 #include "ResourceHandle.h"
 #include "ResourceRequest.h"
-#include "ProgressTracker.h"
-#include "JSDOMBinding.h"
 #include "ScriptController.h"
 #include "webkiterror.h"
 #include "webkitnetworkrequest.h"
@@ -66,14 +66,14 @@
 #include "webkitwebnavigationaction.h"
 #include "webkitwebpolicydecision.h"
 #include "webkitwebview.h"
-#include <wtf/text/CString.h>
-#include <wtf/text/StringConcatenate.h>
-
+#include "webkitwebviewprivate.h"
 #include <JavaScriptCore/APICast.h>
 #include <gio/gio.h>
 #include <glib.h>
 #include <glib/gi18n-lib.h>
 #include <stdio.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
 
 using namespace WebCore;
 
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index 312b8c8..0bdb98f 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -21,13 +21,14 @@
 #include "InspectorClientGtk.h"
 
 #include "Frame.h"
-#include "webkitwebview.h"
-#include "webkitwebinspector.h"
-#include "webkitprivate.h"
-#include "webkitversion.h"
 #include "InspectorController.h"
 #include "NotImplemented.h"
 #include "PlatformString.h"
+#include "webkitprivate.h"
+#include "webkitversion.h"
+#include "webkitwebinspector.h"
+#include "webkitwebview.h"
+#include "webkitwebviewprivate.h"
 #include <wtf/text/CString.h>
 
 using namespace WebCore;
diff --git a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
index 02da1d4..e99fc84 100644
--- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
@@ -24,10 +24,10 @@
 #include "DataObjectGtk.h"
 #include "FocusController.h"
 #include "Frame.h"
-#include <gtk/gtk.h>
 #include "webkitwebframe.h"
 #include "webkitwebview.h"
-#include "webkitprivate.h"
+#include "webkitwebviewprivate.h"
+#include <gtk/gtk.h>
 
 using namespace WebCore;
 
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index 52ce896..b0cf744 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -90,25 +90,6 @@ WebKitWebFrame* kit(WebCore::Frame* coreFrame)
     return client ? client->webFrame() : 0;
 }
 
-WebCore::Page* core(WebKitWebView* webView)
-{
-    if (!webView)
-        return 0;
-
-    WebKitWebViewPrivate* priv = webView->priv;
-    return priv ? priv->corePage : 0;
-}
-
-WebKitWebView* kit(WebCore::Page* corePage)
-{
-    if (!corePage)
-        return 0;
-
-    ASSERT(corePage->chrome());
-    WebKit::ChromeClient* client = static_cast<WebKit::ChromeClient*>(corePage->chrome()->client());
-    return client ? client->webView() : 0;
-}
-
 WebKitWebNavigationReason kit(WebCore::NavigationType type)
 {
     return (WebKitWebNavigationReason)type;
@@ -316,32 +297,3 @@ void webkit_init()
 
     soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
 }
-
-void webkitWebViewEnterFullscreen(WebKitWebView* webView, Node* node)
-{
-    if (!node->hasTagName(HTMLNames::videoTag))
-        return;
-
-#if ENABLE(VIDEO)
-    HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
-    WebKitWebViewPrivate* priv = webView->priv;
-
-    // First exit Fullscreen for the old mediaElement.
-    if (priv->fullscreenVideoController)
-        priv->fullscreenVideoController->exitFullscreen();
-
-    priv->fullscreenVideoController = new FullscreenVideoController;
-    priv->fullscreenVideoController->setMediaElement(videoElement);
-    priv->fullscreenVideoController->enterFullscreen();
-#endif
-}
-
-void webkitWebViewExitFullscreen(WebKitWebView* webView)
-{
-#if ENABLE(VIDEO)
-    WebKitWebViewPrivate* priv = webView->priv;
-    if (priv->fullscreenVideoController)
-        priv->fullscreenVideoController->exitFullscreen();
-#endif
-}
-
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 9abcd9f..a8e9521 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -57,7 +57,6 @@
 #include "IntPoint.h"
 #include "IntRect.h"
 #include "FrameLoaderClient.h"
-#include "FullscreenVideoController.h"
 #include "Node.h"
 #include "Page.h"
 #include "PlatformString.h"
@@ -87,9 +86,6 @@ namespace WebKit {
     WebCore::Frame* core(WebKitWebFrame*);
     WebKitWebFrame* kit(WebCore::Frame*);
 
-    WebCore::Page* core(WebKitWebView*);
-    WebKitWebView* kit(WebCore::Page*);
-
     WebCore::HistoryItem* core(WebKitWebHistoryItem*);
     WebKitWebHistoryItem* kit(PassRefPtr<WebCore::HistoryItem>);
 
@@ -110,15 +106,6 @@ namespace WebKit {
     WebKitHitTestResult* kit(const WebCore::HitTestResult&);
 
     PasteboardHelperGtk* pasteboardHelperInstance();
-
-    typedef struct DroppingContext_ {
-        WebKitWebView* webView;
-        GdkDragContext* gdkContext;
-        RefPtr<WebCore::DataObjectGtk> dataObject;
-        WebCore::IntPoint lastMotionPosition;
-        int pendingDataRequests;
-        bool dropHappened;
-    } DroppingContext;
 }
 
 extern "C" {
@@ -131,67 +118,6 @@ extern "C" {
 #define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
 #define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
 
-    #define WEBKIT_WEB_VIEW_GET_PRIVATE(obj)    (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewPrivate))
-    typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
-    struct _WebKitWebViewPrivate {
-        WebCore::Page* corePage;
-        PlatformRefPtr<WebKitWebSettings> webSettings;
-        PlatformRefPtr<WebKitWebInspector> webInspector;
-        PlatformRefPtr<WebKitWebWindowFeatures> webWindowFeatures;
-
-        WebKitWebFrame* mainFrame;
-        PlatformRefPtr<WebKitWebBackForwardList> backForwardList;
-
-        PlatformRefPtr<GtkMenu> currentMenu;
-        gint lastPopupXPosition;
-        gint lastPopupYPosition;
-
-        HashSet<GtkWidget*> children;
-        bool editable;
-        PlatformRefPtr<GtkIMContext> imContext;
-
-        gboolean transparent;
-
-        PlatformRefPtr<GtkAdjustment> horizontalAdjustment;
-        PlatformRefPtr<GtkAdjustment> verticalAdjustment;
-
-#ifndef GTK_API_VERSION_2
-        // GtkScrollablePolicy needs to be checked when
-        // driving the scrollable adjustment values
-        GtkScrollablePolicy horizontalScrollingPolicy;
-        GtkScrollablePolicy verticalScrollingPolicy;
-#endif
-
-        gboolean zoomFullContent;
-        WebKitLoadStatus loadStatus;
-        CString encoding;
-        CString customEncoding;
-
-        CString iconURI;
-
-        gboolean disposing;
-        gboolean usePrimaryForPaste;
-
-#if ENABLE(VIDEO)
-        FullscreenVideoController* fullscreenVideoController;
-#endif
-
-        // These are hosted here because the DataSource object is
-        // created too late in the frame loading process.
-        PlatformRefPtr<WebKitWebResource> mainResource;
-        CString mainResourceIdentifier;
-        PlatformRefPtr<GHashTable> subResources;
-        CString tooltipText;
-        WebCore::IntRect tooltipArea;
-
-        int currentClickCount;
-        WebCore::IntPoint previousClickPoint;
-        guint previousClickButton;
-        guint32 previousClickTime;
-        HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> > draggingDataObjects;
-        HashMap<GdkDragContext*, WebKit::DroppingContext*> droppingContexts;
-    };
-
     #define WEBKIT_WEB_FRAME_GET_PRIVATE(obj)    (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
     typedef struct _WebKitWebFramePrivate WebKitWebFramePrivate;
     struct _WebKitWebFramePrivate {
@@ -271,39 +197,6 @@ extern "C" {
     WebKitWebWindowFeatures*
     webkit_web_window_features_new_from_core_features (const WebCore::WindowFeatures& features);
 
-    void
-    webkit_web_view_notify_ready (WebKitWebView* web_view);
-
-    void
-    webkit_web_view_request_download(WebKitWebView* web_view, WebKitNetworkRequest* request, const WebCore::ResourceResponse& response = WebCore::ResourceResponse(), WebCore::ResourceHandle* handle = 0);
-
-    void
-    webkit_web_view_add_resource(WebKitWebView*, const char*, WebKitWebResource*);
-
-    void
-    webkit_web_view_add_main_resource(WebKitWebView*, const char*, WebKitWebResource*);
-
-    void
-    webkit_web_view_remove_resource(WebKitWebView*, const char*);
-
-    WebKitWebResource*
-    webkit_web_view_get_resource(WebKitWebView*, char*);
-
-    WebKitWebResource*
-    webkit_web_view_get_main_resource(WebKitWebView*);
-
-    void
-    webkit_web_view_clear_resources(WebKitWebView*);
-
-    GList*
-    webkit_web_view_get_subresources(WebKitWebView*);
-
-    void
-    webkit_web_view_set_tooltip_text(WebKitWebView*, const char*);
-
-    GtkMenu*
-    webkit_web_view_get_context_menu(WebKitWebView*);
-
     WebKitDownload*
     webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response);
 
@@ -335,18 +228,12 @@ extern "C" {
 
     // FIXME: Move these to webkitwebframe.h once their API has been discussed.
 
-    WEBKIT_API gchar*
-    webkit_web_view_get_selected_text (WebKitWebView* web_view);
-
     WEBKIT_API void
     webkit_web_settings_add_extra_plugin_directory (WebKitWebView *web_view, const gchar* directory);
 
     GSList*
     webkit_web_settings_get_enchant_dicts(WebKitWebView* web_view);
 
-    bool
-    webkit_web_view_use_primary_for_paste(WebKitWebView* web_view);
-
     GHashTable*
     webkit_history_items(void);
 
@@ -363,8 +250,8 @@ extern "C" {
     WEBKIT_API WebKitWebDatabase *
     webkit_security_origin_get_web_database(WebKitSecurityOrigin* securityOrigin, const char* databaseName);
 
-    void webkitWebViewEnterFullscreen(WebKitWebView* webView, WebCore::Node* node);
-    void webkitWebViewExitFullscreen(WebKitWebView* webView);
+    WEBKIT_API void
+    webkit_web_frame_layout(WebKitWebFrame* frame);
 }
 
 #endif
diff --git a/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp b/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
index 9b5bf8b..541b0e2 100644
--- a/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
+++ b/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
@@ -26,6 +26,7 @@
 #include "webkitprivate.h"
 #include "webkitwebhistoryitem.h"
 #include "webkitwebview.h"
+#include "webkitwebviewprivate.h"
 #include <glib.h>
 
 /**
diff --git a/WebKit/gtk/webkit/webkitwebdatasource.cpp b/WebKit/gtk/webkit/webkitwebdatasource.cpp
index 3673a99..de8671c 100644
--- a/WebKit/gtk/webkit/webkitwebdatasource.cpp
+++ b/WebKit/gtk/webkit/webkitwebdatasource.cpp
@@ -22,18 +22,18 @@
 
 #include "ArchiveResource.h"
 #include "DocumentLoaderGtk.h"
-#include "FrameLoaderClientGtk.h"
 #include "FrameLoader.h"
+#include "FrameLoaderClientGtk.h"
 #include "KURL.h"
 #include "PlatformString.h"
 #include "ResourceRequest.h"
-#include "runtime/InitializeThreading.h"
 #include "SharedBuffer.h"
 #include "SubstituteData.h"
-#include "webkitwebresource.h"
+#include "runtime/InitializeThreading.h"
 #include "webkitprivate.h"
+#include "webkitwebresource.h"
+#include "webkitwebviewprivate.h"
 #include "wtf/Assertions.h"
-
 #include <glib.h>
 
 /**
diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp
index 13344a2..3d872b6 100644
--- a/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -25,16 +25,11 @@
  */
 
 #include "config.h"
-
-#include "webkitenumtypes.h"
 #include "webkitwebframe.h"
-#include "webkitwebview.h"
-#include "webkitmarshal.h"
-#include "webkitprivate.h"
 
+#include "AXObjectCache.h"
 #include "AccessibilityObjectWrapperAtk.h"
 #include "AnimationController.h"
-#include "AXObjectCache.h"
 #include "DOMObjectCache.h"
 #include "DocumentLoader.h"
 #include "DocumentLoaderGtk.h"
@@ -42,27 +37,33 @@
 #include "FrameLoaderClientGtk.h"
 #include "FrameTree.h"
 #include "FrameView.h"
-#include <glib/gi18n-lib.h>
 #include "GCController.h"
 #include "GraphicsContext.h"
 #include "GtkVersioning.h"
 #include "HTMLFrameOwnerElement.h"
+#include "JSDOMBinding.h"
+#include "JSDOMWindow.h"
 #include "JSElement.h"
 #include "PrintContext.h"
 #include "RenderListItem.h"
-#include "RenderView.h"
 #include "RenderTreeAsText.h"
-#include "JSDOMBinding.h"
+#include "RenderView.h"
 #include "ScriptController.h"
 #include "SubstituteData.h"
+#include "webkitenumtypes.h"
+#include "webkitmarshal.h"
+#include "webkitprivate.h"
+#include "webkitwebview.h"
+#include "webkitwebviewprivate.h"
+#include <JavaScriptCore/APICast.h>
+#include <atk/atk.h>
+#include <glib/gi18n-lib.h>
+#include <wtf/text/CString.h>
+
 #if ENABLE(SVG)
 #include "SVGSMILElement.h"
 #endif
 
-#include <atk/atk.h>
-#include <JavaScriptCore/APICast.h>
-#include <wtf/text/CString.h>
-
 /**
  * SECTION:webkitwebframe
  * @short_description: The content of a #WebKitWebView
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 9cfd133..029a7bf 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -29,26 +29,15 @@
 #include "config.h"
 #include "webkitwebview.h"
 
-#include "webkitdownload.h"
-#include "webkitenumtypes.h"
-#include "webkitgeolocationpolicydecision.h"
-#include "webkitmarshal.h"
-#include "webkitnetworkrequest.h"
-#include "webkitnetworkresponse.h"
-#include "webkitprivate.h"
-#include "webkitwebinspector.h"
-#include "webkitwebbackforwardlist.h"
-#include "webkitwebhistoryitem.h"
-
 #include "AXObjectCache.h"
 #include "AbstractDatabase.h"
 #include "BackForwardListImpl.h"
-#include "MemoryCache.h"
+#include "Chrome.h"
 #include "ChromeClientGtk.h"
 #include "ClipboardUtilitiesGtk.h"
+#include "ContextMenu.h"
 #include "ContextMenuClientGtk.h"
 #include "ContextMenuController.h"
-#include "ContextMenu.h"
 #include "Cursor.h"
 #include "Document.h"
 #include "DocumentLoader.h"
@@ -56,29 +45,29 @@
 #include "DragClientGtk.h"
 #include "DragController.h"
 #include "DragData.h"
-#include "EditorClientGtk.h"
 #include "Editor.h"
+#include "EditorClientGtk.h"
 #include "EventHandler.h"
 #include "FloatQuad.h"
 #include "FocusController.h"
 #include "FrameLoader.h"
 #include "FrameLoaderTypes.h"
 #include "FrameView.h"
-#include <glib/gi18n-lib.h>
-#include <GOwnPtr.h>
-#include <GOwnPtrGtk.h>
+#include "GOwnPtrGtk.h"
 #include "GraphicsContext.h"
 #include "GtkVersioning.h"
+#include "HTMLNames.h"
 #include "HitTestRequest.h"
 #include "HitTestResult.h"
 #include "IconDatabase.h"
 #include "InspectorClientGtk.h"
+#include "MemoryCache.h"
 #include "MouseEventWithHitTestResults.h"
 #include "NotImplemented.h"
 #include "PageCache.h"
 #include "Pasteboard.h"
-#include "PasteboardHelperGtk.h"
 #include "PasteboardHelper.h"
+#include "PasteboardHelperGtk.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformWheelEvent.h"
 #include "ProgressTracker.h"
@@ -87,9 +76,21 @@
 #include "ScriptValue.h"
 #include "Scrollbar.h"
 #include "webkit/WebKitDOMDocumentPrivate.h"
-#include <wtf/text/CString.h>
-
+#include "webkitdownload.h"
+#include "webkitenumtypes.h"
+#include "webkitgeolocationpolicydecision.h"
+#include "webkitmarshal.h"
+#include "webkitnetworkrequest.h"
+#include "webkitnetworkresponse.h"
+#include "webkitprivate.h"
+#include "webkitwebbackforwardlist.h"
+#include "webkitwebhistoryitem.h"
+#include "webkitwebinspector.h"
+#include "webkitwebviewprivate.h"
 #include <gdk/gdkkeysyms.h>
+#include <glib/gi18n-lib.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/text/CString.h>
 
 /**
  * SECTION:webkitwebview
@@ -5057,3 +5058,54 @@ GtkMenu* webkit_web_view_get_context_menu(WebKitWebView* webView)
     return 0;
 #endif
 }
+
+namespace WebKit {
+
+WebCore::Page* core(WebKitWebView* webView)
+{
+    if (!webView)
+        return 0;
+
+    WebKitWebViewPrivate* priv = webView->priv;
+    return priv ? priv->corePage : 0;
+}
+
+WebKitWebView* kit(WebCore::Page* corePage)
+{
+    if (!corePage)
+        return 0;
+
+    ASSERT(corePage->chrome());
+    WebKit::ChromeClient* client = static_cast<WebKit::ChromeClient*>(corePage->chrome()->client());
+    return client ? client->webView() : 0;
+}
+
+void webViewEnterFullscreen(WebKitWebView* webView, Node* node)
+{
+    if (!node->hasTagName(HTMLNames::videoTag))
+        return;
+
+#if ENABLE(VIDEO)
+    HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
+    WebKitWebViewPrivate* priv = webView->priv;
+
+    // First exit Fullscreen for the old mediaElement.
+    if (priv->fullscreenVideoController)
+        priv->fullscreenVideoController->exitFullscreen();
+
+    priv->fullscreenVideoController = new FullscreenVideoController;
+    priv->fullscreenVideoController->setMediaElement(videoElement);
+    priv->fullscreenVideoController->enterFullscreen();
+#endif
+}
+
+void webViewExitFullscreen(WebKitWebView* webView)
+{
+#if ENABLE(VIDEO)
+    WebKitWebViewPrivate* priv = webView->priv;
+    if (priv->fullscreenVideoController)
+        priv->fullscreenVideoController->exitFullscreen();
+#endif
+}
+
+}
diff --git a/WebKit/gtk/webkit/webkitwebviewprivate.h b/WebKit/gtk/webkit/webkitwebviewprivate.h
new file mode 100644
index 0000000..66665b2
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebviewprivate.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008, 2010 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef webkitwebviewprivate_h
+#define webkitwebviewprivate_h
+
+#include "DataObjectGtk.h"
+#include "FullscreenVideoController.h"
+#include "GOwnPtr.h"
+#include "ResourceHandle.h"
+#include <webkit/webkitwebview.h>
+
+namespace WebKit {
+
+WebCore::Page* core(WebKitWebView*);
+WebKitWebView* kit(WebCore::Page*);
+
+
+typedef struct DroppingContext_ {
+    WebKitWebView* webView;
+    GdkDragContext* gdkContext;
+    RefPtr<WebCore::DataObjectGtk> dataObject;
+    WebCore::IntPoint lastMotionPosition;
+    int pendingDataRequests;
+    bool dropHappened;
+} DroppingContext;
+
+}
+
+extern "C" {
+
+#define WEBKIT_WEB_VIEW_GET_PRIVATE(obj)    (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewPrivate))
+typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
+struct _WebKitWebViewPrivate {
+    WebCore::Page* corePage;
+    PlatformRefPtr<WebKitWebSettings> webSettings;
+    PlatformRefPtr<WebKitWebInspector> webInspector;
+    PlatformRefPtr<WebKitWebWindowFeatures> webWindowFeatures;
+
+    WebKitWebFrame* mainFrame;
+    PlatformRefPtr<WebKitWebBackForwardList> backForwardList;
+
+    PlatformRefPtr<GtkMenu> currentMenu;
+    gint lastPopupXPosition;
+    gint lastPopupYPosition;
+
+    HashSet<GtkWidget*> children;
+    bool editable;
+    PlatformRefPtr<GtkIMContext> imContext;
+
+    gboolean transparent;
+
+    PlatformRefPtr<GtkAdjustment> horizontalAdjustment;
+    PlatformRefPtr<GtkAdjustment> verticalAdjustment;
+
+#ifndef GTK_API_VERSION_2
+    // GtkScrollablePolicy needs to be checked when
+    // driving the scrollable adjustment values
+    GtkScrollablePolicy horizontalScrollingPolicy;
+    GtkScrollablePolicy verticalScrollingPolicy;
+#endif
+
+    gboolean zoomFullContent;
+    WebKitLoadStatus loadStatus;
+    CString encoding;
+    CString customEncoding;
+
+    CString iconURI;
+
+    gboolean disposing;
+    gboolean usePrimaryForPaste;
+
+#if ENABLE(VIDEO)
+    FullscreenVideoController* fullscreenVideoController;
+#endif
+
+    // These are hosted here because the DataSource object is
+    // created too late in the frame loading process.
+    PlatformRefPtr<WebKitWebResource> mainResource;
+    CString mainResourceIdentifier;
+    PlatformRefPtr<GHashTable> subResources;
+    CString tooltipText;
+    WebCore::IntRect tooltipArea;
+
+    int currentClickCount;
+    WebCore::IntPoint previousClickPoint;
+    guint previousClickButton;
+    guint32 previousClickTime;
+    HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> > draggingDataObjects;
+    HashMap<GdkDragContext*, WebKit::DroppingContext*> droppingContexts;
+};
+
+void webkit_web_view_notify_ready(WebKitWebView*);
+
+void webkit_web_view_request_download(WebKitWebView*, WebKitNetworkRequest*, const WebCore::ResourceResponse& = WebCore::ResourceResponse(), WebCore::ResourceHandle* = 0);
+
+void webkit_web_view_add_resource(WebKitWebView*, const char*, WebKitWebResource*);
+void webkit_web_view_add_main_resource(WebKitWebView*, const char*, WebKitWebResource*);
+void webkit_web_view_remove_resource(WebKitWebView*, const char*);
+WebKitWebResource* webkit_web_view_get_resource(WebKitWebView*, char*);
+WebKitWebResource* webkit_web_view_get_main_resource(WebKitWebView*);
+void webkit_web_view_clear_resources(WebKitWebView*);
+GList* webkit_web_view_get_subresources(WebKitWebView*);
+
+void webkit_web_view_set_tooltip_text(WebKitWebView*, const char*);
+GtkMenu* webkit_web_view_get_context_menu(WebKitWebView*);
+
+WEBKIT_API gchar* webkit_web_view_get_selected_text(WebKitWebView*);
+bool webkit_web_view_use_primary_for_paste(WebKitWebView*);
+
+void webViewEnterFullscreen(WebKitWebView* webView, WebCore::Node*);
+void webViewExitFullscreen(WebKitWebView* webView);
+
+}
+
+#endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list