Changeset 229182 in webkit
- Timestamp:
- Mar 2, 2018 10:33:54 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r229180 r229182 1 2018-03-02 Tim Horton <timothy_horton@apple.com> 2 3 Make it possible to disable WKPDFView 4 https://bugs.webkit.org/show_bug.cgi?id=183281 5 <rdar://problem/38060815> 6 7 Reviewed by Dan Bates. 8 9 * wtf/FeatureDefines.h: 10 1 11 2018-03-02 Yusuke Suzuki <utatane.tea@gmail.com> 2 12 -
trunk/Source/WTF/wtf/FeatureDefines.h
r225091 r229182 161 161 #endif 162 162 163 #if !defined(ENABLE_WKPDFVIEW) 164 #if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) 165 #define ENABLE_WKPDFVIEW 1 166 #endif 167 #endif 168 163 169 #endif /* PLATFORM(IOS) */ 164 170 -
trunk/Source/WebKit/ChangeLog
r229178 r229182 1 2018-03-02 Tim Horton <timothy_horton@apple.com> 2 3 Make it possible to disable WKPDFView 4 https://bugs.webkit.org/show_bug.cgi?id=183281 5 <rdar://problem/38060815> 6 7 Reviewed by Dan Bates. 8 9 * UIProcess/API/Cocoa/WKWebView.mm: 10 (-[WKWebView _isBackground]): 11 (-[WKWebView _isDisplayingPDF]): 12 (-[WKWebView _dataForDisplayedPDF]): 13 (-[WKWebView _suggestedFilenameForDisplayedPDF]): 14 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: 15 (-[WKWebViewContentProviderRegistry init]): 16 * UIProcess/ios/WKPDFView.h: 17 * UIProcess/ios/WKPDFView.mm: 18 1 19 2018-03-02 Youenn Fablet <youenn@apple.com> 2 20 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r229066 r229182 1295 1295 - (BOOL)_isBackground 1296 1296 { 1297 #if ENABLE(WKPDFVIEW) 1297 1298 if ([self _isDisplayingPDF]) 1298 1299 return [(WKPDFView *)_customContentView isBackground]; 1299 1300 #endif 1300 1301 return [_contentView isBackground]; 1301 1302 } … … 5403 5404 - (BOOL)_isDisplayingPDF 5404 5405 { 5406 #if ENABLE(WKPDFVIEW) 5405 5407 return [_customContentView isKindOfClass:[WKPDFView class]]; 5408 #else 5409 return NO; 5410 #endif 5406 5411 } 5407 5412 5408 5413 - (NSData *)_dataForDisplayedPDF 5409 5414 { 5415 #if ENABLE(WKPDFVIEW) 5410 5416 if (![self _isDisplayingPDF]) 5411 5417 return nil; 5412 5418 CGPDFDocumentRef pdfDocument = [(WKPDFView *)_customContentView pdfDocument]; 5413 5419 return [(NSData *)CGDataProviderCopyData(CGPDFDocumentGetDataProvider(pdfDocument)) autorelease]; 5420 #else 5421 return nil; 5422 #endif 5414 5423 } 5415 5424 5416 5425 - (NSString *)_suggestedFilenameForDisplayedPDF 5417 5426 { 5427 #if ENABLE(WKPDFVIEW) 5418 5428 if (![self _isDisplayingPDF]) 5419 5429 return nil; 5420 5430 return [(WKPDFView *)_customContentView.get() suggestedFilename]; 5431 #else 5432 return nil; 5433 #endif 5421 5434 } 5422 5435 -
trunk/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm
r223149 r229182 52 52 return nil; 53 53 54 #if ENABLE(WKPDFVIEW) 54 55 for (auto& mimeType : WebCore::MIMETypeRegistry::getPDFMIMETypes()) 55 56 [self registerProvider:[WKPDFView class] forMIMEType:mimeType]; 57 #endif 56 58 57 59 return self; -
trunk/Source/WebKit/UIProcess/ios/WKPDFView.h
r210943 r229182 24 24 */ 25 25 26 #if PLATFORM(IOS) 26 #if PLATFORM(IOS) && ENABLE(WKPDFVIEW) 27 27 28 28 #import "CorePDFSPI.h" … … 38 38 @end 39 39 40 #endif // PLATFORM(IOS) 40 #endif // PLATFORM(IOS) && ENABLE(WKPDFVIEW) -
trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm
r226533 r229182 27 27 #import "WKPDFView.h" 28 28 29 #if PLATFORM(IOS) 29 #if PLATFORM(IOS) && ENABLE(WKPDFVIEW) 30 30 31 31 #import "APIFindClient.h" … … 893 893 #pragma clang diagnostic pop 894 894 895 #endif / * PLATFORM(IOS) */895 #endif // PLATFORM(IOS) && ENABLE(WKPDFVIEW)
Note: See TracChangeset
for help on using the changeset viewer.