diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-04 20:16:57 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-04 20:16:57 +0000 |
commit | 4f5025c94935842bbbe68131de009dc63dd8fb3f (patch) | |
tree | a681fb2a6d7ff4a9833c266e83522ce1974b2cd0 | |
parent | 301415ea99531af12cf34568c908fdbdd128bcda (diff) | |
download | chromium_src-4f5025c94935842bbbe68131de009dc63dd8fb3f.zip chromium_src-4f5025c94935842bbbe68131de009dc63dd8fb3f.tar.gz chromium_src-4f5025c94935842bbbe68131de009dc63dd8fb3f.tar.bz2 |
Changes to pending to get WebCore to compile on linux. This
doesn't enable it yet since there are more changes to WebKit
that we need from the merge. Once the merge lands, pending
will probably be clobbered, so this is temporary to allow us
to keep moving forward.
Go ahead and switch from PLATFORM_CHROME to PLATFORM_CHROMIUM
and try to change all the places in the mac code.
This change includes bits from http://codereview.chromium.org/228
which is by Seo Sanghyeon.
Everything still compiles on Windows.
Review URL: http://codereview.chromium.org/1201
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1725 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/SConscript | 10 | ||||
-rw-r--r-- | webkit/glue/webframeloaderclient_impl.h | 2 | ||||
-rw-r--r-- | webkit/pending/Document.cpp | 8 | ||||
-rw-r--r-- | webkit/pending/FrameLoader.cpp | 4 | ||||
-rw-r--r-- | webkit/pending/GraphicsContext.h | 5 | ||||
-rw-r--r-- | webkit/pending/ImageBuffer.h | 4 | ||||
-rw-r--r-- | webkit/pending/InspectorController.h | 2 | ||||
-rw-r--r-- | webkit/pending/Path.h | 2 | ||||
-rw-r--r-- | webkit/pending/ResourceResponseBase.cpp | 2 | ||||
-rw-r--r-- | webkit/pending/SimpleFontData.h | 2 | ||||
-rw-r--r-- | webkit/pending/wtf/Platform.h | 11 | ||||
-rw-r--r-- | webkit/port/page/EventHandlerMac.mm | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/mac/config.h | 2 | ||||
-rw-r--r-- | webkit/webkit.xcodeproj/project.pbxproj | 2 |
14 files changed, 33 insertions, 25 deletions
diff --git a/webkit/SConscript b/webkit/SConscript index 8eeedd0..bc3d70f 100644 --- a/webkit/SConscript +++ b/webkit/SConscript @@ -19,7 +19,10 @@ if env['PLATFORM'] == 'posix': env.Append( CCFLAGS = [ '-Wno-parentheses', - ] + ], + CPPDEFINES = [ + 'BUILDING_GTK__', + ], ) env.Prepend( @@ -126,6 +129,7 @@ env.Append( ['ANDROID_CANVAS_IMPL', '1'], ['WEBCORE_NAVIGATOR_PLATFORM', '"\\"Win32\\""'], 'USE_GOOGLE_URL_LIBRARY', + 'BUILDING_CHROMIUM__', 'LIBXSLT_STATIC', 'LIBXML_STATIC', @@ -155,7 +159,9 @@ if env['PLATFORM'] == 'win32': 'activex_shim/SConscript', 'activex_shim_dll/SConscript', 'build/localized_strings/SConscript', - 'build/WebCore/SConscript', + 'build/WebCore/SConscript', # This almost works on linux. It requires + # some changes to WebKit that we'll get + # in the merge. 'default_plugin/SConscript', 'glue/SConscript', 'glue/plugins/test/SConscript', diff --git a/webkit/glue/webframeloaderclient_impl.h b/webkit/glue/webframeloaderclient_impl.h index b3ef7406..ecb9dc4 100644 --- a/webkit/glue/webframeloaderclient_impl.h +++ b/webkit/glue/webframeloaderclient_impl.h @@ -199,7 +199,7 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient { virtual void unloadListenerChanged(); -#if defined(__APPLE__) && !defined(__BUILDING_CHROME) +#if defined(__APPLE__) && !defined(__BUILDING_CHROMIUM) virtual NSCachedURLResponse* willCacheResponse(WebCore::DocumentLoader*, unsigned long identifier, NSCachedURLResponse*) const; diff --git a/webkit/pending/Document.cpp b/webkit/pending/Document.cpp index 14e4c91..657664e 100644 --- a/webkit/pending/Document.cpp +++ b/webkit/pending/Document.cpp @@ -139,9 +139,9 @@ #endif #if defined(__APPLE__) -// we need to be PLATFORM(CHROME) for this file, even if we're not building +// we need to be PLATFORM(CHROMIUM) for this file, even if we're not building // that particular target, for the a11y ifdefs. -#define WTF_PLATFORM_CHROME 1 +#define WTF_PLATFORM_CHROMIUM 1 #endif using namespace std; @@ -274,12 +274,12 @@ Document::Document(DOMImplementation* impl, Frame* frame, bool isXHTML) , m_titleSetExplicitly(false) , m_imageLoadEventTimer(this, &Document::imageLoadEventTimerFired) , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFired) - , m_dominantScript(USCRIPT_INVALID_CODE) #if ENABLE(XSLT) , m_transformSource(0) #endif , m_xmlVersion("1.0") , m_xmlStandalone(false) + , m_dominantScript(USCRIPT_INVALID_CODE) #if ENABLE(XBL) , m_bindingManager(new XBLBindingManager(this)) #endif @@ -2511,7 +2511,7 @@ bool Document::setFocusedNode(PassRefPtr<Node> newFocusedNode) } } -#if PLATFORM(MAC) && !PLATFORM(CHROME) +#if PLATFORM(MAC) && !PLATFORM(CHROMIUM) if (!focusChangeBlocked && m_focusedNode && AXObjectCache::accessibilityEnabled()) axObjectCache()->handleFocusedUIElementChanged(); #endif diff --git a/webkit/pending/FrameLoader.cpp b/webkit/pending/FrameLoader.cpp index b23933a..3ce520b 100644 --- a/webkit/pending/FrameLoader.cpp +++ b/webkit/pending/FrameLoader.cpp @@ -160,9 +160,9 @@ struct ScheduledRedirection { explicit ScheduledRedirection(HistoryItem* item) : type(historyNavigation) , delay(0) - , historyItem(item) , lockHistory(false) , wasUserGesture(false) + , historyItem(item) { } }; @@ -216,9 +216,9 @@ FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client) , m_isRunningScript(false) , m_didCallImplicitClose(false) , m_wasUnloadEventEmitted(false) - , m_firingUnloadEvents(false) , m_isComplete(false) , m_isLoadingMainResource(false) + , m_firingUnloadEvents(false) , m_cancellingWithLoadInProgress(false) , m_needsClear(false) , m_receivedData(false) diff --git a/webkit/pending/GraphicsContext.h b/webkit/pending/GraphicsContext.h index 46a5b71..87452b7 100644 --- a/webkit/pending/GraphicsContext.h +++ b/webkit/pending/GraphicsContext.h @@ -41,7 +41,7 @@ #if PLATFORM(CG) typedef struct CGContext PlatformGraphicsContext; -#elif PLATFORM(CAIRO) +#elif PLATFORM(CAIRO) || PLATFORM(SKIA) // TODO(jhaas) // We're currently masquerading as Cairo. Change to use PLATFORM(SKIA) //typedef struct _cairo PlatformGraphicsContext; @@ -287,8 +287,7 @@ namespace WebCore { PlatformPath* currentPath(); #endif -// TODO(jhaas): change to PLATFORM(SKIA) -#if PLATFORM(CAIRO) +#if PLATFORM(CAIRO) || PLATFORM(SKIA) void setFillRule(WindRule); PlatformPath* currentPath(); #endif diff --git a/webkit/pending/ImageBuffer.h b/webkit/pending/ImageBuffer.h index 588109c..912f034 100644 --- a/webkit/pending/ImageBuffer.h +++ b/webkit/pending/ImageBuffer.h @@ -40,7 +40,7 @@ typedef struct CGImage* CGImageRef; class QPainter; #endif -#if PLATFORM(CAIRO) +#if PLATFORM(CAIRO) || PLATFORM(SKIA) // TODO(jhaas): PLATFORM(SKIA) typedef struct _cairo_surface cairo_surface_t; class SkBitmap; @@ -63,7 +63,7 @@ namespace WebCore { CGImageRef cgImage() const; #elif PLATFORM(QT) QPixmap* pixmap() const; -#elif PLATFORM(CAIRO) +#elif PLATFORM(CAIRO) || PLATFORM(SKIA) // TODO(jhaas): PLATFORM(SKIA) const SkBitmap* image() const; cairo_surface_t* surface() const; diff --git a/webkit/pending/InspectorController.h b/webkit/pending/InspectorController.h index 6b02ea8..2abcdac 100644 --- a/webkit/pending/InspectorController.h +++ b/webkit/pending/InspectorController.h @@ -49,7 +49,7 @@ // TODO(ojan): Comment in when we do the next full webkit merge. // Commented out from the head version of InspectorController.h // #include "Console.h" -#include "DomWindow.h" +#include "DOMWindow.h" #include <wtf/RefCounted.h> #if USE(JAVASCRIPTCORE_BINDINGS) #include <JavaScriptCore/JSContextRef.h> diff --git a/webkit/pending/Path.h b/webkit/pending/Path.h index 4ed9438..1062ad4 100644 --- a/webkit/pending/Path.h +++ b/webkit/pending/Path.h @@ -35,7 +35,7 @@ typedef QPainterPath PlatformPath; #elif PLATFORM(WX) && USE(WXGC) class wxGraphicsPath; typedef wxGraphicsPath PlatformPath; -#elif PLATFORM(CAIRO) +#elif PLATFORM(CAIRO) || PLATFORM(SKIA) // namespace WebCore { // struct CairoPath; // } diff --git a/webkit/pending/ResourceResponseBase.cpp b/webkit/pending/ResourceResponseBase.cpp index f131bdc..6e5d8e8 100644 --- a/webkit/pending/ResourceResponseBase.cpp +++ b/webkit/pending/ResourceResponseBase.cpp @@ -241,7 +241,7 @@ bool operator==(const ResourceResponse& a, const ResourceResponse& b) return false; if (a.expirationDate() != b.expirationDate()) return false; -#if PLATFORM(MAC) && !PLATFORM(CHROME) +#if PLATFORM(MAC) && !PLATFORM(CHROMIUM) if (a.nsURLResponse() != b.nsURLResponse()) return false; #endif diff --git a/webkit/pending/SimpleFontData.h b/webkit/pending/SimpleFontData.h index 34112bc..e68b249 100644 --- a/webkit/pending/SimpleFontData.h +++ b/webkit/pending/SimpleFontData.h @@ -117,7 +117,7 @@ public: static bool shouldApplyMacAscentHack(); #endif -#if PLATFORM(GTK) +#if PLATFORM(GTK) && PLATFORM(CAIRO) void setFont(cairo_t*) const; #endif diff --git a/webkit/pending/wtf/Platform.h b/webkit/pending/wtf/Platform.h index 7256d81..4bc384e 100644 --- a/webkit/pending/wtf/Platform.h +++ b/webkit/pending/wtf/Platform.h @@ -79,9 +79,10 @@ /* Operating environments */ -/* define a platform for chrome, requires |BUILDING_CHROME__| to be defined */ -#if defined(BUILDING_CHROME__) -#define WTF_PLATFORM_CHROME 1 +/* Define a platform for Chromium, requires |BUILDING_CHROMIUM__| to be */ +/* defined. This is temporary until the merge lands. */ +#if defined(BUILDING_CHROMIUM__) +#define WTF_PLATFORM_CHROMIUM 1 #endif /* PLATFORM(QT) */ @@ -113,9 +114,11 @@ #if PLATFORM(MAC) #define WTF_PLATFORM_CG 1 #define WTF_PLATFORM_CI 1 -#if PLATFORM(CHROME) +#if PLATFORM(CHROMIUM) #define WTF_PLATFORM_SKIA 1 #endif +#elif PLATFORM(CHROMIUM) +#define WTF_PLATFORM_SKIA 1 #elif !PLATFORM(QT) && !PLATFORM(WX) #define WTF_PLATFORM_CAIRO 1 #endif diff --git a/webkit/port/page/EventHandlerMac.mm b/webkit/port/page/EventHandlerMac.mm index 21b394f..51abdd1 100644 --- a/webkit/port/page/EventHandlerMac.mm +++ b/webkit/port/page/EventHandlerMac.mm @@ -187,7 +187,7 @@ void EventHandler::focusDocumentView() Page* page = m_frame->page(); if (!page) return; -#if !PLATFORM(CHROME) +#if !PLATFORM(CHROMIUM) if (FrameView* frameView = m_frame->view()) if (NSView *documentView = frameView->getDocumentView()) page->chrome()->focusNSView(documentView); diff --git a/webkit/tools/test_shell/mac/config.h b/webkit/tools/test_shell/mac/config.h index 428ebf6..45e155e 100644 --- a/webkit/tools/test_shell/mac/config.h +++ b/webkit/tools/test_shell/mac/config.h @@ -7,4 +7,4 @@ #define PLATFORM_NAME "Mac OS X" #define PLATFORM(WTF_FEATURE) (defined( WTF_PLATFORM_##WTF_FEATURE ) && WTF_PLATFORM_##WTF_FEATURE) #define WTF_PLATFORM_MAC 1 -#define WTF_PLATFORM_CHROME 1 +#define WTF_PLATFORM_CHROMIUM 1 diff --git a/webkit/webkit.xcodeproj/project.pbxproj b/webkit/webkit.xcodeproj/project.pbxproj index 25af933..cdc893a 100644 --- a/webkit/webkit.xcodeproj/project.pbxproj +++ b/webkit/webkit.xcodeproj/project.pbxproj @@ -11392,7 +11392,7 @@ INSTALL_PATH = /usr/local/lib; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", - "-DBUILDING_CHROME__", + "-DBUILDING_CHROMIUM__", ); PREBINDING = NO; PRODUCT_NAME = WebCore_v8_chrome; |