<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[194442] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/194442">194442</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2015-12-29 21:02:31 -0800 (Tue, 29 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>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):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCorepageanimationAnimationBasecpp">trunk/Source/WebCore/page/animation/AnimationBase.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationAnimationControllercpp">trunk/Source/WebCore/page/animation/AnimationController.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingTreeFrameScrollingNodeIOSmm">trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinMediaPlayerPrivateMediaFoundationcpp">trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,5 +1,50 @@
</span><span class="cx"> 2015-12-29 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><ins>+ 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 <simon.fraser@apple.com>
+
</ins><span class="cx"> Fix the Windows build.
</span><span class="cx">
</span><span class="cx"> * page/win/FrameCGWin.cpp:
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1078,20 +1078,20 @@
</span><span class="cx">
</span><span class="cx"> LayoutRect FrameView::fixedScrollableAreaBoundsInflatedForScrolling(const LayoutRect& uninflatedBounds) const
</span><span class="cx"> {
</span><del>- LayoutSize scrollPosition = scrollOffsetRespectingCustomFixedPosition();
</del><ins>+ LayoutPoint scrollPosition = scrollPositionRespectingCustomFixedPosition();
</ins><span class="cx">
</span><del>- LayoutSize topLeftExpansion = scrollPosition - toLayoutSize(minimumScrollPosition());
- LayoutSize bottomRightExpansion = toLayoutSize(maximumScrollPosition()) - scrollPosition;
</del><ins>+ LayoutSize topLeftExpansion = scrollPosition - minimumScrollPosition();
+ LayoutSize bottomRightExpansion = maximumScrollPosition() - scrollPosition;
</ins><span class="cx">
</span><span class="cx"> return LayoutRect(uninflatedBounds.location() - topLeftExpansion, uninflatedBounds.size() + topLeftExpansion + bottomRightExpansion);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LayoutSize FrameView::scrollOffsetRespectingCustomFixedPosition() const
</del><ins>+LayoutPoint FrameView::scrollPositionRespectingCustomFixedPosition() const
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>- return useCustomFixedPositionLayoutRect() ? customFixedPositionLayoutRect().location() - LayoutPoint() : toLayoutSize(scrollPosition());
</del><ins>+ return useCustomFixedPositionLayoutRect() ? customFixedPositionLayoutRect().location() : scrollPosition();
</ins><span class="cx"> #else
</span><del>- return scrollOffsetForFixedPosition();
</del><ins>+ return scrollPositionForFixedPosition();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1733,7 +1733,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> LayoutRect viewportRect = visibleContentRect();
</span><span class="cx">
</span><del>- viewportRect.setLocation(toLayoutPoint(scrollOffsetForFixedPosition()));
</del><ins>+ viewportRect.setLocation(scrollPositionForFixedPosition());
</ins><span class="cx"> return viewportRect;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1742,7 +1742,7 @@
</span><span class="cx"> return frame().frameScaleFactor();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-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)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx"> LayoutPoint position;
</span><span class="cx"> if (behaviorForFixed == StickToDocumentBounds)
</span><span class="lines">@@ -1757,7 +1757,7 @@
</span><span class="cx"> float dragFactorX = (fixedElementsLayoutRelativeToFrame || !maxSize.width()) ? 1 : (totalContentsSize.width() - visibleContentRect.width() * frameScaleFactor) / maxSize.width();
</span><span class="cx"> float dragFactorY = (fixedElementsLayoutRelativeToFrame || !maxSize.height()) ? 1 : (totalContentsSize.height() - visibleContentRect.height() * frameScaleFactor) / maxSize.height();
</span><span class="cx">
</span><del>- return LayoutSize(position.x() * dragFactorX / frameScaleFactor, position.y() * dragFactorY / frameScaleFactor);
</del><ins>+ return LayoutPoint(position.x() * dragFactorX / frameScaleFactor, position.y() * dragFactorY / frameScaleFactor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float FrameView::yPositionForInsetClipLayer(const FloatPoint& scrollPosition, float topContentInset)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -278,13 +278,13 @@
</span><span class="cx">
</span><span class="cx"> // Functions for querying the current scrolled position, negating the effects of overhang
</span><span class="cx"> // and adjusting for page scale.
</span><del>- LayoutSize scrollOffsetForFixedPosition() const
</del><ins>+ LayoutPoint scrollPositionForFixedPosition() const
</ins><span class="cx"> {
</span><del>- return scrollOffsetForFixedPosition(visibleContentRect(), totalContentsSize(), scrollPosition(), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), scrollBehaviorForFixedElements(), headerHeight(), footerHeight());
</del><ins>+ return scrollPositionForFixedPosition(visibleContentRect(), totalContentsSize(), scrollPosition(), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), scrollBehaviorForFixedElements(), headerHeight(), footerHeight());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Static function can be called from another thread.
</span><del>- static LayoutSize scrollOffsetForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements, int headerHeight, int footerHeight);
</del><ins>+ static LayoutPoint scrollPositionForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements, int headerHeight, int footerHeight);
</ins><span class="cx">
</span><span class="cx"> // These layers are positioned differently when there is a topContentInset, a header, or a footer. These value need to be computed
</span><span class="cx"> // on both the main thread and the scrolling thread.
</span><span class="lines">@@ -496,7 +496,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> LayoutRect fixedScrollableAreaBoundsInflatedForScrolling(const LayoutRect& uninflatedBounds) const;
</span><del>- LayoutSize scrollOffsetRespectingCustomFixedPosition() const;
</del><ins>+ LayoutPoint scrollPositionRespectingCustomFixedPosition() const;
</ins><span class="cx">
</span><span class="cx"> virtual int headerHeight() const override { return m_headerHeight; }
</span><span class="cx"> WEBCORE_EXPORT void setHeaderHeight(int);
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationAnimationBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/AnimationBase.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -564,9 +564,9 @@
</span><span class="cx"> #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
</span><span class="cx"> if (m_animation->trigger()->isScrollAnimationTrigger()) {
</span><span class="cx"> if (m_object) {
</span><del>- float currentScrollOffset = m_object->view().frameView().scrollOffsetForFixedPosition().height().toFloat();
</del><ins>+ float currentScrollPosition = m_object->view().frameView().scrollPositionForFixedPosition().y().toFloat();
</ins><span class="cx"> ScrollAnimationTrigger& scrollTrigger = downcast<ScrollAnimationTrigger>(*m_animation->trigger().get());
</span><del>- if (currentScrollOffset >= scrollTrigger.startValue().value() && (!scrollTrigger.hasEndValue() || currentScrollOffset <= scrollTrigger.endValue().value()))
</del><ins>+ if (currentScrollPosition >= scrollTrigger.startValue().value() && (!scrollTrigger.hasEndValue() || currentScrollPosition <= scrollTrigger.endValue().value()))
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> return -1;
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationAnimationControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/AnimationController.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -559,8 +559,9 @@
</span><span class="cx"> auto* view = m_frame.view();
</span><span class="cx"> if (!view || !wantsScrollUpdates())
</span><span class="cx"> return;
</span><del>- m_scrollPosition = view->scrollOffsetForFixedPosition().height().toFloat();
</del><span class="cx">
</span><ins>+ m_scrollPosition = view->scrollPositionForFixedPosition().y().toFloat();
+
</ins><span class="cx"> // FIXME: This is updating all the animations, rather than just the ones
</span><span class="cx"> // that are dependent on scroll. We to go from our AnimationBase to its CompositeAnimation
</span><span class="cx"> // so we can execute code similar to updateAnimations.
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -319,20 +319,20 @@
</span><span class="cx"> GraphicsLayer* scrolledContentsLayer = rootContentLayerForFrameView(frameView);
</span><span class="cx"> GraphicsLayer* headerLayer = headerLayerForFrameView(frameView);
</span><span class="cx"> GraphicsLayer* footerLayer = footerLayerForFrameView(frameView);
</span><del>- LayoutSize scrollOffsetForFixed = frameView.scrollOffsetForFixedPosition();
</del><ins>+ LayoutPoint scrollPositionForFixed = frameView.scrollPositionForFixedPosition();
</ins><span class="cx">
</span><span class="cx"> float topContentInset = frameView.topContentInset();
</span><span class="cx"> FloatPoint positionForInsetClipLayer = FloatPoint(0, FrameView::yPositionForInsetClipLayer(scrollPosition, topContentInset));
</span><span class="cx"> FloatPoint positionForContentsLayer = FloatPoint(scrolledContentsLayer->position().x(),
</span><span class="cx"> FrameView::yPositionForRootContentLayer(scrollPosition, topContentInset, frameView.headerHeight()));
</span><del>- FloatPoint positionForHeaderLayer = FloatPoint(scrollOffsetForFixed.width(), FrameView::yPositionForHeaderLayer(scrollPosition, topContentInset));
- FloatPoint positionForFooterLayer = FloatPoint(scrollOffsetForFixed.width(),
</del><ins>+ FloatPoint positionForHeaderLayer = FloatPoint(scrollPositionForFixed.x(), FrameView::yPositionForHeaderLayer(scrollPosition, topContentInset));
+ FloatPoint positionForFooterLayer = FloatPoint(scrollPositionForFixed.x(),
</ins><span class="cx"> FrameView::yPositionForFooterLayer(scrollPosition, topContentInset, frameView.totalContentsSize().height(), frameView.footerHeight()));
</span><span class="cx">
</span><span class="cx"> if (programmaticScroll || scrollingLayerPositionAction == SetScrollingLayerPosition) {
</span><span class="cx"> scrollLayer->setPosition(-frameView.scrollPosition());
</span><span class="cx"> if (counterScrollingLayer)
</span><del>- counterScrollingLayer->setPosition(toLayoutPoint(scrollOffsetForFixed));
</del><ins>+ counterScrollingLayer->setPosition(scrollPositionForFixed);
</ins><span class="cx"> if (insetClipLayer)
</span><span class="cx"> insetClipLayer->setPosition(positionForInsetClipLayer);
</span><span class="cx"> if (contentShadowLayer)
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> scrollLayer->syncPosition(-frameView.scrollPosition());
</span><span class="cx"> if (counterScrollingLayer)
</span><del>- counterScrollingLayer->syncPosition(toLayoutPoint(scrollOffsetForFixed));
</del><ins>+ counterScrollingLayer->syncPosition(scrollPositionForFixed);
</ins><span class="cx"> if (insetClipLayer)
</span><span class="cx"> insetClipLayer->syncPosition(positionForInsetClipLayer);
</span><span class="cx"> if (contentShadowLayer)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingTreeFrameScrollingNodeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -148,17 +148,17 @@
</span><span class="cx"> ScrollBehaviorForFixedElements behaviorForFixed = scrollBehaviorForFixedElements();
</span><span class="cx"> FloatPoint scrollOffset = scrollPosition - toIntSize(scrollOrigin());
</span><span class="cx"> FloatRect viewportRect(FloatPoint(), scrollableAreaSize());
</span><del>- FloatSize scrollOffsetForFixedChildren = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollOffset), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight());
</del><ins>+ FloatPoint scrollPositionForFixedChildren = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollOffset), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight());
</ins><span class="cx">
</span><del>- [m_counterScrollingLayer setPosition:FloatPoint(scrollOffsetForFixedChildren)];
</del><ins>+ [m_counterScrollingLayer setPosition:scrollPositionForFixedChildren];
</ins><span class="cx">
</span><span class="cx"> if (m_headerLayer || m_footerLayer) {
</span><span class="cx"> // Generally the banners should have the same horizontal-position computation as a fixed element. However,
</span><span class="cx"> // the banners are not affected by the frameScaleFactor(), so if there is currently a non-1 frameScaleFactor()
</span><del>- // then we should recompute scrollOffsetForFixedChildren for the banner with a scale factor of 1.
- float horizontalScrollOffsetForBanner = scrollOffsetForFixedChildren.width();
</del><ins>+ // then we should recompute scrollPositionForFixedChildren for the banner with a scale factor of 1.
+ float horizontalScrollOffsetForBanner = scrollPositionForFixedChildren.x();
</ins><span class="cx"> if (frameScaleFactor() != 1)
</span><del>- horizontalScrollOffsetForBanner = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollOffset), scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).width();
</del><ins>+ horizontalScrollOffsetForBanner = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollOffset), scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).x();
</ins><span class="cx">
</span><span class="cx"> if (m_headerLayer)
</span><span class="cx"> [m_headerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, 0)];
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -403,11 +403,11 @@
</span><span class="cx"> LayoutPoint scrollOffset = LayoutPoint(position) - toLayoutSize(scrollOrigin());
</span><span class="cx"> FloatRect viewportRect(FloatPoint(), scrollableAreaSize());
</span><span class="cx">
</span><del>- FloatSize scrollOffsetForFixedChildren = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), scrollOffset, scrollOrigin(), frameScaleFactor(),
</del><ins>+ FloatPoint scrollPositionForFixedChildren = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), scrollOffset, scrollOrigin(), frameScaleFactor(),
</ins><span class="cx"> fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight());
</span><span class="cx">
</span><span class="cx"> if (m_counterScrollingLayer)
</span><del>- m_counterScrollingLayer.get().position = FloatPoint(scrollOffsetForFixedChildren);
</del><ins>+ m_counterScrollingLayer.get().position = scrollPositionForFixedChildren;
</ins><span class="cx">
</span><span class="cx"> float topContentInset = this->topContentInset();
</span><span class="cx"> if (m_insetClipLayer && m_scrolledContentsLayer && topContentInset) {
</span><span class="lines">@@ -422,9 +422,9 @@
</span><span class="cx"> // Generally the banners should have the same horizontal-position computation as a fixed element. However,
</span><span class="cx"> // the banners are not affected by the frameScaleFactor(), so if there is currently a non-1 frameScaleFactor()
</span><span class="cx"> // then we should recompute scrollOffsetForFixedChildren for the banner with a scale factor of 1.
</span><del>- float horizontalScrollOffsetForBanner = scrollOffsetForFixedChildren.width();
</del><ins>+ float horizontalScrollOffsetForBanner = scrollPositionForFixedChildren.x();
</ins><span class="cx"> if (frameScaleFactor() != 1)
</span><del>- horizontalScrollOffsetForBanner = FrameView::scrollOffsetForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), scrollOffset, scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).width();
</del><ins>+ horizontalScrollOffsetForBanner = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), scrollOffset, scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).x();
</ins><span class="cx">
</span><span class="cx"> if (m_headerLayer)
</span><span class="cx"> m_headerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, FrameView::yPositionForHeaderLayer(position, topContentInset));
</span><span class="lines">@@ -459,7 +459,7 @@
</span><span class="cx"> if (!m_children)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- viewportRect.setLocation(FloatPoint() + scrollOffsetForFixedChildren);
</del><ins>+ viewportRect.setLocation(scrollPositionForFixedChildren);
</ins><span class="cx">
</span><span class="cx"> for (auto& child : *m_children)
</span><span class="cx"> child->updateLayersAfterAncestorChange(*this, viewportRect, FloatSize());
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinMediaPlayerPrivateMediaFoundationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -294,7 +294,6 @@
</span><span class="cx"> if (!m_videoDisplay)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- LayoutSize scrollOffset;
</del><span class="cx"> IntPoint positionInWindow(m_lastPaintRect.location());
</span><span class="cx">
</span><span class="cx"> FrameView* view = nullptr;
</span><span class="lines">@@ -304,12 +303,13 @@
</span><span class="cx"> deviceScaleFactor = m_player->cachedResourceLoader()->document()->deviceScaleFactor();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ LayoutPoint scrollPosition;
</ins><span class="cx"> if (view) {
</span><del>- scrollOffset = view->scrollOffsetForFixedPosition();
</del><ins>+ scrollPosition = view->scrollPositionForFixedPosition();
</ins><span class="cx"> positionInWindow = view->convertToContainingWindow(IntPoint(m_lastPaintRect.location()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- positionInWindow.move(-scrollOffset.width().toInt(), -scrollOffset.height().toInt());
</del><ins>+ positionInWindow.move(-scrollPosition.x().toInt(), -scrollPosition.y().toInt());
</ins><span class="cx">
</span><span class="cx"> int x = positionInWindow.x() * deviceScaleFactor;
</span><span class="cx"> int y = positionInWindow.y() * deviceScaleFactor;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1111,9 +1111,9 @@
</span><span class="cx"> viewportRect.setLocation(LayoutPoint(0, -topContentInset));
</span><span class="cx"> }
</span><span class="cx"> } else if (useFixedLayout || frameView.frameScaleFactor() != 1) {
</span><del>- // scrollOffsetForFixedPosition() is adjusted for page scale and it does not include
</del><ins>+ // scrollPositionForFixedPosition() is adjusted for page scale and it does not include
</ins><span class="cx"> // topContentInset so do not add it to the calculation below.
</span><del>- viewportRect.setLocation(toLayoutPoint(frameView.scrollOffsetForFixedPosition()));
</del><ins>+ viewportRect.setLocation(frameView.scrollPositionForFixedPosition());
</ins><span class="cx"> } else {
</span><span class="cx"> // documentScrollOffsetRelativeToViewOrigin() includes -topContentInset in its height
</span><span class="cx"> // so we need to account for that in calculating the phase size
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -5504,7 +5504,7 @@
</span><span class="cx"> // clipRects are needed in view space.
</span><span class="cx"> LayoutPoint offset(renderer().localToContainerPoint(FloatPoint(), &clipRectsContext.rootLayer->renderer()));
</span><span class="cx"> if (clipRects.fixed() && &clipRectsContext.rootLayer->renderer() == &renderer().view())
</span><del>- offset -= renderer().view().frameView().scrollOffsetForFixedPosition();
</del><ins>+ offset -= toLayoutSize(renderer().view().frameView().scrollPositionForFixedPosition());
</ins><span class="cx">
</span><span class="cx"> if (renderer().hasOverflowClip()) {
</span><span class="cx"> ClipRect newOverflowClip = downcast<RenderBox>(renderer()).overflowClipRectForChildLayers(offset, currentRenderNamedFlowFragment(), clipRectsContext.overlayScrollbarSizeRelevancy);
</span><span class="lines">@@ -5568,7 +5568,7 @@
</span><span class="cx">
</span><span class="cx"> // Note: infinite clipRects should not be scrolled here, otherwise they will accidentally no longer be considered infinite.
</span><span class="cx"> if (parentRects.fixed() && &clipRectsContext.rootLayer->renderer() == &view && !backgroundClipRect.isInfinite())
</span><del>- backgroundClipRect.move(view.frameView().scrollOffsetForFixedPosition());
</del><ins>+ backgroundClipRect.moveBy(view.frameView().scrollPositionForFixedPosition());
</ins><span class="cx">
</span><span class="cx"> return backgroundClipRect;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -924,7 +924,7 @@
</span><span class="cx"> FloatSize backgroundSize = contentsSize;
</span><span class="cx"> if (backgroundLayerPaintsFixedRootBackground()) {
</span><span class="cx"> const FrameView& frameView = renderer().view().frameView();
</span><del>- backgroundPosition = toLayoutPoint(frameView.scrollOffsetForFixedPosition());
</del><ins>+ backgroundPosition = frameView.scrollPositionForFixedPosition();
</ins><span class="cx"> backgroundSize = frameView.layoutSize();
</span><span class="cx"> }
</span><span class="cx"> m_backgroundLayer->setPosition(backgroundPosition);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1769,7 +1769,7 @@
</span><span class="cx"> m_scrollLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
</span><span class="cx">
</span><span class="cx"> if (GraphicsLayer* fixedBackgroundLayer = fixedRootBackgroundLayer())
</span><del>- fixedBackgroundLayer->setPosition(toLayoutPoint(frameView.scrollOffsetForFixedPosition()));
</del><ins>+ fixedBackgroundLayer->setPosition(frameView.scrollPositionForFixedPosition());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> FloatPoint RenderLayerCompositor::positionForClipLayer() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (194441 => 194442)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -441,7 +441,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (mode & IsFixed)
</span><del>- transformState.move(frameView().scrollOffsetRespectingCustomFixedPosition());
</del><ins>+ transformState.move(toLayoutSize(frameView().scrollPositionRespectingCustomFixedPosition()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const RenderObject* RenderView::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
</span><span class="lines">@@ -450,14 +450,14 @@
</span><span class="cx"> // then we should have found it by now.
</span><span class="cx"> ASSERT_ARG(ancestorToStopAt, !ancestorToStopAt || ancestorToStopAt == this);
</span><span class="cx">
</span><del>- LayoutSize scrollOffset = frameView().scrollOffsetRespectingCustomFixedPosition();
</del><ins>+ LayoutPoint scrollPosition = frameView().scrollPositionRespectingCustomFixedPosition();
</ins><span class="cx">
</span><span class="cx"> if (!ancestorToStopAt && shouldUseTransformFromContainer(nullptr)) {
</span><span class="cx"> TransformationMatrix t;
</span><span class="cx"> getTransformFromContainer(nullptr, LayoutSize(), t);
</span><del>- geometryMap.pushView(this, scrollOffset, &t);
</del><ins>+ geometryMap.pushView(this, toLayoutSize(scrollPosition), &t);
</ins><span class="cx"> } else
</span><del>- geometryMap.pushView(this, scrollOffset);
</del><ins>+ geometryMap.pushView(this, toLayoutSize(scrollPosition));
</ins><span class="cx">
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -465,7 +465,7 @@
</span><span class="cx"> void RenderView::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
</span><span class="cx"> {
</span><span class="cx"> if (mode & IsFixed)
</span><del>- transformState.move(frameView().scrollOffsetRespectingCustomFixedPosition());
</del><ins>+ transformState.move(toLayoutSize(frameView().scrollPositionRespectingCustomFixedPosition()));
</ins><span class="cx">
</span><span class="cx"> if (mode & UseTransforms && shouldUseTransformFromContainer(nullptr)) {
</span><span class="cx"> TransformationMatrix t;
</span><span class="lines">@@ -696,10 +696,9 @@
</span><span class="cx"> adjustedRect.setX(viewWidth() - adjustedRect.maxX());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (fixed) {
- adjustedRect.move(frameView().scrollOffsetRespectingCustomFixedPosition());
- }
-
</del><ins>+ if (fixed)
+ adjustedRect.moveBy(frameView().scrollPositionRespectingCustomFixedPosition());
+
</ins><span class="cx"> // Apply our transform if we have one (because of full page zooming).
</span><span class="cx"> if (!repaintContainer && layer() && layer()->transform())
</span><span class="cx"> adjustedRect = LayoutRect(layer()->transform()->mapRect(snapRectToDevicePixels(adjustedRect, document().deviceScaleFactor())));
</span></span></pre>
</div>
</div>
</body>
</html>