Changeset 104663 in webkit
- Timestamp:
- Jan 10, 2012 8:50:17 PM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r104656 r104663 1 2012-01-10 Mark Rowe <mrowe@apple.com> 2 3 REGRESSION (r104377): All pages print blank on Snow Leopard 4 <http://webkit.org/b/75879> / <rdar://problem/10674335> 5 6 We need to explicitly load PDFKit.framework before using PDFDocument and friends. 7 On SnowLeopard the framework is not necessarily loaded by anything else before we 8 print, which would lead to us failing to allocate the PDFDocument that we use for 9 drawing the content from the web process. 10 11 Reviewed by Dan Bernstein. 12 13 * UIProcess/API/mac/WKPrintingView.mm: 14 (pdfKitFrameworkPath): Construct the path to the PDFKit framework. 15 (classFromPDFKit): Ensure that the PDFKit framework is loaded, and then retrieve the 16 given class from it. 17 (pdfAnnotationLinkClass): ASSERT that we found the class. 18 (pdfDocumentClass): Ditto. 19 1 20 2012-01-10 Chris Marrin <cmarrin@apple.com> 2 21 -
trunk/Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm
r104377 r104663 412 412 } 413 413 414 static NSString *pdfKitFrameworkPath() 415 { 416 NSString *systemLibraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSSystemDomainMask, NO) objectAtIndex:0]; 417 return [systemLibraryPath stringByAppendingPathComponent:@"Frameworks/Quartz.framework/Frameworks/PDFKit.framework"]; 418 } 419 420 static Class classFromPDFKit(NSString *className) 421 { 422 static NSBundle *pdfKitBundle = [NSBundle bundleWithPath:pdfKitFrameworkPath()]; 423 [pdfKitBundle load]; 424 return [pdfKitBundle classNamed:className]; 425 } 426 414 427 static Class pdfAnnotationLinkClass() 415 428 { 416 static Class pdfAnnotationLinkClass = NSClassFromString(@"PDFAnnotationLink"); 429 static Class pdfAnnotationLinkClass = classFromPDFKit(@"PDFAnnotationLink"); 430 ASSERT(pdfAnnotationLinkClass); 417 431 return pdfAnnotationLinkClass; 418 432 } … … 420 434 static Class pdfDocumentClass() 421 435 { 422 static Class pdfDocumentClass = NSClassFromString(@"PDFDocument"); 436 static Class pdfDocumentClass = classFromPDFKit(@"PDFDocument"); 437 ASSERT(pdfDocumentClass); 423 438 return pdfDocumentClass; 424 439 }
Note: See TracChangeset
for help on using the changeset viewer.