Unreviewed, rolling out r230713.
authorjlewis3@apple.com <jlewis3@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2018 17:02:00 +0000 (17:02 +0000)
committerjlewis3@apple.com <jlewis3@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2018 17:02:00 +0000 (17:02 +0000)
This caused internal build failures.

Reverted changeset:

"Implement checked cast for DDResultRef once
DDResultGetTypeID() is available"
https://bugs.webkit.org/show_bug.cgi?id=184554
https://trac.webkit.org/changeset/230713

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

Source/WebCore/ChangeLog
Source/WebCore/editing/cocoa/DataDetection.mm

index 673dcf4..edf9229 100644 (file)
@@ -1,3 +1,16 @@
+2018-04-17  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r230713.
+
+        This caused internal build failures.
+
+        Reverted changeset:
+
+        "Implement checked cast for DDResultRef once
+        DDResultGetTypeID() is available"
+        https://bugs.webkit.org/show_bug.cgi?id=184554
+        https://trac.webkit.org/changeset/230713
+
 2018-04-17  Chris Dumez  <cdumez@apple.com>
 
         Add bindings code for RemoteDOMWindow
index d319a11..f445616 100644 (file)
 #import "VisibleUnits.h"
 #import <pal/spi/ios/DataDetectorsUISPI.h>
 #import <pal/spi/mac/DataDetectorsSPI.h>
-#import <wtf/cf/TypeCastsCF.h>
 #import <wtf/text/StringBuilder.h>
 
 #import "DataDetectorsCoreSoftLink.h"
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
-WTF_DECLARE_CF_TYPE_TRAIT(DDResult);
-#endif
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -83,11 +78,8 @@ static RetainPtr<DDActionContext> detectItemAtPositionWithRange(VisiblePosition
     RefPtr<Range> mainResultRange;
     CFIndex resultCount = CFArrayGetCount(results.get());
     for (CFIndex i = 0; i < resultCount; i++) {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
-        DDResultRef result = checked_cf_cast<DDResultRef>(CFArrayGetValueAtIndex(results.get(), i));
-#else
+        // FIXME: <rdar://problem/36241894> Implement checked cast for DDResultRef once DDResultGetTypeID() is available
         DDResultRef result = static_cast<DDResultRef>(const_cast<CF_BRIDGED_TYPE(id) void*>(CFArrayGetValueAtIndex(results.get(), i)));
-#endif
         CFRange resultRangeInContext = DDResultGetRange(result);
         if (hitLocation >= resultRangeInContext.location && (hitLocation - resultRangeInContext.location) < resultRangeInContext.length) {
             mainResult = result;