Changeset 169064 in webkit
- Timestamp:
- May 19, 2014, 2:02:24 PM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/ios/WKContentView.mm (modified) (1 diff)
-
WebProcess/WebPage/ios/WebPageIOS.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r169063 r169064 1 2014-05-19 Benjamin Poulain <bpoulain@apple.com> 2 3 [iOS][WK2] Move scale noise filtering to the WebProcess 4 https://bugs.webkit.org/show_bug.cgi?id=133021 5 6 Reviewed by Darin Adler. 7 8 Filtering in the UIProcess was stupid. It forces to handle a third kind of scale just for updates. 9 10 The WebProcess already adjusts the input scale based on the viewport. Changing the input scale at that level 11 is already supported. It is a better place to have the filtering. 12 13 * UIProcess/ios/WKContentView.mm: 14 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): 15 * WebProcess/WebPage/ios/WebPageIOS.mm: 16 (WebKit::WebPage::updateVisibleContentRects): 17 1 18 2014-05-19 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm
r168920 r169064 303 303 _historicalKinematicData.clear(); 304 304 305 double scaleNoiseThreshold = 0.0005;306 CGFloat filteredScale = zoomScale;307 if (!isStableState && fabs(filteredScale - _page->displayedContentScale()) < scaleNoiseThreshold) {308 // Tiny changes of scale during interactive zoom cause content to jump by one pixel, creating309 // visual noise. We filter those useless updates.310 filteredScale = _page->displayedContentScale();311 }312 313 305 FloatRect fixedPositionRectForLayout = _page->computeCustomFixedPositionRect(unobscuredRect, zoomScale, WebPageProxy::UnobscuredRectConstraint::ConstrainedToDocumentRect); 314 306 _page->updateVisibleContentRects(VisibleContentRectUpdateInfo(_page->nextVisibleContentRectUpdateID(), visibleRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, fixedPositionRectForLayout, 315 filteredScale, isStableState, isChangingObscuredInsetsInteractively, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate));307 zoomScale, isStableState, isChangingObscuredInsetsInteractively, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate)); 316 308 317 309 RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page->scrollingCoordinatorProxy(); -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r168982 r169064 2204 2204 m_lastVisibleContentRectUpdateID = visibleContentRectUpdateInfo.updateID(); 2205 2205 2206 double boundedScale = std::min(m_viewportConfiguration.maximumScale(), std::max(m_viewportConfiguration.minimumScale(), visibleContentRectUpdateInfo.scale())); 2206 double scaleNoiseThreshold = 0.005; 2207 double filteredScale = visibleContentRectUpdateInfo.scale(); 2208 double currentScale = m_page->pageScaleFactor(); 2209 if (!visibleContentRectUpdateInfo.inStableState() && fabs(filteredScale - m_page->pageScaleFactor()) < scaleNoiseThreshold) { 2210 // Tiny changes of scale during interactive zoom cause content to jump by one pixel, creating 2211 // visual noise. We filter those useless updates. 2212 filteredScale = currentScale; 2213 } 2214 2215 double boundedScale = std::min(m_viewportConfiguration.maximumScale(), std::max(m_viewportConfiguration.minimumScale(), filteredScale)); 2207 2216 2208 2217 FloatRect exposedRect = visibleContentRectUpdateInfo.exposedRect(); … … 2215 2224 float floatBoundedScale = boundedScale; 2216 2225 bool hasSetPageScale = false; 2217 if (floatBoundedScale != m_page->pageScaleFactor()) {2226 if (floatBoundedScale != currentScale) { 2218 2227 m_scaleWasSetByUIProcess = true; 2219 2228
Note:
See TracChangeset
for help on using the changeset viewer.