WebKit Bugzilla
Attachment 342664 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-20180613091347.patch (text/plain), 4.58 KB, created by
Andy Estes
on 2018-06-13 09:13:48 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andy Estes
Created:
2018-06-13 09:13:48 PDT
Size:
4.58 KB
patch
obsolete
>Subversion Revision: 232791 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a777d75e06dafa3f7df0f9b2911b6d753dae328f..0ecb43ab0c3f971c22a09b3eebf672bd6c697941 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,24 @@ >+2018-06-13 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 Darin Adler. >+ >+ 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..3cae5691f161b6635497d251dd71671f2639648f 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; > } > >@@ -5358,9 +5359,6 @@ - (void)_endAnimatedResize > { > LOG_WITH_STREAM(VisibleRects, stream << "-[WKWebView " << _page->pageID() << " _endAnimatedResize:] " << " _dynamicViewportUpdateMode " << (int)_dynamicViewportUpdateMode); > >- if ([_customContentView respondsToSelector:@selector(web_endAnimatedResize)]) >- [_customContentView web_endAnimatedResize]; >- > // If we already have an up-to-date layer tree, immediately complete > // the resize. Otherwise, we will defer completion until we do. > _waitingForEndAnimatedResize = NO; >diff --git a/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h b/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h >index cf8f08e19ea36a97c8cd28d0987d96e6062558d3..3abc097a943238634fe0e4995d6ca69304b0ebec 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h >+++ b/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h >@@ -59,8 +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_endAnimatedResize; >+- (void)web_beginAnimatedResizeWithUpdates:(void (^)(void))updateBlock; > @property (nonatomic, readonly) NSData *web_dataRepresentation; > @property (nonatomic, readonly) NSString *web_suggestedFilename; > @property (nonatomic, readonly) BOOL web_isBackground; >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