WebKit Bugzilla
Attachment 342631 Details for
Bug 186587
: [iOS] Synchronize PDF resizing with device rotation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186587-20180612221308.patch (text/plain), 3.99 KB, created by
Andy Estes
on 2018-06-12 22:13:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andy Estes
Created:
2018-06-12 22:13:09 PDT
Size:
3.99 KB
patch
obsolete
>Subversion Revision: 232787 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a777d75e06dafa3f7df0f9b2911b6d753dae328f..fcfac3c2b6704eca79af59e09859e1e0de35b69f 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,24 @@ >+2018-06-12 Andy Estes <aestes@apple.com> >+ >+ [iOS] Synchronize PDF resizing with device rotation >+ https://bugs.webkit.org/show_bug.cgi?id=186587 >+ <rdar://problem/40922462> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Both -beginPDFViewRotation and -endPDFViewRotation need to be called as part of >+ the transition coordinator's -animateAlongsideTransition: block to be synchronized >+ with rotation. Additionally, updateBlock needs to be invoked between the two calls >+ so that PDFKit can capture the frame geometry before and after the update. >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _beginAnimatedResizeWithUpdates:]): >+ * UIProcess/Cocoa/WKWebViewContentProvider.h: >+ * UIProcess/ios/WKPDFView.mm: >+ (-[WKPDFView web_beginAnimatedResizeWithUpdates:]): >+ (-[WKPDFView web_beginAnimatedResize]): Renamed to web_beginAnimatedResizeWithUpdates:. >+ (-[WKPDFView web_endAnimatedResize]): Deleted. >+ > 2018-06-12 Brent Fulgham <bfulgham@apple.com> > > Turn CSS Spring Animations and Link Preload off by default for production builds. >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index 162db6ac3126f7919c99924edda3c0ee4f739b5e..a5015afc32db48cb5de8f8cda28e44535c5115ab 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -5235,9 +5235,10 @@ - (void)_beginAnimatedResizeWithUpdates:(void (^)(void))updateBlock > WebCore::FloatRect oldUnobscuredContentRect = _page->unobscuredContentRect(); > > if (![self usesStandardContentView] || !_hasCommittedLoadForMainFrame || CGRectIsEmpty(oldBounds) || oldUnobscuredContentRect.isEmpty()) { >- updateBlock(); >- if ([_customContentView respondsToSelector:@selector(web_beginAnimatedResize)]) >- [_customContentView web_beginAnimatedResize]; >+ if ([_customContentView respondsToSelector:@selector(web_beginAnimatedResizeWithUpdates:)]) >+ [_customContentView web_beginAnimatedResizeWithUpdates:updateBlock]; >+ else >+ updateBlock(); > return; > } > >diff --git a/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h b/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h >index cf8f08e19ea36a97c8cd28d0987d96e6062558d3..83ff2d1ff8263c4bd485ffad24e6bfa4bb225ad2 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h >+++ b/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h >@@ -59,7 +59,7 @@ struct UIEdgeInsets; > - (void)web_scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view; > - (void)web_scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale; > - (void)web_scrollViewDidZoom:(UIScrollView *)scrollView; >-- (void)web_beginAnimatedResize; >+- (void)web_beginAnimatedResizeWithUpdates:(void (^)(void))updateBlock; > - (void)web_endAnimatedResize; > @property (nonatomic, readonly) NSData *web_dataRepresentation; > @property (nonatomic, readonly) NSString *web_suggestedFilename; >diff --git a/Source/WebKit/UIProcess/ios/WKPDFView.mm b/Source/WebKit/UIProcess/ios/WKPDFView.mm >index ac0eb1f81c9f9a175caf6073cdae68c91f9f3f0e..5b77f51692eb70fcd3fbd7fd1f4366e4a2e9aa43 100644 >--- a/Source/WebKit/UIProcess/ios/WKPDFView.mm >+++ b/Source/WebKit/UIProcess/ios/WKPDFView.mm >@@ -352,13 +352,10 @@ - (void)web_scrollViewDidZoom:(UIScrollView *)scrollView > [_hostViewController updatePDFViewLayout]; > } > >-- (void)web_beginAnimatedResize >+- (void)web_beginAnimatedResizeWithUpdates:(void (^)(void))updateBlock > { > [_hostViewController beginPDFViewRotation]; >-} >- >-- (void)web_endAnimatedResize >-{ >+ updateBlock(); > [_hostViewController endPDFViewRotation]; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186587
:
342631
|
342664