Title: [121547] trunk/Source/WebCore
Revision
121547
Author
[email protected]
Date
2012-06-29 03:44:08 -0700 (Fri, 29 Jun 2012)

Log Message

Remove still more BUILDING_ON_LEOPARD branches now that no port supports leopard
https://bugs.webkit.org/show_bug.cgi?id=90256

Reviewed by Ryosuke Niwa.

* platform/LocalizedStrings.cpp:
(WebCore::imageTitle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setAllowsFontSmoothing):
* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::drawPattern):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::clear):
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::boundingRect):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFont):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/mac/ComplexTextController.cpp:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
(WebCore::FontCache::platformInit):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
* platform/graphics/mac/WebLayer.h:
* platform/mac/CursorMac.mm:
(WebCore::Cursor::ensurePlatformCursor):
* platform/mac/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
(WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
* platform/mac/DisplaySleepDisabler.h:
(DisplaySleepDisabler):
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
* platform/mac/PopupMenuMac.mm:
(WebCore::PopupMenuMac::populate):
* platform/mac/ScrollElasticityController.mm:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121546 => 121547)


--- trunk/Source/WebCore/ChangeLog	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/ChangeLog	2012-06-29 10:44:08 UTC (rev 121547)
@@ -1,3 +1,48 @@
+2012-06-29  Eric Seidel  <[email protected]>
+
+        Remove still more BUILDING_ON_LEOPARD branches now that no port supports leopard
+        https://bugs.webkit.org/show_bug.cgi?id=90256
+
+        Reviewed by Ryosuke Niwa.
+
+        * platform/LocalizedStrings.cpp:
+        (WebCore::imageTitle):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::setAllowsFontSmoothing):
+        * platform/graphics/cg/ImageCG.cpp:
+        (WebCore::Image::drawPattern):
+        * platform/graphics/cg/ImageSourceCG.cpp:
+        (WebCore::ImageSource::clear):
+        * platform/graphics/cg/PathCG.cpp:
+        (WebCore::Path::boundingRect):
+        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+        (WebCore::FontPlatformData::ctFont):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        * platform/graphics/mac/ComplexTextController.cpp:
+        * platform/graphics/mac/FontCacheMac.mm:
+        (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
+        (WebCore::FontCache::platformInit):
+        * platform/graphics/mac/FontCustomPlatformData.cpp:
+        (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
+        (WebCore::createFontCustomPlatformData):
+        * platform/graphics/mac/FontCustomPlatformData.h:
+        (WebCore::FontCustomPlatformData::FontCustomPlatformData):
+        * platform/graphics/mac/SimpleFontDataMac.mm:
+        (WebCore::SimpleFontData::platformInit):
+        * platform/graphics/mac/WebLayer.h:
+        * platform/mac/CursorMac.mm:
+        (WebCore::Cursor::ensurePlatformCursor):
+        * platform/mac/DisplaySleepDisabler.cpp:
+        (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
+        (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
+        * platform/mac/DisplaySleepDisabler.h:
+        (DisplaySleepDisabler):
+        * platform/mac/HTMLConverter.h:
+        * platform/mac/HTMLConverter.mm:
+        * platform/mac/PopupMenuMac.mm:
+        (WebCore::PopupMenuMac::populate):
+        * platform/mac/ScrollElasticityController.mm:
+
 2012-06-29  Zan Dobersek  <[email protected]>
 
         Unreviewed attempt at a build fix for 64-bit debug build,

Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/LocalizedStrings.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -755,7 +755,6 @@
 String imageTitle(const String& filename, const IntSize& size)
 {
 #if USE(CF)
-#if !defined(BUILDING_ON_LEOPARD)
     RetainPtr<CFStringRef> filenameCFString(AdoptCF, filename.createCFString());
     RetainPtr<CFLocaleRef> locale(AdoptCF, CFLocaleCopyCurrent());
     RetainPtr<CFNumberFormatterRef> formatter(AdoptCF, CFNumberFormatterCreate(0, locale.get(), kCFNumberFormatterDecimalStyle));
@@ -770,10 +769,6 @@
 
     return formatLocalizedString(WEB_UI_STRING("%@ %@×%@ pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filenameCFString.get(), widthString.get(), heightString.get());
 #else
-    RetainPtr<CFStringRef> filenameCFString(AdoptCF, filename.createCFString());
-    return formatLocalizedString(WEB_UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filenameCFString.get(), size.width(), size.height());
-#endif
-#else
     return formatLocalizedString(WEB_UI_STRING("<filename> %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), size.width(), size.height()).replace("<filename>", filename);
 #endif
 }

Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -1597,11 +1597,8 @@
 
 void GraphicsContext::setAllowsFontSmoothing(bool allowsFontSmoothing)
 {
-    UNUSED_PARAM(allowsFontSmoothing);
-#if !defined(BUILDING_ON_LEOPARD)
     CGContextRef context = platformContext();
     CGContextSetAllowsFontSmoothing(context, allowsFontSmoothing);
-#endif
 }
 
 void GraphicsContext::setIsCALayerContext(bool isLayerContext)

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -262,22 +262,13 @@
 
     // Adjust the color space.
     subImage = Image::imageWithColorSpace(subImage.get(), styleColorSpace);
-    
-    // Leopard has an optimized call for the tiling of image patterns, but we can only use it if the image has been decoded enough that
-    // its buffer is the same size as the overall image.  Because a partially decoded CGImageRef with a smaller width or height than the
-    // overall image buffer needs to tile with "gaps", we can't use the optimized tiling call in that case.
-    // FIXME: We cannot use CGContextDrawTiledImage with scaled tiles on Leopard, because it suffers from rounding errors.  Snow Leopard is ok.
+
     float scaledTileWidth = tileRect.width() * narrowPrecisionToFloat(patternTransform.a());
     float w = CGImageGetWidth(tileImage);
-#ifdef BUILDING_ON_LEOPARD
-    if (w == size().width() && h == size().height() && scaledTileWidth == tileRect.width() && scaledTileHeight == tileRect.height())
-#else
     if (w == size().width() && h == size().height())
-#endif
         CGContextDrawTiledImage(context, FloatRect(adjustedX, adjustedY, scaledTileWidth, scaledTileHeight), subImage.get());
     else {
-
-    // On Leopard and newer, this code now only runs for partially decoded images whose buffers do not yet match the overall size of the image.
+    // This code now only runs for partially decoded images whose buffers do not yet match the overall size of the image.
     static const CGPatternCallbacks patternCallbacks = { 0, drawPatternCallback, NULL };
     CGAffineTransform matrix = CGAffineTransformMake(narrowPrecisionToCGFloat(patternTransform.a()), 0, 0, narrowPrecisionToCGFloat(patternTransform.d()), adjustedX, adjustedY);
     matrix = CGAffineTransformConcat(matrix, CGContextGetCTM(context));
@@ -301,7 +292,6 @@
 
     CGContextSetFillColorWithColor(context, color.get());
     CGContextFillRect(context, CGContextGetClipBoundingBox(context));
-
     }
 
     stateSaver.restore();

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -85,22 +85,12 @@
 
 void ImageSource::clear(bool destroyAllFrames, size_t, SharedBuffer* data, bool allDataReceived)
 {
-#if !defined(BUILDING_ON_LEOPARD)
-    // Recent versions of ImageIO discard previously decoded image frames if the client
+    // ImageIO discards previously decoded image frames if the client
     // application no longer holds references to them, so there's no need to throw away
     // the decoder unless we're explicitly asked to destroy all of the frames.
-
     if (!destroyAllFrames)
         return;
-#else
-    // Older versions of ImageIO hold references to previously decoded image frames.
-    // There is no API to selectively release some of the frames it is holding, and
-    // if we don't release the frames we use too much memory on large images.
-    // Destroying the decoder is the only way to release previous frames.
 
-    UNUSED_PARAM(destroyAllFrames);
-#endif
-
     if (m_decoder) {
         CFRelease(m_decoder);
         m_decoder = 0;

Modified: trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -171,15 +171,8 @@
 
 FloatRect Path::boundingRect() const
 {
-    // CGPathGetBoundingBox includes the path's control points, CGPathGetPathBoundingBox
-    // does not, but only exists on 10.6 and above.
-
-    CGRect bound = CGRectZero;
-#if !defined(BUILDING_ON_LEOPARD)
-    bound = CGPathGetPathBoundingBox(m_path);
-#else
-    bound = CGPathGetBoundingBox(m_path);
-#endif
+    // CGPathGetPathBoundingBox does not include the path's control points.
+    CGRect bound = CGPathGetPathBoundingBox(m_path);
     return CGRectIsNull(bound) ? CGRectZero : bound;
 }
 

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2012-06-29 10:44:08 UTC (rev 121547)
@@ -240,24 +240,6 @@
     return descriptor;
 }
 
-// Adding a cascade list breaks the font on Leopard
-static bool canSetCascadeListForCustomFont()
-{
-#if PLATFORM(CHROMIUM)
-    static SInt32 systemVersion;
-    if (!systemVersion) {
-        if (Gestalt(gestaltSystemVersion, &systemVersion) != noErr)
-            return false;
-    }
-
-    return systemVersion >= 0x1060;
-#elif !defined(BUILDING_ON_LEOPARD)
-    return true;
-#else
-    return false;
-#endif
-}
-
 CTFontRef FontPlatformData::ctFont() const
 {
     if (m_CTFont)
@@ -265,7 +247,7 @@
 
 #if PLATFORM(CHROMIUM)
     if (m_inMemoryFont) {
-        m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_inMemoryFont->cgFont(), m_size, 0, canSetCascadeListForCustomFont() ? cascadeToLastResortFontDescriptor() : 0));
+        m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_inMemoryFont->cgFont(), m_size, 0, cascadeToLastResortFontDescriptor()));
         return m_CTFont.get();
     }
 #endif
@@ -281,7 +263,7 @@
             fontDescriptor = cascadeToLastResortFontDescriptor();
         m_CTFont.adoptCF(CTFontCreateCopyWithAttributes(m_CTFont.get(), m_size, 0, fontDescriptor));
     } else
-        m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, canSetCascadeListForCustomFont() ? cascadeToLastResortFontDescriptor() : 0));
+        m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, cascadeToLastResortFontDescriptor()));
 
     if (m_widthVariant != RegularWidth) {
         int featureTypeValue = kTextSpacingType;

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -1617,12 +1617,7 @@
 
 bool MediaPlayerPrivateGStreamer::supportsFullscreen() const
 {
-#if defined(BUILDING_ON_LEOPARD)
-    // See <rdar://problem/7389945>
-    return false;
-#else
     return true;
-#endif
 }
 
 PlatformMedia MediaPlayerPrivateGStreamer::platformMedia() const

Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -33,11 +33,6 @@
 #include <wtf/StdLibExtras.h>
 #include <wtf/unicode/CharacterNames.h>
 
-#if defined(BUILDING_ON_LEOPARD)
-// Undefined when compiling agains the 10.5 SDK.
-#define kCTVersionNumber10_6 0x00030000
-#endif
-
 using namespace std;
 
 namespace WebCore {

Modified: trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm	2012-06-29 10:44:08 UTC (rev 121547)
@@ -52,30 +52,17 @@
     fontCache()->invalidate();
 }
 
-#if !defined(BUILDING_ON_LEOPARD)
 static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef name, const void *, CFDictionaryRef)
 {
     ASSERT_UNUSED(observer, observer == fontCache());
     ASSERT_UNUSED(name, CFEqual(name, kCTFontManagerRegisteredFontsChangedNotification));
     invalidateFontCache(0);
 }
-#else
-static void fontCacheATSNotificationCallback(ATSFontNotificationInfoRef, void*)
-{
-    invalidateFontCache(0);
-}
-#endif
 
 void FontCache::platformInit()
 {
     wkSetUpFontCache();
-#if !defined(BUILDING_ON_LEOPARD)
     CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFontsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
-#else
-    // kCTFontManagerRegisteredFontsChangedNotification does not exist on Leopard and earlier.
-    // FIXME: Passing kATSFontNotifyOptionReceiveWhileSuspended may be an overkill and does not seem to work anyway.
-    ATSFontNotificationSubscribe(fontCacheATSNotificationCallback, kATSFontNotifyOptionReceiveWhileSuspended, 0, 0);
-#endif
 }
 
 static int toAppKitFontWeight(FontWeight fontWeight)

Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -78,10 +78,6 @@
 
 FontCustomPlatformData::~FontCustomPlatformData()
 {
-#ifdef BUILDING_ON_LEOPARD
-    if (m_atsContainer)
-        ATSFontDeactivate(m_atsContainer, NULL, kATSOptionFlagsDefault);
-#endif
 #if USE(SKIA_ON_MAC_CHROMIUM)
     SkSafeUnref(m_typeface);
 #endif
@@ -115,51 +111,15 @@
     }
 #endif
 
-    ATSFontContainerRef containerRef = 0;
-
     RetainPtr<CGFontRef> cgFontRef;
-
-#ifndef BUILDING_ON_LEOPARD
     RetainPtr<CFDataRef> bufferData(AdoptCF, buffer->createCFData());
     RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(bufferData.get()));
 
     cgFontRef.adoptCF(CGFontCreateWithDataProvider(dataProvider.get()));
     if (!cgFontRef)
         return 0;
-#else
-    // Use ATS to activate the font.
 
-    // The value "3" means that the font is private and can't be seen by anyone else.
-    ATSFontActivateFromMemory((void*)buffer->data(), buffer->size(), 3, kATSFontFormatUnspecified, NULL, kATSOptionFlagsDefault, &containerRef);
-    if (!containerRef)
-        return 0;
-    ItemCount fontCount;
-    ATSFontFindFromContainer(containerRef, kATSOptionFlagsDefault, 0, NULL, &fontCount);
-    
-    // We just support the first font in the list.
-    if (fontCount == 0) {
-        ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
-        return 0;
-    }
-    
-    ATSFontRef fontRef = 0;
-    ATSFontFindFromContainer(containerRef, kATSOptionFlagsDefault, 1, &fontRef, NULL);
-    if (!fontRef) {
-        ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
-        return 0;
-    }
-    
-    cgFontRef.adoptCF(CGFontCreateWithPlatformFont(&fontRef));
-    // Workaround for <rdar://problem/5675504>.
-    if (cgFontRef && !CGFontGetNumberOfGlyphs(cgFontRef.get()))
-        cgFontRef = 0;
-    if (!cgFontRef) {
-        ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
-        return 0;
-    }
-#endif // !defined(BUILDING_ON_LEOPARD)
-
-    FontCustomPlatformData* fontCustomPlatformData = new FontCustomPlatformData(containerRef, cgFontRef.leakRef());
+    FontCustomPlatformData* fontCustomPlatformData = new FontCustomPlatformData(cgFontRef.leakRef());
 #if USE(SKIA_ON_MAC_CHROMIUM)
     RemoteFontStream* stream = new RemoteFontStream(buffer);
     fontCustomPlatformData->m_typeface = SkTypeface::CreateFromStream(stream);

Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h	2012-06-29 10:44:08 UTC (rev 121547)
@@ -30,8 +30,6 @@
 #include <wtf/Noncopyable.h>
 
 typedef struct CGFont* CGFontRef;
-typedef UInt32 ATSFontContainerRef;
-typedef UInt32 ATSFontRef;
 
 #if USE(SKIA_ON_MAC_CHROMIUM)
 class SkTypeface;
@@ -45,9 +43,8 @@
 struct FontCustomPlatformData {
     WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
 public:
-    FontCustomPlatformData(ATSFontContainerRef container, CGFontRef cgFont)
-        : m_atsContainer(container)
-        , m_cgFont(cgFont)
+    explicit FontCustomPlatformData(CGFontRef cgFont)
+        : m_cgFont(cgFont)
 #if USE(SKIA_ON_MAC_CHROMIUM)
         , m_typeface(0)
 #endif

Modified: trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm	2012-06-29 10:44:08 UTC (rev 121547)
@@ -233,15 +233,6 @@
     NSString *familyName = [m_platformData.font() familyName];
     if ([familyName isEqualToString:@"Times"] || [familyName isEqualToString:@"Helvetica"] || [familyName isEqualToString:@"Courier"])
         ascent += floorf(((ascent + descent) * 0.15f) + 0.5f);
-#if defined(BUILDING_ON_LEOPARD)
-    else if ([familyName isEqualToString:@"Geeza Pro"]) {
-        // Geeza Pro has glyphs that draw slightly above the ascent or far below the descent. Adjust
-        // those vertical metrics to better match reality, so that diacritics at the bottom of one line
-        // do not overlap diacritics at the top of the next line.
-        ascent *= 1.08f;
-        descent *= 2.f;
-    }
-#endif
 
     // Compute and store line spacing, before the line metrics hacks are applied.
     m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));

Modified: trunk/Source/WebCore/platform/graphics/mac/WebLayer.h (121546 => 121547)


--- trunk/Source/WebCore/platform/graphics/mac/WebLayer.h	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/graphics/mac/WebLayer.h	2012-06-29 10:44:08 UTC (rev 121547)
@@ -36,13 +36,6 @@
     class PlatformCALayerClient;
 }
 
-#if defined(BUILDING_ON_LEOPARD)
-@interface CALayer(WebLayerInternal)
-- (CGAffineTransform)contentsTransform;
-- (void)setContentsTransform:(CGAffineTransform)t;
-@end
-#endif
-
 @interface WebLayer : CALayer 
 {
 }

Modified: trunk/Source/WebCore/platform/mac/CursorMac.mm (121546 => 121547)


--- trunk/Source/WebCore/platform/mac/CursorMac.mm	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/mac/CursorMac.mm	2012-06-29 10:44:08 UTC (rev 121547)
@@ -254,11 +254,7 @@
         break;
 
     case Cursor::ContextMenu:
-#if !defined(BUILDING_ON_LEOPARD)
         m_platformCursor = [NSCursor contextualMenuCursor];
-#else
-        m_platformCursor = createNamedCursor("contextMenuCursor", 3, 2);
-#endif
         break;
 
     case Cursor::Alias:
@@ -278,19 +274,11 @@
         break;
 
     case Cursor::NoDrop:
-#if !defined(BUILDING_ON_LEOPARD)
         m_platformCursor = [NSCursor operationNotAllowedCursor];
-#else
-        m_platformCursor = createNamedCursor("noDropCursor", 3, 1);
-#endif
         break;
 
     case Cursor::Copy:
-#if !defined(BUILDING_ON_LEOPARD)
         m_platformCursor = [NSCursor dragCopyCursor];
-#else
-        m_platformCursor = createNamedCursor("copyCursor", 3, 2);
-#endif
         break;
 
     case Cursor::None:
@@ -298,11 +286,7 @@
         break;
 
     case Cursor::NotAllowed:
-#if !defined(BUILDING_ON_LEOPARD)
         m_platformCursor = [NSCursor operationNotAllowedCursor];
-#else
-        m_platformCursor = createNamedCursor("notAllowedCursor", 11, 11);
-#endif
         break;
 
     case Cursor::ZoomIn:

Modified: trunk/Source/WebCore/platform/mac/DisplaySleepDisabler.cpp (121546 => 121547)


--- trunk/Source/WebCore/platform/mac/DisplaySleepDisabler.cpp	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/mac/DisplaySleepDisabler.cpp	2012-06-29 10:44:08 UTC (rev 121547)
@@ -29,40 +29,20 @@
 #include <IOKit/pwr_mgt/IOPMLib.h>
 #include <wtf/RetainPtr.h>
 
-#ifdef BUILDING_ON_LEOPARD
-#include <wtf/UnusedParam.h>
-#endif
-
 namespace WebCore {
 
 static const double systemActivityInterval = 1;
 
 DisplaySleepDisabler::DisplaySleepDisabler(const char* reason)
     : m_disableDisplaySleepAssertion(0)
-#ifdef BUILDING_ON_LEOPARD
-    , m_systemActivityTimer(this, &DisplaySleepDisabler::systemActivityTimerFired)
-#endif
 {
-#ifndef BUILDING_ON_LEOPARD
     RetainPtr<CFStringRef> reasonCF(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, reason, kCFStringEncodingUTF8));
     IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonCF.get(), &m_disableDisplaySleepAssertion);
-#else
-    UNUSED_PARAM(reason);
-    IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, &m_disableDisplaySleepAssertion);
-    m_systemActivityTimer.startRepeating(systemActivityInterval);
-#endif
 }
 
 DisplaySleepDisabler::~DisplaySleepDisabler()
 {
     IOPMAssertionRelease(m_disableDisplaySleepAssertion);
 }
-    
-#ifdef BUILDING_ON_LEOPARD
-void DisplaySleepDisabler::systemActivityTimerFired(Timer<DisplaySleepDisabler>*)
-{
-    UpdateSystemActivity(OverallAct);
-}
-#endif
 
 }

Modified: trunk/Source/WebCore/platform/mac/DisplaySleepDisabler.h (121546 => 121547)


--- trunk/Source/WebCore/platform/mac/DisplaySleepDisabler.h	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/mac/DisplaySleepDisabler.h	2012-06-29 10:44:08 UTC (rev 121547)
@@ -29,10 +29,6 @@
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 
-#ifdef BUILDING_ON_LEOPARD
-#include "Timer.h"
-#endif
-
 namespace WebCore {
 
 class DisplaySleepDisabler {
@@ -40,18 +36,11 @@
 public:
     static PassOwnPtr<DisplaySleepDisabler> create(const char* reason) { return adoptPtr(new DisplaySleepDisabler(reason)); }
     ~DisplaySleepDisabler();
-    
+
 private:
     DisplaySleepDisabler(const char* reason);
-
-#ifdef BUILDING_ON_LEOPARD
-    void systemActivityTimerFired(Timer<DisplaySleepDisabler>*);
-#endif
     
     uint32_t m_disableDisplaySleepAssertion;
-#ifdef BUILDING_ON_LEOPARD
-    Timer<DisplaySleepDisabler> m_systemActivityTimer;
-#endif
 };
 
 }

Modified: trunk/Source/WebCore/platform/mac/HTMLConverter.h (121546 => 121547)


--- trunk/Source/WebCore/platform/mac/HTMLConverter.h	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/mac/HTMLConverter.h	2012-06-29 10:44:08 UTC (rev 121547)
@@ -79,12 +79,10 @@
     } _flags;
 }
 
-#if !defined(BUILDING_ON_LEOPARD)
 - (id)init;
 - (id)initWithDOMRange:(DOMRange *)domRange;
 
 - (NSAttributedString *)attributedString;
-#endif
 
 + (NSAttributedString *)editingAttributedStringFromRange:(WebCore::Range*)range;
 @end

Modified: trunk/Source/WebCore/platform/mac/HTMLConverter.mm (121546 => 121547)


--- trunk/Source/WebCore/platform/mac/HTMLConverter.mm	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/mac/HTMLConverter.mm	2012-06-29 10:44:08 UTC (rev 121547)
@@ -50,7 +50,6 @@
 static NSFileWrapper *fileWrapperForURL(DocumentLoader *, NSURL *);
 static NSFileWrapper *fileWrapperForElement(Element*);
 
-#ifndef BUILDING_ON_LEOPARD
 
 // Additional control Unicode characters
 const unichar WebNextLineCharacter = 0x0085;
@@ -96,12 +95,8 @@
     return defaultFont;
 }
 
-#endif
-
 @implementation WebHTMLConverter
 
-#ifndef BUILDING_ON_LEOPARD
-
 static NSFont *_fontForNameAndSize(NSString *fontName, CGFloat size, NSMutableDictionary *cache)
 {
     NSFontManager *fontManager = [NSFontManager sharedFontManager];
@@ -1657,8 +1652,6 @@
     return (0 == _errorCode) ? [[_attrStr retain] autorelease] : nil;
 }
 
-#endif // !defined(BUILDING_ON_LEOPARD)
-
 // This function uses TextIterator, which makes offsets in its result compatible with HTML editing.
 + (NSAttributedString *)editingAttributedStringFromRange:(Range*)range
 {

Modified: trunk/Source/WebCore/platform/mac/PopupMenuMac.mm (121546 => 121547)


--- trunk/Source/WebCore/platform/mac/PopupMenuMac.mm	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/mac/PopupMenuMac.mm	2012-06-29 10:44:08 UTC (rev 121547)
@@ -75,10 +75,8 @@
     if (!client()->shouldPopOver())
         [m_popup.get() addItemWithTitle:@""];
 
-#ifndef BUILDING_ON_LEOPARD
     TextDirection menuTextDirection = client()->menuStyle().textDirection();
     [m_popup.get() setUserInterfaceLayoutDirection:menuTextDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
-#endif // !defined(BUILDING_ON_LEOPARD)
 
     ASSERT(client());
     int size = client()->listSize();
@@ -98,7 +96,6 @@
                 [attributes setObject:font forKey:NSFontAttributeName];
             }
 
-#ifndef BUILDING_ON_LEOPARD
             RetainPtr<NSMutableParagraphStyle> paragraphStyle(AdoptNS, [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
             [paragraphStyle.get() setAlignment:menuTextDirection == LTR ? NSLeftTextAlignment : NSRightTextAlignment];
             NSWritingDirection writingDirection = style.textDirection() == LTR ? NSWritingDirectionLeftToRight : NSWritingDirectionRightToLeft;
@@ -109,7 +106,6 @@
                 [attributes setObject:writingDirectionArray.get() forKey:NSWritingDirectionAttributeName];
             }
             [attributes setObject:paragraphStyle.get() forKey:NSParagraphStyleAttributeName];
-#endif // !defined(BUILDING_ON_LEOPARD)
 
             // FIXME: Add support for styling the foreground and background colors.
             // FIXME: Find a way to customize text color when an item is highlighted.

Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm (121546 => 121547)


--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm	2012-06-29 10:31:14 UTC (rev 121546)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm	2012-06-29 10:44:08 UTC (rev 121547)
@@ -33,12 +33,6 @@
 
 #if ENABLE(RUBBER_BANDING)
 
-#ifdef BUILDING_ON_LEOPARD
-@interface NSProcessInfo (ScrollAnimatorMacExt)
-- (NSTimeInterval)systemUptime;
-@end
-#endif
-
 #if ENABLE(RUBBER_BANDING)
 static NSTimeInterval systemUptime()
 {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to