2008-10-10 Darin Fisher <darin@chromium.org>
authordarin@chromium.org <darin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Oct 2008 05:15:47 +0000 (05:15 +0000)
committerdarin@chromium.org <darin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Oct 2008 05:15:47 +0000 (05:15 +0000)
        Reviewed by Darin Adler.

        Add some PLATFORM(CHROMIUM) ifdefs to WebCore
        https://bugs.webkit.org/show_bug.cgi?id=21511

        * loader/FTPDirectoryDocument.cpp:
        * loader/FTPDirectoryParser.cpp:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::finishedLoadingDocument):
        * platform/ContextMenuItem.h:
        * platform/Cursor.h:
        * platform/DragData.h:
        * platform/DragImage.h:
        * platform/Pasteboard.h:
        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::isSystemKey):
        * platform/PlatformMenuDescription.h:
        * platform/PlatformMouseEvent.h:
        * platform/PlatformWheelEvent.h:
        * platform/PopupMenu.h:
        * platform/ScrollView.h:
        * platform/Widget.h:
        * platform/network/NetworkStateNotifier.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37599 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
WebCore/ChangeLog
WebCore/loader/FTPDirectoryDocument.cpp
WebCore/loader/FTPDirectoryParser.cpp
WebCore/loader/FrameLoader.cpp
WebCore/platform/ContextMenuItem.h
WebCore/platform/Cursor.h
WebCore/platform/DragData.h
WebCore/platform/DragImage.h
WebCore/platform/Pasteboard.h
WebCore/platform/PlatformKeyboardEvent.h
WebCore/platform/PlatformMenuDescription.h
WebCore/platform/PlatformMouseEvent.h
WebCore/platform/PlatformWheelEvent.h
WebCore/platform/PopupMenu.h
WebCore/platform/ScrollView.h
WebCore/platform/Widget.h
WebCore/platform/network/NetworkStateNotifier.h

index a22b7e55cbbb6578bd8713d041a23ce50dc025b1..b1f3b3bd2070576eadf18e2e38eb81434c0d9185 100644 (file)
@@ -1,3 +1,29 @@
+2008-10-10  Darin Fisher  <darin@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Add some PLATFORM(CHROMIUM) ifdefs to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=21511
+
+        * loader/FTPDirectoryDocument.cpp:
+        * loader/FTPDirectoryParser.cpp:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::finishedLoadingDocument):
+        * platform/ContextMenuItem.h:
+        * platform/Cursor.h:
+        * platform/DragData.h:
+        * platform/DragImage.h:
+        * platform/Pasteboard.h:
+        * platform/PlatformKeyboardEvent.h:
+        (WebCore::PlatformKeyboardEvent::isSystemKey):
+        * platform/PlatformMenuDescription.h:
+        * platform/PlatformMouseEvent.h:
+        * platform/PlatformWheelEvent.h:
+        * platform/PopupMenu.h:
+        * platform/ScrollView.h:
+        * platform/Widget.h:
+        * platform/network/NetworkStateNotifier.h:
+
 2008-10-14  Chris Marrin  <cmarrin@apple.com>
 
         Reviewed by Darin Adler.
index 786762bda57eb4554db175dddac2ef9853dadd69..b333edb037c827a651db8cec64258acfde21b287 100644 (file)
@@ -235,7 +235,7 @@ static struct tm *localTimeQt(const time_t *const timep, struct tm *result)
 }
 
 #define localtime_r(x, y) localTimeQt(x, y)
-#elif PLATFORM(WIN) && !defined(localtime_r)
+#elif PLATFORM(WIN_OS) && !defined(localtime_r)
 #define localtime_r(x, y) localtime_s((y), (x))
 #endif
 
index ef284db14d2615e425f828439a13db4cab930746..41e79c6c83f8ea4c666cbdf68c43c048710cbaca 100644 (file)
@@ -51,7 +51,7 @@ static struct tm *gmtimeQt(const time_t *const timep, struct tm *result)
 }
 
 #define gmtime_r(x, y) gmtimeQt(x, y)
-#elif PLATFORM(WIN) && !defined(gmtime_r)
+#elif PLATFORM(WIN_OS) && !defined(gmtime_r)
 #define gmtime_r(x, y) gmtime_s((y), (x))
 #endif
 
index 1887f87c2d58bcf7db5676f39f7bf562fff4374e..f62d7aa10e14564ce1a9bf982936a76a00f9ed07 100644 (file)
@@ -3022,7 +3022,8 @@ void FrameLoader::didReceiveServerRedirectForProvisionalLoadForFrame()
 
 void FrameLoader::finishedLoadingDocument(DocumentLoader* loader)
 {
-#if PLATFORM(WIN)
+    // FIXME: Platforms shouldn't differ here!
+#if PLATFORM(WIN) || PLATFORM(CHROMIUM)
     if (m_creatingInitialEmptyDocument)
         return;
 #endif
index 22e042f91ed65fed9b54a67af308d978bba2301f..26f88ecb66e38bcbc14d1e780a8f7416e1f41469 100644 (file)
@@ -169,6 +169,8 @@ namespace WebCore {
     };
 #elif PLATFORM(WX)
     typedef wxMenuItem* PlatformMenuItemDescription;
+#else
+    typedef void* PlatformMenuItemDescription;
 #endif
 
     class ContextMenuItem {
index 86c615888faa6bd73b4a3a5b22da5a6a2f45576b..e53ca0cf06a8b3827e5a3ae5c9eabee28d935c3e 100644 (file)
@@ -38,6 +38,8 @@ typedef HICON HCURSOR;
 typedef struct _GdkCursor GdkCursor;
 #elif PLATFORM(QT)
 #include <QCursor>
+#elif PLATFORM(CHROMIUM)
+#include "PlatformCursor.h"
 #endif
 
 #if PLATFORM(MAC)
@@ -76,6 +78,8 @@ namespace WebCore {
     typedef QCursor PlatformCursor;
 #elif PLATFORM(WX)
     typedef wxCursor* PlatformCursor;
+#elif PLATFORM(CHROMIUM)
+    // See PlatformCursor.h
 #else
     typedef void* PlatformCursor;
 #endif
index 467904d2b9b91a3166eb84258bc631d044ffe1b9..a2c56288f67fbee039d7390954d85e89d6a34291 100644 (file)
@@ -54,6 +54,8 @@ typedef class wxDataObject* DragDataRef;
 #elif PLATFORM(GTK)
 // FIXME: this should probably be something gdk-specific
 typedef void* DragDataRef;
+#elif PLATFORM(CHROMIUM)
+#include "DragDataRef.h"
 #endif
 
 
index 92dc66ae62243197bf410db8b7fd7393df06ee5f..744e4507a80c1d6b4ef858170663f31933fbef4f 100644 (file)
@@ -44,6 +44,8 @@ QT_END_NAMESPACE
 typedef struct HBITMAP__* HBITMAP;
 #elif PLATFORM(WX)
 class wxDragImage;
+#elif PLATFORM(CHROMIUM)
+#include "DragImageRef.h"
 #endif
 
 //We need to #define YOffset as it needs to be shared with WebKit
index 491b4c55e9ecef01474a1198c8728032c9c85c0d..f98683f97dee5430e92b4338acfad4ed338d8056 100644 (file)
@@ -53,6 +53,10 @@ class NSArray;
 typedef struct HWND__* HWND;
 #endif
 
+#if PLATFORM(CHROMIUM)
+#include "PasteboardPrivate.h"
+#endif
+
 namespace WebCore {
 
 #if PLATFORM(MAC)
@@ -120,6 +124,10 @@ private:
 #if PLATFORM(QT)
     bool m_selectionMode;
 #endif
+
+#if PLATFORM(CHROMIUM)
+    PasteboardPrivate p;
+#endif
 };
 
 } // namespace WebCore
index c0be2efa1b93b9bb6f4a59b46f302e0ce9e8baec..4a6bc9e41ec6b9b464464b470f332be6a8a6ec01 100644 (file)
@@ -132,7 +132,6 @@ namespace WebCore {
 
 #if PLATFORM(WIN)
         PlatformKeyboardEvent(HWND, WPARAM, LPARAM, Type, bool);
-        bool isSystemKey() const { return m_isSystemKey; }
 #endif
 
 #if PLATFORM(GTK)
@@ -149,7 +148,11 @@ namespace WebCore {
         PlatformKeyboardEvent(wxKeyEvent&);
 #endif
 
-    private:
+#if PLATFORM(WIN) || PLATFORM(CHROMIUM)
+        bool isSystemKey() const { return m_isSystemKey; }
+#endif
+
+    protected:
         Type m_type;
         String m_text;
         String m_unmodifiedText;
@@ -166,7 +169,7 @@ namespace WebCore {
 #if PLATFORM(MAC)
         RetainPtr<NSEvent> m_macEvent;
 #endif
-#if PLATFORM(WIN)
+#if PLATFORM(WIN) || PLATFORM(CHROMIUM)
         bool m_isSystemKey;
 #endif
 #if PLATFORM(GTK)
index 7ecc4ce0665452ba710617fe4ac0c3aafaf112c1..65537eb3e13a34c6d31c345197d1943d0b806e10 100644 (file)
@@ -55,6 +55,8 @@ namespace WebCore {
     typedef GtkMenu* PlatformMenuDescription;
 #elif PLATFORM(WX)
     typedef wxMenu* PlatformMenuDescription;
+#else
+    typedef void* PlatformMenuDescription;
 #endif
 
 } // namespace
index 9252738d6dd66ac72c28a73b4cbb3d125847a7dd..1b92153d9986f97835a1e761a54aab8e69eac619 100644 (file)
@@ -137,7 +137,7 @@ namespace WebCore {
 #endif
 
 
-    private:
+    protected:
         IntPoint m_position;
         IntPoint m_globalPosition;
         MouseButton m_button;
index ad8852d362c3b356e1c63b9d1f47ea94f62cec5b..fc954edb8ff5fa2d5c906047c1513822ea07554c 100644 (file)
@@ -116,7 +116,7 @@ namespace WebCore {
         PlatformWheelEvent(const wxMouseEvent&, const wxPoint&);
 #endif
 
-    private:
+    protected:
 #if !PLATFORM(WIN)
         int horizontalLineMultiplier() const { return cLineMultiplier; }
         int verticalLineMultiplier() const { return cLineMultiplier; }
index 785ce468e721fa08c82e24670bb3876aed742cf5..fc85d6045f3805a9106e924fe597ad584435fcf3 100644 (file)
@@ -57,6 +57,8 @@ typedef struct _GtkWidget GtkWidget;
 class wxMenu;
 #include <wx/defs.h>
 #include <wx/event.h>
+#elif PLATFORM(CHROMIUM)
+#include "PopupMenuPrivate.h"
 #endif
 
 namespace WebCore {
@@ -173,6 +175,8 @@ private:
 #elif PLATFORM(WX)
     wxMenu* m_menu;
     void OnMenuItemSelected(wxCommandEvent&);
+#elif PLATFORM(CHROMIUM)
+    PopupMenuPrivate p;
 #endif
 
 };
index 1fd7455bfd2d5223c296245faf13ea616bf3964f..be14f59c3b0607c467ffd5f1509a316d7306b137 100644 (file)
 typedef struct _GtkAdjustment GtkAdjustment;
 #endif
 
-#if PLATFORM(WIN)
-typedef struct HRGN__* HRGN;
-#endif
-
 #if PLATFORM(WX)
 class wxScrollWinEvent;
 #endif
index f5f28aa415035135f49af9daaef8c1abc797135b..f84600158376422fd23fad745bd7b49c4d992c68 100644 (file)
@@ -65,6 +65,10 @@ class wxWindow;
 typedef wxWindow* PlatformWidget;
 #endif
 
+#if PLATFORM(CHROMIUM)
+#include "PlatformWidget.h"
+#endif
+
 #include "IntPoint.h"
 #include "IntRect.h"
 #include "IntSize.h"
index 22f14a87b3b541f7f7b55a12d9f22a12c1037258..4bc74276fb1bbf8d0bb5244b95cda0e1987abbf8 100644 (file)
 typedef const struct __CFArray * CFArrayRef;
 typedef const struct __SCDynamicStore * SCDynamicStoreRef;
 
+#elif PLATFORM(CHROMIUM)
+
+#include "NetworkStateNotifierPrivate.h"
+
 #elif PLATFORM(WIN)
 
 #include <windows.h>
@@ -71,10 +75,13 @@ private:
     void registerForAddressChange();
     HANDLE m_waitHandle;
     OVERLAPPED m_overlapped;
+
+#elif PLATFORM(CHROMIUM)
+    NetworkStateNotifierPrivate p;
 #endif
 };
 
-#if !PLATFORM(MAC) && !PLATFORM(WIN)
+#if !PLATFORM(MAC) && !PLATFORM(WIN) && !PLATFORM(CHROMIUM)
 
 inline NetworkStateNotifier::NetworkStateNotifier()
     : m_isOnLine(true)