Bug 226588

Summary: [macOS] Image extraction preview panel should automatically close when the web view is unparented
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: PlatformAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, hi, megan_gardner, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Handle WP termination as well
none
Patch ews-feeder: commit-queue-

Description Wenson Hsieh 2021-06-03 10:28:30 PDT
rdar://77062762
Comment 1 Wenson Hsieh 2021-06-03 10:51:01 PDT Comment hidden (obsolete)
Comment 2 Wenson Hsieh 2021-06-03 11:12:14 PDT
Created attachment 430486 [details]
Handle WP termination as well
Comment 3 Tim Horton 2021-06-03 11:14:09 PDT
Comment on attachment 430486 [details]
Handle WP termination as well

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

> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:2408
> +        m_page->closeSharedPreviewPanelIfNecessary();

maybe stick this right next to dismissContentRelativeChildWindowsWithAnimation above?
Comment 4 Wenson Hsieh 2021-06-03 11:15:02 PDT
Thanks for the review!

(In reply to Tim Horton from comment #3)
> Comment on attachment 430486 [details]
> Handle WP termination as well
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=430486&action=review
> 
> > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:2408
> > +        m_page->closeSharedPreviewPanelIfNecessary();
> 
> maybe stick this right next to
> dismissContentRelativeChildWindowsWithAnimation above?

Makes sense — moved to right after the `dismissContentRelativeChildWindowsWithAnimation(false);`.
Comment 5 Wenson Hsieh 2021-06-03 11:16:31 PDT
Created attachment 430488 [details]
Patch
Comment 6 EWS 2021-06-03 12:40:06 PDT
Committed r278414 (238439@main): <https://commits.webkit.org/238439@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 430488 [details].