Remove pre-Sierra-OS-specific code in WebCore
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jan 2018 20:58:52 +0000 (20:58 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jan 2018 20:58:52 +0000 (20:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182026

Reviewed by Tim Horton.

Source/WebCore:

* page/cocoa/UserAgent.mm:
(WebCore::systemMarketingVersionForUserAgentString):
* page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
(WebCore::ScrollingMomentumCalculatorMac::retargetedScrollOffsetDidChange):
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::bitmapPNGFileType):
* platform/graphics/FontPlatformData.cpp:
* platform/graphics/FontPlatformData.h:
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(layerContentsFormat):
(PlatformCALayerCocoa::updateContentsFormat):
(PlatformCALayerCocoa::backingStoreBytesPerPixel const):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::linearRGBColorSpaceRef):
(WebCore::extendedSRGBColorSpaceRef):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::drawPDFPage):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::getCSSAttribute):
(WebCore::capabilitiesForFontDescriptor):
(WebCore::findClosestFont):
(WebCore::platformFontLookupWithFamily):
(WebCore::lookupFallbackFont):
(WebCore::fontWeightFromCoreText): Deleted.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::variantCapsSupportsCharacterForSynthesis const):
(WebCore::Font::platformWidthForGlyph const):
(WebCore::advanceForColorBitmapFont): Deleted.
(WebCore::canUseFastGlyphAdvanceGetter): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::hash const):
(WebCore::FontPlatformData::platformIsEqual const):
(WebCore::FontPlatformData::ctFont const):
* platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::linearRGBColorSpaceRef): Deleted.
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::setTimebase):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::supportsFormat):
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenSupportsExtendedColor):
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::didCreateScrollerImp):
(WebCore::ScrollbarThemeMac::isLayoutDirectionRTL):
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::userPrefersReducedMotion const):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* platform/text/mac/TextBoundaries.mm:
(WebCore::findNextWordFromIndex):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft const):
* testing/Internals.mm:
(WebCore::Internals::userPrefersReducedMotion const):

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:
* pal/spi/cg/CoreGraphicsSPI.h:
* pal/spi/cocoa/DataDetectorsCoreSPI.h:
* pal/spi/cocoa/QuartzCoreSPI.h:
* pal/spi/mac/AVFoundationSPI.h:
* pal/spi/mac/NSMenuSPI.h:
* pal/spi/mac/NSScrollingMomentumCalculatorSPI.h:
* pal/spi/mac/PIPSPI.h:

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

32 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h
Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreSPI.h
Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h
Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h
Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h
Source/WebCore/PAL/pal/spi/mac/NSScrollingMomentumCalculatorSPI.h
Source/WebCore/PAL/pal/spi/mac/PIPSPI.h
Source/WebCore/page/cocoa/UserAgent.mm
Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm
Source/WebCore/platform/cocoa/PasteboardCocoa.mm
Source/WebCore/platform/graphics/FontPlatformData.cpp
Source/WebCore/platform/graphics/FontPlatformData.h
Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm
Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm
Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp
Source/WebCore/platform/mac/PlatformScreenMac.mm
Source/WebCore/platform/mac/ScrollbarThemeMac.mm
Source/WebCore/platform/mac/ThemeMac.mm
Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm
Source/WebCore/platform/text/mac/TextBoundaries.mm
Source/WebCore/rendering/RenderLayerModelObject.cpp
Source/WebCore/testing/Internals.mm

index ff09167..d438d08 100644 (file)
@@ -1,5 +1,70 @@
 2018-01-24  Alex Christensen  <achristensen@webkit.org>
 
+        Remove pre-Sierra-OS-specific code in WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=182026
+
+        Reviewed by Tim Horton.
+
+        * page/cocoa/UserAgent.mm:
+        (WebCore::systemMarketingVersionForUserAgentString):
+        * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
+        (WebCore::ScrollingMomentumCalculatorMac::retargetedScrollOffsetDidChange):
+        * platform/cocoa/PasteboardCocoa.mm:
+        (WebCore::bitmapPNGFileType):
+        * platform/graphics/FontPlatformData.cpp:
+        * platform/graphics/FontPlatformData.h:
+        * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
+        (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        (layerContentsFormat):
+        (PlatformCALayerCocoa::updateContentsFormat):
+        (PlatformCALayerCocoa::backingStoreBytesPerPixel const):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::linearRGBColorSpaceRef):
+        (WebCore::extendedSRGBColorSpaceRef):
+        * platform/graphics/cg/PDFDocumentImage.cpp:
+        (WebCore::PDFDocumentImage::drawPDFPage):
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::getCSSAttribute):
+        (WebCore::capabilitiesForFontDescriptor):
+        (WebCore::findClosestFont):
+        (WebCore::platformFontLookupWithFamily):
+        (WebCore::lookupFallbackFont):
+        (WebCore::fontWeightFromCoreText): Deleted.
+        * platform/graphics/cocoa/FontCocoa.mm:
+        (WebCore::Font::variantCapsSupportsCharacterForSynthesis const):
+        (WebCore::Font::platformWidthForGlyph const):
+        (WebCore::advanceForColorBitmapFont): Deleted.
+        (WebCore::canUseFastGlyphAdvanceGetter): Deleted.
+        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+        (WebCore::FontPlatformData::FontPlatformData):
+        (WebCore::FontPlatformData::hash const):
+        (WebCore::FontPlatformData::platformIsEqual const):
+        (WebCore::FontPlatformData::ctFont const):
+        * platform/graphics/cocoa/GraphicsContextCocoa.mm:
+        (WebCore::linearRGBColorSpaceRef): Deleted.
+        * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
+        (WebCore::WebCoreDecompressionSession::setTimebase):
+        * platform/graphics/mac/FontCustomPlatformData.cpp:
+        (WebCore::FontCustomPlatformData::supportsFormat):
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::screenSupportsExtendedColor):
+        * platform/mac/ScrollbarThemeMac.mm:
+        (WebCore::ScrollbarThemeMac::didCreateScrollerImp):
+        (WebCore::ScrollbarThemeMac::isLayoutDirectionRTL):
+        * platform/mac/ThemeMac.mm:
+        (WebCore::ThemeMac::userPrefersReducedMotion const):
+        * platform/network/cocoa/ResourceRequestCocoa.mm:
+        (WebCore::ResourceRequest::doUpdatePlatformRequest):
+        * platform/text/mac/TextBoundaries.mm:
+        (WebCore::findNextWordFromIndex):
+        * rendering/RenderLayerModelObject.cpp:
+        (WebCore::RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft const):
+        * testing/Internals.mm:
+        (WebCore::Internals::userPrefersReducedMotion const):
+
+2018-01-24  Alex Christensen  <achristensen@webkit.org>
+
         Remove WebProcess authentication code
         https://bugs.webkit.org/show_bug.cgi?id=182020
 
index 9031895..d46935c 100644 (file)
@@ -1,3 +1,19 @@
+2018-01-24  Alex Christensen  <achristensen@webkit.org>
+
+        Remove pre-Sierra-OS-specific code in WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=182026
+
+        Reviewed by Tim Horton.
+
+        * pal/spi/cf/CFNetworkSPI.h:
+        * pal/spi/cg/CoreGraphicsSPI.h:
+        * pal/spi/cocoa/DataDetectorsCoreSPI.h:
+        * pal/spi/cocoa/QuartzCoreSPI.h:
+        * pal/spi/mac/AVFoundationSPI.h:
+        * pal/spi/mac/NSMenuSPI.h:
+        * pal/spi/mac/NSScrollingMomentumCalculatorSPI.h:
+        * pal/spi/mac/PIPSPI.h:
+
 2018-01-23  Dean Jackson  <dino@apple.com>
 
         REGRESSION (r222961?): sRGB images shown in WebGL are over-saturated on a wide gamut monitor
index f74c95f..df39622 100644 (file)
@@ -172,7 +172,6 @@ typedef void (^CFCachedURLResponseCallBackBlock)(CFCachedURLResponseRef);
 @end
 #endif
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
 @interface NSHTTPCookie ()
 @property (nullable, readonly, copy) NSString *_storagePartition;
 @end
@@ -186,7 +185,6 @@ typedef void (^CFCachedURLResponseCallBackBlock)(CFCachedURLResponseRef);
 @property (readwrite, copy) NSString *_pathToDownloadTaskFile;
 @property (copy) NSString *_storagePartitionIdentifier;
 @end
-#endif
 
 #endif // defined(__OBJC__)
 
index 20968a1..4810a19 100644 (file)
@@ -249,14 +249,12 @@ bool CGContextGetAllowsFontSubpixelPositioning(CGContextRef);
 bool CGContextDrawsWithCorrectShadowOffsets(CGContextRef);
 CGPatternRef CGPatternCreateWithImage2(CGImageRef, CGAffineTransform, CGPatternTiling);
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
 bool CGColorSpaceUsesExtendedRange(CGColorSpaceRef);
 
 typedef struct CGPDFAnnotation *CGPDFAnnotationRef;
 typedef bool (^CGPDFAnnotationDrawCallbackType)(CGContextRef context, CGPDFPageRef page, CGPDFAnnotationRef annotation);
 void CGContextDrawPDFPageWithAnnotations(CGContextRef, CGPDFPageRef, CGPDFAnnotationDrawCallbackType);
 void CGContextDrawPathDirect(CGContextRef, CGPathDrawingMode, CGPathRef, const CGRect* boundingBox);
-#endif
 
 #if USE(IOSURFACE)
 CGContextRef CGIOSurfaceContextCreate(IOSurfaceRef, size_t, size_t, size_t, size_t, CGColorSpaceRef, CGBitmapInfo);
index 51d908e..863aa90 100644 (file)
@@ -104,17 +104,10 @@ extern NSString * const DDURLScheme;
 
 #define DDResultPropertyPassiveDisplay   (1 << 0)
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-typedef struct __DDQueryOffset {
-    CFIndex queryIndex;
-    CFIndex offset;
-} DDQueryOffset;
-#else
 typedef struct __DDQueryOffset {
     CFIndex queryIndex:32;
     CFIndex offset:32;
 } DDQueryOffset;
-#endif
 
 typedef struct __DDQueryRange {
     DDQueryOffset start;
@@ -123,11 +116,7 @@ typedef struct __DDQueryRange {
 
 #endif // !USE(APPLE_INTERNAL_SDK)
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-static_assert(sizeof(DDQueryOffset) == sizeof(CFIndex) * 2, "DDQueryOffset is no longer the size of two CFIndexes. Update the definition of DDQueryOffset in this file to match the new size.");
-#else
 static_assert(sizeof(DDQueryOffset) == 8, "DDQueryOffset is no longer 8 bytes. Update the definition of DDQueryOffset in this file to match the new size.");
-#endif
 
 typedef struct __DDScanQuery *DDScanQueryRef;
 typedef struct __DDScanner *DDScannerRef;
index 6e5f6b4..ff96c0b 100644 (file)
@@ -76,10 +76,8 @@ typedef struct _CARenderContext CARenderContext;
 - (mach_port_t)createFencePort;
 - (void)setFencePort:(mach_port_t)port;
 - (void)setFencePort:(mach_port_t)port commitHandler:(void(^)(void))block;
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-@property uint32_t commitPriority;
-#endif
 #if PLATFORM(MAC)
+@property uint32_t commitPriority;
 @property BOOL colorMatchUntaggedContent;
 #endif
 @property (readonly) uint32_t contextId;
@@ -187,7 +185,7 @@ size_t CARenderServerGetBufferDataSize(CARenderServerBufferRef);
 
 bool CARenderServerRenderLayerWithTransform(mach_port_t, uint32_t client_id, uint64_t layer_id, CARenderServerBufferRef, int32_t ox, int32_t oy, const CATransform3D*);
 #endif
-#endif
+#endif // USE(APPLE_INTERNAL_SDK)
 
 typedef struct _CAMachPort *CAMachPortRef;
 CAMachPortRef CAMachPortCreate(mach_port_t);
@@ -243,15 +241,6 @@ extern NSString * const kCAContextPortNumber;
 extern NSString * const kCAContentsFormatRGBA10XR;
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
 extern NSString * const kCAContentsFormatRGBA8ColorRGBA8LinearGlyphMask;
 #endif
-
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
-@protocol CALayerDelegate <NSObject>
-@end
-
-@protocol CAAnimationDelegate <NSObject>
-@end
-
-#endif // USE(APPLE_INTERNAL_SDK)
index 6620414..2cb7cf9 100644 (file)
@@ -76,12 +76,7 @@ NS_ASSUME_NONNULL_END
 
 #endif // ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101200) || PLATFORM(IOS)
 #import <AVFoundation/AVAssetCache.h>
-#else
-@interface AVAssetCache : NSObject
-@end
-#endif
 NS_ASSUME_NONNULL_BEGIN
 @interface AVAssetCache ()
 + (AVAssetCache *)assetCacheWithURL:(NSURL *)URL;
@@ -155,7 +150,7 @@ NS_ASSUME_NONNULL_END
 #endif // !PLATFORM(IOS)
 #endif // USE(APPLE_INTERNAL_SDK)
 
-#if PLATFORM(MAC) && (!USE(APPLE_INTERNAL_SDK) || __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
+#if PLATFORM(MAC) && !USE(APPLE_INTERNAL_SDK)
 NS_ASSUME_NONNULL_BEGIN
 @interface AVStreamDataParser (AVStreamDataParserPrivate)
 + (NSString *)outputMIMECodecParameterForInputMIMECodecParameter:(NSString *)inputMIMECodecParameter;
index 50d509c..e217e23 100644 (file)
@@ -57,12 +57,7 @@ enum {
 
 @class QLPreviewMenuItem;
 
-#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
-@interface NSMenuItem () <NSUserInterfaceItemIdentification>
-#else 
 @interface NSMenuItem ()
-#endif
-
 + (QLPreviewMenuItem *)standardQuickLookMenuItem;
 + (NSMenuItem *)standardShareMenuItemForItems:(NSArray *)items;
 @end
index 1e3b6e6..0391785 100644 (file)
@@ -33,9 +33,7 @@
 
 - (instancetype)initWithInitialOrigin:(NSPoint)origin velocity:(NSPoint)velocity documentFrame:(NSRect)docFrame constrainedClippingOrigin:(NSPoint)constrainedClippingOrigin clippingSize:(NSSize)clipViewSize tolerance:(NSSize)tolerance;
 - (NSPoint)positionAfterDuration:(NSTimeInterval)duration;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
 - (void)calculateToReachDestination;
-#endif
 
 @property NSPoint destinationOrigin;
 @property (readonly) NSTimeInterval durationUntilStop;
index 05cfd74..b4af134 100644 (file)
@@ -23,7 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
 
 #if USE(APPLE_INTERNAL_SDK)
 #import <PIP/PIPViewControllerPrivate.h>
@@ -59,4 +59,4 @@ NS_ASSUME_NONNULL_END
 
 #endif
 
-#endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#endif // PLATFORM(MAC)
index 676e0ee..d1a7e59 100644 (file)
@@ -34,13 +34,7 @@ String systemMarketingVersionForUserAgentString()
     // we were concerned about old DHTML libraries interpreting "4." as Netscape 4. That's no longer a concern for us
     // but we're sticking with the underscores for compatibility with the format used by older versions of Safari.
 #if PLATFORM(MAC)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
     return ASCIILiteral("10_13_4");
-#elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-    return ASCIILiteral("10_12_6");
-#else
-    return ASCIILiteral("10_11_6");
-#endif
 #else
     return ASCIILiteral("11_3");
 #endif
index 2954a40..3c4ca5f 100644 (file)
@@ -70,9 +70,7 @@ void ScrollingMomentumCalculatorMac::retargetedScrollOffsetDidChange()
 {
     _NSScrollingMomentumCalculator *calculator = ensurePlatformMomentumCalculator();
     calculator.destinationOrigin = NSMakePoint(retargetedScrollOffset().width(), retargetedScrollOffset().height());
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     [calculator calculateToReachDestination];
-#endif
 }
 
 Seconds ScrollingMomentumCalculatorMac::animationDuration()
index a62e744..a5e155e 100644 (file)
@@ -43,11 +43,7 @@ namespace WebCore {
 #if PLATFORM(MAC)
 static NSBitmapImageFileType bitmapPNGFileType()
 {
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
     return NSBitmapImageFileTypePNG;
-#else
-    return NSPNGFileType;
-#endif
 }
 #endif // PLATFORM(MAC)
 
index 4568ca9..0e3f7a7 100644 (file)
@@ -56,7 +56,7 @@ FontPlatformData::FontPlatformData(float size, bool syntheticBold, bool syntheti
 {
 }
 
-#if USE(CG) && (PLATFORM(WIN) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200))
+#if USE(CG) && PLATFORM(WIN)
 FontPlatformData::FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant, TextRenderingMode textRenderingMode)
     : FontPlatformData(size, syntheticBold, syntheticOblique, orientation, widthVariant, textRenderingMode)
 {
index 9f95fdf..230c815 100644 (file)
@@ -85,7 +85,7 @@ public:
     static FontPlatformData cloneWithSyntheticOblique(const FontPlatformData&, bool);
     static FontPlatformData cloneWithSize(const FontPlatformData&, float);
 
-#if USE(CG) && (PLATFORM(WIN) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200))
+#if USE(CG) && PLATFORM(WIN)
     FontPlatformData(CGFontRef, float size, bool syntheticBold, bool syntheticOblique, FontOrientation, FontWidthVariant, TextRenderingMode);
 #endif
 
@@ -137,7 +137,7 @@ public:
 
     bool hasVariations() const { return m_hasVariations; }
 
-#if USE(CG) && (PLATFORM(WIN) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200))
+#if USE(CG) && PLATFORM(WIN)
     CGFontRef cgFont() const { return m_cgFont.get(); }
 #endif
 
@@ -226,7 +226,7 @@ private:
     RefPtr<SharedGDIObject<HFONT>> m_font;
 #endif
 
-#if USE(CG) && (PLATFORM(WIN) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200))
+#if USE(CG) && PLATFORM(WIN)
     RetainPtr<CGFontRef> m_cgFont;
 #endif
 
index d49f1aa..62d8f13 100644 (file)
@@ -113,7 +113,7 @@ void VideoFullscreenLayerManager::setVideoFullscreenLayer(PlatformLayer *videoFu
 
         CAContext *newContext = [m_videoLayer context];
         if (oldContext && newContext && oldContext != newContext) {
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
             oldContext.commitPriority = 0;
             newContext.commitPriority = 1;
 #endif
index 82d76d6..8eea276 100644 (file)
@@ -1009,7 +1009,6 @@ void PlatformCALayerCocoa::updateCustomAppearance(GraphicsLayer::CustomAppearanc
 #endif
 }
 
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
 static NSString *layerContentsFormat(bool acceleratesDrawing, bool wantsDeepColor, bool supportsSubpixelAntialiasedFonts)
 {
 #if PLATFORM(IOS)
@@ -1019,7 +1018,7 @@ static NSString *layerContentsFormat(bool acceleratesDrawing, bool wantsDeepColo
     UNUSED_PARAM(wantsDeepColor);
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
     if (supportsSubpixelAntialiasedFonts && acceleratesDrawing)
         return kCAContentsFormatRGBA8ColorRGBA8LinearGlyphMask;
 #else
@@ -1029,16 +1028,13 @@ static NSString *layerContentsFormat(bool acceleratesDrawing, bool wantsDeepColo
 
     return nil;
 }
-#endif
 
 void PlatformCALayerCocoa::updateContentsFormat()
 {
     if (m_layerType == LayerTypeWebLayer || m_layerType == LayerTypeTiledBackingTileLayer) {
         BEGIN_BLOCK_OBJC_EXCEPTIONS
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
         if (NSString *formatString = layerContentsFormat(acceleratesDrawing(), wantsDeepColorBackingStore(), supportsSubpixelAntialiasedText()))
             [m_layer setContentsFormat:formatString];
-#endif
         END_BLOCK_OBJC_EXCEPTIONS
     }
 }
@@ -1234,7 +1230,7 @@ unsigned PlatformCALayerCocoa::backingStoreBytesPerPixel() const
         return isOpaque() ? 4 : 5;
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
     if (!isOpaque() && supportsSubpixelAntialiasedText())
         return 8;
 #endif
index 4c82fe5..31d5d52 100644 (file)
@@ -92,8 +92,6 @@ CGColorSpaceRef sRGBColorSpaceRef()
     return sRGBColorSpace;
 }
 
-#if PLATFORM(WIN) || PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
-// See GraphicsContextCocoa for the pre-10.12 implementation.
 CGColorSpaceRef linearRGBColorSpaceRef()
 {
     static CGColorSpaceRef linearRGBColorSpace;
@@ -108,7 +106,6 @@ CGColorSpaceRef linearRGBColorSpaceRef()
     });
     return linearRGBColorSpace;
 }
-#endif
 
 CGColorSpaceRef extendedSRGBColorSpaceRef()
 {
@@ -116,7 +113,7 @@ CGColorSpaceRef extendedSRGBColorSpaceRef()
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
         CGColorSpaceRef colorSpace = NULL;
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
+#if PLATFORM(COCOA)
         colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceExtendedSRGB);
 #endif
         // If there is no support for extended sRGB, fall back to sRGB.
index ab5c613..ac33971 100644 (file)
@@ -343,7 +343,7 @@ void PDFDocumentImage::drawPDFPage(GraphicsContext& context)
     notImplemented();
 #else
     // CGPDF pages are indexed from 1.
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
+#if PLATFORM(COCOA)
     CGContextDrawPDFPageWithAnnotations(context.platformContext(), CGPDFDocumentGetPage(m_document.get(), 1), nullptr);
 #else
     CGContextDrawPDFPage(context.platformContext(), CGPDFDocumentGetPage(m_document.get(), 1));
index 4d397bc..c94670d 100644 (file)
@@ -35,7 +35,6 @@
 #include <wtf/MainThread.h>
 #include <wtf/NeverDestroyed.h>
 
-#define SHOULD_USE_CORE_TEXT_FONT_LOOKUP (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
 #define HAS_CORE_TEXT_WIDTH_ATTRIBUTE ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000))
 #define CAN_DISALLOW_USER_INSTALLED_FONTS ((PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400))
 
@@ -810,29 +809,6 @@ static inline bool isSystemFont(const AtomicString& family)
     return family[0] == '.';
 }
 
-#if SHOULD_USE_CORE_TEXT_FONT_LOOKUP
-static float fontWeightFromCoreText(CGFloat weight)
-{
-    if (weight < -0.6)
-        return 100;
-    if (weight < -0.365)
-        return 200;
-    if (weight < -0.115)
-        return 300;
-    if (weight <  0.130)
-        return 400;
-    if (weight <  0.235)
-        return 500;
-    if (weight <  0.350)
-        return 600;
-    if (weight <  0.500)
-        return 700;
-    if (weight <  0.700)
-        return 800;
-    return 900;
-}
-#endif
-
 class FontDatabase {
 public:
 #if !CAN_DISALLOW_USER_INSTALLED_FONTS
@@ -1077,7 +1053,6 @@ static VariationCapabilities variationCapabilitiesForFontDescriptor(CTFontDescri
     return result;
 }
 
-#if !SHOULD_USE_CORE_TEXT_FONT_LOOKUP || HAS_CORE_TEXT_WIDTH_ATTRIBUTE
 static float getCSSAttribute(CTFontDescriptorRef fontDescriptor, const CFStringRef attribute, float fallback)
 {
     auto number = adoptCF(static_cast<CFNumberRef>(CTFontDescriptorCopyAttribute(fontDescriptor, attribute)));
@@ -1088,7 +1063,6 @@ static float getCSSAttribute(CTFontDescriptorRef fontDescriptor, const CFStringR
     ASSERT_UNUSED(success, success);
     return cssValue;
 }
-#endif
 
 FontSelectionCapabilities capabilitiesForFontDescriptor(CTFontDescriptorRef fontDescriptor)
 {
@@ -1097,7 +1071,7 @@ FontSelectionCapabilities capabilitiesForFontDescriptor(CTFontDescriptorRef font
 
     VariationCapabilities variationCapabilities = variationCapabilitiesForFontDescriptor(fontDescriptor);
 
-#if SHOULD_USE_CORE_TEXT_FONT_LOOKUP || !HAS_CORE_TEXT_WIDTH_ATTRIBUTE
+#if !HAS_CORE_TEXT_WIDTH_ATTRIBUTE
     bool weightOrWidthComeFromTraits = !variationCapabilities.weight || !variationCapabilities.width;
 #else
     bool weightOrWidthComeFromTraits = false;
@@ -1124,29 +1098,13 @@ FontSelectionCapabilities capabilitiesForFontDescriptor(CTFontDescriptorRef font
                 } else
                     variationCapabilities.slope = {{ static_cast<float>(normalItalicValue()), static_cast<float>(normalItalicValue()) }};
             }
-
-#if SHOULD_USE_CORE_TEXT_FONT_LOOKUP
-            if (!variationCapabilities.weight) {
-                auto weightNumber = static_cast<CFNumberRef>(CFDictionaryGetValue(traits.get(), kCTFontWeightTrait));
-                if (weightNumber) {
-                    CGFloat ctWeight;
-                    auto success = CFNumberGetValue(weightNumber, kCFNumberCGFloatType, &ctWeight);
-                    ASSERT_UNUSED(success, success);
-                    auto weightValue = fontWeightFromCoreText(ctWeight);
-                    variationCapabilities.weight = {{ weightValue, weightValue }};
-                } else
-                    variationCapabilities.weight = {{ static_cast<float>(normalWeightValue()), static_cast<float>(normalWeightValue()) }};
-            }
-#endif
         }
     }
 
-#if !SHOULD_USE_CORE_TEXT_FONT_LOOKUP
     if (!variationCapabilities.weight) {
         auto value = getCSSAttribute(fontDescriptor, kCTFontCSSWeightAttribute, static_cast<float>(normalWeightValue()));
         variationCapabilities.weight = {{ value, value }};
     }
-#endif
 
 #if HAS_CORE_TEXT_WIDTH_ATTRIBUTE
     if (!variationCapabilities.width) {
@@ -1164,7 +1122,6 @@ FontSelectionCapabilities capabilitiesForFontDescriptor(CTFontDescriptorRef font
     return result;
 }
 
-#if !SHOULD_USE_CORE_TEXT_FONT_LOOKUP
 static const FontDatabase::InstalledFont* findClosestFont(const FontDatabase::InstalledFontFamily& familyFonts, FontSelectionRequest fontSelectionRequest)
 {
     Vector<FontSelectionCapabilities> capabilities;
@@ -1174,7 +1131,6 @@ static const FontDatabase::InstalledFont* findClosestFont(const FontDatabase::In
     FontSelectionAlgorithm fontSelectionAlgorithm(fontSelectionRequest, capabilities, familyFonts.capabilities);
     return &familyFonts.installedFonts[fontSelectionAlgorithm.indexOfBestCapabilities()];
 }
-#endif
 
 Vector<FontSelectionCapabilities> FontCache::getFontSelectionCapabilitiesInFamily(const AtomicString& familyName, AllowUserInstalledFonts allowUserInstalledFonts)
 {
@@ -1201,11 +1157,6 @@ static FontLookup platformFontLookupWithFamily(const AtomicString& family, FontS
     if (!isSystemFont(family) && whitelist.size() && !whitelist.contains(family))
         return { nullptr };
 
-#if SHOULD_USE_CORE_TEXT_FONT_LOOKUP
-    UNUSED_PARAM(allowUserInstalledFonts);
-    CTFontSymbolicTraits traits = (isFontWeightBold(request.weight) ? kCTFontTraitBold : 0) | (isItalic(request.slope) ? kCTFontTraitItalic : 0);
-    return { adoptCF(CTFontCreateForCSS(family.string().createCFString().get(), static_cast<float>(request.weight), traits, size)) };
-#else
     auto& fontDatabase = allowUserInstalledFonts == AllowUserInstalledFonts::Yes ? FontDatabase::singletonAllowingUserInstalledFonts() : FontDatabase::singletonDisallowingUserInstalledFonts();
     const auto& familyFonts = fontDatabase.collectionForFamily(family.string());
     if (familyFonts.isEmpty()) {
@@ -1241,7 +1192,6 @@ static FontLookup platformFontLookupWithFamily(const AtomicString& family, FontS
         return { adoptCF(CTFontCreateWithFontDescriptor(installedFont->fontDescriptor.get(), size, nullptr)), false };
 
     return { nullptr };
-#endif
 }
 
 static void invalidateFontCache()
@@ -1364,7 +1314,7 @@ static RetainPtr<CTFontRef> lookupFallbackFont(CTFontRef font, FontSelectionValu
     ASSERT(length > 0);
 
     RetainPtr<CFStringRef> localeString;
-#if (PLATFORM(IOS) && TARGET_OS_IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
+#if (PLATFORM(IOS) && TARGET_OS_IOS) || PLATFORM(MAC)
     if (!locale.isNull())
         localeString = locale.string().createCFString();
 #else
@@ -1373,7 +1323,7 @@ static RetainPtr<CTFontRef> lookupFallbackFont(CTFontRef font, FontSelectionValu
 
     CFIndex coveredLength = 0;
     RetainPtr<CTFontRef> result;
-#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || (PLATFORM(IOS) && TARGET_OS_IOS))
+#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && (PLATFORM(MAC) || (PLATFORM(IOS) && TARGET_OS_IOS))
     result = adoptCF(CTFontCreatePhysicalFontForCharactersWithLanguage(font, characters, length, localeString.get(), &coveredLength));
 #else
     result = adoptCF(CTFontCreateForCharactersWithLanguage(font, characters, length, localeString.get(), &coveredLength));
index 3223007..13f68a7 100644 (file)
@@ -234,7 +234,7 @@ void Font::platformDestroy()
 
 bool Font::variantCapsSupportsCharacterForSynthesis(FontVariantCaps fontVariantCaps, UChar32 character) const
 {
-#if (PLATFORM(IOS) && TARGET_OS_IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
+#if (PLATFORM(IOS) && TARGET_OS_IOS) || PLATFORM(MAC)
     Glyph glyph = glyphForCharacter(character);
     if (!glyph)
         return false;
@@ -276,7 +276,7 @@ bool Font::variantCapsSupportsCharacterForSynthesis(FontVariantCaps fontVariantC
 #endif
 }
 
-#if (PLATFORM(IOS) && TARGET_OS_IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
+#if (PLATFORM(IOS) && TARGET_OS_IOS) || PLATFORM(MAC)
 static RetainPtr<CFDictionaryRef> smallCapsOpenTypeDictionary(CFStringRef key, int rawValue)
 {
     RetainPtr<CFNumberRef> value = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &rawValue));
@@ -581,37 +581,12 @@ FloatRect Font::platformBoundsForGlyph(Glyph glyph) const
     return boundingBox;
 }
 
-#if !((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS))
-static inline std::optional<CGSize> advanceForColorBitmapFont(const FontPlatformData& platformData, Glyph glyph)
-{
-    CTFontRef font = platformData.font();
-    if (!font || !platformData.isColorBitmapFont())
-        return std::nullopt;
-    CGSize advance;
-    CTFontGetAdvancesForGlyphs(font, kCTFontOrientationDefault, &glyph, &advance, 1);
-    return advance;
-}
-
-static inline bool canUseFastGlyphAdvanceGetter(const FontPlatformData& platformData, Glyph glyph, CGSize& advance, bool& populatedAdvance)
-{
-    if (platformData.isEmoji() || platformData.hasCustomTracking() || platformData.textRenderingMode() == OptimizeLegibility)
-        return false;
-    if (auto size = advanceForColorBitmapFont(platformData, glyph)) {
-        populatedAdvance = true;
-        advance = size.value();
-        return false;
-    }
-    return true;
-}
-#endif
-
 float Font::platformWidthForGlyph(Glyph glyph) const
 {
     CGSize advance = CGSizeZero;
     bool horizontal = platformData().orientation() == Horizontal;
     CGFontRenderingStyle style = kCGFontRenderingStyleAntialiasing | kCGFontRenderingStyleSubpixelPositioning | kCGFontRenderingStyleSubpixelQuantization | kCGFontAntialiasingStyleUnfiltered;
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
     if (platformData().size()) {
         CTFontOrientation orientation = horizontal || m_isBrokenIdeographFallback ? kCTFontOrientationHorizontal : kCTFontOrientationVertical;
         // FIXME: Remove this special-casing when <rdar://problem/28197291> and <rdar://problem/28662086> are fixed.
@@ -620,22 +595,6 @@ float Font::platformWidthForGlyph(Glyph glyph) const
         else
             CTFontGetUnsummedAdvancesForGlyphsAndStyle(m_platformData.ctFont(), orientation, style, &glyph, &advance, 1);
     }
-
-#else
-
-    bool populatedAdvance = false;
-    if ((horizontal || m_isBrokenIdeographFallback) && canUseFastGlyphAdvanceGetter(this->platformData(), glyph, advance, populatedAdvance)) {
-        float pointSize = platformData().size();
-        CGAffineTransform m = CGAffineTransformMakeScale(pointSize, pointSize);
-        if (!CGFontGetGlyphAdvancesForStyle(platformData().cgFont(), &m, style, &glyph, 1, &advance)) {
-            RetainPtr<CFStringRef> fullName = adoptCF(CGFontCopyFullName(platformData().cgFont()));
-            LOG_ERROR("Unable to cache glyph widths for %@ %f", fullName.get(), pointSize);
-            advance.width = 0;
-        }
-    } else if (!populatedAdvance && platformData().size())
-        CTFontGetAdvancesForGlyphs(m_platformData.ctFont(), horizontal ? kCTFontOrientationHorizontal : kCTFontOrientationVertical, &glyph, &advance, 1);
-#endif
-
     return advance.width + m_syntheticBoldOffset;
 }
 
index fa8b82c..5594ef4 100644 (file)
@@ -39,11 +39,7 @@ namespace WebCore {
 enum TextSpacingCTFeatureSelector { TextSpacingProportional, TextSpacingFullWidth, TextSpacingHalfWidth, TextSpacingThirdWidth, TextSpacingQuarterWidth };
 
 FontPlatformData::FontPlatformData(CTFontRef font, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant, TextRenderingMode textRenderingMode)
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-    : FontPlatformData(adoptCF(CTFontCopyGraphicsFont(font, NULL)).get(), size, syntheticBold, syntheticOblique, orientation, widthVariant, textRenderingMode)
-#else
     : FontPlatformData(size, syntheticBold, syntheticOblique, orientation, widthVariant, textRenderingMode)
-#endif
 {
     ASSERT_ARG(font, font);
     m_font = font;
@@ -60,11 +56,7 @@ FontPlatformData::FontPlatformData(CTFontRef font, float size, bool syntheticBol
 unsigned FontPlatformData::hash() const
 {
     uintptr_t flags = static_cast<uintptr_t>(m_widthVariant << 6 | m_isHashTableDeletedValue << 5 | m_textRenderingMode << 3 | m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique);
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-    uintptr_t fontHash = reinterpret_cast<uintptr_t>(m_font.get());
-#else
     uintptr_t fontHash = reinterpret_cast<uintptr_t>(CFHash(m_font.get()));
-#endif
     uintptr_t hashCodes[] = { fontHash, flags };
     return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes);
 }
@@ -73,11 +65,7 @@ bool FontPlatformData::platformIsEqual(const FontPlatformData& other) const
 {
     if (!m_font || !other.m_font)
         return m_font == other.m_font;
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-    return m_font == other.m_font;
-#else
     return CFEqual(m_font.get(), other.m_font.get());
-#endif
 }
 
 CTFontRef FontPlatformData::registeredFont() const
@@ -161,9 +149,6 @@ CTFontRef FontPlatformData::ctFont() const
         return m_ctFont.get();
 
     ASSERT(m_font);
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-    ASSERT(m_cgFont);
-#endif
     m_ctFont = adoptCF(CTFontCreateCopyWithAttributes(m_font.get(), m_size, 0, cascadeToLastResortAndVariationsFontDescriptor(m_font.get()).get()));
 
     if (m_widthVariant != RegularWidth) {
index bc5324e..7088f00 100644 (file)
@@ -368,26 +368,4 @@ void GraphicsContext::drawLineForDocumentMarker(const FloatPoint& point, float w
 #endif
 }
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-CGColorSpaceRef linearRGBColorSpaceRef()
-{
-    static CGColorSpaceRef linearSRGBColorSpace;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        RetainPtr<NSString> iccProfilePath = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"linearSRGB" ofType:@"icc"];
-        RetainPtr<NSData> iccProfileData = adoptNS([[NSData alloc] initWithContentsOfFile:iccProfilePath.get()]);
-        if (iccProfileData)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-            linearSRGBColorSpace = CGColorSpaceCreateWithICCProfile((CFDataRef)iccProfileData.get());
-#pragma clang diagnostic pop
-
-        // If we fail to load the linearized sRGB ICC profile, fall back to sRGB.
-        if (!linearSRGBColorSpace)
-            linearSRGBColorSpace = sRGBColorSpaceRef();
-    });
-    return linearSRGBColorSpace;
-}
-#endif
-
 } // namespace WebCore
index 1752f45..a84338e 100644 (file)
@@ -84,9 +84,7 @@ void WebCoreDecompressionSession::setTimebase(CMTimebaseRef timebase)
             dispatch_source_set_event_handler(m_timerSource.get(), [this] {
                 automaticDequeue();
             });
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
             dispatch_activate(m_timerSource.get());
-#endif
         }
         CMTimebaseAddTimerDispatchSource(m_timebase.get(), m_timerSource.get());
     }
index e7d410f..caaacb2 100644 (file)
@@ -76,12 +76,10 @@ bool FontCustomPlatformData::supportsFormat(const String& format)
 {
     return equalLettersIgnoringASCIICase(format, "truetype")
         || equalLettersIgnoringASCIICase(format, "opentype")
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
         || equalLettersIgnoringASCIICase(format, "woff2")
 #if ENABLE(VARIATION_FONTS)
         || equalLettersIgnoringASCIICase(format, "woff2-variations")
 #endif
-#endif
 #if ENABLE(VARIATION_FONTS)
         || equalLettersIgnoringASCIICase(format, "woff-variations")
         || equalLettersIgnoringASCIICase(format, "truetype-variations")
index f0f671b..8d7957a 100644 (file)
@@ -144,14 +144,7 @@ bool screenSupportsExtendedColor(Widget* widget)
     if (!widget)
         return false;
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     return [screen(widget) canRepresentDisplayGamut:NSDisplayGamutP3];
-#else
-    auto colorSpace = screenColorSpace(widget);
-    auto iccData = adoptCF(CGColorSpaceCopyICCProfile(colorSpace));
-    auto profile = adoptCF(ColorSyncProfileCreate(iccData.get(), nullptr));
-    return profile && ColorSyncProfileIsWideGamut(profile.get());
-#endif
 }
 
 FloatRect toUserSpace(const NSRect& rect, NSWindow *destination)
index 39ae98b..769dedc 100644 (file)
@@ -154,7 +154,7 @@ static NSControlSize scrollbarControlSizeToNSControlSize(ScrollbarControlSize co
 
 void ScrollbarThemeMac::didCreateScrollerImp(Scrollbar& scrollbar)
 {
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
     NSScrollerImp *scrollerImp = painterForScrollbar(scrollbar);
     ASSERT(scrollerImp);
     scrollerImp.userInterfaceLayoutDirection = scrollbar.scrollableArea().shouldPlaceBlockDirectionScrollbarOnLeft() ? NSUserInterfaceLayoutDirectionRightToLeft : NSUserInterfaceLayoutDirectionLeftToRight;
@@ -195,7 +195,7 @@ NSScrollerImp *ScrollbarThemeMac::painterForScrollbar(Scrollbar& scrollbar)
 
 bool ScrollbarThemeMac::isLayoutDirectionRTL(Scrollbar& scrollbar)
 {
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
     NSScrollerImp *scrollerImp = painterForScrollbar(scrollbar);
     ASSERT(scrollerImp);
     return scrollerImp.userInterfaceLayoutDirection == NSUserInterfaceLayoutDirectionRightToLeft;
index 47634f3..d8fdfb3 100644 (file)
@@ -867,11 +867,7 @@ void ThemeMac::paint(ControlPart part, ControlStates& states, GraphicsContext& c
 
 bool ThemeMac::userPrefersReducedMotion() const
 {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion];
-#else
-    return false;
-#endif
 }
 
 }
index b17be3c..0e095a3 100644 (file)
@@ -182,7 +182,7 @@ void ResourceRequest::doUpdatePlatformRequest()
         [NSURLProtocol setProperty:partitionValue forKey:(NSString *)_kCFURLCachePartitionKey inRequest:nsRequest];
     }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
+#if PLATFORM(MAC)
     if (m_url.isLocalFile()) {
         auto fsRepFile = FileSystem::fileSystemRepresentation(m_url.fileSystemPath());
         if (!fsRepFile.isNull()) {
index 5c39d63..4090b66 100644 (file)
@@ -232,32 +232,6 @@ void findEndWordBoundary(StringView text, int position, int* end)
 int findNextWordFromIndex(StringView text, int position, bool forward)
 {   
 #if USE(APPKIT)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-    if (!text.length())
-        return 0;
-    if (!text.is8Bit() && !forward) {
-        int chunkSize = 256;
-        int decrement = chunkSize / 2;
-        for (int startPosition = std::max(0, position - chunkSize); startPosition > -decrement; startPosition -= decrement) {
-            int length;
-            if (startPosition < 0) {
-                length = chunkSize + startPosition;
-                startPosition = 0;
-            } else
-                length = std::min(chunkSize, position - startPosition);
-            if (length > 1 && U16_IS_LEAD(text[startPosition + length - 1]) && (static_cast<unsigned>(startPosition + length) < text.length()) && U16_IS_TRAIL(text[startPosition + length])) {
-                ++startPosition;
-                ++length;
-            }
-            StringView shortText(text.characters16() + startPosition, length);
-            RetainPtr<NSAttributedString> attributedString = adoptNS([[NSAttributedString alloc] initWithString:shortText.createNSStringWithoutCopying().get()]);
-            int result = [attributedString nextWordFromIndex:length forward:forward];
-            if (result && (result != 1 || !U16_IS_TRAIL(shortText[0])))
-                return startPosition + result;
-        }
-        return 0;
-    }
-#endif
     NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:text.createNSStringWithoutCopying().get()];
     int result = [attributedString nextWordFromIndex:position forward:forward];
     [attributedString release];
index f598606..55b43a6 100644 (file)
@@ -238,7 +238,7 @@ void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt
 bool RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft() const
 {
 // RTL Scrollbars require some system support, and this system support does not exist on certain versions of OS X. iOS uses a separate mechanism.
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
+#if PLATFORM(IOS)
     return false;
 #else
     switch (settings().userInterfaceDirectionPolicy()) {
index 1292e39..dde70b3 100644 (file)
@@ -47,10 +47,8 @@ bool Internals::userPrefersReducedMotion() const
 {
 #if PLATFORM(IOS)
     return UIAccessibilityIsReduceMotionEnabled();
-#elif PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-    return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion];
 #else
-    return false;
+    return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion];
 #endif
 }
 #endif