Allow some deprecations in WKDrawingView.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2019 05:33:04 +0000 (05:33 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2019 05:33:04 +0000 (05:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194636

Reviewed by Wenson Hsieh.

* UIProcess/ios/WKDrawingView.mm:
(-[WKDrawingView PNGRepresentation]):
(-[WKDrawingView loadDrawingFromPNGRepresentation:]):
(-[WKDrawingView _canvasViewWillBeginDrawing:]):
(-[WKDrawingView didChangeInk:]):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKDrawingView.mm

index eb656a3..c14f6a2 100644 (file)
@@ -1,3 +1,16 @@
+2019-02-13  Timothy Hatcher  <timothy@apple.com>
+
+        Allow some deprecations in WKDrawingView.
+        https://bugs.webkit.org/show_bug.cgi?id=194636
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/ios/WKDrawingView.mm:
+        (-[WKDrawingView PNGRepresentation]):
+        (-[WKDrawingView loadDrawingFromPNGRepresentation:]):
+        (-[WKDrawingView _canvasViewWillBeginDrawing:]):
+        (-[WKDrawingView didChangeInk:]):
+
 2019-02-13  Jer Noble  <jer.noble@apple.com>
 
         [Cocoa] Media elements will restart network buffering just before suspending
index 2b25c60..692699c 100644 (file)
@@ -134,7 +134,9 @@ static UIImage *emptyImage()
     RetainPtr<UIImage> image = [self renderedDrawing];
     RetainPtr<NSMutableData> PNGData = adoptNS([[NSMutableData alloc] init]);
     RetainPtr<CGImageDestinationRef> imageDestination = adoptCF(CGImageDestinationCreateWithData((__bridge CFMutableDataRef)PNGData.get(), kUTTypePNG, 1, nil));
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     NSString *base64Drawing = [[[_pencilView drawing] serialize] base64EncodedStringWithOptions:0];
+ALLOW_DEPRECATED_DECLARATIONS_END
     NSDictionary *properties = nil;
     if (base64Drawing) {
         // FIXME: We should put this somewhere less user-facing than the EXIF User Comment field.
@@ -162,7 +164,9 @@ static UIImage *emptyImage()
         return;
     RetainPtr<NSData> drawingData = adoptNS([[NSData alloc] initWithBase64EncodedString:base64Drawing options:0]);
     RetainPtr<PKDrawing> drawing = adoptNS([WebKit::allocPKDrawingInstance() initWithData:drawingData.get() error:nil]);
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     [_pencilView setDrawing:drawing.get()];
+ALLOW_DEPRECATED_DECLARATIONS_END
 }
 
 - (void)canvasViewDrawingDidChange:(PKCanvasView *)canvasView
@@ -172,7 +176,9 @@ static UIImage *emptyImage()
 
 - (void)_canvasViewWillBeginDrawing:(PKCanvasView *)canvasView
 {
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     [_pencilView setInk:_contentView._drawingCoordinator.inkPicker.ink];
+ALLOW_DEPRECATED_DECLARATIONS_END
 }
 
 - (void)invalidateAttachment
@@ -191,7 +197,9 @@ static UIImage *emptyImage()
 
 - (void)didChangeInk:(PKInk *)ink
 {
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     [_pencilView setInk:ink];
+ALLOW_DEPRECATED_DECLARATIONS_END
 }
 
 @end