Changeset 230713 in webkit
- Timestamp:
- Apr 17, 2018 9:28:33 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r230712 r230713 1 2018-04-17 David Kilzer <ddkilzer@apple.com> 2 3 Implement checked cast for DDResultRef once DDResultGetTypeID() is available 4 <https://webkit.org/b/184554> 5 <rdar://problem/36241894> 6 7 Reviewed by Brent Fulgham. 8 9 * editing/cocoa/DataDetection.mm: 10 (WebCore::detectItemAtPositionWithRange): Implement checked cast 11 for DDResultRef. 12 1 13 2018-04-17 Said Abou-Hallawa <sabouhallawa@apple.com> 2 14 -
trunk/Source/WebCore/editing/cocoa/DataDetection.mm
r226483 r230713 51 51 #import <pal/spi/ios/DataDetectorsUISPI.h> 52 52 #import <pal/spi/mac/DataDetectorsSPI.h> 53 #import <wtf/cf/TypeCastsCF.h> 53 54 #import <wtf/text/StringBuilder.h> 54 55 55 56 #import "DataDetectorsCoreSoftLink.h" 57 58 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 59 WTF_DECLARE_CF_TYPE_TRAIT(DDResult); 60 #endif 56 61 57 62 namespace WebCore { … … 79 84 CFIndex resultCount = CFArrayGetCount(results.get()); 80 85 for (CFIndex i = 0; i < resultCount; i++) { 81 // FIXME: <rdar://problem/36241894> Implement checked cast for DDResultRef once DDResultGetTypeID() is available 86 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 87 DDResultRef result = checked_cf_cast<DDResultRef>(CFArrayGetValueAtIndex(results.get(), i)); 88 #else 82 89 DDResultRef result = static_cast<DDResultRef>(const_cast<CF_BRIDGED_TYPE(id) void*>(CFArrayGetValueAtIndex(results.get(), i))); 90 #endif 83 91 CFRange resultRangeInContext = DDResultGetRange(result); 84 92 if (hitLocation >= resultRangeInContext.location && (hitLocation - resultRangeInContext.location) < resultRangeInContext.length) {
Note: See TracChangeset
for help on using the changeset viewer.