Changeset 200161 in webkit
- Timestamp:
- Apr 27, 2016 4:51:40 PM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r200159 r200161 1 2016-04-27 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] When determining tile size, check whether ancestor UIScrollViews are actually scrollable 4 https://bugs.webkit.org/show_bug.cgi?id=157107 5 rdar://problem/25943577 6 7 Reviewed by Tim Horton. 8 9 Rename "enclosedInScrollView" to "enclosedInScrollableAncestorView" everywhere. 10 11 * page/FrameView.cpp: 12 (WebCore::FrameView::adjustTiledBackingScrollability): 13 * page/Page.h: 14 (WebCore::Page::enclosedInScrollableAncestorView): 15 (WebCore::Page::setEnclosedInScrollableAncestorView): 16 (WebCore::Page::enclosedInScrollView): Deleted. 17 (WebCore::Page::setEnclosedInScrollView): Deleted. 18 1 19 2016-04-27 Michael Catanzaro <mcatanzaro@igalia.com> 2 20 -
trunk/Source/WebCore/page/FrameView.cpp
r200116 r200161 2488 2488 #if PLATFORM(IOS) 2489 2489 if (Page* page = frame().page()) 2490 clippedByAncestorView |= page->enclosedInScroll View();2490 clippedByAncestorView |= page->enclosedInScrollableAncestorView(); 2491 2491 #endif 2492 2492 -
trunk/Source/WebCore/page/Page.h
r199955 r200161 300 300 void setObscuredInset(FloatSize inset) { m_obscuredInset = inset; } 301 301 302 bool enclosedInScroll View() const { return m_enclosedInScrollView; }303 void setEnclosedInScroll View(bool f) { m_enclosedInScrollView = f; }302 bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; } 303 void setEnclosedInScrollableAncestorView(bool f) { m_enclosedInScrollableAncestorView = f; } 304 304 #endif 305 305 … … 613 613 // This is only used for history scroll position restoration. 614 614 FloatSize m_obscuredInset; 615 bool m_enclosedInScroll View { false };615 bool m_enclosedInScrollableAncestorView { false }; 616 616 #endif 617 617 -
trunk/Source/WebKit2/ChangeLog
r200157 r200161 1 2016-04-27 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] When determining tile size, check whether ancestor UIScrollViews are actually scrollable 4 https://bugs.webkit.org/show_bug.cgi?id=157107 5 rdar://problem/25943577 6 7 Reviewed by Tim Horton. 8 9 We should only fall back to 512x512 tiles if the WKWebView has a UIScrollView ancestor, 10 and that UIScrollView actually scrolls. This avoids falling back to small tiles in 11 MobileSafari. 12 13 Rename "enclosedInScrollView" to "enclosedInScrollableAncestorView" everywhere. 14 15 * Shared/VisibleContentRectUpdateInfo.cpp: 16 (WebKit::VisibleContentRectUpdateInfo::encode): 17 (WebKit::VisibleContentRectUpdateInfo::decode): 18 * Shared/VisibleContentRectUpdateInfo.h: 19 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo): 20 (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView): 21 (WebKit::operator==): 22 (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollView): Deleted. 23 * UIProcess/API/Cocoa/WKWebView.mm: 24 (scrollViewCanScroll): 25 (-[WKWebView _updateContentRectsWithState:]): 26 * UIProcess/ios/WKContentView.h: 27 * UIProcess/ios/WKContentView.mm: 28 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): 29 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollView:]): Deleted. 30 * WebProcess/WebPage/ios/WebPageIOS.mm: 31 (WebKit::WebPage::updateVisibleContentRects): 32 1 33 2016-04-26 Ada Chan <adachan@apple.com> 2 34 -
trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp
r199259 r200161 47 47 encoder << m_isChangingObscuredInsetsInteractively; 48 48 encoder << m_allowShrinkToFit; 49 encoder << m_enclosedInScroll View;49 encoder << m_enclosedInScrollableAncestorView; 50 50 } 51 51 … … 80 80 if (!decoder.decode(result.m_allowShrinkToFit)) 81 81 return false; 82 if (!decoder.decode(result.m_enclosedInScroll View))82 if (!decoder.decode(result.m_enclosedInScrollableAncestorView)) 83 83 return false; 84 84 -
trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h
r199259 r200161 42 42 VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedContentRect, const WebCore::FloatRect& unobscuredContentRect, 43 43 const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, 44 const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, bool enclosedInScroll View,44 const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, bool enclosedInScrollableAncestorView, 45 45 double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId) 46 46 : m_exposedContentRect(exposedContentRect) … … 58 58 , m_isChangingObscuredInsetsInteractively(isChangingObscuredInsetsInteractively) 59 59 , m_allowShrinkToFit(allowShrinkToFit) 60 , m_enclosedInScroll View(enclosedInScrollView)60 , m_enclosedInScrollableAncestorView(enclosedInScrollableAncestorView) 61 61 { 62 62 } … … 72 72 bool isChangingObscuredInsetsInteractively() const { return m_isChangingObscuredInsetsInteractively; } 73 73 bool allowShrinkToFit() const { return m_allowShrinkToFit; } 74 bool enclosedInScroll View() const { return m_enclosedInScrollView; }74 bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; } 75 75 76 76 double timestamp() const { return m_timestamp; } … … 99 99 bool m_isChangingObscuredInsetsInteractively { false }; 100 100 bool m_allowShrinkToFit { false }; 101 bool m_enclosedInScroll View { false };101 bool m_enclosedInScrollableAncestorView { false }; 102 102 }; 103 103 … … 115 115 && a.inStableState() == b.inStableState() 116 116 && a.allowShrinkToFit() == b.allowShrinkToFit() 117 && a.enclosedInScroll View() == b.enclosedInScrollView();117 && a.enclosedInScrollableAncestorView() == b.enclosedInScrollableAncestorView(); 118 118 } 119 119 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r200116 r200161 1987 1987 } 1988 1988 1989 static bool scrollViewCanScroll(UIScrollView *scrollView) 1990 { 1991 if (!scrollView) 1992 return NO; 1993 1994 UIEdgeInsets contentInset = scrollView.contentInset; 1995 CGSize contentSize = scrollView.contentSize; 1996 CGSize boundsSize = scrollView.bounds.size; 1997 1998 return (contentSize.width + contentInset.left + contentInset.right) > boundsSize.width 1999 || (contentSize.height + contentInset.top + contentInset.bottom) > boundsSize.height; 2000 } 2001 1989 2002 - (void)_updateContentRectsWithState:(BOOL)inStableState 1990 2003 { … … 2043 2056 inStableState:inStableState 2044 2057 isChangingObscuredInsetsInteractively:_isChangingObscuredInsetsInteractively 2045 enclosedInScroll View:[self _scroller] != nil];2058 enclosedInScrollableAncestorView:scrollViewCanScroll([self _scroller])]; 2046 2059 } 2047 2060 -
trunk/Source/WebKit2/UIProcess/ios/WKContentView.h
r199259 r200161 73 73 inStableState:(BOOL)isStableState 74 74 isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively 75 enclosedInScroll View:(BOOL)enclosedInScrollView;75 enclosedInScrollableAncestorView:(BOOL)enclosedInScrollableAncestorView; 76 76 77 77 - (void)didFinishScrolling; -
trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm
r199259 r200161 357 357 358 358 - (void)didUpdateVisibleRect:(CGRect)visibleRect unobscuredRect:(CGRect)unobscuredRect unobscuredRectInScrollViewCoordinates:(CGRect)unobscuredRectInScrollViewCoordinates 359 obscuredInset:(CGSize)obscuredInset scale:(CGFloat)zoomScale minimumScale:(CGFloat)minimumScale inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively enclosedInScroll View:(BOOL)enclosedInScrollView359 obscuredInset:(CGSize)obscuredInset scale:(CGFloat)zoomScale minimumScale:(CGFloat)minimumScale inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively enclosedInScrollableAncestorView:(BOOL)enclosedInScrollableAncestorView 360 360 { 361 361 auto drawingArea = _page->drawingArea(); … … 382 382 isChangingObscuredInsetsInteractively, 383 383 _webView._allowsViewportShrinkToFit, 384 enclosedInScroll View,384 enclosedInScrollableAncestorView, 385 385 timestamp, 386 386 velocityData.horizontalVelocity, -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r200098 r200161 2968 2968 frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredContentRect().size()); 2969 2969 m_page->setObscuredInset(visibleContentRectUpdateInfo.obscuredInset()); 2970 m_page->setEnclosedInScroll View(visibleContentRectUpdateInfo.enclosedInScrollView());2970 m_page->setEnclosedInScrollableAncestorView(visibleContentRectUpdateInfo.enclosedInScrollableAncestorView()); 2971 2971 2972 2972 double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
Note: See TracChangeset
for help on using the changeset viewer.