Diff
Modified: trunk/Source/WebCore/ChangeLog (227551 => 227552)
--- trunk/Source/WebCore/ChangeLog 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/ChangeLog 2018-01-24 20:58:52 UTC (rev 227552)
@@ -1,5 +1,70 @@
2018-01-24 Alex Christensen <[email protected]>
+ 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 <[email protected]>
+
Remove WebProcess authentication code
https://bugs.webkit.org/show_bug.cgi?id=182020
Modified: trunk/Source/WebCore/PAL/ChangeLog (227551 => 227552)
--- trunk/Source/WebCore/PAL/ChangeLog 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/ChangeLog 2018-01-24 20:58:52 UTC (rev 227552)
@@ -1,3 +1,19 @@
+2018-01-24 Alex Christensen <[email protected]>
+
+ 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 <[email protected]>
REGRESSION (r222961?): sRGB images shown in WebGL are over-saturated on a wide gamut monitor
Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (227551 => 227552)
--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -172,7 +172,6 @@
@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 @@
@property (readwrite, copy) NSString *_pathToDownloadTaskFile;
@property (copy) NSString *_storagePartitionIdentifier;
@end
-#endif
#endif // defined(__OBJC__)
Modified: trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h (227551 => 227552)
--- trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -249,7 +249,6 @@
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;
@@ -256,7 +255,6 @@
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);
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreSPI.h (227551 => 227552)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreSPI.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreSPI.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -104,17 +104,10 @@
#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 @@
#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;
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h (227551 => 227552)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -76,10 +76,8 @@
- (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
+#if PLATFORM(MAC)
@property uint32_t commitPriority;
-#endif
-#if PLATFORM(MAC)
@property BOOL colorMatchUntaggedContent;
#endif
@property (readonly) uint32_t contextId;
@@ -187,7 +185,7 @@
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 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)
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h (227551 => 227552)
--- trunk/Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -76,12 +76,7 @@
#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 @@
#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;
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h (227551 => 227552)
--- trunk/Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -57,12 +57,7 @@
@class QLPreviewMenuItem;
-#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
-@interface NSMenuItem () <NSUserInterfaceItemIdentification>
-#else
@interface NSMenuItem ()
-#endif
-
+ (QLPreviewMenuItem *)standardQuickLookMenuItem;
+ (NSMenuItem *)standardShareMenuItemForItems:(NSArray *)items;
@end
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollingMomentumCalculatorSPI.h (227551 => 227552)
--- trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollingMomentumCalculatorSPI.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollingMomentumCalculatorSPI.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -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;
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/PIPSPI.h (227551 => 227552)
--- trunk/Source/WebCore/PAL/pal/spi/mac/PIPSPI.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/PIPSPI.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -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 @@
#endif
-#endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#endif // PLATFORM(MAC)
Modified: trunk/Source/WebCore/page/cocoa/UserAgent.mm (227551 => 227552)
--- trunk/Source/WebCore/page/cocoa/UserAgent.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/page/cocoa/UserAgent.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -34,14 +34,8 @@
// 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
}
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm (227551 => 227552)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -70,9 +70,7 @@
{
_NSScrollingMomentumCalculator *calculator = ensurePlatformMomentumCalculator();
calculator.destinationOrigin = NSMakePoint(retargetedScrollOffset().width(), retargetedScrollOffset().height());
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
[calculator calculateToReachDestination];
-#endif
}
Seconds ScrollingMomentumCalculatorMac::animationDuration()
Modified: trunk/Source/WebCore/platform/cocoa/PasteboardCocoa.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/cocoa/PasteboardCocoa.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/cocoa/PasteboardCocoa.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -43,11 +43,7 @@
#if PLATFORM(MAC)
static NSBitmapImageFileType bitmapPNGFileType()
{
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
return NSBitmapImageFileTypePNG;
-#else
- return NSPNGFileType;
-#endif
}
#endif // PLATFORM(MAC)
Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp 2018-01-24 20:58:52 UTC (rev 227552)
@@ -56,7 +56,7 @@
{
}
-#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)
{
Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.h (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/FontPlatformData.h 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.h 2018-01-24 20:58:52 UTC (rev 227552)
@@ -85,7 +85,7 @@
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 @@
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 @@
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
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -113,7 +113,7 @@
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
Modified: trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -1009,7 +1009,6 @@
#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 @@
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 @@
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 @@
return isOpaque() ? 4 : 5;
#endif
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
if (!isOpaque() && supportsSubpixelAntialiasedText())
return 8;
#endif
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2018-01-24 20:58:52 UTC (rev 227552)
@@ -92,8 +92,6 @@
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 @@
});
return linearRGBColorSpace;
}
-#endif
CGColorSpaceRef extendedSRGBColorSpaceRef()
{
@@ -116,7 +113,7 @@
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.
Modified: trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp 2018-01-24 20:58:52 UTC (rev 227552)
@@ -343,7 +343,7 @@
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));
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2018-01-24 20:58:52 UTC (rev 227552)
@@ -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 @@
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 @@
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 @@
ASSERT_UNUSED(success, success);
return cssValue;
}
-#endif
FontSelectionCapabilities capabilitiesForFontDescriptor(CTFontDescriptorRef fontDescriptor)
{
@@ -1097,7 +1071,7 @@
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 @@
} 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 @@
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 @@
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 @@
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 @@
return { adoptCF(CTFontCreateWithFontDescriptor(installedFont->fontDescriptor.get(), size, nullptr)), false };
return { nullptr };
-#endif
}
static void invalidateFontCache()
@@ -1364,7 +1314,7 @@
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 @@
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));
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -234,7 +234,7 @@
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 @@
#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,30 +581,6 @@
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;
@@ -611,7 +587,6 @@
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 @@
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;
}
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -39,11 +39,7 @@
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 @@
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 @@
{
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 @@
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) {
Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -368,26 +368,4 @@
#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
Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -84,9 +84,7 @@
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());
}
Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (227551 => 227552)
--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp 2018-01-24 20:58:52 UTC (rev 227552)
@@ -76,12 +76,10 @@
{
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")
Modified: trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -144,14 +144,7 @@
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 = "" nullptr));
- return profile && ColorSyncProfileIsWideGamut(profile.get());
-#endif
}
FloatRect toUserSpace(const NSRect& rect, NSWindow *destination)
Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -154,7 +154,7 @@
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 @@
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;
Modified: trunk/Source/WebCore/platform/mac/ThemeMac.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/mac/ThemeMac.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -867,11 +867,7 @@
bool ThemeMac::userPrefersReducedMotion() const
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion];
-#else
- return false;
-#endif
}
}
Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -182,7 +182,7 @@
[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()) {
Modified: trunk/Source/WebCore/platform/text/mac/TextBoundaries.mm (227551 => 227552)
--- trunk/Source/WebCore/platform/text/mac/TextBoundaries.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/platform/text/mac/TextBoundaries.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -232,32 +232,6 @@
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];
Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp (227551 => 227552)
--- trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp 2018-01-24 20:58:52 UTC (rev 227552)
@@ -238,7 +238,7 @@
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()) {
Modified: trunk/Source/WebCore/testing/Internals.mm (227551 => 227552)
--- trunk/Source/WebCore/testing/Internals.mm 2018-01-24 20:55:28 UTC (rev 227551)
+++ trunk/Source/WebCore/testing/Internals.mm 2018-01-24 20:58:52 UTC (rev 227552)
@@ -47,10 +47,8 @@
{
#if PLATFORM(IOS)
return UIAccessibilityIsReduceMotionEnabled();
-#elif PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#else
return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion];
-#else
- return false;
#endif
}
#endif