Null check webFrame when creating a print preview to prevent a crash.
Created attachment 377486 [details] Patch
Created attachment 377487 [details] Patch
Comment on attachment 377487 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377487&action=review > Source/WebKit/UIProcess/mac/WKPrintingView.mm:508 > + // Preview isn't available yet, request it asynchronously. This comment should stay where it was! This isn't about the early return, it's about the else case in the inner if. > Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:436 > + auto delegate = adoptNS([[PrintDelegate alloc] init]); > + [webView setUIDelegate:delegate.get()]; > + [webView loadHTMLString:@"<head><title>test_title</title></head><body onload='print()'>hello world!</body>" baseURL:[NSURL URLWithString:@"http://example.com/"]]; > + TestWebKitAPI::Util::run(&done); You can replace these four lines with one: [webView synchronouslyLoadHTMLString:@"<head><title>test_title</title></head><body onload='print()'>hello world!</body>"]; > Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:439 > + // Circumvents Assertion in WebKit. Nevermind, I lied, kill this comment with fire.
Wait no!
Comment on attachment 377487 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377487&action=review >> Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:436 >> + TestWebKitAPI::Util::run(&done); > > You can replace these four lines with one: > > [webView synchronouslyLoadHTMLString:@"<head><title>test_title</title></head><body onload='print()'>hello world!</body>"]; NEVERMIND I forgot that it is on print() not on load. Leave it be
<rdar://problem/51618863>
Created attachment 377494 [details] Patch for landing
Comment on attachment 377494 [details] Patch for landing Clearing flags on attachment: 377494 Committed r249224: <https://trac.webkit.org/changeset/249224>
All reviewed patches have been landed. Closing bug.