diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 14:53:02 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 14:53:02 +0000 |
commit | 3697547ae0042bc61d4d575afaefb245ba6034be (patch) | |
tree | c35dcfb11e1073bcc07c90e632e3b6021b5e966d /webkit/config.h.in | |
parent | 897d3bf2b8092cad9c51f6145b249f15447f4903 (diff) | |
download | chromium_src-3697547ae0042bc61d4d575afaefb245ba6034be.zip chromium_src-3697547ae0042bc61d4d575afaefb245ba6034be.tar.gz chromium_src-3697547ae0042bc61d4d575afaefb245ba6034be.tar.bz2 |
Prevent system WebCore.framework from not working due to collisions with
Objective-C names in our libwebcore.a by giving our Objective-C WebCore
classes alternate names.
Review URL: http://codereview.chromium.org/43094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/config.h.in')
-rw-r--r-- | webkit/config.h.in | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/webkit/config.h.in b/webkit/config.h.in index 1ff00ed..2fb36a3 100644 --- a/webkit/config.h.in +++ b/webkit/config.h.in @@ -127,13 +127,42 @@ #define WTF_USE_GOOGLEURL 1 -#if !PLATFORM(DARWIN) +#if PLATFORM(DARWIN) + +// Chromium's version of WebCore includes the following Objective-C classes. +// The system-provided WebCore framework may also provide these classes. +// Because of the nature of Objective-C binding (dynamically at runtime), +// it's possible for the Chromium-provided versions to interfere with the +// system-provided versions. This may happen when a system framework attempts +// to use WebCore.framework, such as when converting an HTML-flavored string +// to an NSAttributedString. The solution is to force Objective-C class names +// that would conflict to use alternate names. +// +// TODO(mark): This list will hopefully shrink but may also grow. Periodically +// run "nm libwebcore.a | grep -E '[atsATS] ([+-]\[|\.objc_class_name)'" and +// make sure that everything listed there has the alternate ChromiumWebCoreObjC +// name, and that nothing extraneous is listed here. If all Objective-C can +// be eliminated from Chromium's WebCore library, these defines should be +// removed entirely. + +#define ScrollbarPrefsObserver \ + ChromiumWebCoreObjCScrollbarPrefsObserver +#define WebCoreControlTintObserver \ + ChromiumWebCoreObjCWebCoreControlTintObserver +#define WebCoreRenderThemeNotificationObserver \ + ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver +#define WebFontCache \ + ChromiumWebCoreObjCWebFontCache + +#else // !PLATFORM(DARWIN) + // Don't define SKIA on Mac. Undefine other things as well that might get set // as side-effects. #define WTF_PLATFORM_SKIA 1 #undef WTF_PLATFORM_CG #undef WTF_PLATFORM_CF -#endif + +#endif // !PLATFORM(DARWIN) #if !defined(WTF_USE_V8) #define WTF_USE_V8 1 |