Diff
Modified: trunk/Source/WebCore/ChangeLog (194441 => 194442)
--- trunk/Source/WebCore/ChangeLog 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/ChangeLog 2015-12-30 05:02:31 UTC (rev 194442)
@@ -1,5 +1,50 @@
2015-12-29 Simon Fraser <[email protected]>
+ Rename "scrollOffsetForFixedPosition" and related functions to refer to scrollPosition
+ https://bugs.webkit.org/show_bug.cgi?id=152590
+
+ Reviewed by Zalan Bujtas.
+
+ FrameView::scrollOffsetForFixedPosition() actually returned a scroll position
+ (possibly negative for RTL content), not a scroll offset, so rename it and related
+ functions.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::fixedScrollableAreaBoundsInflatedForScrolling):
+ (WebCore::FrameView::scrollPositionRespectingCustomFixedPosition):
+ (WebCore::FrameView::viewportConstrainedVisibleContentRect):
+ (WebCore::FrameView::scrollPositionForFixedPosition):
+ (WebCore::FrameView::scrollOffsetRespectingCustomFixedPosition): Deleted.
+ (WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
+ * page/FrameView.h:
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::timeToNextService):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::scrollWasUpdated):
+ * page/scrolling/AsyncScrollingCoordinator.cpp:
+ (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
+ * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
+ (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
+ * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+ (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
+ (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::calculateClipRects):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGeometry):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::mapLocalToContainer):
+ (WebCore::RenderView::pushMappingToContainer):
+ (WebCore::RenderView::mapAbsoluteToLocalPoint):
+ (WebCore::RenderView::computeRectForRepaint):
+
+2015-12-29 Simon Fraser <[email protected]>
+
Fix the Windows build.
* page/win/FrameCGWin.cpp:
Modified: trunk/Source/WebCore/page/FrameView.cpp (194441 => 194442)
--- trunk/Source/WebCore/page/FrameView.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/page/FrameView.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -1078,20 +1078,20 @@
LayoutRect FrameView::fixedScrollableAreaBoundsInflatedForScrolling(const LayoutRect& uninflatedBounds) const
{
- LayoutSize scrollPosition = scrollOffsetRespectingCustomFixedPosition();
+ LayoutPoint scrollPosition = scrollPositionRespectingCustomFixedPosition();
- LayoutSize topLeftExpansion = scrollPosition - toLayoutSize(minimumScrollPosition());
- LayoutSize bottomRightExpansion = toLayoutSize(maximumScrollPosition()) - scrollPosition;
+ LayoutSize topLeftExpansion = scrollPosition - minimumScrollPosition();
+ LayoutSize bottomRightExpansion = maximumScrollPosition() - scrollPosition;
return LayoutRect(uninflatedBounds.location() - topLeftExpansion, uninflatedBounds.size() + topLeftExpansion + bottomRightExpansion);
}
-LayoutSize FrameView::scrollOffsetRespectingCustomFixedPosition() const
+LayoutPoint FrameView::scrollPositionRespectingCustomFixedPosition() const
{
#if PLATFORM(IOS)
- return useCustomFixedPositionLayoutRect() ? customFixedPositionLayoutRect().location() - LayoutPoint() : toLayoutSize(scrollPosition());
+ return useCustomFixedPositionLayoutRect() ? customFixedPositionLayoutRect().location() : scrollPosition();
#else
- return scrollOffsetForFixedPosition();
+ return scrollPositionForFixedPosition();
#endif
}
@@ -1733,7 +1733,7 @@
#endif
LayoutRect viewportRect = visibleContentRect();
- viewportRect.setLocation(toLayoutPoint(scrollOffsetForFixedPosition()));
+ viewportRect.setLocation(scrollPositionForFixedPosition());
return viewportRect;
}
@@ -1742,7 +1742,7 @@
return frame().frameScaleFactor();
}
-LayoutSize FrameView::scrollOffsetForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements behaviorForFixed, int headerHeight, int footerHeight)
+LayoutPoint FrameView::scrollPositionForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements behaviorForFixed, int headerHeight, int footerHeight)
{
LayoutPoint position;
if (behaviorForFixed == StickToDocumentBounds)
@@ -1757,7 +1757,7 @@
float dragFactorX = (fixedElementsLayoutRelativeToFrame || !maxSize.width()) ? 1 : (totalContentsSize.width() - visibleContentRect.width() * frameScaleFactor) / maxSize.width();
float dragFactorY = (fixedElementsLayoutRelativeToFrame || !maxSize.height()) ? 1 : (totalContentsSize.height() - visibleContentRect.height() * frameScaleFactor) / maxSize.height();
- return LayoutSize(position.x() * dragFactorX / frameScaleFactor, position.y() * dragFactorY / frameScaleFactor);
+ return LayoutPoint(position.x() * dragFactorX / frameScaleFactor, position.y() * dragFactorY / frameScaleFactor);
}
float FrameView::yPositionForInsetClipLayer(const FloatPoint& scrollPosition, float topContentInset)
Modified: trunk/Source/WebCore/page/FrameView.h (194441 => 194442)
--- trunk/Source/WebCore/page/FrameView.h 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/page/FrameView.h 2015-12-30 05:02:31 UTC (rev 194442)
@@ -278,13 +278,13 @@
// Functions for querying the current scrolled position, negating the effects of overhang
// and adjusting for page scale.
- LayoutSize scrollOffsetForFixedPosition() const
+ LayoutPoint scrollPositionForFixedPosition() const
{
- return scrollOffsetForFixedPosition(visibleContentRect(), totalContentsSize(), scrollPosition(), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), scrollBehaviorForFixedElements(), headerHeight(), footerHeight());
+ return scrollPositionForFixedPosition(visibleContentRect(), totalContentsSize(), scrollPosition(), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), scrollBehaviorForFixedElements(), headerHeight(), footerHeight());
}
// Static function can be called from another thread.
- static LayoutSize scrollOffsetForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements, int headerHeight, int footerHeight);
+ static LayoutPoint scrollPositionForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements, int headerHeight, int footerHeight);
// These layers are positioned differently when there is a topContentInset, a header, or a footer. These value need to be computed
// on both the main thread and the scrolling thread.
@@ -496,7 +496,7 @@
#endif
LayoutRect fixedScrollableAreaBoundsInflatedForScrolling(const LayoutRect& uninflatedBounds) const;
- LayoutSize scrollOffsetRespectingCustomFixedPosition() const;
+ LayoutPoint scrollPositionRespectingCustomFixedPosition() const;
virtual int headerHeight() const override { return m_headerHeight; }
WEBCORE_EXPORT void setHeaderHeight(int);
Modified: trunk/Source/WebCore/page/animation/AnimationBase.cpp (194441 => 194442)
--- trunk/Source/WebCore/page/animation/AnimationBase.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/page/animation/AnimationBase.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -564,9 +564,9 @@
#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
if (m_animation->trigger()->isScrollAnimationTrigger()) {
if (m_object) {
- float currentScrollOffset = m_object->view().frameView().scrollOffsetForFixedPosition().height().toFloat();
+ float currentScrollPosition = m_object->view().frameView().scrollPositionForFixedPosition().y().toFloat();
ScrollAnimationTrigger& scrollTrigger = downcast<ScrollAnimationTrigger>(*m_animation->trigger().get());
- if (currentScrollOffset >= scrollTrigger.startValue().value() && (!scrollTrigger.hasEndValue() || currentScrollOffset <= scrollTrigger.endValue().value()))
+ if (currentScrollPosition >= scrollTrigger.startValue().value() && (!scrollTrigger.hasEndValue() || currentScrollPosition <= scrollTrigger.endValue().value()))
return 0;
}
return -1;
Modified: trunk/Source/WebCore/page/animation/AnimationController.cpp (194441 => 194442)
--- trunk/Source/WebCore/page/animation/AnimationController.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/page/animation/AnimationController.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -559,8 +559,9 @@
auto* view = m_frame.view();
if (!view || !wantsScrollUpdates())
return;
- m_scrollPosition = view->scrollOffsetForFixedPosition().height().toFloat();
+ m_scrollPosition = view->scrollPositionForFixedPosition().y().toFloat();
+
// FIXME: This is updating all the animations, rather than just the ones
// that are dependent on scroll. We to go from our AnimationBase to its CompositeAnimation
// so we can execute code similar to updateAnimations.
Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (194441 => 194442)
--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -319,20 +319,20 @@
GraphicsLayer* scrolledContentsLayer = rootContentLayerForFrameView(frameView);
GraphicsLayer* headerLayer = headerLayerForFrameView(frameView);
GraphicsLayer* footerLayer = footerLayerForFrameView(frameView);
- LayoutSize scrollOffsetForFixed = frameView.scrollOffsetForFixedPosition();
+ LayoutPoint scrollPositionForFixed = frameView.scrollPositionForFixedPosition();
float topContentInset = frameView.topContentInset();
FloatPoint positionForInsetClipLayer = FloatPoint(0, FrameView::yPositionForInsetClipLayer(scrollPosition, topContentInset));
FloatPoint positionForContentsLayer = FloatPoint(scrolledContentsLayer->position().x(),
FrameView::yPositionForRootContentLayer(scrollPosition, topContentInset, frameView.headerHeight()));
- FloatPoint positionForHeaderLayer = FloatPoint(scrollOffsetForFixed.width(), FrameView::yPositionForHeaderLayer(scrollPosition, topContentInset));
- FloatPoint positionForFooterLayer = FloatPoint(scrollOffsetForFixed.width(),
+ FloatPoint positionForHeaderLayer = FloatPoint(scrollPositionForFixed.x(), FrameView::yPositionForHeaderLayer(scrollPosition, topContentInset));
+ FloatPoint positionForFooterLayer = FloatPoint(scrollPositionForFixed.x(),
FrameView::yPositionForFooterLayer(scrollPosition, topContentInset, frameView.totalContentsSize().height(), frameView.footerHeight()));
if (programmaticScroll || scrollingLayerPositionAction == SetScrollingLayerPosition) {
scrollLayer->setPosition(-frameView.scrollPosition());
if (counterScrollingLayer)
- counterScrollingLayer->setPosition(toLayoutPoint(scrollOffsetForFixed));
+ counterScrollingLayer->setPosition(scrollPositionForFixed);
if (insetClipLayer)
insetClipLayer->setPosition(positionForInsetClipLayer);
if (contentShadowLayer)
@@ -346,7 +346,7 @@
} else {
scrollLayer->syncPosition(-frameView.scrollPosition());
if (counterScrollingLayer)
- counterScrollingLayer->syncPosition(toLayoutPoint(scrollOffsetForFixed));
+ counterScrollingLayer->syncPosition(scrollPositionForFixed);
if (insetClipLayer)
insetClipLayer->syncPosition(positionForInsetClipLayer);
if (contentShadowLayer)
Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm (194441 => 194442)
--- trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm 2015-12-30 05:02:31 UTC (rev 194442)
@@ -148,17 +148,17 @@
ScrollBehaviorForFixedElements behaviorForFixed = scrollBehaviorForFixedElements();
FloatPoint scrollOffset = scrollPosition - toIntSize(scrollOrigin());
FloatRect viewportRect(FloatPoint(), scrollableAreaSize());
- FloatSize scrollOffsetForFixedChildren = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollOffset), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight());
+ FloatPoint scrollPositionForFixedChildren = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollOffset), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight());
- [m_counterScrollingLayer setPosition:FloatPoint(scrollOffsetForFixedChildren)];
+ [m_counterScrollingLayer setPosition:scrollPositionForFixedChildren];
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()
- // then we should recompute scrollOffsetForFixedChildren for the banner with a scale factor of 1.
- float horizontalScrollOffsetForBanner = scrollOffsetForFixedChildren.width();
+ // then we should recompute scrollPositionForFixedChildren for the banner with a scale factor of 1.
+ float horizontalScrollOffsetForBanner = scrollPositionForFixedChildren.x();
if (frameScaleFactor() != 1)
- horizontalScrollOffsetForBanner = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollOffset), scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).width();
+ horizontalScrollOffsetForBanner = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollOffset), scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).x();
if (m_headerLayer)
[m_headerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, 0)];
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (194441 => 194442)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm 2015-12-30 05:02:31 UTC (rev 194442)
@@ -403,11 +403,11 @@
LayoutPoint scrollOffset = LayoutPoint(position) - toLayoutSize(scrollOrigin());
FloatRect viewportRect(FloatPoint(), scrollableAreaSize());
- FloatSize scrollOffsetForFixedChildren = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), scrollOffset, scrollOrigin(), frameScaleFactor(),
+ FloatPoint scrollPositionForFixedChildren = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), scrollOffset, scrollOrigin(), frameScaleFactor(),
fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight());
if (m_counterScrollingLayer)
- m_counterScrollingLayer.get().position = FloatPoint(scrollOffsetForFixedChildren);
+ m_counterScrollingLayer.get().position = scrollPositionForFixedChildren;
float topContentInset = this->topContentInset();
if (m_insetClipLayer && m_scrolledContentsLayer && topContentInset) {
@@ -422,9 +422,9 @@
// 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()
// then we should recompute scrollOffsetForFixedChildren for the banner with a scale factor of 1.
- float horizontalScrollOffsetForBanner = scrollOffsetForFixedChildren.width();
+ float horizontalScrollOffsetForBanner = scrollPositionForFixedChildren.x();
if (frameScaleFactor() != 1)
- horizontalScrollOffsetForBanner = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), scrollOffset, scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).width();
+ horizontalScrollOffsetForBanner = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), scrollOffset, scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).x();
if (m_headerLayer)
m_headerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, FrameView::yPositionForHeaderLayer(position, topContentInset));
@@ -459,7 +459,7 @@
if (!m_children)
return;
- viewportRect.setLocation(FloatPoint() + scrollOffsetForFixedChildren);
+ viewportRect.setLocation(scrollPositionForFixedChildren);
for (auto& child : *m_children)
child->updateLayersAfterAncestorChange(*this, viewportRect, FloatSize());
Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp (194441 => 194442)
--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -294,7 +294,6 @@
if (!m_videoDisplay)
return;
- LayoutSize scrollOffset;
IntPoint positionInWindow(m_lastPaintRect.location());
FrameView* view = nullptr;
@@ -304,12 +303,13 @@
deviceScaleFactor = m_player->cachedResourceLoader()->document()->deviceScaleFactor();
}
+ LayoutPoint scrollPosition;
if (view) {
- scrollOffset = view->scrollOffsetForFixedPosition();
+ scrollPosition = view->scrollPositionForFixedPosition();
positionInWindow = view->convertToContainingWindow(IntPoint(m_lastPaintRect.location()));
}
- positionInWindow.move(-scrollOffset.width().toInt(), -scrollOffset.height().toInt());
+ positionInWindow.move(-scrollPosition.x().toInt(), -scrollPosition.y().toInt());
int x = positionInWindow.x() * deviceScaleFactor;
int y = positionInWindow.y() * deviceScaleFactor;
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (194441 => 194442)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -1111,9 +1111,9 @@
viewportRect.setLocation(LayoutPoint(0, -topContentInset));
}
} else if (useFixedLayout || frameView.frameScaleFactor() != 1) {
- // scrollOffsetForFixedPosition() is adjusted for page scale and it does not include
+ // scrollPositionForFixedPosition() is adjusted for page scale and it does not include
// topContentInset so do not add it to the calculation below.
- viewportRect.setLocation(toLayoutPoint(frameView.scrollOffsetForFixedPosition()));
+ viewportRect.setLocation(frameView.scrollPositionForFixedPosition());
} else {
// documentScrollOffsetRelativeToViewOrigin() includes -topContentInset in its height
// so we need to account for that in calculating the phase size
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (194441 => 194442)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -5504,7 +5504,7 @@
// clipRects are needed in view space.
LayoutPoint offset(renderer().localToContainerPoint(FloatPoint(), &clipRectsContext.rootLayer->renderer()));
if (clipRects.fixed() && &clipRectsContext.rootLayer->renderer() == &renderer().view())
- offset -= renderer().view().frameView().scrollOffsetForFixedPosition();
+ offset -= toLayoutSize(renderer().view().frameView().scrollPositionForFixedPosition());
if (renderer().hasOverflowClip()) {
ClipRect newOverflowClip = downcast<RenderBox>(renderer()).overflowClipRectForChildLayers(offset, currentRenderNamedFlowFragment(), clipRectsContext.overlayScrollbarSizeRelevancy);
@@ -5568,7 +5568,7 @@
// Note: infinite clipRects should not be scrolled here, otherwise they will accidentally no longer be considered infinite.
if (parentRects.fixed() && &clipRectsContext.rootLayer->renderer() == &view && !backgroundClipRect.isInfinite())
- backgroundClipRect.move(view.frameView().scrollOffsetForFixedPosition());
+ backgroundClipRect.moveBy(view.frameView().scrollPositionForFixedPosition());
return backgroundClipRect;
}
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (194441 => 194442)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -924,7 +924,7 @@
FloatSize backgroundSize = contentsSize;
if (backgroundLayerPaintsFixedRootBackground()) {
const FrameView& frameView = renderer().view().frameView();
- backgroundPosition = toLayoutPoint(frameView.scrollOffsetForFixedPosition());
+ backgroundPosition = frameView.scrollPositionForFixedPosition();
backgroundSize = frameView.layoutSize();
}
m_backgroundLayer->setPosition(backgroundPosition);
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (194441 => 194442)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -1769,7 +1769,7 @@
m_scrollLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
if (GraphicsLayer* fixedBackgroundLayer = fixedRootBackgroundLayer())
- fixedBackgroundLayer->setPosition(toLayoutPoint(frameView.scrollOffsetForFixedPosition()));
+ fixedBackgroundLayer->setPosition(frameView.scrollPositionForFixedPosition());
}
FloatPoint RenderLayerCompositor::positionForClipLayer() const
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (194441 => 194442)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2015-12-30 04:49:47 UTC (rev 194441)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2015-12-30 05:02:31 UTC (rev 194442)
@@ -441,7 +441,7 @@
}
if (mode & IsFixed)
- transformState.move(frameView().scrollOffsetRespectingCustomFixedPosition());
+ transformState.move(toLayoutSize(frameView().scrollPositionRespectingCustomFixedPosition()));
}
const RenderObject* RenderView::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
@@ -450,14 +450,14 @@
// then we should have found it by now.
ASSERT_ARG(ancestorToStopAt, !ancestorToStopAt || ancestorToStopAt == this);
- LayoutSize scrollOffset = frameView().scrollOffsetRespectingCustomFixedPosition();
+ LayoutPoint scrollPosition = frameView().scrollPositionRespectingCustomFixedPosition();
if (!ancestorToStopAt && shouldUseTransformFromContainer(nullptr)) {
TransformationMatrix t;
getTransformFromContainer(nullptr, LayoutSize(), t);
- geometryMap.pushView(this, scrollOffset, &t);
+ geometryMap.pushView(this, toLayoutSize(scrollPosition), &t);
} else
- geometryMap.pushView(this, scrollOffset);
+ geometryMap.pushView(this, toLayoutSize(scrollPosition));
return nullptr;
}
@@ -465,7 +465,7 @@
void RenderView::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
{
if (mode & IsFixed)
- transformState.move(frameView().scrollOffsetRespectingCustomFixedPosition());
+ transformState.move(toLayoutSize(frameView().scrollPositionRespectingCustomFixedPosition()));
if (mode & UseTransforms && shouldUseTransformFromContainer(nullptr)) {
TransformationMatrix t;
@@ -696,10 +696,9 @@
adjustedRect.setX(viewWidth() - adjustedRect.maxX());
}
- if (fixed) {
- adjustedRect.move(frameView().scrollOffsetRespectingCustomFixedPosition());
- }
-
+ if (fixed)
+ adjustedRect.moveBy(frameView().scrollPositionRespectingCustomFixedPosition());
+
// Apply our transform if we have one (because of full page zooming).
if (!repaintContainer && layer() && layer()->transform())
adjustedRect = LayoutRect(layer()->transform()->mapRect(snapRectToDevicePixels(adjustedRect, document().deviceScaleFactor())));