Modified: trunk/Source/WebCore/ChangeLog (165665 => 165666)
--- trunk/Source/WebCore/ChangeLog 2014-03-15 00:35:48 UTC (rev 165665)
+++ trunk/Source/WebCore/ChangeLog 2014-03-15 01:03:02 UTC (rev 165666)
@@ -1,3 +1,17 @@
+2014-03-14 Simon Fraser <simon.fra...@apple.com>
+
+ [iOS WK2] background-attachment: fixed renders oddly, moves around
+ https://bugs.webkit.org/show_bug.cgi?id=130277
+ <rdar://problem/16332883>
+
+ Reviewed by Tim Horton.
+
+ If we have a counter-scrolling layer (for a fixed background), move
+ it around when changing the viewport.
+
+ * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
+ (WebCore::ScrollingTreeScrollingNodeIOS::updateForViewport):
+
2014-03-14 Jae Hyun Park <jaep...@webkit.org>
[Texmap] Remove duplicated code in TextureMapperLayer
Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm (165665 => 165666)
--- trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm 2014-03-15 00:35:48 UTC (rev 165665)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm 2014-03-15 01:03:02 UTC (rev 165666)
@@ -132,7 +132,7 @@
void ScrollingTreeScrollingNodeIOS::setScrollLayerPosition(const FloatPoint& position)
{
ASSERT(!shouldUpdateScrollLayerPositionSynchronously());
- m_scrollLayer.get().position = CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y());
+ [m_scrollLayer setPosition:CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y())];
ScrollBehaviorForFixedElements behaviorForFixed = scrollBehaviorForFixedElements();
FloatPoint scrollOffset = position - toIntSize(scrollOrigin());
@@ -140,9 +140,9 @@
// FIXME: scrollOffsetForFixedPosition() needs to do float math.
FloatSize scrollOffsetForFixedChildren = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), totalContentsSize(), flooredIntPoint(scrollOffset), scrollOrigin(), frameScaleFactor(), false, behaviorForFixed, headerHeight(), footerHeight());
- if (m_counterScrollingLayer)
- m_counterScrollingLayer.get().position = FloatPoint(scrollOffsetForFixedChildren);
+ [m_counterScrollingLayer setPosition:FloatPoint(scrollOffsetForFixedChildren)];
+
if (m_headerLayer || m_footerLayer) {
// Generally the banners should have the same horizontal-position computation as a fixed element. However,
// the banners are not affected by the frameScaleFactor(), so if there is currently a non-1 frameScaleFactor()
@@ -152,10 +152,10 @@
horizontalScrollOffsetForBanner = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), totalContentsSize(), flooredIntPoint(scrollOffset), scrollOrigin(), 1, false, behaviorForFixed, headerHeight(), footerHeight()).width();
if (m_headerLayer)
- m_headerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, 0);
+ [m_headerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, 0)];
if (m_footerLayer)
- m_footerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight());
+ [m_footerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight())];
}
if (!m_children)
@@ -172,6 +172,8 @@
void ScrollingTreeScrollingNodeIOS::updateForViewport(const FloatRect& viewportRect, double scale)
{
+ [m_counterScrollingLayer setPosition:viewportRect.location()];
+
if (!m_children)
return;
Modified: trunk/Source/WebKit2/ChangeLog (165665 => 165666)
--- trunk/Source/WebKit2/ChangeLog 2014-03-15 00:35:48 UTC (rev 165665)
+++ trunk/Source/WebKit2/ChangeLog 2014-03-15 01:03:02 UTC (rev 165666)
@@ -1,3 +1,17 @@
+2014-03-14 Simon Fraser <simon.fra...@apple.com>
+
+ [iOS WK2] background-attachment: fixed renders oddly, moves around
+ https://bugs.webkit.org/show_bug.cgi?id=130277
+ <rdar://problem/16332883>
+
+ Reviewed by Tim Horton.
+
+ Actually send scrolling and counter-scrolling layers to the UI process!
+
+ * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
+ (ArgumentCoder<ScrollingStateScrollingNode>::encode):
+ (ArgumentCoder<ScrollingStateScrollingNode>::decode):
+
2014-03-14 Anders Carlsson <ander...@apple.com>
Try to fix the iOS build.
Modified: trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp (165665 => 165666)
--- trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp 2014-03-15 00:35:48 UTC (rev 165665)
+++ trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp 2014-03-15 01:03:02 UTC (rev 165666)
@@ -122,6 +122,12 @@
SCROLLING_NODE_ENCODE(RequestedScrollPosition, requestedScrollPositionRepresentsProgrammaticScroll)
SCROLLING_NODE_ENCODE(HeaderHeight, headerHeight)
SCROLLING_NODE_ENCODE(FooterHeight, footerHeight)
+
+ if (node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
+ encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer());
+
+ if (node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer))
+ encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.counterScrollingLayer());
}
#define SCROLLING_NODE_DECODE(property, type, setter) \
@@ -171,6 +177,20 @@
SCROLLING_NODE_DECODE(HeaderHeight, int, setHeaderHeight);
SCROLLING_NODE_DECODE(FooterHeight, int, setFooterHeight);
+ if (node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) {
+ GraphicsLayer::PlatformLayerID layerID;
+ if (!decoder.decode(layerID))
+ return false;
+ node.setScrolledContentsLayer(layerID);
+ }
+
+ if (node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer)) {
+ GraphicsLayer::PlatformLayerID layerID;
+ if (!decoder.decode(layerID))
+ return false;
+ node.setCounterScrollingLayer(layerID);
+ }
+
return true;
}