RESOLVED FIXED 130152
Do not show extended background during a pinch gesture on iOS
https://bugs.webkit.org/show_bug.cgi?id=130152
Summary Do not show extended background during a pinch gesture on iOS
Beth Dakin
Reported 2014-03-12 12:10:06 PDT
Do not show extended background during a pinch gesture. <rdar://problem/16303819>
Attachments
Patch (2.20 KB, patch)
2014-03-12 12:14 PDT, Beth Dakin
benjamin: review-
Patch (3.16 KB, patch)
2014-03-12 13:36 PDT, Beth Dakin
simon.fraser: review+
Beth Dakin
Comment 1 2014-03-12 12:14:22 PDT
Benjamin Poulain
Comment 2 2014-03-12 12:54:40 PDT
Comment on attachment 226543 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226543&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:403 > + UIColor *pageExtendedBackgroundColor = [self pageExtendedBackgroundColor]; > + if (pageExtendedBackgroundColor && [self _backgroundExtendsBeyondPage] && [_scrollView zoomScale] >= [_scrollView minimumZoomScale] && ![_scrollView isZoomBouncing]) > + [_scrollView setBackgroundColor:pageExtendedBackgroundColor]; > + else > + [_scrollView setBackgroundColor:nil]; You'll need the same code executed in response to scrollViewDidZoom:
Simon Fraser (smfr)
Comment 3 2014-03-12 13:03:18 PDT
Comment on attachment 226543 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226543&action=review >> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:403 >> + [_scrollView setBackgroundColor:nil]; > > You'll need the same code executed in response to scrollViewDidZoom: Yeah, I don't think this is the right place to set the scrollView's background color. I think we should just store the color coming in from the layer commit, then decide where to apply it in response to gestures elsewhere.
Beth Dakin
Comment 4 2014-03-12 13:32:50 PDT
(In reply to comment #3) > (From update of attachment 226543 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=226543&action=review > > >> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:403 > >> + [_scrollView setBackgroundColor:nil]; > > > > You'll need the same code executed in response to scrollViewDidZoom: > > Yeah, I don't think this is the right place to set the scrollView's background color. I think we should just store the color coming in from the layer commit, then decide where to apply it in response to gestures elsewhere. Just so you know, we do already cache the color. We cache it in WebPageProxy::didCommitLayerTree. New patch forthcoming!
Beth Dakin
Comment 5 2014-03-12 13:36:13 PDT
mitz
Comment 6 2014-03-13 11:06:21 PDT
Comment on attachment 226548 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226548&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:388 > +- (void)updateScrollViewBackground This internal method’s name should have an underscore prefix.
Beth Dakin
Comment 7 2014-03-13 11:46:43 PDT
(In reply to comment #6) > (From update of attachment 226548 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=226548&action=review > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:388 > > +- (void)updateScrollViewBackground > > This internal method’s name should have an underscore prefix. Done!
Beth Dakin
Comment 8 2014-03-13 15:45:59 PDT
Note You need to log in before you can comment on or make changes to this bug.