https://bugs.webkit.org/show_bug.cgi?id=167604
Source/WebCore:
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):
Source/WebKit2:
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):
LayoutTests:
Reviewed by Zalan Bujtas.
* compositing/scrolling/fixed-inside-scroll-expected.html: Added.
* compositing/scrolling/fixed-inside-scroll.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211387
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-01-30 Simon Fraser <simon.fraser@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-30 Matt Baker <mattbaker@apple.com>
Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops)
--- /dev/null
+<!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>
--- /dev/null
+<!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>
+2017-01-30 Simon Fraser <simon.fraser@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-30 Jer Noble <jer.noble@apple.com>
NULL-deref crash at PlatformMediaSession::endInterruption
#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()) {
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));
2017-01-30 Simon Fraser <simon.fraser@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-30 Simon Fraser <simon.fraser@apple.com>
+
Fixed elements should not rubber-band in WK2, nor remain at negative offsets
https://bugs.webkit.org/show_bug.cgi?id=167484
rdar://problem/29453068
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()