| Index: cc/CCLayerImpl.cpp
|
| ===================================================================
|
| --- cc/CCLayerImpl.cpp (revision 156389)
|
| +++ cc/CCLayerImpl.cpp (working copy)
|
| @@ -48,6 +48,7 @@
|
| , m_isContainerForFixedPositionLayers(false)
|
| , m_fixedToContainerLayer(false)
|
| , m_pageScaleDelta(1)
|
| + , m_pageScaleFactor(1)
|
| , m_renderTarget(0)
|
| , m_drawDepth(0)
|
| , m_drawOpacity(0)
|
| @@ -159,20 +160,23 @@
|
| return 0;
|
| }
|
|
|
| -void CCLayerImpl::scrollBy(const FloatSize& scroll)
|
| +FloatSize CCLayerImpl::scrollBy(const FloatSize& scroll)
|
| {
|
| IntSize minDelta = -toSize(m_scrollPosition);
|
| IntSize maxDelta = m_maxScrollPosition - toSize(m_scrollPosition);
|
| // Clamp newDelta so that position + delta stays within scroll bounds.
|
| FloatSize newDelta = (m_scrollDelta + scroll).expandedTo(minDelta).shrunkTo(maxDelta);
|
| + FloatSize unscrolled = m_scrollDelta + scroll - newDelta;
|
|
|
| if (m_scrollDelta == newDelta)
|
| - return;
|
| + return unscrolled;
|
|
|
| m_scrollDelta = newDelta;
|
| if (m_scrollbarAnimationController)
|
| m_scrollbarAnimationController->updateScrollOffset(this);
|
| noteLayerPropertyChangedForSubtree();
|
| +
|
| + return unscrolled;
|
| }
|
|
|
| CCInputHandlerClient::ScrollStatus CCLayerImpl::tryScroll(const IntPoint& viewportPoint, CCInputHandlerClient::ScrollInputType type) const
|
| @@ -558,6 +562,15 @@
|
| noteLayerPropertyChangedForSubtree();
|
| }
|
|
|
| +void CCLayerImpl::setLocalOffset(const FloatSize& offset)
|
| +{
|
| + if (m_localOffset == offset)
|
| + return;
|
| +
|
| + m_localOffset = offset;
|
| + noteLayerPropertyChangedForSubtree();
|
| +}
|
| +
|
| void CCLayerImpl::setPageScaleDelta(float pageScaleDelta)
|
| {
|
| if (m_pageScaleDelta == pageScaleDelta)
|
|
|