| Summary: | [iOS][WK2] Implement WKPDFView smart magnification | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||
| Component: | WebKit2 | Assignee: | Tim Horton <thorton> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | andersca, benjamin, bunhere, cdumez, commit-queue, gyuyoung.kim, sergio, simon.fraser | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Tim Horton
2014-06-24 14:53:25 PDT
Created attachment 233746 [details]
patch
Comment on attachment 233746 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=233746&action=review r=dan with lots of comments below > Source/WebKit2/UIProcess/ios/WKPDFView.h:30 > #import <UIKit/UIView.h> > +#import <CorePDF/UIPDFPageView.h> sorting! > Source/WebKit2/UIProcess/ios/WKPDFView.mm:49 > +static const float smartMagnificationElementPadding = 0.05; CGFloat > Source/WebKit2/UIProcess/ios/WKPDFView.mm:72 > + bool _isStartingZoom; Big BOOL > Source/WebKit2/UIProcess/ios/WKPDFView.mm:185 > + [pageInfo.view setDelegate:self]; clear delegates > Source/WebKit2/UIProcess/ios/WKPDFView.mm:270 > + _isStartingZoom = true; YES etc > Source/WebKit2/UIProcess/ios/WKPDFView.mm:272 > + bool isImage = kind == kUIPDFObjectKindGraphic; Big BOOL > Source/WebKit2/UIProcess/ios/WKPDFView.mm:275 > + double dx = smartMagnificationElementPadding * targetRect.size.width; CGFloat > Source/WebKit2/UIProcess/ios/WKPDFView.mm:277 > + targetRect.origin.x -= dx; > + targetRect.size.width += 2 * dx; There should be a CGRect thing for this |