Changeset 200470 in webkit
- Timestamp:
- May 5, 2016 1:01:13 PM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r200469 r200470 1 2016-05-05 Simon Fraser <simon.fraser@apple.com> 2 3 Revert r200390, thus putting r199259 and r200161 and back. 4 5 * loader/HistoryController.cpp: 6 (WebCore::HistoryController::saveScrollPositionAndViewStateToItem): 7 * page/FrameView.cpp: 8 (WebCore::FrameView::adjustTiledBackingScrollability): 9 * page/Page.h: 10 (WebCore::Page::obscuredInset): 11 (WebCore::Page::setObscuredInset): 12 (WebCore::Page::enclosedInScrollableAncestorView): 13 (WebCore::Page::setEnclosedInScrollableAncestorView): 14 * platform/ScrollView.h: 15 (WebCore::ScrollView::platformObscuredInset): Deleted. 16 (WebCore::ScrollView::platformSetObscuredInset): Deleted. 17 1 18 2016-05-05 Sam Weinig <sam@webkit.org> 2 19 -
trunk/Source/WebCore/loader/HistoryController.cpp
r200390 r200470 80 80 else 81 81 item->setScrollPosition(frameView->scrollPosition()); 82 82 83 #if PLATFORM(IOS) 83 84 item->setExposedContentRect(frameView->exposedContentRect()); 84 85 item->setUnobscuredContentRect(frameView->unobscuredContentRect()); 85 item->setObscuredInset(frameView->platformObscuredInset());86 86 #endif 87 87 88 88 Page* page = m_frame.page(); 89 if (page && m_frame.isMainFrame()) 89 if (page && m_frame.isMainFrame()) { 90 90 item->setPageScaleFactor(page->pageScaleFactor() / page->viewScaleFactor()); 91 #if PLATFORM(IOS) 92 item->setObscuredInset(page->obscuredInset()); 93 #endif 94 } 91 95 92 96 // FIXME: It would be great to work out a way to put this code in WebCore instead of calling through to the client. -
trunk/Source/WebCore/page/FrameView.cpp
r200390 r200470 2486 2486 bool clippedByAncestorView = static_cast<bool>(m_viewExposedRect); 2487 2487 2488 #if PLATFORM(IOS) 2489 if (Page* page = frame().page()) 2490 clippedByAncestorView |= page->enclosedInScrollableAncestorView(); 2491 #endif 2492 2488 2493 if (delegatesScrolling()) { 2489 2494 IntSize documentSize = contentsSize(); -
trunk/Source/WebCore/page/Page.h
r200390 r200470 295 295 float topContentInset() const { return m_topContentInset; } 296 296 WEBCORE_EXPORT void setTopContentInset(float); 297 298 #if PLATFORM(IOS) 299 FloatSize obscuredInset() const { return m_obscuredInset; } 300 void setObscuredInset(FloatSize inset) { m_obscuredInset = inset; } 297 301 302 bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; } 303 void setEnclosedInScrollableAncestorView(bool f) { m_enclosedInScrollableAncestorView = f; } 304 #endif 305 298 306 #if ENABLE(IOS_TEXT_AUTOSIZING) 299 307 float textAutosizingWidth() const { return m_textAutosizingWidth; } … … 601 609 602 610 float m_topContentInset; 603 611 612 #if PLATFORM(IOS) 613 // This is only used for history scroll position restoration. 614 FloatSize m_obscuredInset; 615 bool m_enclosedInScrollableAncestorView { false }; 616 #endif 617 604 618 #if ENABLE(IOS_TEXT_AUTOSIZING) 605 619 float m_textAutosizingWidth; -
trunk/Source/WebCore/platform/ScrollView.h
r200390 r200470 379 379 WEBCORE_EXPORT void scrollOffsetChangedViaPlatformWidget(const ScrollOffset& oldOffset, const ScrollOffset& newOffset); 380 380 381 #if PLATFORM(IOS)382 FloatSize platformObscuredInset() const { return m_obscuredInset; }383 void platformSetObscuredInset(FloatSize inset) { m_obscuredInset = inset; }384 #endif385 386 381 protected: 387 382 ScrollView(); … … 459 454 FloatSize m_unobscuredContentSize; 460 455 // This is only used for history scroll position restoration. 461 FloatSize m_obscuredInset;462 456 #else 463 457 IntRect m_fixedVisibleContentRect; -
trunk/Source/WebKit2/ChangeLog
r200463 r200470 1 2016-05-05 Simon Fraser <simon.fraser@apple.com> 2 3 Revert r200390, thus putting r199259 and r200161 and back. 4 5 * Shared/VisibleContentRectUpdateInfo.cpp: 6 (WebKit::VisibleContentRectUpdateInfo::encode): 7 (WebKit::VisibleContentRectUpdateInfo::decode): 8 * Shared/VisibleContentRectUpdateInfo.h: 9 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo): 10 (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView): 11 (WebKit::operator==): 12 * UIProcess/API/Cocoa/WKWebView.mm: 13 (-[WKWebView _didInvokeUIScrollViewDelegateCallback]): 14 (-[WKWebView _didFinishScrolling]): 15 (-[WKWebView scrollViewDidScroll:]): 16 (-[WKWebView scrollViewDidZoom:]): 17 (-[WKWebView scrollViewDidEndZooming:withView:atScale:]): 18 (-[WKWebView _scrollViewDidInterruptDecelerating:]): 19 (-[WKWebView _visibleRectInEnclosingScrollView:]): 20 (-[WKWebView _visibleContentRect]): 21 (-[WKWebView _didScroll]): 22 (-[WKWebView _enclosingScrollerScrollingEnded:]): 23 (-[WKWebView _frameOrBoundsChanged]): 24 (-[WKWebView _updateVisibleContentRects]): 25 (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): 26 (scrollViewCanScroll): 27 (-[WKWebView _updateContentRectsWithState:]): 28 * UIProcess/API/Cocoa/WKWebViewInternal.h: 29 * UIProcess/WebPageProxy.h: 30 * UIProcess/ios/WKContentView.h: 31 * UIProcess/ios/WKContentView.mm: 32 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): 33 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted. 34 * UIProcess/ios/WebPageProxyIOS.mm: 35 (WebKit::WebPageProxy::updateVisibleContentRects): 36 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: 37 (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation): 38 * WebProcess/WebPage/ios/WebPageIOS.mm: 39 (WebKit::WebPage::updateVisibleContentRects): 40 1 41 2016-05-02 Sam Weinig <sam@webkit.org> 2 42 -
trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp
r200390 r200470 47 47 encoder << m_isChangingObscuredInsetsInteractively; 48 48 encoder << m_allowShrinkToFit; 49 encoder << m_enclosedInScrollableAncestorView; 49 50 } 50 51 … … 79 80 if (!decoder.decode(result.m_allowShrinkToFit)) 80 81 return false; 82 if (!decoder.decode(result.m_enclosedInScrollableAncestorView)) 83 return false; 81 84 82 85 return true; -
trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h
r200390 r200470 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, 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_enclosedInScrollableAncestorView(enclosedInScrollableAncestorView) 60 61 { 61 62 } … … 71 72 bool isChangingObscuredInsetsInteractively() const { return m_isChangingObscuredInsetsInteractively; } 72 73 bool allowShrinkToFit() const { return m_allowShrinkToFit; } 74 bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; } 73 75 74 76 double timestamp() const { return m_timestamp; } … … 97 99 bool m_isChangingObscuredInsetsInteractively { false }; 98 100 bool m_allowShrinkToFit { false }; 101 bool m_enclosedInScrollableAncestorView { false }; 99 102 }; 100 103 … … 111 114 && a.scaleChangeRate() == b.scaleChangeRate() 112 115 && a.inStableState() == b.inStableState() 113 && a.allowShrinkToFit() == b.allowShrinkToFit(); 116 && a.allowShrinkToFit() == b.allowShrinkToFit() 117 && a.enclosedInScrollableAncestorView() == b.enclosedInScrollableAncestorView(); 114 118 } 115 119 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r200463 r200470 243 243 RetainPtr<UIView> _customContentFixedOverlayView; 244 244 245 RetainPtr<NSTimer> _enclosingScrollViewScrollTimer; 246 BOOL _didScrollSinceLastTimerFire; 247 245 248 WebCore::Color _scrollViewBackgroundColor; 246 249 … … 1049 1052 if (_hadDelayedUpdateVisibleContentRects) { 1050 1053 _hadDelayedUpdateVisibleContentRects = NO; 1051 [self _updateVisibleContentRect s];1054 [self _updateVisibleContentRectAfterScrollInView:_scrollView.get()]; 1052 1055 } 1053 1056 } … … 1793 1796 return; 1794 1797 1795 [self _updateVisibleContentRect s];1798 [self _updateVisibleContentRectAfterScrollInView:_scrollView.get()]; 1796 1799 [_contentView didFinishScrolling]; 1797 1800 } … … 1847 1850 [_customContentView scrollViewDidScroll:(UIScrollView *)scrollView]; 1848 1851 1849 [self _updateVisibleContentRect s];1852 [self _updateVisibleContentRectAfterScrollInView:scrollView]; 1850 1853 1851 1854 if (WebKit::RemoteLayerTreeScrollingPerformanceData* scrollPerfData = _page->scrollingPerformanceData()) … … 1856 1859 { 1857 1860 [self _updateScrollViewBackground]; 1858 [self _updateVisibleContentRect s];1861 [self _updateVisibleContentRectAfterScrollInView:scrollView]; 1859 1862 } 1860 1863 … … 1862 1865 { 1863 1866 ASSERT(scrollView == _scrollView); 1864 [self _updateVisibleContentRect s];1867 [self _updateVisibleContentRectAfterScrollInView:scrollView]; 1865 1868 [_contentView didZoomToScale:scale]; 1866 1869 } … … 1877 1880 1878 1881 [_contentView didInterruptScrolling]; 1882 [self _updateVisibleContentRectAfterScrollInView:scrollView]; 1883 } 1884 1885 - (CGRect)_visibleRectInEnclosingScrollView:(UIScrollView *)enclosingScrollView 1886 { 1887 if (!enclosingScrollView) 1888 return self.bounds; 1889 1890 CGRect exposedRect = [enclosingScrollView convertRect:enclosingScrollView.bounds toView:self]; 1891 return CGRectIntersectsRect(exposedRect, self.bounds) ? CGRectIntersection(exposedRect, self.bounds) : CGRectZero; 1892 } 1893 1894 - (CGRect)_visibleContentRect 1895 { 1896 CGRect visibleRectInContentCoordinates = _frozenVisibleContentRect ? _frozenVisibleContentRect.value() : [self convertRect:self.bounds toView:_contentView.get()]; 1897 1898 if (UIScrollView *enclosingScroller = [self _scroller]) { 1899 CGRect viewVisibleRect = [self _visibleRectInEnclosingScrollView:enclosingScroller]; 1900 CGRect viewVisibleContentRect = [self convertRect:viewVisibleRect toView:_contentView.get()]; 1901 visibleRectInContentCoordinates = CGRectIntersection(visibleRectInContentCoordinates, viewVisibleContentRect); 1902 } 1903 1904 return visibleRectInContentCoordinates; 1905 } 1906 1907 // Called when some ancestor UIScrollView scrolls. 1908 - (void)_didScroll 1909 { 1910 [self _updateVisibleContentRectAfterScrollInView:[self _scroller]]; 1911 1912 const NSTimeInterval ScrollingEndedTimerInterval = 0.032; 1913 if (!_enclosingScrollViewScrollTimer) { 1914 _enclosingScrollViewScrollTimer = adoptNS([[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:ScrollingEndedTimerInterval] 1915 interval:0 target:self selector:@selector(_enclosingScrollerScrollingEnded:) userInfo:nil repeats:YES]); 1916 [[NSRunLoop mainRunLoop] addTimer:_enclosingScrollViewScrollTimer.get() forMode:NSDefaultRunLoopMode]; 1917 } 1918 _didScrollSinceLastTimerFire = YES; 1919 } 1920 1921 - (void)_enclosingScrollerScrollingEnded:(NSTimer *)timer 1922 { 1923 if (_didScrollSinceLastTimerFire) { 1924 _didScrollSinceLastTimerFire = NO; 1925 return; 1926 } 1927 1879 1928 [self _updateVisibleContentRects]; 1929 [_enclosingScrollViewScrollTimer invalidate]; 1930 _enclosingScrollViewScrollTimer = nil; 1880 1931 } 1881 1932 … … 1890 1941 if (!_overridesMaximumUnobscuredSize) 1891 1942 _page->setMaximumUnobscuredSize(WebCore::FloatSize(bounds.size)); 1892 if ( WebKit::DrawingAreaProxy*drawingArea = _page->drawingArea())1943 if (auto drawingArea = _page->drawingArea()) 1893 1944 drawingArea->setSize(WebCore::IntSize(bounds.size), WebCore::IntSize(), WebCore::IntSize()); 1894 1945 } … … 1920 1971 - (void)_updateVisibleContentRects 1921 1972 { 1973 // For visible rect updates not associated with a spefic UIScrollView, just consider our own scroller. 1974 [self _updateVisibleContentRectAfterScrollInView:_scrollView.get()]; 1975 } 1976 1977 - (void)_updateVisibleContentRectAfterScrollInView:(UIScrollView *)scrollView 1978 { 1979 BOOL isStableState = !([scrollView isDragging] || [scrollView isDecelerating] || [scrollView isZooming] || [scrollView _isAnimatingZoom] || [scrollView _isScrollingToTop]); 1980 1981 if (isStableState && scrollView == _scrollView.get()) 1982 isStableState = !_isChangingObscuredInsetsInteractively; 1983 1984 if (isStableState && scrollView == _scrollView.get()) 1985 isStableState = ![self _scrollViewIsRubberBanding]; 1986 1987 // FIXME: this can be made static after we stop supporting iOS 8.x. 1988 if (isStableState && [scrollView respondsToSelector:@selector(_isInterruptingDeceleration)]) 1989 isStableState = ![scrollView performSelector:@selector(_isInterruptingDeceleration)]; 1990 1991 [self _updateContentRectsWithState:isStableState]; 1992 } 1993 1994 static bool scrollViewCanScroll(UIScrollView *scrollView) 1995 { 1996 if (!scrollView) 1997 return NO; 1998 1999 UIEdgeInsets contentInset = scrollView.contentInset; 2000 CGSize contentSize = scrollView.contentSize; 2001 CGSize boundsSize = scrollView.bounds.size; 2002 2003 return (contentSize.width + contentInset.left + contentInset.right) > boundsSize.width 2004 || (contentSize.height + contentInset.top + contentInset.bottom) > boundsSize.height; 2005 } 2006 2007 - (void)_updateContentRectsWithState:(BOOL)inStableState 2008 { 1922 2009 if (![self usesStandardContentView]) { 1923 2010 [_customContentView web_computedContentInsetDidChange]; … … 1937 2024 1938 2025 CGRect fullViewRect = self.bounds; 1939 CGRect visibleRectInContentCoordinates = _frozenVisibleContentRect ? _frozenVisibleContentRect.value() : [self convertRect:fullViewRect toView:_contentView.get()];2026 CGRect visibleRectInContentCoordinates = [self _visibleContentRect]; 1940 2027 1941 2028 UIEdgeInsets computedContentInsetUnadjustedForKeyboard = [self _computedContentInset]; … … 1948 2035 CGFloat scaleFactor = contentZoomScale(self); 1949 2036 1950 BOOL isStableState = !(_isChangingObscuredInsetsInteractively || [_scrollView isDragging] || [_scrollView isDecelerating] || [_scrollView isZooming] || [_scrollView _isAnimatingZoom] || [_scrollView _isScrollingToTop] || [self _scrollViewIsRubberBanding]);1951 1952 // FIXME: this can be made static after we stop supporting iOS 8.x.1953 if (isStableState && [_scrollView respondsToSelector:@selector(_isInterruptingDeceleration)])1954 isStableState = ![_scrollView performSelector:@selector(_isInterruptingDeceleration)];1955 1956 2037 #if ENABLE(CSS_SCROLL_SNAP) && ENABLE(ASYNC_SCROLLING) 1957 if (i sStableState) {2038 if (inStableState) { 1958 2039 WebKit::RemoteScrollingCoordinatorProxy* coordinator = _page->scrollingCoordinatorProxy(); 1959 2040 if (coordinator && coordinator->hasActiveSnapPoint()) { 1960 CGRect fullViewRect = self.bounds;1961 2041 CGRect unobscuredRect = UIEdgeInsetsInsetRect(fullViewRect, computedContentInsetUnadjustedForKeyboard); 1962 2042 … … 1979 2059 obscuredInset:CGSizeMake(_obscuredInsets.left, _obscuredInsets.top) 1980 2060 scale:scaleFactor minimumScale:[_scrollView minimumZoomScale] 1981 inStableState:isStableState 1982 isChangingObscuredInsetsInteractively:_isChangingObscuredInsetsInteractively]; 2061 inStableState:inStableState 2062 isChangingObscuredInsetsInteractively:_isChangingObscuredInsetsInteractively 2063 enclosedInScrollableAncestorView:scrollViewCanScroll([self _scroller])]; 1983 2064 } 1984 2065 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h
r200390 r200470 100 100 101 101 - (void)_updateVisibleContentRects; 102 - (void)_updateVisibleContentRectAfterScrollInView:(UIScrollView *)scrollView; 103 - (void)_updateContentRectsWithState:(BOOL)inStableState; 102 104 103 105 - (void)_didFinishLoadForMainFrame; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r200390 r200470 456 456 const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredContentRect(); } 457 457 458 void updateVisibleContentRects(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate);458 void updateVisibleContentRects(const VisibleContentRectUpdateInfo&); 459 459 void resendLastVisibleContentRects(); 460 460 -
trunk/Source/WebKit2/UIProcess/ios/WKContentView.h
r200390 r200470 71 71 obscuredInset:(CGSize)topInset 72 72 scale:(CGFloat)scale minimumScale:(CGFloat)minimumScale 73 inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively; 73 inStableState:(BOOL)isStableState 74 isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively 75 enclosedInScrollableAncestorView:(BOOL)enclosedInScrollableAncestorView; 74 76 75 77 - (void)didFinishScrolling; -
trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm
r200390 r200470 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 360 { 359 obscuredInset:(CGSize)obscuredInset scale:(CGFloat)zoomScale minimumScale:(CGFloat)minimumScale inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively enclosedInScrollableAncestorView:(BOOL)enclosedInScrollableAncestorView 360 { 361 auto drawingArea = _page->drawingArea(); 362 if (!drawingArea) 363 return; 364 361 365 double timestamp = monotonicallyIncreasingTime(); 362 366 HistoricalVelocityData::VelocityData velocityData; … … 367 371 368 372 FloatRect fixedPositionRectForLayout = _page->computeCustomFixedPositionRect(unobscuredRect, zoomScale, WebPageProxy::UnobscuredRectConstraint::ConstrainedToDocumentRect); 369 _page->updateVisibleContentRects(visibleRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, fixedPositionRectForLayout, WebCore::FloatSize(obscuredInset), 370 zoomScale, isStableState, isChangingObscuredInsetsInteractively, _webView._allowsViewportShrinkToFit, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate); 373 374 VisibleContentRectUpdateInfo visibleContentRectUpdateInfo( 375 visibleRect, 376 unobscuredRect, 377 unobscuredRectInScrollViewCoordinates, 378 fixedPositionRectForLayout, 379 WebCore::FloatSize(obscuredInset), 380 zoomScale, 381 isStableState, 382 isChangingObscuredInsetsInteractively, 383 _webView._allowsViewportShrinkToFit, 384 enclosedInScrollableAncestorView, 385 timestamp, 386 velocityData.horizontalVelocity, 387 velocityData.verticalVelocity, 388 velocityData.scaleChangeRate, 389 downcast<RemoteLayerTreeDrawingAreaProxy>(*drawingArea).lastCommittedLayerTreeTransactionID()); 390 391 _page->updateVisibleContentRects(visibleContentRectUpdateInfo); 371 392 372 393 RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page->scrollingCoordinatorProxy(); … … 374 395 scrollingCoordinator->viewportChangedViaDelegatedScrolling(scrollingCoordinator->rootScrollingNodeID(), fixedPositionRect, zoomScale); 375 396 376 if (auto drawingArea = _page->drawingArea()) 377 drawingArea->updateDebugIndicator(); 378 397 drawingArea->updateDebugIndicator(); 398 379 399 [self updateFixedClippingView:fixedPositionRect]; 380 400 } -
trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
r200390 r200470 183 183 } 184 184 185 void WebPageProxy::updateVisibleContentRects(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate)185 void WebPageProxy::updateVisibleContentRects(const VisibleContentRectUpdateInfo& visibleContentRectUpdate) 186 186 { 187 187 if (!isValid()) 188 188 return; 189 189 190 VisibleContentRectUpdateInfo visibleContentRectUpdateInfo(exposedRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, customFixedPositionRect, obscuredInset, scale, inStableState, isChangingObscuredInsetsInteractively, allowShrinkToFit, timestamp, horizontalVelocity, verticalVelocity, scaleChangeRate, downcast<RemoteLayerTreeDrawingAreaProxy>(*drawingArea()).lastCommittedLayerTreeTransactionID()); 191 192 if (visibleContentRectUpdateInfo == m_lastVisibleContentRectUpdate) 193 return; 194 195 m_lastVisibleContentRectUpdate = visibleContentRectUpdateInfo; 196 m_process->send(Messages::ViewUpdateDispatcher::VisibleContentRectUpdate(m_pageID, visibleContentRectUpdateInfo), 0); 190 if (visibleContentRectUpdate == m_lastVisibleContentRectUpdate) 191 return; 192 193 m_lastVisibleContentRectUpdate = visibleContentRectUpdate; 194 m_process->send(Messages::ViewUpdateDispatcher::VisibleContentRectUpdate(m_pageID, visibleContentRectUpdate), 0); 197 195 } 198 196 -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
r200390 r200470 260 260 #if PLATFORM(IOS) 261 261 FloatPoint tiledMapLocation = m_webPageProxy.unobscuredContentRect().location(); 262 tiledMapLocation = tiledMapLocation.expandedTo(m_webPageProxy.exposedContentRect().location() + FloatSize(0, 60)); 263 262 264 float absoluteInset = indicatorInset / m_webPageProxy.displayedContentScale(); 263 265 tiledMapLocation += FloatSize(absoluteInset, absoluteInset); -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r200390 r200470 2967 2967 2968 2968 frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredContentRect().size()); 2969 frameView.platformSetObscuredInset(visibleContentRectUpdateInfo.obscuredInset()); 2969 m_page->setObscuredInset(visibleContentRectUpdateInfo.obscuredInset()); 2970 m_page->setEnclosedInScrollableAncestorView(visibleContentRectUpdateInfo.enclosedInScrollableAncestorView()); 2970 2971 2971 2972 double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
Note: See TracChangeset
for help on using the changeset viewer.