- Revision
- 261168
- Author
- [email protected]
- Date
- 2020-05-05 07:43:20 -0700 (Tue, 05 May 2020)
Log Message
Remove now-uneeded HAVE macros related to PDF
https://bugs.webkit.org/show_bug.cgi?id=211435
Reviewed by Anders Carlsson.
Source/WebKit:
* Platform/spi/ios/PDFKitSPI.h: Removed HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING).
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:mimeType:]): Removed
HAVE(PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR).
(+[WKPDFView web_requiresCustomSnapshotting]): Removed HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING).
(-[WKPDFView web_snapshotRectInContentViewCoordinates:snapshotWidth:completionHandler:]):
Ditto.
Source/WebKitLegacy/mac:
* WebView/WebFrameView.mm:
(+[WebFrameView _viewTypesAllowImageTypeOmission:]): Removed HAVE(LEGACY_PDF_SUPPORT).
* WebView/WebView.mm:
(+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]): Ditto.
Source/WTF:
* wtf/PlatformHave.h: Remove HAVE_PDFHOSTVIEWCONTROLLER_SNAPSHOTTING,
always set for iOS, HAVE_LEGACY_PDF_SUPPORT, always set for all Cocoa
platforms, and HAVE_PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR,
always set for iOS family platforms.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (261167 => 261168)
--- trunk/Source/WTF/ChangeLog 2020-05-05 14:40:10 UTC (rev 261167)
+++ trunk/Source/WTF/ChangeLog 2020-05-05 14:43:20 UTC (rev 261168)
@@ -1,5 +1,17 @@
2020-05-05 Darin Adler <[email protected]>
+ Remove now-uneeded HAVE macros related to PDF
+ https://bugs.webkit.org/show_bug.cgi?id=211435
+
+ Reviewed by Anders Carlsson.
+
+ * wtf/PlatformHave.h: Remove HAVE_PDFHOSTVIEWCONTROLLER_SNAPSHOTTING,
+ always set for iOS, HAVE_LEGACY_PDF_SUPPORT, always set for all Cocoa
+ platforms, and HAVE_PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR,
+ always set for iOS family platforms.
+
+2020-05-05 Darin Adler <[email protected]>
+
Remove now-unneeded HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
https://bugs.webkit.org/show_bug.cgi?id=211428
Modified: trunk/Source/WTF/wtf/PlatformHave.h (261167 => 261168)
--- trunk/Source/WTF/wtf/PlatformHave.h 2020-05-05 14:40:10 UTC (rev 261167)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2020-05-05 14:43:20 UTC (rev 261168)
@@ -81,10 +81,6 @@
#define HAVE_ARM_NEON_INTRINSICS 0
#endif
-#if !defined(HAVE_PDFHOSTVIEWCONTROLLER_SNAPSHOTTING) && PLATFORM(IOS)
-#define HAVE_PDFHOSTVIEWCONTROLLER_SNAPSHOTTING 1
-#endif
-
#if !defined(HAVE_VISIBILITY_PROPAGATION_VIEW) && PLATFORM(IOS_FAMILY)
#define HAVE_VISIBILITY_PROPAGATION_VIEW 1
#endif
@@ -589,10 +585,6 @@
#define HAVE_SYSTEM_FEATURE_FLAGS 1
#endif
-#if PLATFORM(IOS_FAMILY) || PLATFORM(MAC)
-#define HAVE_LEGACY_PDF_SUPPORT 1
-#endif
-
#if PLATFORM(IOS)
#define HAVE_AVOBSERVATIONCONTROLLER 1
#endif
@@ -602,10 +594,6 @@
#define HAVE_CANCEL_WEB_TOUCH_EVENTS_GESTURE 1
#endif
-#if PLATFORM(IOS_FAMILY)
-#define HAVE_PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR 1
-#endif
-
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101600)
#define HAVE_DD_HIGHLIGHT_CREATE_WITH_SCALE 1
#endif
Modified: trunk/Source/WebKit/ChangeLog (261167 => 261168)
--- trunk/Source/WebKit/ChangeLog 2020-05-05 14:40:10 UTC (rev 261167)
+++ trunk/Source/WebKit/ChangeLog 2020-05-05 14:43:20 UTC (rev 261168)
@@ -1,3 +1,19 @@
+2020-05-05 Darin Adler <[email protected]>
+
+ Remove now-uneeded HAVE macros related to PDF
+ https://bugs.webkit.org/show_bug.cgi?id=211435
+
+ Reviewed by Anders Carlsson.
+
+ * Platform/spi/ios/PDFKitSPI.h: Removed HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING).
+
+ * UIProcess/ios/WKPDFView.mm:
+ (-[WKPDFView web_initWithFrame:webView:mimeType:]): Removed
+ HAVE(PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR).
+ (+[WKPDFView web_requiresCustomSnapshotting]): Removed HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING).
+ (-[WKPDFView web_snapshotRectInContentViewCoordinates:snapshotWidth:completionHandler:]):
+ Ditto.
+
2020-05-05 Youenn Fablet <[email protected]>
Receiving WebRTC network packets should not go through the main thread
Modified: trunk/Source/WebKit/Platform/spi/ios/PDFKitSPI.h (261167 => 261168)
--- trunk/Source/WebKit/Platform/spi/ios/PDFKitSPI.h 2020-05-05 14:40:10 UTC (rev 261167)
+++ trunk/Source/WebKit/Platform/spi/ios/PDFKitSPI.h 2020-05-05 14:43:20 UTC (rev 261168)
@@ -59,9 +59,7 @@
- (void) beginPDFViewRotation;
- (void) endPDFViewRotation;
-#if HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING)
- (void) snapshotViewRect: (CGRect) rect snapshotWidth: (NSNumber*) width afterScreenUpdates: (BOOL) afterScreenUpdates withResult: (void (^)(UIImage* image)) completion;
-#endif
@end
Modified: trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm (261167 => 261168)
--- trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm 2020-05-05 14:40:10 UTC (rev 261167)
+++ trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm 2020-05-05 14:43:20 UTC (rev 261168)
@@ -120,11 +120,7 @@
if (!(self = [super initWithFrame:frame webView:webView]))
return nil;
-#if HAVE(PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR)
UIColor *backgroundColor = PDFHostViewController.backgroundColor;
-#else
- UIColor *backgroundColor = UIColor.grayColor;
-#endif
self.backgroundColor = backgroundColor;
webView.scrollView.backgroundColor = backgroundColor;
@@ -367,12 +363,8 @@
+ (BOOL)web_requiresCustomSnapshotting
{
-#if HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING)
static bool hasGlobalCaptureEntitlement = WTF::processHasEntitlement("com.apple.QuartzCore.global-capture");
return !hasGlobalCaptureEntitlement;
-#else
- return false;
-#endif
}
- (void)web_scrollViewDidScroll:(UIScrollView *)scrollView
@@ -404,12 +396,10 @@
- (void)web_snapshotRectInContentViewCoordinates:(CGRect)rectInContentViewCoordinates snapshotWidth:(CGFloat)snapshotWidth completionHandler:(void (^)(CGImageRef))completionHandler
{
-#if HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING)
CGRect rectInHostViewCoordinates = [self._contentView convertRect:rectInContentViewCoordinates toView:[_hostViewController view]];
[_hostViewController snapshotViewRect:rectInHostViewCoordinates snapshotWidth:@(snapshotWidth) afterScreenUpdates:NO withResult:^(UIImage *image) {
completionHandler(image.CGImage);
}];
-#endif
}
- (NSData *)web_dataRepresentation
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (261167 => 261168)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2020-05-05 14:40:10 UTC (rev 261167)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2020-05-05 14:43:20 UTC (rev 261168)
@@ -1,3 +1,15 @@
+2020-05-05 Darin Adler <[email protected]>
+
+ Remove now-uneeded HAVE macros related to PDF
+ https://bugs.webkit.org/show_bug.cgi?id=211435
+
+ Reviewed by Anders Carlsson.
+
+ * WebView/WebFrameView.mm:
+ (+[WebFrameView _viewTypesAllowImageTypeOmission:]): Removed HAVE(LEGACY_PDF_SUPPORT).
+ * WebView/WebView.mm:
+ (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]): Ditto.
+
2020-05-04 Darin Adler <[email protected]>
[Mac] Remove __MAC_OS_X_VERSION_MIN_REQUIRED checks for versions older than 10.14
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.mm (261167 => 261168)
--- trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.mm 2020-05-05 14:40:10 UTC (rev 261167)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.mm 2020-05-05 14:43:20 UTC (rev 261168)
@@ -262,9 +262,7 @@
#if PLATFORM(IOS_FAMILY)
#define WebPDFView ([WebView _getPDFViewClass])
#endif
-#if HAVE(LEGACY_PDF_SUPPORT)
addTypesFromClass(viewTypes, [WebPDFView class], [WebPDFView supportedMIMETypes]);
-#endif
#if PLATFORM(IOS_FAMILY)
#undef WebPDFView
#endif
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (261167 => 261168)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2020-05-05 14:40:10 UTC (rev 261167)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2020-05-05 14:43:20 UTC (rev 261168)
@@ -2070,11 +2070,7 @@
#if PLATFORM(IOS_FAMILY)
#define WebPDFView ([WebView _getPDFViewClass])
#endif
-#if !HAVE(LEGACY_PDF_SUPPORT)
- if (!viewClass || !repClass) {
-#else
if (!viewClass || !repClass || [[WebPDFView supportedMIMETypes] containsObject:MIMEType]) {
-#endif
#if PLATFORM(IOS_FAMILY)
#undef WebPDFView
#endif