Changeset 165666 in webkit
- Timestamp:
- Mar 14, 2014 6:03:02 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r165665 r165666 1 2014-03-14 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] background-attachment: fixed renders oddly, moves around 4 https://bugs.webkit.org/show_bug.cgi?id=130277 5 <rdar://problem/16332883> 6 7 Reviewed by Tim Horton. 8 9 If we have a counter-scrolling layer (for a fixed background), move 10 it around when changing the viewport. 11 12 * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm: 13 (WebCore::ScrollingTreeScrollingNodeIOS::updateForViewport): 14 1 15 2014-03-14 Jae Hyun Park <jaepark@webkit.org> 2 16 -
trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm
r165652 r165666 133 133 { 134 134 ASSERT(!shouldUpdateScrollLayerPositionSynchronously()); 135 m_scrollLayer.get().position = CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y());135 [m_scrollLayer setPosition:CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y())]; 136 136 137 137 ScrollBehaviorForFixedElements behaviorForFixed = scrollBehaviorForFixedElements(); … … 141 141 // FIXME: scrollOffsetForFixedPosition() needs to do float math. 142 142 FloatSize scrollOffsetForFixedChildren = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), totalContentsSize(), flooredIntPoint(scrollOffset), scrollOrigin(), frameScaleFactor(), false, behaviorForFixed, headerHeight(), footerHeight()); 143 if (m_counterScrollingLayer) 144 m_counterScrollingLayer.get().position = FloatPoint(scrollOffsetForFixedChildren);143 144 [m_counterScrollingLayer setPosition:FloatPoint(scrollOffsetForFixedChildren)]; 145 145 146 146 if (m_headerLayer || m_footerLayer) { … … 153 153 154 154 if (m_headerLayer) 155 m_headerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, 0);155 [m_headerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, 0)]; 156 156 157 157 if (m_footerLayer) 158 m_footerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight());158 [m_footerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight())]; 159 159 } 160 160 … … 173 173 void ScrollingTreeScrollingNodeIOS::updateForViewport(const FloatRect& viewportRect, double scale) 174 174 { 175 [m_counterScrollingLayer setPosition:viewportRect.location()]; 176 175 177 if (!m_children) 176 178 return; -
trunk/Source/WebKit2/ChangeLog
r165663 r165666 1 2014-03-14 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] background-attachment: fixed renders oddly, moves around 4 https://bugs.webkit.org/show_bug.cgi?id=130277 5 <rdar://problem/16332883> 6 7 Reviewed by Tim Horton. 8 9 Actually send scrolling and counter-scrolling layers to the UI process! 10 11 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: 12 (ArgumentCoder<ScrollingStateScrollingNode>::encode): 13 (ArgumentCoder<ScrollingStateScrollingNode>::decode): 14 1 15 2014-03-14 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp
r165493 r165666 123 123 SCROLLING_NODE_ENCODE(HeaderHeight, headerHeight) 124 124 SCROLLING_NODE_ENCODE(FooterHeight, footerHeight) 125 126 if (node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) 127 encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer()); 128 129 if (node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer)) 130 encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.counterScrollingLayer()); 125 131 } 126 132 … … 171 177 SCROLLING_NODE_DECODE(HeaderHeight, int, setHeaderHeight); 172 178 SCROLLING_NODE_DECODE(FooterHeight, int, setFooterHeight); 179 180 if (node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) { 181 GraphicsLayer::PlatformLayerID layerID; 182 if (!decoder.decode(layerID)) 183 return false; 184 node.setScrolledContentsLayer(layerID); 185 } 186 187 if (node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer)) { 188 GraphicsLayer::PlatformLayerID layerID; 189 if (!decoder.decode(layerID)) 190 return false; 191 node.setCounterScrollingLayer(layerID); 192 } 173 193 174 194 return true;
Note: See TracChangeset
for help on using the changeset viewer.