Bug 146917

Summary: iOS WebKit doesn't build.
Product: WebKit Reporter: Yongjun Zhang <yongjun_zhang>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, mitz, sam, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch.
mitz: review+
Fix the conflict. none

Description Yongjun Zhang 2015-07-13 14:46:23 PDT
We shouldn't use deprecated UIVC API for preview.
Comment 1 Yongjun Zhang 2015-07-13 14:50:14 PDT
Created attachment 256730 [details]
Patch.
Comment 2 Yongjun Zhang 2015-07-13 14:52:16 PDT
rdar://problem/21801544
Comment 3 mitz 2015-07-13 15:00:47 PDT
Comment on attachment 256730 [details]
Patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=256730&action=review

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3185
> +    _previewing = [window.rootViewController registerForPreviewingWithSourceView:self];

Do we need to retain this?
Comment 4 mitz 2015-07-13 15:00:55 PDT
I’ve already fixed the build in r186779 but moving off the deprecated API is better.
Comment 5 Yongjun Zhang 2015-07-13 15:37:16 PDT
(In reply to comment #3)
> Comment on attachment 256730 [details]
> Patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=256730&action=review
> 
> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3185
> > +    _previewing = [window.rootViewController registerForPreviewingWithSourceView:self];
> 
> Do we need to retain this?

yeah, I think we need to. Will Change.
Comment 6 Yongjun Zhang 2015-07-13 15:39:36 PDT
Created attachment 256734 [details]
Fix the conflict.
Comment 7 mitz 2015-07-13 15:50:30 PDT
Comment on attachment 256734 [details]
Fix the conflict.

View in context: https://bugs.webkit.org/attachment.cgi?id=256734&action=review

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3197
> +    _previewing.delegate = nil;
>      [_previewGestureRecognizer setDelegate:nil];
>      _previewGestureRecognizer = nil;
> +    [_previewing release];

Should we do these two new things (clearing the delegate and releasing) in our -dealloc too, just in case?
Comment 8 Yongjun Zhang 2015-07-14 09:42:05 PDT
(In reply to comment #7)
> Comment on attachment 256734 [details]
> Fix the conflict.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=256734&action=review
> 
> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3197
> > +    _previewing.delegate = nil;
> >      [_previewGestureRecognizer setDelegate:nil];
> >      _previewGestureRecognizer = nil;
> > +    [_previewing release];
> 
> Should we do these two new things (clearing the delegate and releasing) in
> our -dealloc too, just in case?

I don't think it's needed. We will do the cleanup when the view is removed from window, which should be done before dealloc.
Comment 9 WebKit Commit Bot 2015-07-14 10:39:06 PDT
Comment on attachment 256734 [details]
Fix the conflict.

Clearing flags on attachment: 256734

Committed r186808: <http://trac.webkit.org/changeset/186808>
Comment 10 WebKit Commit Bot 2015-07-14 10:39:10 PDT
All reviewed patches have been landed.  Closing bug.