<!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>[209297] trunk</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/209297">209297</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-12-03 08:36:14 -0800 (Sat, 03 Dec 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>localToAbsolute() does incorrect conversion for elements inside position:fixed with zooming
https://bugs.webkit.org/show_bug.cgi?id=165244
Reviewed by Zalan Bujtas.
Source/WebCore:
RenderView::mapLocalToContainer() and RenderView::mapAbsoluteToLocalPoint() handle the coordinate
mapping through the RenderView's transform (when zoomed), and apply the scroll offset for position:fixed
elements.
They did this in the wrong order; "local to absolute" applied the zoom scale, and then adjusted for the scroll position,
and "absolute to local" applied the scroll position and then the transform.
However that scroll position adjustment should be in unzoomed coordinates, since it's accounting for the
layout adjustment that position:fixed receives (which actually occurs via the localToAbsolute() call
in RenderLayer's accumulateOffsetTowardsAncestor()). "local to absolute" should therefore apply the scroll
adjustment first before the transform, and "absolute to local" the reverse.
In both visual viewport mode, and legacy drifty fixed mode FrameView::scrollPositionForFixedPosition()
returns a scroll offset that is unaffected by zoom, which is correct and confirms this change.
[Confusingly, ScrollView scroll positions _are_ affected by zoom, as the entire document gets bigger.]
RenderGeometryMap::mapToContainer(), which is an optimization on top of RenderView::mapLocalToContainer(),
gets a similar fix.
Test: fast/zooming/client-rect-in-fixed-zoomed.html
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToContainer):
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
LayoutTests:
Test getBoundingClientRect() (which internally calls localToAbsolute())
for an element inside position:fixed after zooming.
* fast/visual-viewport/zoomed-fixed-expected.txt: Rebaseline
* fast/zooming/client-rect-in-fixed-zoomed-expected.txt: Added.
* fast/zooming/client-rect-in-fixed-zoomed.html: Added.
* platform/ios-simulator/TestExpectations: Skip new test on iOS; test requires window.scrollTo to be synchronous.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastvisualviewportzoomedfixedexpectedtxt">trunk/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGeometryMapcpp">trunk/Source/WebCore/rendering/RenderGeometryMap.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastzoomingclientrectinfixedzoomedexpectedtxt">trunk/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastzoomingclientrectinfixedzoomedhtml">trunk/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209296 => 209297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-03 07:28:25 UTC (rev 209296)
+++ trunk/LayoutTests/ChangeLog        2016-12-03 16:36:14 UTC (rev 209297)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-11-30 Simon Fraser <simon.fraser@apple.com>
+
+ localToAbsolute() does incorrect conversion for elements inside position:fixed with zooming
+ https://bugs.webkit.org/show_bug.cgi?id=165244
+
+ Reviewed by Zalan Bujtas.
+
+ Test getBoundingClientRect() (which internally calls localToAbsolute())
+ for an element inside position:fixed after zooming.
+
+ * fast/visual-viewport/zoomed-fixed-expected.txt: Rebaseline
+ * fast/zooming/client-rect-in-fixed-zoomed-expected.txt: Added.
+ * fast/zooming/client-rect-in-fixed-zoomed.html: Added.
+ * platform/ios-simulator/TestExpectations: Skip new test on iOS; test requires window.scrollTo to be synchronous.
+
+
</ins><span class="cx"> 2016-12-02 Antoine Quint <graouts@apple.com>
</span><span class="cx">
</span><span class="cx"> [Modern Media Controls] Update the media controls size as the media element is resized
</span></span></pre></div>
<a id="trunkLayoutTestsfastvisualviewportzoomedfixedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt (209296 => 209297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt        2016-12-03 07:28:25 UTC (rev 209296)
+++ trunk/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt        2016-12-03 16:36:14 UTC (rev 209297)
</span><span class="lines">@@ -18,37 +18,37 @@
</span><span class="cx"> JSON.stringify(internals.layoutViewportRect()) is {"top":232.5,"right":867.5,"bottom":817.5,"left":82.5,"width":785,"height":585}
</span><span class="cx"> JSON.stringify(internals.visualViewportRect()) is {"top":525,"right":867.5,"bottom":817.5,"left":475,"width":392.5,"height":292.5}
</span><span class="cx"> client rect of top:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-408.75,"right":351.25,"bottom":-308.75,"left":-433.75,"width":785,"height":100}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-292.5,"right":392.5,"bottom":-192.5,"left":-392.5,"width":785,"height":100}
</ins><span class="cx"> client rect of bottom:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":76.25,"right":351.25,"bottom":176.25,"left":-433.75,"width":785,"height":100}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":192.5,"right":392.5,"bottom":292.5,"left":-392.5,"width":785,"height":100}
</ins><span class="cx"> client rect of left:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-408.75,"right":-333.75,"bottom":176.25,"left":-433.75,"width":100,"height":585}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-292.5,"right":-292.5,"bottom":292.5,"left":-392.5,"width":100,"height":585}
</ins><span class="cx"> client rect of right:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-408.75,"right":351.25,"bottom":176.25,"left":251.25,"width":100,"height":585}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-292.5,"right":392.5,"bottom":292.5,"left":292.5,"width":100,"height":585}
</ins><span class="cx">
</span><span class="cx"> Scrolled to 100, 776
</span><span class="cx"> JSON.stringify(internals.layoutViewportRect()) is {"top":483.5,"right":867.5,"bottom":1068.5,"left":82.5,"width":785,"height":585}
</span><span class="cx"> JSON.stringify(internals.visualViewportRect()) is {"top":776,"right":492.5,"bottom":1068.5,"left":100,"width":392.5,"height":292.5}
</span><span class="cx"> client rect of top:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-534.25,"right":726.25,"bottom":-434.25,"left":-58.75,"width":785,"height":100}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-292.5,"right":767.5,"bottom":-192.5,"left":-17.5,"width":785,"height":100}
</ins><span class="cx"> client rect of bottom:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-49.25,"right":726.25,"bottom":50.75,"left":-58.75,"width":785,"height":100}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":192.5,"right":767.5,"bottom":292.5,"left":-17.5,"width":785,"height":100}
</ins><span class="cx"> client rect of left:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-534.25,"right":41.25,"bottom":50.75,"left":-58.75,"width":100,"height":585}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-292.5,"right":82.5,"bottom":292.5,"left":-17.5,"width":100,"height":585}
</ins><span class="cx"> client rect of right:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-534.25,"right":726.25,"bottom":50.75,"left":626.25,"width":100,"height":585}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-292.5,"right":767.5,"bottom":292.5,"left":667.5,"width":100,"height":585}
</ins><span class="cx">
</span><span class="cx"> Scrolled to 50, 300
</span><span class="cx"> JSON.stringify(internals.layoutViewportRect()) is {"top":300,"right":835,"bottom":885,"left":50,"width":785,"height":585}
</span><span class="cx"> JSON.stringify(internals.visualViewportRect()) is {"top":300,"right":442.5,"bottom":592.5,"left":50,"width":392.5,"height":292.5}
</span><span class="cx"> client rect of top:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-150,"right":760,"bottom":-50,"left":-25,"width":785,"height":100}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":0,"right":785,"bottom":100,"left":0,"width":785,"height":100}
</ins><span class="cx"> client rect of bottom:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":335,"right":760,"bottom":435,"left":-25,"width":785,"height":100}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":485,"right":785,"bottom":585,"left":0,"width":785,"height":100}
</ins><span class="cx"> client rect of left:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-150,"right":75,"bottom":435,"left":-25,"width":100,"height":585}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":0,"right":100,"bottom":585,"left":0,"width":100,"height":585}
</ins><span class="cx"> client rect of right:
</span><del>-JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":-150,"right":760,"bottom":435,"left":660,"width":100,"height":585}
</del><ins>+JSON.stringify(fixedElement.getBoundingClientRect()) is {"top":0,"right":785,"bottom":585,"left":685,"width":100,"height":585}
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastzoomingclientrectinfixedzoomedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed-expected.txt (0 => 209297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed-expected.txt        2016-12-03 16:36:14 UTC (rev 209297)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Tests localToAbsolute coordinate conversion for an element inside position:fixed after zoom.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS internals.pageScaleFactor() is 2
+PASS JSON.stringify(clientRect) is JSON.stringify({top: 9.515625, right: 42, bottom: 19.515625, left: 22, width: 20, height: 10})
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastzoomingclientrectinfixedzoomedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed.html (0 => 209297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed.html         (rev 0)
+++ trunk/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed.html        2016-12-03 16:36:14 UTC (rev 209297)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ body {
+ height: 2000px;
+ width: 2000px;
+ }
+
+ .container {
+ position: fixed;
+ top: 20px;
+ left: 10px;
+ width: 200px;
+ height: 100px;
+ background-color: silver;
+ }
+ #box {
+ width: 20px;
+ height: 10px;
+ margin: 12px;
+ background-color: blue;
+ }
+
+ </style>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script>
+ description("Tests localToAbsolute coordinate conversion for an element inside position:fixed after zoom.");
+
+ window.jsTestIsAsync = true;
+
+ var clientRect;
+ function doAfterZooming()
+ {
+ window.scrollTo(0, 140);
+
+ shouldBe('internals.pageScaleFactor()', '2');
+
+ var box = document.getElementById('box');
+ clientRect = box.getBoundingClientRect();
+
+ shouldBe('JSON.stringify(clientRect)', 'JSON.stringify({top: 9.515625, right: 42, bottom: 19.515625, left: 22, width: 20, height: 10})');
+
+ finishJSTest();
+ }
+
+ function getUIScript()
+ {
+ return `(function() {
+ uiController.zoomToScale(2, function() {
+ uiController.uiScriptComplete(uiController.zoomScale);
+ });
+ })();`;
+ }
+
+ function doTest()
+ {
+ if (window.testRunner) {
+ testRunner.runUIScript(getUIScript(), function(zoomScale) {
+ doAfterZooming();
+ })
+ } else
+ window.setTimeout(doAfterZooming, 1000);
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <div class="container">
+ <div id="box"></div>
+ </div>
+ <script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (209296 => 209297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-12-03 07:28:25 UTC (rev 209296)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-12-03 16:36:14 UTC (rev 209297)
</span><span class="lines">@@ -2764,3 +2764,6 @@
</span><span class="cx"> webkit.org/b/164594 http/tests/cache/disk-cache/disk-cache-request-headers.html [ Pass Timeout ]
</span><span class="cx">
</span><span class="cx"> webkit.org/b/163046 js/regress-141098.html [ Pass Failure ]
</span><ins>+
+# Test relies on window.scrollTo
+fast/zooming/client-rect-in-fixed-zoomed.html [ Skip ]
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209296 => 209297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-03 07:28:25 UTC (rev 209296)
+++ trunk/Source/WebCore/ChangeLog        2016-12-03 16:36:14 UTC (rev 209297)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2016-11-30 Simon Fraser <simon.fraser@apple.com>
+
+ localToAbsolute() does incorrect conversion for elements inside position:fixed with zooming
+ https://bugs.webkit.org/show_bug.cgi?id=165244
+
+ Reviewed by Zalan Bujtas.
+
+ RenderView::mapLocalToContainer() and RenderView::mapAbsoluteToLocalPoint() handle the coordinate
+ mapping through the RenderView's transform (when zoomed), and apply the scroll offset for position:fixed
+ elements.
+
+ They did this in the wrong order; "local to absolute" applied the zoom scale, and then adjusted for the scroll position,
+ and "absolute to local" applied the scroll position and then the transform.
+
+ However that scroll position adjustment should be in unzoomed coordinates, since it's accounting for the
+ layout adjustment that position:fixed receives (which actually occurs via the localToAbsolute() call
+ in RenderLayer's accumulateOffsetTowardsAncestor()). "local to absolute" should therefore apply the scroll
+ adjustment first before the transform, and "absolute to local" the reverse.
+
+ In both visual viewport mode, and legacy drifty fixed mode FrameView::scrollPositionForFixedPosition()
+ returns a scroll offset that is unaffected by zoom, which is correct and confirms this change.
+
+ [Confusingly, ScrollView scroll positions _are_ affected by zoom, as the entire document gets bigger.]
+
+ RenderGeometryMap::mapToContainer(), which is an optimization on top of RenderView::mapLocalToContainer(),
+ gets a similar fix.
+
+ Test: fast/zooming/client-rect-in-fixed-zoomed.html
+
+ * rendering/RenderGeometryMap.cpp:
+ (WebCore::RenderGeometryMap::mapToContainer):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::mapLocalToContainer):
+ (WebCore::RenderView::mapAbsoluteToLocalPoint):
+
</ins><span class="cx"> 2016-12-02 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Put names on layers in release builds
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGeometryMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGeometryMap.cpp (209296 => 209297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGeometryMap.cpp        2016-12-03 07:28:25 UTC (rev 209296)
+++ trunk/Source/WebCore/rendering/RenderGeometryMap.cpp        2016-12-03 16:36:14 UTC (rev 209297)
</span><span class="lines">@@ -81,13 +81,13 @@
</span><span class="cx"> inFixed = true;
</span><span class="cx">
</span><span class="cx"> if (!i) {
</span><ins>+ // The root gets special treatment for fixed position
+ if (inFixed)
+ transformState.move(currentStep.m_offset.width(), currentStep.m_offset.height());
+
</ins><span class="cx"> // A null container indicates mapping through the RenderView, so including its transform (the page scale).
</span><span class="cx"> if (!container && currentStep.m_transform)
</span><span class="cx"> transformState.applyTransform(*currentStep.m_transform.get());
</span><del>-
- // The root gets special treatment for fixed position
- if (inFixed)
- transformState.move(currentStep.m_offset.width(), currentStep.m_offset.height());
</del><span class="cx"> } else {
</span><span class="cx"> TransformState::TransformAccumulation accumulate = currentStep.m_accumulatingTransform ? TransformState::AccumulateTransform : TransformState::FlattenTransform;
</span><span class="cx"> if (currentStep.m_transform)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (209296 => 209297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2016-12-03 07:28:25 UTC (rev 209296)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2016-12-03 16:36:14 UTC (rev 209297)
</span><span class="lines">@@ -437,14 +437,14 @@
</span><span class="cx"> ASSERT_ARG(repaintContainer, !repaintContainer || repaintContainer == this);
</span><span class="cx"> ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == (mode & IsFixed));
</span><span class="cx">
</span><ins>+ if (mode & IsFixed)
+ transformState.move(toLayoutSize(frameView().scrollPositionRespectingCustomFixedPosition()));
+
</ins><span class="cx"> if (!repaintContainer && mode & UseTransforms && shouldUseTransformFromContainer(nullptr)) {
</span><span class="cx"> TransformationMatrix t;
</span><span class="cx"> getTransformFromContainer(nullptr, LayoutSize(), t);
</span><span class="cx"> transformState.applyTransform(t);
</span><span class="cx"> }
</span><del>-
- if (mode & IsFixed)
- transformState.move(toLayoutSize(frameView().scrollPositionRespectingCustomFixedPosition()));
</del><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">@@ -467,14 +467,14 @@
</span><span class="cx">
</span><span class="cx"> void RenderView::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
</span><span class="cx"> {
</span><del>- if (mode & IsFixed)
- transformState.move(toLayoutSize(frameView().scrollPositionRespectingCustomFixedPosition()));
-
</del><span class="cx"> if (mode & UseTransforms && shouldUseTransformFromContainer(nullptr)) {
</span><span class="cx"> TransformationMatrix t;
</span><span class="cx"> getTransformFromContainer(nullptr, LayoutSize(), t);
</span><span class="cx"> transformState.applyTransform(t);
</span><span class="cx"> }
</span><ins>+
+ if (mode & IsFixed)
+ transformState.move(toLayoutSize(frameView().scrollPositionRespectingCustomFixedPosition()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RenderView::requiresColumns(int) const
</span></span></pre>
</div>
</div>
</body>
</html>