Changeset 218374 in webkit
- Timestamp:
- Jun 15, 2017, 6:43:27 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r218343 r218374 1 2017-06-15 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] YouTube videos flash at the wrong place at the end of rotation 4 https://bugs.webkit.org/show_bug.cgi?id=173445 5 rdar://problem/31584852 6 7 Reviewed by Tim Horton. 8 9 In MobileSafari where WKWebView rotation uses _dynamicViewportUpdateModes, we could do a 10 visibleContentRect update at the end of rotation which computed a bad layoutViewportRect, 11 because it used a m_baseLayoutViewportSize from the old orientation. 12 13 We have actually sent a new m_baseLayoutViewportSize to the UI process by this point in 14 a layer tree commit, but _didCommitLayerTree: ignored it because we had a _dynamicViewportUpdateMode. 15 16 Fix is to always update the layout viewport data from the web process, since during dynamic 17 viewport updates, we still need these data to compute rectangles sent back to the web process via 18 visible content rect updates. 19 20 * UIProcess/API/Cocoa/WKWebView.mm: 21 (-[WKWebView _didCommitLayerTree:]): 22 * UIProcess/ios/WebPageProxyIOS.mm: 23 (WebKit::WebPageProxy::computeCustomFixedPositionRect): 24 (WebKit::WebPageProxy::updateLayoutViewportParameters): Cleanup. 25 1 26 2017-06-15 Wenson Hsieh <wenson_hsieh@apple.com> 2 27 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r218144 r218374 1479 1479 LOG_WITH_STREAM(VisibleRects, stream << "-[WKWebView _didCommitLayerTree:] transactionID " << layerTreeTransaction.transactionID() << " _dynamicViewportUpdateMode " << (int)_dynamicViewportUpdateMode); 1480 1480 1481 BOOL needUpdateVisbleContentRects = _page->updateLayoutViewportParameters(layerTreeTransaction); 1482 1481 1483 if (_dynamicViewportUpdateMode != DynamicViewportUpdateMode::NotResizing) { 1482 1484 if (_resizeAnimationTransformTransactionID && layerTreeTransaction.transactionID() >= _resizeAnimationTransformTransactionID.value()) { … … 1514 1516 _stableStatePresentationUpdateCallbacks = nil; 1515 1517 } 1516 1517 BOOL needUpdateVisbleContentRects = _page->updateLayoutViewportParameters(layerTreeTransaction);1518 1518 1519 1519 if (![_contentView _mayDisableDoubleTapGesturesDuringSingleTap]) -
trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
r216794 r218374 260 260 FloatSize constainedSize = isBelowMinimumScale ? constrainedUnobscuredRect.size() : unobscuredContentRect.size(); 261 261 FloatRect unobscuredContentRectForViewport = isBelowMinimumScale ? constrainedUnobscuredRect : unobscuredContentRectRespectingInputViewBounds; 262 262 263 263 FloatRect layoutViewportRect = FrameView::computeUpdatedLayoutViewportRect(LayoutRect(currentCustomFixedPositionRect), LayoutRect(documentRect), LayoutSize(constainedSize), LayoutRect(unobscuredContentRectForViewport), m_baseLayoutViewportSize, m_minStableLayoutViewportOrigin, m_maxStableLayoutViewportOrigin, constraint); 264 264 … … 405 405 bool WebPageProxy::updateLayoutViewportParameters(const WebKit::RemoteLayerTreeTransaction& layerTreeTransaction) 406 406 { 407 bool changed = m_baseLayoutViewportSize != layerTreeTransaction.baseLayoutViewportSize() 408 || m_minStableLayoutViewportOrigin != layerTreeTransaction.minStableLayoutViewportOrigin() 409 || m_maxStableLayoutViewportOrigin != layerTreeTransaction.maxStableLayoutViewportOrigin(); 407 if (m_baseLayoutViewportSize == layerTreeTransaction.baseLayoutViewportSize() 408 && m_minStableLayoutViewportOrigin == layerTreeTransaction.minStableLayoutViewportOrigin() 409 && m_maxStableLayoutViewportOrigin == layerTreeTransaction.maxStableLayoutViewportOrigin()) 410 return false; 410 411 411 412 m_baseLayoutViewportSize = layerTreeTransaction.baseLayoutViewportSize(); 412 413 m_minStableLayoutViewportOrigin = layerTreeTransaction.minStableLayoutViewportOrigin(); 413 414 m_maxStableLayoutViewportOrigin = layerTreeTransaction.maxStableLayoutViewportOrigin(); 414 415 return changed; 415 416 LOG_WITH_STREAM(VisibleRects, stream << "WebPageProxy::updateLayoutViewportParameters: baseLayoutViewportSize: " << m_baseLayoutViewportSize << " minStableLayoutViewportOrigin: " << m_minStableLayoutViewportOrigin << " maxStableLayoutViewportOrigin: " << m_maxStableLayoutViewportOrigin); 417 418 return true; 416 419 } 417 420
Note:
See TracChangeset
for help on using the changeset viewer.