PDFs still don't snapshot properly in iOS Safari
Created attachment 251210 [details] Patch
<rdar://problem/18283459>
Comment on attachment 251210 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251210&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:2648 > + CGContextRef ctx = UIGraphicsGetCurrentContext(); Please use context instead of context. > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:2650 > + CGContextTranslateCTM(ctx, destinationRect.origin.x, destinationRect.origin.y); > + CGContextScaleCTM(ctx, imageScale, imageScale); Do you need to save and restore the state here?
(In reply to comment #3) > Comment on attachment 251210 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=251210&action=review > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:2648 > > + CGContextRef ctx = UIGraphicsGetCurrentContext(); > > Please use context instead of context. You can't abbreviate it even if you want to :D > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:2650 > > + CGContextTranslateCTM(ctx, destinationRect.origin.x, destinationRect.origin.y); > > + CGContextScaleCTM(ctx, imageScale, imageScale); > > Do you need to save and restore the state here? I don't think so, because it's a new context that was just created and will be lost very soon. Seems like that would be a waste of time, right?
http://trac.webkit.org/changeset/183068