Changeset 167286 in webkit
- Timestamp:
- Apr 14, 2014, 5:47:46 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r167285 r167286 1 2014-04-14 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (WebKit2): Programmatic scrolls in overflow-scrolling:touch don't work 4 https://bugs.webkit.org/show_bug.cgi?id=131649 5 6 Reviewed by Tim Horton. 7 8 Update the UIScrollView's contentOffset when we're told that the scroll position 9 changed. 10 11 Also refactor slightly to have a single exception-protected block. 12 13 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: 14 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): 15 1 16 2014-04-14 Tim Horton <timothy_horton@apple.com> 2 17 -
trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
r166531 r167286 116 116 const auto& scrollingStateNode = toScrollingStateScrollingNode(stateNode); 117 117 118 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollLayer)) { 118 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollLayer) 119 || scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::TotalContentsSize) 120 || scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition)) { 119 121 BEGIN_BLOCK_OBJC_EXCEPTIONS 120 122 UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; 121 123 ASSERT([scrollView isKindOfClass:[UIScrollView self]]); 122 124 123 if (!m_scrollViewDelegate) 124 m_scrollViewDelegate = adoptNS([[WKOverflowScrollViewDelegate alloc] initWithScrollingTreeNode:this]); 125 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollLayer)) { 126 if (!m_scrollViewDelegate) 127 m_scrollViewDelegate = adoptNS([[WKOverflowScrollViewDelegate alloc] initWithScrollingTreeNode:this]); 125 128 126 scrollView.delegate = m_scrollViewDelegate.get(); 127 END_BLOCK_OBJC_EXCEPTIONS 128 } 129 scrollView.delegate = m_scrollViewDelegate.get(); 130 } 129 131 130 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::TotalContentsSize)) { 131 BEGIN_BLOCK_OBJC_EXCEPTIONS 132 UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate]; 133 ASSERT([scrollView isKindOfClass:[UIScrollView self]]); 132 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::TotalContentsSize)) 133 scrollView.contentSize = scrollingStateNode.totalContentsSize(); 134 134 135 scrollView.contentSize = scrollingStateNode.totalContentsSize(); 135 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition)) 136 scrollView.contentOffset = scrollingStateNode.scrollPosition(); 136 137 137 138 END_BLOCK_OBJC_EXCEPTIONS
Note:
See TracChangeset
for help on using the changeset viewer.