Changeset 198986 in webkit
- Timestamp:
- Apr 3, 2016 11:56:30 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r198983 r198986 1 2016-04-03 David Kilzer <ddkilzer@apple.com> 2 3 REGRESSION (r198653, r198864): http/tests/contentdispositionattachmentsandbox/referer-header-stripped*.html tests crashing due to unavailable SPI 4 <http://webkit.org/b/156145> 5 6 Reviewed by Tim Horton. 7 8 Covered by existing tests under GuardMalloc: 9 10 http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-always.html 11 http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-default.html 12 http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-never.html 13 http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-no-referrer-when-downgrade.html 14 http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-no-referrer.html 15 http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-origin.html 16 http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-unsafe-url.html 17 http/tests/contentdispositionattachmentsandbox/referer-header-stripped.html 18 19 * editing/cocoa/DataDetection.mm: 20 (WebCore::DataDetection::isDataDetectorLink): 21 (WebCore::DataDetection::shouldCancelDefaultAction): 22 - Restore iOS 9.x code. 23 (WebCore::DataDetection::detectContentInRange): 24 - Guard new SPI with version macros. 25 26 * platform/cocoa/DataDetectorsCoreSoftLink.h: 27 * platform/cocoa/DataDetectorsCoreSoftLink.mm: 28 - Guard new SPI with version macros. 29 1 30 2016-04-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 31 -
trunk/Source/WebCore/editing/cocoa/DataDetection.mm
r198974 r198986 157 157 if (!is<HTMLAnchorElement>(element)) 158 158 return false; 159 159 160 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 160 161 return [softLink_DataDetectorsCore_DDURLTapAndHoldSchemes() containsObject:(NSString *)downcast<HTMLAnchorElement>(element).href().protocol().convertToASCIILowercase()]; 162 #else 163 if (equalIgnoringASCIICase(element.fastGetAttribute(x_apple_data_detectorsAttr), "true")) 164 return true; 165 URL url = downcast<HTMLAnchorElement>(element).href(); 166 return url.protocolIs("mailto") || url.protocolIs("tel"); 167 #endif 161 168 } 162 169 … … 173 180 bool DataDetection::shouldCancelDefaultAction(Element& element) 174 181 { 182 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 175 183 if (!isDataDetectorLink(element)) 176 184 return false; … … 194 202 } 195 203 return softLink_DataDetectorsCore_DDShouldImmediatelyShowActionSheetForResult(result); 204 #else 205 if (!is<HTMLAnchorElement>(element)) 206 return false; 207 if (!equalIgnoringASCIICase(element.fastGetAttribute(x_apple_data_detectorsAttr), "true")) 208 return false; 209 String type = element.getAttribute(x_apple_data_detectors_typeAttr).convertToASCIILowercase(); 210 if (type == "misc" || type == "calendar-event" || type == "telephone") 211 return true; 212 return false; 213 #endif 196 214 } 197 215 … … 581 599 582 600 lastModifiedQueryOffset = queryRange.end; 601 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 583 602 BOOL shouldUseLightLinks = softLink_DataDetectorsCore_DDShouldUseLightLinksForResult(coreResult, [indexPaths[resultIndex] length] > 1); 603 #else 604 BOOL shouldUseLightLinks = NO; 605 #endif 584 606 585 607 for (auto& range : resultRanges) { -
trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h
r198864 r198986 49 49 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDResultGetQueryRangeForURLification, DDQueryRange, (DDResultRef result), (result)) 50 50 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDURLStringForResult, NSString *, (DDResultRef currentResult, NSString * resultIdentifier, DDURLifierPhoneNumberDetectionTypes includingTelGroups, NSDate * referenceDate, NSTimeZone * referenceTimeZone), (currentResult, resultIdentifier, includingTelGroups, referenceDate, referenceTimeZone)) 51 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 51 52 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDURLTapAndHoldSchemes, NSArray *, (), ()) 52 53 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDShouldImmediatelyShowActionSheetForURL, BOOL, (NSURL *url), (url)) 53 54 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDShouldImmediatelyShowActionSheetForResult, BOOL, (DDResultRef result), (result)) 54 55 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDShouldUseLightLinksForResult, BOOL, (DDResultRef result, BOOL extractedFromSignature), (result, extractedFromSignature)) 56 #endif 55 57 SOFT_LINK_POINTER_FOR_HEADER(WebCore, DataDetectorsCore, DDBinderHttpURLKey, CFStringRef) 56 58 SOFT_LINK_POINTER_FOR_HEADER(WebCore, DataDetectorsCore, DDBinderWebURLKey, CFStringRef) -
trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm
r198864 r198986 48 48 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDResultGetQueryRangeForURLification, DDQueryRange, (DDResultRef result), (result)) 49 49 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDURLStringForResult, NSString *, (DDResultRef currentResult, NSString * resultIdentifier, DDURLifierPhoneNumberDetectionTypes includingTelGroups, NSDate * referenceDate, NSTimeZone * referenceTimeZone), (currentResult, resultIdentifier, includingTelGroups, referenceDate, referenceTimeZone)) 50 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 50 51 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDURLTapAndHoldSchemes, NSArray *, (), ()) 51 52 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDShouldImmediatelyShowActionSheetForURL, BOOL, (NSURL *url), (url)) 52 53 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDShouldImmediatelyShowActionSheetForResult, BOOL, (DDResultRef result), (result)) 53 54 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDShouldUseLightLinksForResult, BOOL, (DDResultRef result, BOOL extractedFromSignature), (result, extractedFromSignature)) 55 #endif 54 56 SOFT_LINK_POINTER_FOR_SOURCE(WebCore, DataDetectorsCore, DDBinderHttpURLKey, CFStringRef) 55 57 SOFT_LINK_POINTER_FOR_SOURCE(WebCore, DataDetectorsCore, DDBinderWebURLKey, CFStringRef)
Note: See TracChangeset
for help on using the changeset viewer.