Title: [227467] trunk/Source
Revision
227467
Author
achristen...@apple.com
Date
2018-01-23 18:27:56 -0800 (Tue, 23 Jan 2018)

Log Message

Remove pre-Sierra-OS-specific code in WTF and _javascript_Core
https://bugs.webkit.org/show_bug.cgi?id=182028

Reviewed by Keith Miller.

Source/_javascript_Core:

* inspector/remote/cocoa/RemoteInspectorXPCConnection.h:
* inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::handleEvent):

Source/WTF:

* wtf/Platform.h:
* wtf/mac/AppKitCompatibilityDeclarations.h:
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::MainThreadFunctionTracker::singleton): Deleted.
(WTF::MainThreadFunctionTracker::callOnMainThread): Deleted.
(WTF::MainThreadFunctionTracker::cancelCallOnMainThread): Deleted.
(WTF::MainThreadFunctionTracker::addFunction): Deleted.
(WTF::MainThreadFunctionTracker::removeIdentifier): Deleted.
(WTF::MainThreadFunctionTracker::removeFunctions): Deleted.
(WTF::callOnMainThread): Deleted.
(WTF::cancelCallOnMainThread): Deleted.
* wtf/spi/cocoa/SecuritySPI.h:
* wtf/spi/darwin/dyldSPI.h:
* wtf/text/icu/TextBreakIteratorICU.h:
(WTF::TextBreakIteratorICU::TextBreakIteratorICU):
(WTF::caretRules): Deleted.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (227466 => 227467)


--- trunk/Source/_javascript_Core/ChangeLog	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-01-24 02:27:56 UTC (rev 227467)
@@ -1,3 +1,14 @@
+2018-01-23  Alex Christensen  <achristen...@webkit.org>
+
+        Remove pre-Sierra-OS-specific code in WTF and _javascript_Core
+        https://bugs.webkit.org/show_bug.cgi?id=182028
+
+        Reviewed by Keith Miller.
+
+        * inspector/remote/cocoa/RemoteInspectorXPCConnection.h:
+        * inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:
+        (Inspector::RemoteInspectorXPCConnection::handleEvent):
+
 2018-01-23  Filip Pizlo  <fpi...@apple.com>
 
         Use precise index masking for FTL GetByArgumentByVal

Modified: trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorXPCConnection.h (227466 => 227467)


--- trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorXPCConnection.h	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorXPCConnection.h	2018-01-24 02:27:56 UTC (rev 227467)
@@ -67,7 +67,7 @@
     dispatch_queue_t m_queue;
     Client* m_client;
     bool m_closed { false };
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
+#if PLATFORM(MAC)
     bool m_validated { false };
 #endif
 };

Modified: trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorXPCConnection.mm (227466 => 227467)


--- trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorXPCConnection.mm	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorXPCConnection.mm	2018-01-24 02:27:56 UTC (rev 227467)
@@ -46,7 +46,7 @@
 }
 #endif
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
+#if PLATFORM(MAC)
 static bool auditTokenHasEntitlement(audit_token_t token, NSString *entitlement)
 {
     auto task = adoptCF(SecTaskCreateWithAuditToken(kCFAllocatorDefault, token));
@@ -169,7 +169,7 @@
         return;
     }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
+#if PLATFORM(MAC)
     if (!m_validated) {
         audit_token_t token;
         xpc_connection_get_audit_token(m_connection, &token);

Modified: trunk/Source/WTF/ChangeLog (227466 => 227467)


--- trunk/Source/WTF/ChangeLog	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/WTF/ChangeLog	2018-01-24 02:27:56 UTC (rev 227467)
@@ -1,3 +1,27 @@
+2018-01-23  Alex Christensen  <achristen...@webkit.org>
+
+        Remove pre-Sierra-OS-specific code in WTF and _javascript_Core
+        https://bugs.webkit.org/show_bug.cgi?id=182028
+
+        Reviewed by Keith Miller.
+
+        * wtf/Platform.h:
+        * wtf/mac/AppKitCompatibilityDeclarations.h:
+        * wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
+        (WTF::MainThreadFunctionTracker::singleton): Deleted.
+        (WTF::MainThreadFunctionTracker::callOnMainThread): Deleted.
+        (WTF::MainThreadFunctionTracker::cancelCallOnMainThread): Deleted.
+        (WTF::MainThreadFunctionTracker::addFunction): Deleted.
+        (WTF::MainThreadFunctionTracker::removeIdentifier): Deleted.
+        (WTF::MainThreadFunctionTracker::removeFunctions): Deleted.
+        (WTF::callOnMainThread): Deleted.
+        (WTF::cancelCallOnMainThread): Deleted.
+        * wtf/spi/cocoa/SecuritySPI.h:
+        * wtf/spi/darwin/dyldSPI.h:
+        * wtf/text/icu/TextBreakIteratorICU.h:
+        (WTF::TextBreakIteratorICU::TextBreakIteratorICU):
+        (WTF::caretRules): Deleted.
+
 2018-01-23  Filip Pizlo  <fpi...@apple.com>
 
         JSC should use a speculation fence on VM entry/exit

Modified: trunk/Source/WTF/wtf/Platform.h (227466 => 227467)


--- trunk/Source/WTF/wtf/Platform.h	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/WTF/wtf/Platform.h	2018-01-24 02:27:56 UTC (rev 227467)
@@ -675,7 +675,7 @@
 
 #endif /* OS(DARWIN) */
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
+#if PLATFORM(COCOA)
 #define HAVE_CFNETWORK_STORAGE_PARTITIONING 1
 #endif
 
@@ -1226,7 +1226,7 @@
 #endif
 
 /* FIXME: Enable USE_OS_LOG when building with the public iOS 10 SDK once we fix <rdar://problem/27758343>. */
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || (PLATFORM(IOS) && USE(APPLE_INTERNAL_SDK))
+#if PLATFORM(MAC) || (PLATFORM(IOS) && USE(APPLE_INTERNAL_SDK))
 #define USE_OS_LOG 1
 #if USE(APPLE_INTERNAL_SDK)
 #define USE_OS_STATE 1
@@ -1233,7 +1233,7 @@
 #endif
 #endif
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
+#if PLATFORM(COCOA)
 #define HAVE_SEC_TRUST_SERIALIZATION 1
 #endif
 
@@ -1261,7 +1261,7 @@
 #endif
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
 #define USE_MEDIAREMOTE 1
 #endif
 
@@ -1270,7 +1270,7 @@
 #pragma strict_gs_check(on)
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101201 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC)
 #define HAVE_TOUCH_BAR 1
 #define HAVE_ADVANCED_SPELL_CHECKING 1
 
@@ -1277,7 +1277,7 @@
 #if defined(__LP64__)
 #define ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER 1
 #endif
-#endif /* PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101201 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 */
+#endif /* PLATFORM(MAC) */
 
 #if PLATFORM(COCOA) && ENABLE(WEB_RTC)
 #define USE_LIBWEBRTC 1

Modified: trunk/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h (227466 => 227467)


--- trunk/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h	2018-01-24 02:27:56 UTC (rev 227467)
@@ -32,102 +32,6 @@
 #import <AppKit/AppKit.h>
 #endif
 
-#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
-
-static const NSAlertStyle NSAlertStyleCritical = NSCriticalAlertStyle;
-static const NSAlertStyle NSAlertStyleInformational = NSInformationalAlertStyle;
-static const NSAlertStyle NSAlertStyleWarning = NSWarningAlertStyle;
-
-static const NSBezelStyle NSBezelStyleShadowlessSquare = NSShadowlessSquareBezelStyle;
-static const NSBezelStyle NSBezelStyleRounded = NSRoundedBezelStyle;
-static const NSBezelStyle NSBezelStyleRoundedDisclosure = NSRoundedDisclosureBezelStyle;
-
-static const NSButtonType NSButtonTypeMomentaryLight = NSMomentaryLightButton;
-static const NSButtonType NSButtonTypePushOnPushOff = NSPushOnPushOffButton;
-static const NSButtonType NSButtonTypeToggle = NSToggleButton;
-static const NSButtonType NSButtonTypeSwitch = NSSwitchButton;
-static const NSButtonType NSButtonTypeRadio = NSRadioButton;
-static const NSButtonType NSButtonTypeMomentaryChange = NSMomentaryChangeButton;
-static const NSButtonType NSButtonTypeOnOff = NSOnOffButton;
-static const NSButtonType NSButtonTypeMomentaryPushIn = NSMomentaryPushInButton;
-static const NSButtonType NSButtonTypeAccelerator = NSAcceleratorButton;
-static const NSButtonType NSButtonTypeMultiLevelAccelerator = NSMultiLevelAcceleratorButton;
-
-static const NSCompositingOperation NSCompositingOperationCopy = NSCompositeCopy;
-static const NSCompositingOperation NSCompositingOperationDestinationIn = NSCompositeDestinationIn;
-static const NSCompositingOperation NSCompositingOperationDestinationOut =  NSCompositeDestinationOut;
-static const NSCompositingOperation NSCompositingOperationDestinationOver = NSCompositeDestinationOver;
-static const NSCompositingOperation NSCompositingOperationSourceAtop = NSCompositeSourceAtop;
-static const NSCompositingOperation NSCompositingOperationSourceIn = NSCompositeSourceIn;
-static const NSCompositingOperation NSCompositingOperationSourceOver = NSCompositeSourceOver;
-
-static const NSControlSize NSControlSizeRegular = NSRegularControlSize;
-static const NSControlSize NSControlSizeSmall = NSSmallControlSize;
-static const NSControlSize NSControlSizeMini = NSMiniControlSize;
-
-static const NSSliderType NSSliderTypeLinear = NSLinearSlider;
-static const NSSliderType NSSliderTypeCircular = NSCircularSlider;
-
-static const NSEventMask NSEventMaskAny = NSAnyEventMask;
-static const NSEventMask NSEventMaskFlagsChanged = NSFlagsChangedMask;
-static const NSEventMask NSEventMaskKeyDown = NSKeyDownMask;
-static const NSEventMask NSEventMaskKeyUp = NSKeyUpMask;
-static const NSEventMask NSEventMaskLeftMouseDown = NSLeftMouseDownMask;
-static const NSEventMask NSEventMaskLeftMouseDragged = NSLeftMouseDraggedMask;
-static const NSEventMask NSEventMaskLeftMouseUp = NSLeftMouseUpMask;
-static const NSEventMask NSEventMaskOtherMouseDown = NSOtherMouseDownMask;
-static const NSEventMask NSEventMaskOtherMouseUp = NSOtherMouseUpMask;
-static const NSEventMask NSEventMaskPeriodic = NSPeriodicMask;
-static const NSEventMask NSEventMaskRightMouseDown = NSRightMouseDownMask;
-static const NSEventMask NSEventMaskRightMouseUp = NSRightMouseUpMask;
-static const NSEventMask NSEventMaskMouseMoved = NSMouseMovedMask;
-static const NSEventMask NSEventMaskScrollWheel = NSScrollWheelMask;
-
-static const NSEventModifierFlags NSEventModifierFlagOption = NSAlternateKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagControl = NSControlKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagCapsLock = NSAlphaShiftKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagCommand =  NSCommandKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagDeviceIndependentFlagsMask =  NSDeviceIndependentModifierFlagsMask;
-static const NSEventModifierFlags NSEventModifierFlagFunction = NSFunctionKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagNumericPad = NSNumericPadKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagShift = NSShiftKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagHelp = NSHelpKeyMask;
-
-static const NSEventType NSEventTypeApplicationDefined = NSApplicationDefined;
-static const NSEventType NSEventTypeFlagsChanged = NSFlagsChanged;
-static const NSEventType NSEventTypeKeyDown = NSKeyDown;
-static const NSEventType NSEventTypeKeyUp = NSKeyUp;
-static const NSEventType NSEventTypeLeftMouseDown = NSLeftMouseDown;
-static const NSEventType NSEventTypeLeftMouseDragged = NSLeftMouseDragged;
-static const NSEventType NSEventTypeLeftMouseUp = NSLeftMouseUp;
-static const NSEventType NSEventTypeMouseEntered = NSMouseEntered;
-static const NSEventType NSEventTypeMouseExited = NSMouseExited;
-static const NSEventType NSEventTypeMouseMoved = NSMouseMoved;
-static const NSEventType NSEventTypeOtherMouseDown = NSOtherMouseDown;
-static const NSEventType NSEventTypeOtherMouseDragged = NSOtherMouseDragged;
-static const NSEventType NSEventTypeOtherMouseUp = NSOtherMouseUp;
-static const NSEventType NSEventTypePeriodic = NSPeriodic;
-static const NSEventType NSEventTypeRightMouseDown = NSRightMouseDown;
-static const NSEventType NSEventTypeRightMouseDragged = NSRightMouseDragged;
-static const NSEventType NSEventTypeRightMouseUp = NSRightMouseUp;
-static const NSEventType NSEventTypeScrollWheel = NSScrollWheel;
-static const NSEventType NSEventTypeSystemDefined = NSSystemDefined;
-
-typedef NSUInteger NSWindowStyleMask;
-static const NSWindowStyleMask NSWindowStyleMaskBorderless = NSBorderlessWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskClosable = NSClosableWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskFullScreen = NSFullScreenWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskFullSizeContentView = NSFullSizeContentViewWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskHUDWindow = NSHUDWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskMiniaturizable = NSMiniaturizableWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskNonactivatingPanel = NSNonactivatingPanelMask;
-static const NSWindowStyleMask NSWindowStyleMaskResizable = NSResizableWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskTexturedBackground = NSTexturedBackgroundWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskTitled = NSTitledWindowMask;
-static const NSWindowStyleMask NSWindowStyleMaskUtilityWindow = NSUtilityWindowMask;
-
-#endif // __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
-
 #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101300
 
 typedef NSInteger NSControlStateValue;

Modified: trunk/Source/WTF/wtf/mac/DeprecatedSymbolsUsedBySafari.mm (227466 => 227467)


--- trunk/Source/WTF/wtf/mac/DeprecatedSymbolsUsedBySafari.mm	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/WTF/wtf/mac/DeprecatedSymbolsUsedBySafari.mm	2018-01-24 02:27:56 UTC (rev 227467)
@@ -38,97 +38,6 @@
 
 namespace WTF {
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-WTF_EXPORT_PRIVATE void callOnMainThread(void (*function)(void*), void* context);
-WTF_EXPORT_PRIVATE void cancelCallOnMainThread(void (*function)(void*), void* context);
-
-class MainThreadFunctionTracker {
-public:
-    static MainThreadFunctionTracker& singleton()
-    {
-        static std::once_flag onceFlag;
-
-        static LazyNeverDestroyed<MainThreadFunctionTracker> tracker;
-
-        std::call_once(onceFlag, [&] {
-            tracker.construct();
-        });
-
-        return tracker;
-    }
-
-    void callOnMainThread(void (*function)(void*), void* context)
-    {
-        uint64_t identifier = addFunction(function, context);
-
-        WTF::callOnMainThread([this, function, context, identifier] {
-            if (!removeIdentifier(function, context, identifier))
-                return;
-
-            function(context);
-        });
-    }
-
-    void cancelCallOnMainThread(void (*function)(void*), void* context)
-    {
-        removeFunctions(function, context);
-    }
-
-private:
-    uint64_t addFunction(void (*function)(void*), void* context)
-    {
-        LockHolder lockHolder(m_lock);
-        uint64_t identifier = ++m_currentIdentifier;
-
-        auto& set = m_functions.add({ function, context }, HashSet<uint64_t> { }).iterator->value;
-        set.add(identifier);
-
-        return identifier;
-    }
-
-    bool removeIdentifier(void (*function)(void*), void* context, uint64_t identifier)
-    {
-        LockHolder lockHolder(m_lock);
-
-        auto it = m_functions.find({ function, context });
-        if (it == m_functions.end())
-            return false;
-
-        auto& set = it->value;
-        if (!set.remove(identifier))
-            return false;
-
-        if (set.isEmpty())
-            m_functions.remove(it);
-
-        return true;
-    }
-
-    void removeFunctions(void (*function)(void*), void* context)
-    {
-        LockHolder lockHolder(m_lock);
-
-        m_functions.remove({ function, context });
-    }
-
-    Lock m_lock;
-    uint64_t m_currentIdentifier;
-    HashMap<std::pair<void (*)(void*), void*>, HashSet<uint64_t>> m_functions;
-};
-
-void callOnMainThread(void (*function)(void*), void* context)
-{
-    MainThreadFunctionTracker::singleton().callOnMainThread(function, context);
-}
-
-void cancelCallOnMainThread(void (*function)(void*), void* context)
-{
-    ASSERT(function);
-
-    MainThreadFunctionTracker::singleton().cancelCallOnMainThread(function, context);
-}
-#endif
-
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
 struct LockBase {
 private:

Modified: trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h (227466 => 227467)


--- trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h	2018-01-24 02:27:56 UTC (rev 227467)
@@ -66,12 +66,9 @@
 SecTaskRef SecTaskCreateFromSelf(CFAllocatorRef);
 CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef, CFStringRef entitlement, CFErrorRef *);
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-CFStringRef SecTaskCopySigningIdentifier(SecTaskRef, CFErrorRef *);
-#endif
-
 #if PLATFORM(MAC)
 #include <Security/SecAsn1Types.h>
+CFStringRef SecTaskCopySigningIdentifier(SecTaskRef, CFErrorRef *);
 extern const SecAsn1Template kSecAsn1AlgorithmIDTemplate[];
 extern const SecAsn1Template kSecAsn1SubjectPublicKeyInfoTemplate[];
 #endif

Modified: trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h (227466 => 227467)


--- trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h	2018-01-24 02:27:56 UTC (rev 227467)
@@ -29,10 +29,6 @@
 
 #include <mach-o/dyld_priv.h>
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-#define DYLD_MACOSX_VERSION_10_12 0x000A0C00
-#endif
-
 #ifndef DYLD_IOS_VERSION_11_0
 #define DYLD_IOS_VERSION_11_0 0x000B0000
 #endif

Modified: trunk/Source/WTF/wtf/text/icu/TextBreakIteratorICU.h (227466 => 227467)


--- trunk/Source/WTF/wtf/text/icu/TextBreakIteratorICU.h	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/WTF/wtf/text/icu/TextBreakIteratorICU.h	2018-01-24 02:27:56 UTC (rev 227467)
@@ -24,122 +24,13 @@
 #include <wtf/Optional.h>
 #include <wtf/text/icu/UTextProviderLatin1.h>
 
-#define USE_ICU_CARET_ITERATOR (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
-
 namespace WTF {
 
-#if USE_ICU_CARET_ITERATOR
-static String caretRules()
-{
-    static StaticStringImpl caretRuleString(
-        // This rule set is based on character-break iterator rules of ICU 57
-        // <http://source.icu-project.org/repos/icu/icu/tags/release-57-1/source/data/brkitr/>.
-        // The major differences from the original ones are listed below:
-        // * Replaced '[\p{Grapheme_Cluster_Break = SpacingMark}]' with '[\p{General_Category = Spacing Mark} - $Extend]' for ICU 3.8 or earlier;
-        // * Removed rules that prevent a caret from moving after prepend characters (Bug 24342);
-        // * Added rules that prevent a caret from moving after virama signs of Indic languages except Tamil (Bug 15790), and;
-        // * Added rules that prevent a caret from moving before Japanese half-width katakara voiced marks.
-        // * Added rules for regional indicator symbols.
-        "$CR      = [\\p{Grapheme_Cluster_Break = CR}];"
-        "$LF      = [\\p{Grapheme_Cluster_Break = LF}];"
-        "$Control = [\\p{Grapheme_Cluster_Break = Control}];"
-        "$VoiceMarks = [\\uFF9E\\uFF9F];" // Japanese half-width katakana voiced marks
-        "$Extend  = [\\p{Grapheme_Cluster_Break = Extend} $VoiceMarks - [\\u0E30 \\u0E32 \\u0E45 \\u0EB0 \\u0EB2]];"
-        "$SpacingMark = [[\\p{General_Category = Spacing Mark}] - $Extend];"
-        "$L       = [\\p{Grapheme_Cluster_Break = L}];"
-        "$V       = [\\p{Grapheme_Cluster_Break = V}];"
-        "$T       = [\\p{Grapheme_Cluster_Break = T}];"
-        "$LV      = [\\p{Grapheme_Cluster_Break = LV}];"
-        "$LVT     = [\\p{Grapheme_Cluster_Break = LVT}];"
-        "$Hin0    = [\\u0905-\\u0939];" // Devanagari Letter A,...,Ha
-        "$HinV    = \\u094D;" // Devanagari Sign Virama
-        "$Hin1    = [\\u0915-\\u0939];" // Devanagari Letter Ka,...,Ha
-        "$Ben0    = [\\u0985-\\u09B9];" // Bengali Letter A,...,Ha
-        "$BenV    = \\u09CD;" // Bengali Sign Virama
-        "$Ben1    = [\\u0995-\\u09B9];" // Bengali Letter Ka,...,Ha
-        "$Pan0    = [\\u0A05-\\u0A39];" // Gurmukhi Letter A,...,Ha
-        "$PanV    = \\u0A4D;" // Gurmukhi Sign Virama
-        "$Pan1    = [\\u0A15-\\u0A39];" // Gurmukhi Letter Ka,...,Ha
-        "$Guj0    = [\\u0A85-\\u0AB9];" // Gujarati Letter A,...,Ha
-        "$GujV    = \\u0ACD;" // Gujarati Sign Virama
-        "$Guj1    = [\\u0A95-\\u0AB9];" // Gujarati Letter Ka,...,Ha
-        "$Ori0    = [\\u0B05-\\u0B39];" // Oriya Letter A,...,Ha
-        "$OriV    = \\u0B4D;" // Oriya Sign Virama
-        "$Ori1    = [\\u0B15-\\u0B39];" // Oriya Letter Ka,...,Ha
-        "$Tel0    = [\\u0C05-\\u0C39];" // Telugu Letter A,...,Ha
-        "$TelV    = \\u0C4D;" // Telugu Sign Virama
-        "$Tel1    = [\\u0C14-\\u0C39];" // Telugu Letter Ka,...,Ha
-        "$Kan0    = [\\u0C85-\\u0CB9];" // Kannada Letter A,...,Ha
-        "$KanV    = \\u0CCD;" // Kannada Sign Virama
-        "$Kan1    = [\\u0C95-\\u0CB9];" // Kannada Letter A,...,Ha
-        "$Mal0    = [\\u0D05-\\u0D39];" // Malayalam Letter A,...,Ha
-        "$MalV    = \\u0D4D;" // Malayalam Sign Virama
-        "$Mal1    = [\\u0D15-\\u0D39];" // Malayalam Letter A,...,Ha
-        "$RI      = [\\U0001F1E6-\\U0001F1FF];" // Emoji regional indicators
-        "$ZWJ     = \\u200D;" // Zero width joiner
-        "$EmojiVar = [\\uFE0F];" // Emoji-style variation selector
-        "$EmojiForSeqs = [\\u2640 \\u2642 \\u26F9 \\u2764 \\U0001F308 \\U0001F3C3-\\U0001F3C4 \\U0001F3CA-\\U0001F3CC \\U0001F3F3 \\U0001F441 \\U0001F466-\\U0001F469 \\U0001F46E-\\U0001F46F \\U0001F471 \\U0001F473 \\U0001F477 \\U0001F481-\\U0001F482 \\U0001F486-\\U0001F487 \\U0001F48B \\U0001F575 \\U0001F5E8 \\U0001F645-\\U0001F647 \\U0001F64B \\U0001F64D-\\U0001F64E \\U0001F6A3 \\U0001F6B4-\\U0001F6B6 \\u2695-\\u2696 \\u2708 \\U0001F33E \\U0001F373 \\U0001F393 \\U0001F3A4 \\U0001F3A8 \\U0001F3EB \\U0001F3ED \\U0001F4BB-\\U0001F4BC \\U0001F527 \\U0001F52C \\U0001F680 \\U0001F692 \\U0001F926 \\U0001F937-\\U0001F939 \\U0001F93C-\\U0001F93E];" // Emoji that participate in ZWJ sequences
-        "$EmojiForMods = [\\u261D \\u26F9 \\u270A-\\u270D \\U0001F385 \\U0001F3C3-\\U0001F3C4 \\U0001F3CA \\U0001F3CB \\U0001F442-\\U0001F443 \\U0001F446-\\U0001F450 \\U0001F466-\\U0001F478 \\U0001F47C \\U0001F481-\\U0001F483 \\U0001F485-\\U0001F487 \\U0001F4AA \\U0001F575 \\U0001F590 \\U0001F595 \\U0001F596 \\U0001F645-\\U0001F647 \\U0001F64B-\\U0001F64F \\U0001F6A3 \\U0001F6B4-\\U0001F6B6 \\U0001F6C0 \\U0001F918 \\U0001F3C2 \\U0001F3C7 \\U0001F3CC \\U0001F574 \\U0001F57A \\U0001F6CC \\U0001F919-\\U0001F91E \\U0001F926 \\U0001F930 \\U0001F933-\\U0001F939 \\U0001F93C-\\U0001F93E] ;" // Emoji that take Fitzpatrick modifiers
-        "$EmojiMods = [\\U0001F3FB-\\U0001F3FF];" // Fitzpatrick modifiers
-        "!!chain;"
-        "!!RINoChain;"
-        "!!forward;"
-        "$CR $LF;"
-        "$L ($L | $V | $LV | $LVT);"
-        "($LV | $V) ($V | $T);"
-        "($LVT | $T) $T;"
-        "$RI $RI $Extend* / $RI;"
-        "$RI $RI $Extend*;"
-        "[^$Control $CR $LF] $Extend;"
-        "[^$Control $CR $LF] $SpacingMark;"
-        "$Hin0 $HinV $Hin1;" // Devanagari Virama (forward)
-        "$Ben0 $BenV $Ben1;" // Bengali Virama (forward)
-        "$Pan0 $PanV $Pan1;" // Gurmukhi Virama (forward)
-        "$Guj0 $GujV $Guj1;" // Gujarati Virama (forward)
-        "$Ori0 $OriV $Ori1;" // Oriya Virama (forward)
-        "$Tel0 $TelV $Tel1;" // Telugu Virama (forward)
-        "$Kan0 $KanV $Kan1;" // Kannada Virama (forward)
-        "$Mal0 $MalV $Mal1;" // Malayalam Virama (forward)
-        "$ZWJ $EmojiForSeqs;" // Don't break in emoji ZWJ sequences
-        "$EmojiForMods $EmojiVar? $EmojiMods;" // Don't break between relevant emoji (possibly with variation selector) and Fitzpatrick modifier
-        "!!reverse;"
-        "$LF $CR;"
-        "($L | $V | $LV | $LVT) $L;"
-        "($V | $T) ($LV | $V);"
-        "$T ($LVT | $T);"
-        "$Extend* $RI $RI / $Extend* $RI $RI;"
-        "$Extend* $RI $RI;"
-        "$Extend      [^$Control $CR $LF];"
-        "$SpacingMark [^$Control $CR $LF];"
-        "$Hin1 $HinV $Hin0;" // Devanagari Virama (backward)
-        "$Ben1 $BenV $Ben0;" // Bengali Virama (backward)
-        "$Pan1 $PanV $Pan0;" // Gurmukhi Virama (backward)
-        "$Guj1 $GujV $Guj0;" // Gujarati Virama (backward)
-        "$Ori1 $OriV $Ori0;" // Gujarati Virama (backward)
-        "$Tel1 $TelV $Tel0;" // Telugu Virama (backward)
-        "$Kan1 $KanV $Kan0;" // Kannada Virama (backward)
-        "$Mal1 $MalV $Mal0;" // Malayalam Virama (backward)
-        "$EmojiForSeqs $ZWJ;" // Don't break in emoji ZWJ sequences
-        "$EmojiMods $EmojiVar? $EmojiForMods;" // Don't break between relevant emoji (possibly with variation selector) and Fitzpatrick modifier
-        "!!safe_reverse;"
-        "$RI $RI+;"
-        "[$EmojiVar $EmojiMods]+ $EmojiForMods;"
-        "!!safe_forward;"
-        "$RI $RI+;"
-        "$EmojiForMods [$EmojiVar $EmojiMods]+;"
-    );
-    return caretRuleString;
-}
-#endif
-
 class TextBreakIteratorICU {
 public:
     enum class Mode {
         Line,
         Character,
-#if USE_ICU_CARET_ITERATOR
-        Caret,
-#endif
     };
 
     void set8BitText(const LChar* buffer, unsigned length)
@@ -170,11 +61,6 @@
         case Mode::Character:
             type = UBRK_CHARACTER;
             break;
-#if USE_ICU_CARET_ITERATOR
-        case Mode::Caret:
-            type = UBRK_CHARACTER;
-            break;
-#endif
         default:
             ASSERT_NOT_REACHED();
             type = UBRK_CHARACTER;
@@ -188,15 +74,7 @@
 
         // FIXME: Handle weak / normal / strict line breaking.
         UErrorCode status = U_ZERO_ERROR;
-#if USE_ICU_CARET_ITERATOR
-        if (mode == Mode::Caret) {
-            static NeverDestroyed<String> caretRules = WTF::caretRules();
-            static NeverDestroyed<StringView::UpconvertedCharacters> upconvertedRules = StringView(caretRules).upconvertedCharacters();
-            UParseError parseError;
-            m_iterator = ubrk_openRules(upconvertedRules.get(), caretRules.get().length(), text, textLength, &parseError, &status);
-        } else
-#endif
-            m_iterator = ubrk_open(type, locale, text, textLength, &status);
+        m_iterator = ubrk_open(type, locale, text, textLength, &status);
         ASSERT(U_SUCCESS(status));
 
         if (requiresSet8BitText)

Modified: trunk/Source/WTF/wtf/text/mac/TextBreakIteratorInternalICUMac.mm (227466 => 227467)


--- trunk/Source/WTF/wtf/text/mac/TextBreakIteratorInternalICUMac.mm	2018-01-24 01:09:36 UTC (rev 227466)
+++ trunk/Source/WTF/wtf/text/mac/TextBreakIteratorInternalICUMac.mm	2018-01-24 02:27:56 UTC (rev 227467)
@@ -32,11 +32,7 @@
     case TextBreakIterator::Mode::Line:
         return TextBreakIteratorICU(string, TextBreakIteratorICU::Mode::Line, locale.string().utf8().data());
     case TextBreakIterator::Mode::Caret:
-#if USE_ICU_CARET_ITERATOR
-        return TextBreakIteratorICU(string, TextBreakIteratorICU::Mode::Caret, locale.string().utf8().data());
-#else
         return TextBreakIteratorCF(string, TextBreakIteratorCF::Mode::Caret);
-#endif
     case TextBreakIterator::Mode::Delete:
         return TextBreakIteratorCF(string, TextBreakIteratorCF::Mode::Delete);
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to