Diff
Modified: branches/safari-603-branch/LayoutTests/ChangeLog (211520 => 211521)
--- branches/safari-603-branch/LayoutTests/ChangeLog 2017-02-01 21:26:47 UTC (rev 211520)
+++ branches/safari-603-branch/LayoutTests/ChangeLog 2017-02-01 21:26:51 UTC (rev 211521)
@@ -1,5 +1,19 @@
2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+ Merge r211387. rdar://problem/29500273
+
+ 2017-01-30 Simon Fraser <simon.fra...@apple.com>
+
+ [iOS] position:fixed inside touch-scrollable overflow is mispositioned
+ https://bugs.webkit.org/show_bug.cgi?id=167604
+
+ Reviewed by Zalan Bujtas.
+
+ * compositing/scrolling/fixed-inside-scroll-expected.html: Added.
+ * compositing/scrolling/fixed-inside-scroll.html: Added.
+
+2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+
Merge r211385. rdar://problem/29738502
2017-01-30 Matt Baker <mattba...@apple.com>
Added: branches/safari-603-branch/LayoutTests/compositing/scrolling/fixed-inside-scroll-expected.html (0 => 211521)
--- branches/safari-603-branch/LayoutTests/compositing/scrolling/fixed-inside-scroll-expected.html (rev 0)
+++ branches/safari-603-branch/LayoutTests/compositing/scrolling/fixed-inside-scroll-expected.html 2017-02-01 21:26:51 UTC (rev 211521)
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ html {
+ -webkit-overflow-scrolling: touch;
+ }
+
+ .scroller {
+ height: 500px;
+ width: 300px;
+ margin: 50px;
+ border: 25px solid gray;
+ padding: 10px;
+ overflow: scroll;
+ box-shadow: 0 0 30px black;
+ }
+
+ .contents {
+ width: 400px;
+ height: 2000px;
+ }
+
+ .fixed {
+ position: absolute;
+ background-color: green;
+ left: 70px;
+ top: 70px;
+ height: 200px;
+ width: 200px;
+ }
+
+ .indicator {
+ position: absolute;
+ left: 70px;
+ top: 70px;
+ height: 200px;
+ width: 200px;
+ background-color: red;
+ }
+ </style>
+</head>
+<body>
+ <div class="indicator"></div>
+ <div id="scroller" class="scroller">
+ <div class="contents">
+ <div class="fixed box"></div>
+ </div>
+ </div>
+</body>
+</html>
Added: branches/safari-603-branch/LayoutTests/compositing/scrolling/fixed-inside-scroll.html (0 => 211521)
--- branches/safari-603-branch/LayoutTests/compositing/scrolling/fixed-inside-scroll.html (rev 0)
+++ branches/safari-603-branch/LayoutTests/compositing/scrolling/fixed-inside-scroll.html 2017-02-01 21:26:51 UTC (rev 211521)
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ html {
+ -webkit-overflow-scrolling: touch;
+ }
+
+ .scroller {
+ height: 500px;
+ width: 300px;
+ margin: 50px;
+ border: 25px solid gray;
+ padding: 10px;
+ overflow: scroll;
+ box-shadow: 0 0 30px black;
+ }
+
+ .contents {
+ width: 400px;
+ height: 2000px;
+ }
+
+ .fixed {
+ position: fixed;
+ background-color: green;
+ left: 70px;
+ top: 70px;
+ height: 200px;
+ width: 200px;
+ }
+
+ .indicator {
+ position: absolute;
+ left: 70px;
+ top: 70px;
+ height: 200px;
+ width: 200px;
+ background-color: red;
+ }
+ </style>
+</head>
+<body>
+ <div class="indicator"></div>
+ <div id="scroller" class="scroller">
+ <div class="contents">
+ <div class="fixed box"></div>
+ </div>
+ </div>
+</body>
+</html>
Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (211520 => 211521)
--- branches/safari-603-branch/Source/WebCore/ChangeLog 2017-02-01 21:26:47 UTC (rev 211520)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog 2017-02-01 21:26:51 UTC (rev 211521)
@@ -1,5 +1,30 @@
2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+ Merge r211387. rdar://problem/29500273
+
+ 2017-01-30 Simon Fraser <simon.fra...@apple.com>
+
+ [iOS] position:fixed inside touch-scrollable overflow is mispositioned
+ https://bugs.webkit.org/show_bug.cgi?id=167604
+ rdar://problem/29500273
+
+ Reviewed by Zalan Bujtas.
+
+ For layers inside touch-scrollable overflow, RenderLayerBacking::computeParentGraphicsLayerRect() needs
+ to account for the offset from the ancestor compositing layer's origin, to handle scrollable elements with
+ box-shadow, for example.
+
+ Also make the compositing log output a little easier to read.
+
+ Test: compositing/scrolling/fixed-inside-scroll.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::logLayerInfo):
+
+2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+
Merge r211386. rdar://problem/30204866
2017-01-30 Jer Noble <jer.no...@apple.com>
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (211520 => 211521)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-02-01 21:26:47 UTC (rev 211520)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-02-01 21:26:51 UTC (rev 211521)
@@ -831,12 +831,11 @@
#if PLATFORM(IOS)
if (compositedAncestor->hasTouchScrollableOverflow()) {
+ LayoutRect ancestorCompositedBounds = ancestorBackingLayer->compositedBounds();
auto& renderBox = downcast<RenderBox>(compositedAncestor->renderer());
- LayoutRect paddingBox(renderBox.borderLeft(), renderBox.borderTop(),
- renderBox.width() - renderBox.borderLeft() - renderBox.borderRight(),
- renderBox.height() - renderBox.borderTop() - renderBox.borderBottom());
+ LayoutRect paddingBox(renderBox.borderLeft(), renderBox.borderTop(), renderBox.width() - renderBox.borderLeft() - renderBox.borderRight(), renderBox.height() - renderBox.borderTop() - renderBox.borderBottom());
ScrollOffset scrollOffset = compositedAncestor->scrollOffset();
- parentGraphicsLayerRect = LayoutRect((paddingBox.location() - toLayoutSize(scrollOffset)), paddingBox.size());
+ parentGraphicsLayerRect = LayoutRect((paddingBox.location() - toLayoutSize(ancestorCompositedBounds.location()) - toLayoutSize(scrollOffset)), paddingBox.size());
}
#else
if (compositedAncestor->needsCompositedScrolling()) {
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (211520 => 211521)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp 2017-02-01 21:26:47 UTC (rev 211520)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp 2017-02-01 21:26:51 UTC (rev 211521)
@@ -837,7 +837,7 @@
absoluteBounds.move(layer.offsetFromAncestor(m_renderView.layer()));
StringBuilder logString;
- logString.append(String::format("%*p (%.6f,%.6f-%.6f,%.6f) %.2fKB", 12 + depth * 2, &layer,
+ logString.append(String::format("%*p (%.3f,%.3f-%.3f,%.3f) %.2fKB", 12 + depth * 2, &layer,
absoluteBounds.x().toFloat(), absoluteBounds.y().toFloat(), absoluteBounds.maxX().toFloat(), absoluteBounds.maxY().toFloat(),
backing->backingStoreMemoryEstimate() / 1024));
Modified: branches/safari-603-branch/Source/WebKit2/ChangeLog (211520 => 211521)
--- branches/safari-603-branch/Source/WebKit2/ChangeLog 2017-02-01 21:26:47 UTC (rev 211520)
+++ branches/safari-603-branch/Source/WebKit2/ChangeLog 2017-02-01 21:26:51 UTC (rev 211521)
@@ -1,5 +1,22 @@
2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+ Merge r211387. rdar://problem/29500273
+
+ 2017-01-30 Simon Fraser <simon.fra...@apple.com>
+
+ [iOS] position:fixed inside touch-scrollable overflow is mispositioned
+ https://bugs.webkit.org/show_bug.cgi?id=167604
+ rdar://problem/29500273
+
+ Reviewed by Zalan Bujtas.
+
+ Make sure we tell m_webPageProxy.computeCustomFixedPositionRect() when visual viewports are enabled.
+
+ * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
+ (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
+
+2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+
Merge r211295. rdar://problem/30236297
2017-01-27 Chris Dumez <cdu...@apple.com>
Modified: branches/safari-603-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm (211520 => 211521)
--- branches/safari-603-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm 2017-02-01 21:26:47 UTC (rev 211520)
+++ branches/safari-603-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm 2017-02-01 21:26:51 UTC (rev 211521)
@@ -94,7 +94,8 @@
FloatRect RemoteScrollingCoordinatorProxy::customFixedPositionRect() const
{
- return m_webPageProxy.computeCustomFixedPositionRect(m_webPageProxy.unobscuredContentRect(), m_webPageProxy.unobscuredContentRectRespectingInputViewBounds(), m_webPageProxy.customFixedPositionRect(), m_webPageProxy.displayedContentScale());
+ return m_webPageProxy.computeCustomFixedPositionRect(m_webPageProxy.unobscuredContentRect(), m_webPageProxy.unobscuredContentRectRespectingInputViewBounds(), m_webPageProxy.customFixedPositionRect(),
+ m_webPageProxy.displayedContentScale(), WebPageProxy::UnobscuredRectConstraint::Unconstrained, visualViewportEnabled());
}
void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture()