Changeset 73539 in webkit


Ignore:
Timestamp:
Dec 8, 2010 12:29:03 PM (13 years ago)
Author:
kov@webkit.org
Message:

2010-12-08 Gustavo Noronha Silva <gustavo.noronha@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.
Location:
trunk/WebKit/gtk
Files:
1 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r73535 r73539  
    4747        * webkit/webkitprivate.h:
    4848        * webkit/webkitwebframe.cpp:
     49
     502010-12-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     51
     52        Reviewed by Martin Robinson.
     53
     54        [GTK] Split webkitprivate.{cpp,h} in more manageable chunks
     55        https://bugs.webkit.org/show_bug.cgi?id=50698
     56
     57        Split private bits of WebKitWebView to its own private header, and
     58        to its implementation file. Take the opportunity to fix includes
     59        sorting to comply with the style guide.
     60
     61        * WebCoreSupport/ChromeClientGtk.cpp:
     62        (WebKit::ChromeClient::enterFullscreenForNode):
     63        (WebKit::ChromeClient::exitFullscreenForNode):
     64        * WebCoreSupport/ContextMenuClientGtk.cpp:
     65        * WebCoreSupport/DragClientGtk.cpp:
     66        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
     67        * WebCoreSupport/EditorClientGtk.cpp:
     68        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     69        * WebCoreSupport/InspectorClientGtk.cpp:
     70        * WebCoreSupport/PasteboardHelperGtk.cpp:
     71        * webkit/webkitprivate.cpp:
     72        (webkit_init):
     73        * webkit/webkitprivate.h:
     74        * webkit/webkitwebbackforwardlist.cpp:
     75        * webkit/webkitwebdatasource.cpp:
     76        * webkit/webkitwebframe.cpp:
     77        * webkit/webkitwebview.cpp:
     78        (WebKit::core):
     79        (WebKit::kit):
     80        (WebKit::webViewEnterFullscreen):
     81        (WebKit::webViewExitFullscreen):
     82        * webkit/webkitwebviewprivate.h: Added.
    4983
    50842010-12-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
  • trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp

    r72909 r73539  
    2828#include "DumpRenderTreeSupportGtk.h"
    2929#include "Element.h"
     30#include "FileChooser.h"
    3031#include "FileSystem.h"
    31 #include "FileChooser.h"
    3232#include "FloatRect.h"
    3333#include "FrameLoadRequest.h"
     
    3535#include "GtkVersioning.h"
    3636#include "HTMLNames.h"
    37 #include "IntRect.h"
    3837#include "HitTestResult.h"
    3938#include "Icon.h"
     39#include "IntRect.h"
    4040#include "KURL.h"
    4141#include "NavigationAction.h"
     42#include "NotImplemented.h"
    4243#include "PlatformString.h"
    4344#include "PopupMenuClient.h"
     
    4546#include "SearchPopupMenuGtk.h"
    4647#include "SecurityOrigin.h"
     48#include "WindowFeatures.h"
    4749#include "webkitgeolocationpolicydecision.h"
    48 #include "webkitwebview.h"
    4950#include "webkitnetworkrequest.h"
    5051#include "webkitprivate.h"
    51 #include "NotImplemented.h"
    52 #include "WindowFeatures.h"
     52#include "webkitwebview.h"
     53#include "webkitwebviewprivate.h"
     54#include <glib.h>
     55#include <glib/gi18n-lib.h>
     56#include <gtk/gtk.h>
     57#include <wtf/text/CString.h>
     58
    5359#if ENABLE(DATABASE)
    5460#include "DatabaseTracker.h"
    5561#endif
    56 #include <wtf/text/CString.h>
    57 
    58 #include <glib.h>
    59 #include <glib/gi18n-lib.h>
    60 #include <gtk/gtk.h>
    6162
    6263using namespace WebCore;
     
    669670    WebKitWebFrame* webFrame = kit(frame);
    670671    WebKitWebView* webView = getViewFromFrame(webFrame);
    671     webkitWebViewEnterFullscreen(webView, node);
     672    webViewEnterFullscreen(webView, node);
    672673}
    673674
     
    677678    WebKitWebFrame* webFrame = kit(frame);
    678679    WebKitWebView* webView = getViewFromFrame(webFrame);
    679     webkitWebViewExitFullscreen(webView);
     680    webViewExitFullscreen(webView);
    680681}
    681682#endif
  • trunk/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp

    r73535 r73539  
    1919
    2020#include "config.h"
     21#include "ContextMenuClientGtk.h"
     22
    2123#include "ContextMenu.h"
    22 #include "ContextMenuClientGtk.h"
    2324#include "ContextMenuController.h"
    24 
    2525#include "HitTestResult.h"
    2626#include "KURL.h"
    2727#include "NotImplemented.h"
    2828#include "Page.h"
     29#include "webkitprivate.h"
     30#include "webkitwebviewprivate.h"
     31#include <glib-object.h>
     32#include <glib/gi18n-lib.h>
     33#include <gtk/gtk.h>
    2934#include <wtf/text/CString.h>
    30 
    31 #include <glib/gi18n-lib.h>
    32 #include <glib-object.h>
    33 #include <gtk/gtk.h>
    34 #include "webkitprivate.h"
    3535
    3636using namespace WebCore;
  • trunk/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp

    r71204 r73539  
    3434#include "RenderObject.h"
    3535#include "webkitprivate.h"
     36#include "webkitwebviewprivate.h"
    3637#include "webkitwebview.h"
    3738#include <gdk/gdk.h>
  • trunk/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r73527 r73539  
    4848#endif
    4949#include "webkitprivate.h"
     50#include "webkitwebviewprivate.h"
    5051#include "webkitwebview.h"
    5152#include "webkitwebframe.h"
  • trunk/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp

    r73088 r73539  
    4747#include "webkitmarshal.h"
    4848#include "webkitprivate.h"
     49#include "webkitwebviewprivate.h"
    4950#include <wtf/text/CString.h>
    5051
  • trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r73455 r73539  
    3535#include "FrameLoader.h"
    3636#include "FrameNetworkingContextGtk.h"
     37#include "FrameTree.h"
    3738#include "FrameView.h"
    38 #include "FrameTree.h"
    3939#include "GOwnPtr.h"
    4040#include "GRefPtr.h"
     
    4646#include "HTMLNames.h"
    4747#include "HTMLPlugInElement.h"
     48#include "JSDOMBinding.h"
    4849#include "JSDOMWindow.h"
    4950#include "Language.h"
     
    5354#include "Page.h"
    5455#include "PluginDatabase.h"
     56#include "ProgressTracker.h"
    5557#include "RenderPart.h"
    5658#include "ResourceHandle.h"
    5759#include "ResourceRequest.h"
    58 #include "ProgressTracker.h"
    59 #include "JSDOMBinding.h"
    6060#include "ScriptController.h"
    6161#include "webkiterror.h"
     
    6767#include "webkitwebpolicydecision.h"
    6868#include "webkitwebview.h"
    69 #include <wtf/text/CString.h>
    70 #include <wtf/text/StringConcatenate.h>
    71 
     69#include "webkitwebviewprivate.h"
    7270#include <JavaScriptCore/APICast.h>
    7371#include <gio/gio.h>
     
    7573#include <glib/gi18n-lib.h>
    7674#include <stdio.h>
     75#include <wtf/text/CString.h>
     76#include <wtf/text/StringConcatenate.h>
    7777
    7878using namespace WebCore;
  • trunk/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp

    r71604 r73539  
    2222
    2323#include "Frame.h"
    24 #include "webkitwebview.h"
    25 #include "webkitwebinspector.h"
    26 #include "webkitprivate.h"
    27 #include "webkitversion.h"
    2824#include "InspectorController.h"
    2925#include "NotImplemented.h"
    3026#include "PlatformString.h"
     27#include "webkitprivate.h"
     28#include "webkitversion.h"
     29#include "webkitwebinspector.h"
     30#include "webkitwebview.h"
     31#include "webkitwebviewprivate.h"
    3132#include <wtf/text/CString.h>
    3233
  • trunk/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp

    r57901 r73539  
    2525#include "FocusController.h"
    2626#include "Frame.h"
    27 #include <gtk/gtk.h>
    2827#include "webkitwebframe.h"
    2928#include "webkitwebview.h"
    30 #include "webkitprivate.h"
     29#include "webkitwebviewprivate.h"
     30#include <gtk/gtk.h>
    3131
    3232using namespace WebCore;
  • trunk/WebKit/gtk/webkit/webkitprivate.cpp

    r73353 r73539  
    9191}
    9292
    93 WebCore::Page* core(WebKitWebView* webView)
    94 {
    95     if (!webView)
    96         return 0;
    97 
    98     WebKitWebViewPrivate* priv = webView->priv;
    99     return priv ? priv->corePage : 0;
    100 }
    101 
    102 WebKitWebView* kit(WebCore::Page* corePage)
    103 {
    104     if (!corePage)
    105         return 0;
    106 
    107     ASSERT(corePage->chrome());
    108     WebKit::ChromeClient* client = static_cast<WebKit::ChromeClient*>(corePage->chrome()->client());
    109     return client ? client->webView() : 0;
    110 }
    111 
    11293WebKitWebNavigationReason kit(WebCore::NavigationType type)
    11394{
     
    317298    soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
    318299}
    319 
    320 void webkitWebViewEnterFullscreen(WebKitWebView* webView, Node* node)
    321 {
    322     if (!node->hasTagName(HTMLNames::videoTag))
    323         return;
    324 
    325 #if ENABLE(VIDEO)
    326     HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
    327     WebKitWebViewPrivate* priv = webView->priv;
    328 
    329     // First exit Fullscreen for the old mediaElement.
    330     if (priv->fullscreenVideoController)
    331         priv->fullscreenVideoController->exitFullscreen();
    332 
    333     priv->fullscreenVideoController = new FullscreenVideoController;
    334     priv->fullscreenVideoController->setMediaElement(videoElement);
    335     priv->fullscreenVideoController->enterFullscreen();
    336 #endif
    337 }
    338 
    339 void webkitWebViewExitFullscreen(WebKitWebView* webView)
    340 {
    341 #if ENABLE(VIDEO)
    342     WebKitWebViewPrivate* priv = webView->priv;
    343     if (priv->fullscreenVideoController)
    344         priv->fullscreenVideoController->exitFullscreen();
    345 #endif
    346 }
    347 
  • trunk/WebKit/gtk/webkit/webkitprivate.h

    r73527 r73539  
    5858#include "IntRect.h"
    5959#include "FrameLoaderClient.h"
    60 #include "FullscreenVideoController.h"
    6160#include "Node.h"
    6261#include "Page.h"
     
    8887    WebKitWebFrame* kit(WebCore::Frame*);
    8988
    90     WebCore::Page* core(WebKitWebView*);
    91     WebKitWebView* kit(WebCore::Page*);
    92 
    9389    WebCore::HistoryItem* core(WebKitWebHistoryItem*);
    9490    WebKitWebHistoryItem* kit(PassRefPtr<WebCore::HistoryItem>);
     
    111107
    112108    PasteboardHelperGtk* pasteboardHelperInstance();
    113 
    114     typedef struct DroppingContext_ {
    115         WebKitWebView* webView;
    116         GdkDragContext* gdkContext;
    117         RefPtr<WebCore::DataObjectGtk> dataObject;
    118         WebCore::IntPoint lastMotionPosition;
    119         int pendingDataRequests;
    120         bool dropHappened;
    121     } DroppingContext;
    122109}
    123110
     
    131118#define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
    132119#define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
    133 
    134     #define WEBKIT_WEB_VIEW_GET_PRIVATE(obj)    (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewPrivate))
    135     typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
    136     struct _WebKitWebViewPrivate {
    137         WebCore::Page* corePage;
    138         PlatformRefPtr<WebKitWebSettings> webSettings;
    139         PlatformRefPtr<WebKitWebInspector> webInspector;
    140         PlatformRefPtr<WebKitWebWindowFeatures> webWindowFeatures;
    141 
    142         WebKitWebFrame* mainFrame;
    143         PlatformRefPtr<WebKitWebBackForwardList> backForwardList;
    144 
    145         PlatformRefPtr<GtkMenu> currentMenu;
    146         gint lastPopupXPosition;
    147         gint lastPopupYPosition;
    148 
    149         HashSet<GtkWidget*> children;
    150         bool editable;
    151         PlatformRefPtr<GtkIMContext> imContext;
    152 
    153         gboolean transparent;
    154 
    155         PlatformRefPtr<GtkAdjustment> horizontalAdjustment;
    156         PlatformRefPtr<GtkAdjustment> verticalAdjustment;
    157 
    158 #ifndef GTK_API_VERSION_2
    159         // GtkScrollablePolicy needs to be checked when
    160         // driving the scrollable adjustment values
    161         GtkScrollablePolicy horizontalScrollingPolicy;
    162         GtkScrollablePolicy verticalScrollingPolicy;
    163 #endif
    164 
    165         gboolean zoomFullContent;
    166         WebKitLoadStatus loadStatus;
    167         CString encoding;
    168         CString customEncoding;
    169 
    170         CString iconURI;
    171 
    172         gboolean disposing;
    173         gboolean usePrimaryForPaste;
    174 
    175 #if ENABLE(VIDEO)
    176         FullscreenVideoController* fullscreenVideoController;
    177 #endif
    178 
    179         // These are hosted here because the DataSource object is
    180         // created too late in the frame loading process.
    181         PlatformRefPtr<WebKitWebResource> mainResource;
    182         CString mainResourceIdentifier;
    183         PlatformRefPtr<GHashTable> subResources;
    184         CString tooltipText;
    185         WebCore::IntRect tooltipArea;
    186 
    187         int currentClickCount;
    188         WebCore::IntPoint previousClickPoint;
    189         guint previousClickButton;
    190         guint32 previousClickTime;
    191         HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> > draggingDataObjects;
    192         HashMap<GdkDragContext*, WebKit::DroppingContext*> droppingContexts;
    193     };
    194120
    195121    #define WEBKIT_WEB_FRAME_GET_PRIVATE(obj)    (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
     
    272198    webkit_web_window_features_new_from_core_features (const WebCore::WindowFeatures& features);
    273199
    274     void
    275     webkit_web_view_notify_ready (WebKitWebView* web_view);
    276 
    277     void
    278     webkit_web_view_request_download(WebKitWebView* web_view, WebKitNetworkRequest* request, const WebCore::ResourceResponse& response = WebCore::ResourceResponse(), WebCore::ResourceHandle* handle = 0);
    279 
    280     void
    281     webkit_web_view_add_resource(WebKitWebView*, const char*, WebKitWebResource*);
    282 
    283     void
    284     webkit_web_view_add_main_resource(WebKitWebView*, const char*, WebKitWebResource*);
    285 
    286     void
    287     webkit_web_view_remove_resource(WebKitWebView*, const char*);
    288 
    289     WebKitWebResource*
    290     webkit_web_view_get_resource(WebKitWebView*, char*);
    291 
    292     WebKitWebResource*
    293     webkit_web_view_get_main_resource(WebKitWebView*);
    294 
    295     void
    296     webkit_web_view_clear_resources(WebKitWebView*);
    297 
    298     GList*
    299     webkit_web_view_get_subresources(WebKitWebView*);
    300 
    301     void
    302     webkit_web_view_set_tooltip_text(WebKitWebView*, const char*);
    303 
    304     GtkMenu*
    305     webkit_web_view_get_context_menu(WebKitWebView*);
    306 
    307200    WebKitDownload*
    308201    webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response);
     
    336229    // FIXME: Move these to webkitwebframe.h once their API has been discussed.
    337230
    338     WEBKIT_API gchar*
    339     webkit_web_view_get_selected_text (WebKitWebView* web_view);
    340 
    341231    WEBKIT_API void
    342232    webkit_web_settings_add_extra_plugin_directory (WebKitWebView *web_view, const gchar* directory);
     
    344234    GSList*
    345235    webkit_web_settings_get_enchant_dicts(WebKitWebView* web_view);
    346 
    347     bool
    348     webkit_web_view_use_primary_for_paste(WebKitWebView* web_view);
    349236
    350237    GHashTable*
     
    364251    webkit_security_origin_get_web_database(WebKitSecurityOrigin* securityOrigin, const char* databaseName);
    365252
    366     void webkitWebViewEnterFullscreen(WebKitWebView* webView, WebCore::Node* node);
    367     void webkitWebViewExitFullscreen(WebKitWebView* webView);
     253    WEBKIT_API void
     254    webkit_web_frame_layout(WebKitWebFrame* frame);
    368255}
    369256
  • trunk/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp

    r70955 r73539  
    2727#include "webkitwebhistoryitem.h"
    2828#include "webkitwebview.h"
     29#include "webkitwebviewprivate.h"
    2930#include <glib.h>
    3031
  • trunk/WebKit/gtk/webkit/webkitwebdatasource.cpp

    r73006 r73539  
    2323#include "ArchiveResource.h"
    2424#include "DocumentLoaderGtk.h"
     25#include "FrameLoader.h"
    2526#include "FrameLoaderClientGtk.h"
    26 #include "FrameLoader.h"
    2727#include "KURL.h"
    2828#include "PlatformString.h"
    2929#include "ResourceRequest.h"
    30 #include "runtime/InitializeThreading.h"
    3130#include "SharedBuffer.h"
    3231#include "SubstituteData.h"
     32#include "runtime/InitializeThreading.h"
     33#include "webkitprivate.h"
    3334#include "webkitwebresource.h"
    34 #include "webkitprivate.h"
     35#include "webkitwebviewprivate.h"
    3536#include "wtf/Assertions.h"
    36 
    3737#include <glib.h>
    3838
  • trunk/WebKit/gtk/webkit/webkitwebframe.cpp

    r73527 r73539  
    2626
    2727#include "config.h"
    28 
    29 #include "webkitenumtypes.h"
    3028#include "webkitwebframe.h"
    31 #include "webkitwebview.h"
    32 #include "webkitmarshal.h"
    33 #include "webkitprivate.h"
    34 
     29
     30#include "AXObjectCache.h"
    3531#include "AccessibilityObjectWrapperAtk.h"
    3632#include "AnimationController.h"
    37 #include "AXObjectCache.h"
    3833#include "DOMObjectCache.h"
    3934#include "DocumentLoader.h"
     
    4338#include "FrameTree.h"
    4439#include "FrameView.h"
    45 #include <glib/gi18n-lib.h>
    4640#include "GCController.h"
    4741#include "GraphicsContext.h"
    4842#include "GtkVersioning.h"
    4943#include "HTMLFrameOwnerElement.h"
     44#include "JSDOMBinding.h"
     45#include "JSDOMWindow.h"
    5046#include "JSElement.h"
    5147#include "PrintContext.h"
    5248#include "RenderListItem.h"
     49#include "RenderTreeAsText.h"
    5350#include "RenderView.h"
    54 #include "RenderTreeAsText.h"
    55 #include "JSDOMBinding.h"
    5651#include "ScriptController.h"
    5752#include "SubstituteData.h"
     53#include "webkitenumtypes.h"
     54#include "webkitmarshal.h"
     55#include "webkitprivate.h"
     56#include "webkitwebview.h"
     57#include "webkitwebviewprivate.h"
     58#include <JavaScriptCore/APICast.h>
     59#include <atk/atk.h>
     60#include <glib/gi18n-lib.h>
     61#include <wtf/text/CString.h>
     62
    5863#if ENABLE(SVG)
    5964#include "SVGSMILElement.h"
    6065#endif
    61 
    62 #include <atk/atk.h>
    63 #include <JavaScriptCore/APICast.h>
    64 #include <wtf/text/CString.h>
    6566
    6667/**
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r73534 r73539  
    3030#include "webkitwebview.h"
    3131
    32 #include "webkitdownload.h"
    33 #include "webkitenumtypes.h"
    34 #include "webkitgeolocationpolicydecision.h"
    35 #include "webkitmarshal.h"
    36 #include "webkitnetworkrequest.h"
    37 #include "webkitnetworkresponse.h"
    38 #include "webkitprivate.h"
    39 #include "webkitwebinspector.h"
    40 #include "webkitwebbackforwardlist.h"
    41 #include "webkitwebhistoryitem.h"
    42 
    4332#include "AXObjectCache.h"
    4433#include "AbstractDatabase.h"
    4534#include "BackForwardListImpl.h"
    46 #include "MemoryCache.h"
     35#include "Chrome.h"
    4736#include "ChromeClientGtk.h"
    4837#include "ClipboardUtilitiesGtk.h"
     38#include "ContextMenu.h"
    4939#include "ContextMenuClientGtk.h"
    5040#include "ContextMenuController.h"
    51 #include "ContextMenu.h"
    5241#include "Cursor.h"
    5342#include "Document.h"
     
    5746#include "DragController.h"
    5847#include "DragData.h"
     48#include "Editor.h"
    5949#include "EditorClientGtk.h"
    60 #include "Editor.h"
    6150#include "EventHandler.h"
    6251#include "FloatQuad.h"
     
    6554#include "FrameLoaderTypes.h"
    6655#include "FrameView.h"
    67 #include <glib/gi18n-lib.h>
    68 #include <GOwnPtr.h>
    69 #include <GOwnPtrGtk.h>
     56#include "GOwnPtrGtk.h"
    7057#include "GraphicsContext.h"
    7158#include "GtkVersioning.h"
     59#include "HTMLNames.h"
    7260#include "HitTestRequest.h"
    7361#include "HitTestResult.h"
    7462#include "IconDatabase.h"
    7563#include "InspectorClientGtk.h"
     64#include "MemoryCache.h"
    7665#include "MouseEventWithHitTestResults.h"
    7766#include "NotImplemented.h"
    7867#include "PageCache.h"
    7968#include "Pasteboard.h"
     69#include "PasteboardHelper.h"
    8070#include "PasteboardHelperGtk.h"
    81 #include "PasteboardHelper.h"
    8271#include "PlatformKeyboardEvent.h"
    8372#include "PlatformWheelEvent.h"
     
    8877#include "Scrollbar.h"
    8978#include "webkit/WebKitDOMDocumentPrivate.h"
     79#include "webkitdownload.h"
     80#include "webkitenumtypes.h"
     81#include "webkitgeolocationpolicydecision.h"
     82#include "webkitmarshal.h"
     83#include "webkitnetworkrequest.h"
     84#include "webkitnetworkresponse.h"
     85#include "webkitprivate.h"
     86#include "webkitwebbackforwardlist.h"
     87#include "webkitwebhistoryitem.h"
     88#include "webkitwebinspector.h"
     89#include "webkitwebviewprivate.h"
     90#include <gdk/gdkkeysyms.h>
     91#include <glib/gi18n-lib.h>
     92#include <wtf/gobject/GOwnPtr.h>
    9093#include <wtf/text/CString.h>
    91 
    92 #include <gdk/gdkkeysyms.h>
    9394
    9495/**
     
    50585059#endif
    50595060}
     5061
     5062namespace WebKit {
     5063
     5064WebCore::Page* core(WebKitWebView* webView)
     5065{
     5066    if (!webView)
     5067        return 0;
     5068
     5069    WebKitWebViewPrivate* priv = webView->priv;
     5070    return priv ? priv->corePage : 0;
     5071}
     5072
     5073WebKitWebView* kit(WebCore::Page* corePage)
     5074{
     5075    if (!corePage)
     5076        return 0;
     5077
     5078    ASSERT(corePage->chrome());
     5079    WebKit::ChromeClient* client = static_cast<WebKit::ChromeClient*>(corePage->chrome()->client());
     5080    return client ? client->webView() : 0;
     5081}
     5082
     5083void webViewEnterFullscreen(WebKitWebView* webView, Node* node)
     5084{
     5085    if (!node->hasTagName(HTMLNames::videoTag))
     5086        return;
     5087
     5088#if ENABLE(VIDEO)
     5089    HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
     5090    WebKitWebViewPrivate* priv = webView->priv;
     5091
     5092    // First exit Fullscreen for the old mediaElement.
     5093    if (priv->fullscreenVideoController)
     5094        priv->fullscreenVideoController->exitFullscreen();
     5095
     5096    priv->fullscreenVideoController = new FullscreenVideoController;
     5097    priv->fullscreenVideoController->setMediaElement(videoElement);
     5098    priv->fullscreenVideoController->enterFullscreen();
     5099#endif
     5100}
     5101
     5102void webViewExitFullscreen(WebKitWebView* webView)
     5103{
     5104#if ENABLE(VIDEO)
     5105    WebKitWebViewPrivate* priv = webView->priv;
     5106    if (priv->fullscreenVideoController)
     5107        priv->fullscreenVideoController->exitFullscreen();
     5108#endif
     5109}
     5110
     5111}
Note: See TracChangeset for help on using the changeset viewer.