Diff
Modified: tags/Safari-608.1.30/LayoutTests/ChangeLog (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/ChangeLog 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/ChangeLog 2019-06-19 19:00:49 UTC (rev 246603)
@@ -1,3 +1,7 @@
+2019-06-19 Kocsen Chung <[email protected]>
+
+ Revert r246538. rdar://problem/51905737
+
2019-06-19 Cathie Chen <[email protected]>
resize-observer/element-leak.html is a flaky failure
Modified: tags/Safari-608.1.30/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -16,11 +16,11 @@
(position 43.00 43.00)
(children 1
(GraphicsLayer
- (bounds origin 80.00 80.00)
(anchor 0.00 0.00)
(bounds 285.00 135.00)
(children 1
(GraphicsLayer
+ (position -80.00 -80.00)
(anchor 0.00 0.00)
(children 1
(GraphicsLayer
Modified: tags/Safari-608.1.30/LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -16,12 +16,12 @@
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(position 1.00 1.00)
- (bounds origin 0.00 50.00)
(bounds 189.00 124.00)
(children 1
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(scrollOffset (0,50))
+ (position 0.00 -50.00)
(anchor 0.00 0.00)
(bounds 189.00 270.00)
(drawsContent 1)
@@ -39,12 +39,12 @@
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(position 1.00 1.00)
- (bounds origin 0.00 50.00)
(bounds 189.00 124.00)
(children 1
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(scrollOffset (0,50))
+ (position 0.00 -50.00)
(anchor 0.00 0.00)
(bounds 189.00 270.00)
(drawsContent 1)
Modified: tags/Safari-608.1.30/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -17,11 +17,11 @@
(position 16.00 16.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 100.00)
(anchor 0.00 0.00)
(bounds 400.00 300.00)
(children 1
(GraphicsLayer
+ (position 0.00 -100.00)
(anchor 0.00 0.00)
(children 1
(GraphicsLayer
Modified: tags/Safari-608.1.30/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -17,11 +17,11 @@
(position 16.00 16.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 100.00)
(anchor 0.00 0.00)
(bounds 400.00 300.00)
(children 1
(GraphicsLayer
+ (position 0.00 -100.00)
(anchor 0.00 0.00)
(children 1
(GraphicsLayer
Modified: tags/Safari-608.1.30/LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -20,12 +20,12 @@
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(position 1.00 1.00)
- (bounds origin 0.00 200.00)
(bounds 305.00 305.00)
(children 1
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(scrollOffset (0,200))
+ (position 0.00 -200.00)
(anchor 0.00 0.00)
(bounds 305.00 1020.00)
(drawsContent 1)
Modified: tags/Safari-608.1.30/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -15,12 +15,12 @@
(GraphicsLayer
(offsetFromRenderer width=2 height=2)
(position 2.00 2.00)
- (bounds origin 366.00 0.00)
(bounds 400.00 204.00)
(children 1
(GraphicsLayer
(offsetFromRenderer width=2 height=2)
(scrollOffset (366,0))
+ (position -366.00 0.00)
(anchor 0.00 0.00)
(bounds 766.00 204.00)
(drawsContent 1)
Modified: tags/Safari-608.1.30/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -16,7 +16,6 @@
(position 43.00 43.00)
(children 1
(GraphicsLayer
- (bounds origin 80.00 80.00)
(anchor 0.00 0.00)
(bounds 300.00 150.00)
(children 1
Modified: tags/Safari-608.1.30/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -63,7 +63,6 @@
(position 12.00 12.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 120.00)
(anchor 0.00 0.00)
(bounds 480.00 400.00)
(children 1
Modified: tags/Safari-608.1.30/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -21,11 +21,11 @@
(position 16.00 16.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 100.00)
(anchor 0.00 0.00)
(bounds 400.00 300.00)
(children 1
(GraphicsLayer
+ (position 0.00 -100.00)
(anchor 0.00 0.00)
(children 1
(GraphicsLayer
Modified: tags/Safari-608.1.30/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -21,11 +21,11 @@
(position 16.00 16.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 100.00)
(anchor 0.00 0.00)
(bounds 400.00 300.00)
(children 1
(GraphicsLayer
+ (position 0.00 -100.00)
(anchor 0.00 0.00)
(children 1
(GraphicsLayer
Modified: tags/Safari-608.1.30/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -20,11 +20,11 @@
(position 16.00 16.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 100.00)
(anchor 0.00 0.00)
(bounds 400.00 300.00)
(children 1
(GraphicsLayer
+ (position 0.00 -100.00)
(children 1
(GraphicsLayer
(anchor 0.00 0.00)
Modified: tags/Safari-608.1.30/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -20,11 +20,11 @@
(position 16.00 16.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 100.00)
(anchor 0.00 0.00)
(bounds 400.00 300.00)
(children 1
(GraphicsLayer
+ (position 0.00 -100.00)
(anchor 0.00 0.00)
(children 1
(GraphicsLayer
@@ -34,12 +34,6 @@
(GraphicsLayer
(bounds 400.00 1016.00)
(drawsContent 1)
- (repaint rects
- (rect 0.00 0.00 400.00 1016.00)
- (rect 0.00 0.00 400.00 1016.00)
- (rect 8.00 8.00 384.00 1000.00)
- (rect 0.00 0.00 400.00 1016.00)
- )
(children 1
(GraphicsLayer
(position 8.00 8.00)
Modified: tags/Safari-608.1.30/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -20,11 +20,11 @@
(position 16.00 16.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 100.00)
(anchor 0.00 0.00)
(bounds 400.00 300.00)
(children 1
(GraphicsLayer
+ (position 0.00 -100.00)
(anchor 0.00 0.00)
(children 1
(GraphicsLayer
Modified: tags/Safari-608.1.30/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -65,11 +65,11 @@
(position 12.00 12.00)
(children 1
(GraphicsLayer
- (bounds origin 0.00 120.00)
(anchor 0.00 0.00)
(bounds 465.00 400.00)
(children 1
(GraphicsLayer
+ (position 0.00 -120.00)
(anchor 0.00 0.00)
(children 1
(GraphicsLayer
Modified: tags/Safari-608.1.30/LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -30,10 +30,9 @@
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(position 1.00 1.00)
- (bounds origin 0.00 1800.00)
(bounds 385.00 512.00)
- (visible rect 0.00, 1800.00 385.00 x 512.00)
- (coverage rect 0.00, 1800.00 385.00 x 512.00)
+ (visible rect 0.00, 0.00 385.00 x 512.00)
+ (coverage rect 0.00, 0.00 385.00 x 512.00)
(intersects coverage rect 1)
(contentsScale 1.00)
(children 1
@@ -40,6 +39,7 @@
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(scrollOffset (0,1800))
+ (position 0.00 -1800.00)
(anchor 0.00 0.00)
(bounds 385.00 3000.00)
(drawsContent 1)
Modified: tags/Safari-608.1.30/LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt (246602 => 246603)
--- tags/Safari-608.1.30/LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt 2019-06-19 19:00:49 UTC (rev 246603)
@@ -30,10 +30,9 @@
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(position 1.00 1.00)
- (bounds origin 0.00 200.00)
(bounds 385.00 512.00)
- (visible rect 0.00, 200.00 385.00 x 512.00)
- (coverage rect 0.00, 200.00 385.00 x 512.00)
+ (visible rect 0.00, 0.00 385.00 x 512.00)
+ (coverage rect 0.00, 0.00 385.00 x 512.00)
(intersects coverage rect 1)
(contentsScale 1.00)
(children 1
@@ -40,6 +39,7 @@
(GraphicsLayer
(offsetFromRenderer width=1 height=1)
(scrollOffset (0,200))
+ (position 0.00 -200.00)
(anchor 0.00 0.00)
(bounds 385.00 3000.00)
(drawsContent 1)
Modified: tags/Safari-608.1.30/Source/WebCore/ChangeLog (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/ChangeLog 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/ChangeLog 2019-06-19 19:00:49 UTC (rev 246603)
@@ -1,3 +1,7 @@
+2019-06-19 Kocsen Chung <[email protected]>
+
+ Revert r246538. rdar://problem/51905737
+
2019-06-18 Saam Barati <[email protected]>
[WHLSL] Support matrices
Modified: tags/Safari-608.1.30/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2019-06-19 19:00:49 UTC (rev 246603)
@@ -446,15 +446,24 @@
void AsyncScrollingCoordinator::reconcileScrollPosition(FrameView& frameView, ScrollingLayerPositionAction scrollingLayerPositionAction)
{
+#if PLATFORM(IOS_FAMILY)
+ // Doing all scrolling like this (UIScrollView style) would simplify code.
auto* scrollContainerLayer = scrollContainerLayerForFrameView(frameView);
if (!scrollContainerLayer)
return;
-
- // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).
if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set)
scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition());
else
scrollContainerLayer->syncBoundsOrigin(frameView.scrollPosition());
+#else
+ auto* scrolledContentsLayer = scrolledContentsLayerForFrameView(frameView);
+ if (!scrolledContentsLayer)
+ return;
+ if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set)
+ scrolledContentsLayer->setPosition(-frameView.scrollPosition());
+ else
+ scrolledContentsLayer->syncPosition(-frameView.scrollPosition());
+#endif
}
void AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea& scrollableArea, ScrollbarOrientation orientation)
Modified: tags/Safari-608.1.30/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2019-06-19 19:00:49 UTC (rev 246603)
@@ -272,7 +272,7 @@
GraphicsLayer* ScrollingCoordinator::insetClipLayerForFrameView(FrameView& frameView)
{
if (auto* renderView = frameView.frame().contentRenderer())
- return renderView->compositor().scrollContainerLayer();
+ return renderView->compositor().clipLayer();
return nullptr;
}
Modified: tags/Safari-608.1.30/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm 2019-06-19 19:00:49 UTC (rev 246603)
@@ -199,8 +199,7 @@
void ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers()
{
- // We use scroll position here because the root content layer is offset to account for scrollOrigin (see FrameView::positionForRootContentLayer).
- [scrollContainerLayer() _web_setLayerBoundsOrigin:currentScrollPosition()];
+ scrolledContentsLayer().position = -currentScrollPosition();
}
void ScrollingTreeFrameScrollingNodeMac::repositionRelatedLayers()
Modified: tags/Safari-608.1.30/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm 2019-06-19 19:00:49 UTC (rev 246603)
@@ -31,7 +31,6 @@
#import "Logging.h"
#import "ScrollingStateOverflowScrollingNode.h"
#import "ScrollingTree.h"
-#import "WebCoreCALayerExtras.h"
#import <wtf/text/TextStream.h>
namespace WebCore {
@@ -92,7 +91,7 @@
void ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers()
{
auto scrollOffset = ScrollableArea::scrollOffsetFromPosition(currentScrollPosition(), toFloatSize(scrollOrigin()));
- [scrollContainerLayer() _web_setLayerBoundsOrigin:scrollOffset];
+ scrolledContentsLayer().position = -scrollOffset;
}
void ScrollingTreeOverflowScrollingNodeMac::repositionRelatedLayers()
Modified: tags/Safari-608.1.30/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h 2019-06-19 19:00:49 UTC (rev 246603)
@@ -28,7 +28,6 @@
@interface CALayer (WebCoreCALayerExtras)
- (void)web_disableAllActions;
-- (void)_web_setLayerBoundsOrigin:(CGPoint)origin;
- (void)_web_setLayerTopLeftPosition:(CGPoint)position;
+ (CALayer *)_web_renderLayerWithContextID:(uint32_t)contextID;
Modified: tags/Safari-608.1.30/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm 2019-06-19 19:00:49 UTC (rev 246603)
@@ -56,13 +56,6 @@
};
}
-- (void)_web_setLayerBoundsOrigin:(CGPoint)origin
-{
- CGRect bounds = [self bounds];
- bounds.origin = origin;
- [self setBounds:bounds];
-}
-
- (void)_web_setLayerTopLeftPosition:(CGPoint)position
{
CGSize layerSize = [self bounds].size;
Modified: tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerBacking.cpp (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerBacking.cpp 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerBacking.cpp 2019-06-19 19:00:49 UTC (rev 246603)
@@ -1225,6 +1225,9 @@
ScrollOffset scrollOffset = m_owningLayer.scrollOffset();
updateScrollOffset(scrollOffset);
+#if PLATFORM(IOS_FAMILY)
+ m_scrolledContentsLayer->setPosition({ }); // FIXME: necessary?
+#endif
FloatSize oldScrollingLayerOffset = m_scrollContainerLayer->offsetFromRenderer();
m_scrollContainerLayer->setOffsetFromRenderer(toFloatSize(paddingBox.location()));
@@ -1303,10 +1306,17 @@
void RenderLayerBacking::setLocationOfScrolledContents(ScrollOffset scrollOffset, ScrollingLayerPositionAction setOrSync)
{
+#if PLATFORM(IOS_FAMILY)
if (setOrSync == ScrollingLayerPositionAction::Sync)
m_scrollContainerLayer->syncBoundsOrigin(scrollOffset);
else
m_scrollContainerLayer->setBoundsOrigin(scrollOffset);
+#else
+ if (setOrSync == ScrollingLayerPositionAction::Sync)
+ m_scrolledContentsLayer->syncPosition(-scrollOffset);
+ else
+ m_scrolledContentsLayer->setPosition(-scrollOffset);
+#endif
}
void RenderLayerBacking::updateScrollOffset(ScrollOffset scrollOffset)
@@ -1320,8 +1330,6 @@
setLocationOfScrolledContents(scrollOffset, ScrollingLayerPositionAction::Set);
m_owningLayer.setRequiresScrollPositionReconciliation(false);
}
-
- ASSERT(m_scrolledContentsLayer->position().isZero());
}
void RenderLayerBacking::updateAfterDescendants()
Modified: tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerCompositor.cpp (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-06-19 19:00:49 UTC (rev 246603)
@@ -301,6 +301,7 @@
// Take care that the owned GraphicsLayers are deleted first as their destructors may call back here.
GraphicsLayer::unparentAndClear(m_rootContentsLayer);
+ GraphicsLayer::unparentAndClear(m_clipLayer);
GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
@@ -520,7 +521,7 @@
#if ENABLE(TREE_DEBUGGING)
if (layersLogEnabled()) {
LOG(Layers, "RenderLayerCompositor::flushPendingLayerChanges");
- showGraphicsLayerTree(m_overflowControlsHostLayer.get());
+ showGraphicsLayerTree(m_rootContentsLayer.get());
}
#endif
}
@@ -1968,7 +1969,7 @@
layer->setNeedsCompositingGeometryUpdate();
if (m_scrolledContentsLayer) {
- updateScrollContainerGeometry();
+ updateScrollLayerClipping();
frameViewDidScroll();
updateOverflowControlsLayers();
@@ -1988,26 +1989,28 @@
return scrollingCoordinator && scrollingCoordinator->coordinatesScrollingForFrameView(m_renderView.frameView());
}
-void RenderLayerCompositor::updateLayersForScrollPosition()
+void RenderLayerCompositor::updateScrollLayerPosition()
{
ASSERT(!hasCoordinatedScrolling());
- ASSERT(m_scrollContainerLayer);
+ ASSERT(m_scrolledContentsLayer);
auto& frameView = m_renderView.frameView();
- // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).
- m_scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition());
+ IntPoint scrollPosition = frameView.scrollPosition();
+ m_scrolledContentsLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
+
if (auto* fixedBackgroundLayer = fixedRootBackgroundLayer())
fixedBackgroundLayer->setPosition(frameView.scrollPositionForFixedPosition());
}
-void RenderLayerCompositor::updateScrollContainerGeometry()
+void RenderLayerCompositor::updateScrollLayerClipping()
{
- if (!m_scrollContainerLayer)
+ auto* layerForClipping = this->layerForClipping();
+ if (!layerForClipping)
return;
- m_scrollContainerLayer->setSize(m_renderView.frameView().sizeForVisibleContent());
- m_scrollContainerLayer->setPosition(positionForClipLayer());
+ layerForClipping->setSize(m_renderView.frameView().sizeForVisibleContent());
+ layerForClipping->setPosition(positionForClipLayer());
}
FloatPoint RenderLayerCompositor::positionForClipLayer() const
@@ -2032,7 +2035,7 @@
return;
}
- updateLayersForScrollPosition();
+ updateScrollLayerPosition();
}
void RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars()
@@ -2249,10 +2252,10 @@
if (m_rootContentsLayer) {
m_rootContentsLayer->setSize(m_renderView.frameView().contentsSize());
m_rootContentsLayer->setPosition(m_renderView.frameView().positionForRootContentLayer());
- m_rootContentsLayer->setAnchorPoint({ });
+ m_rootContentsLayer->setAnchorPoint(FloatPoint3D());
}
- updateScrollContainerGeometry();
+ updateScrollLayerClipping();
#if ENABLE(RUBBER_BANDING)
if (m_contentShadowLayer && m_rootContentsLayer) {
@@ -3679,7 +3682,7 @@
// We want the overhang areas layer to be positioned below the frame contents,
// so insert it below the clip layer.
- m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, m_scrollContainerLayer.get());
+ m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, layerForClipping());
}
} else
GraphicsLayer::unparentAndClear(m_layerForOverhangAreas);
@@ -3769,7 +3772,7 @@
m_rootContentsLayer->setName("content root");
IntRect overflowRect = snappedIntRect(m_renderView.layoutOverflowRect());
m_rootContentsLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.maxY()));
- m_rootContentsLayer->setPosition({ });
+ m_rootContentsLayer->setPosition(FloatPoint());
#if PLATFORM(IOS_FAMILY)
// Page scale is applied above this on iOS, so we'll just say that our root layer applies it.
@@ -3785,35 +3788,52 @@
if (requiresScrollLayer(expectedAttachment)) {
if (!m_overflowControlsHostLayer) {
ASSERT(!m_scrolledContentsLayer);
+ ASSERT(!m_clipLayer);
// Create a layer to host the clipping layer and the overflow controls layers.
m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
m_overflowControlsHostLayer->setName("overflow controls host");
- m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer);
- m_scrollContainerLayer->setName("scroll container");
- m_scrollContainerLayer->setMasksToBounds(true);
- m_scrollContainerLayer->setAnchorPoint({ });
-
m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrolledContents);
m_scrolledContentsLayer->setName("scrolled contents");
m_scrolledContentsLayer->setAnchorPoint({ });
- m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer);
- m_scrollContainerLayer->addChild(*m_scrolledContentsLayer);
+#if PLATFORM(IOS_FAMILY)
+ if (m_renderView.settings().asyncFrameScrollingEnabled()) {
+ m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer);
+
+ m_scrollContainerLayer->setName("scroll container");
+ m_scrollContainerLayer->setMasksToBounds(true);
+ m_scrollContainerLayer->setAnchorPoint({ });
+
+ m_scrollContainerLayer->addChild(*m_scrolledContentsLayer);
+ m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer);
+ }
+#endif
+ if (!m_scrollContainerLayer) {
+ m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
+ m_clipLayer->setName("frame clipping");
+ m_clipLayer->setMasksToBounds(true);
+ m_clipLayer->setAnchorPoint({ });
+
+ m_clipLayer->addChild(*m_scrolledContentsLayer);
+ m_overflowControlsHostLayer->addChild(*m_clipLayer);
+ }
+
m_scrolledContentsLayer->addChild(*m_rootContentsLayer);
- updateScrollContainerGeometry();
+ updateScrollLayerClipping();
updateOverflowControlsLayers();
if (hasCoordinatedScrolling())
scheduleLayerFlush(true);
else
- updateLayersForScrollPosition();
+ updateScrollLayerPosition();
}
} else {
if (m_overflowControlsHostLayer) {
GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer);
+ GraphicsLayer::unparentAndClear(m_clipLayer);
GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
}
@@ -3860,6 +3880,7 @@
if (m_overflowControlsHostLayer) {
GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer);
+ GraphicsLayer::unparentAndClear(m_clipLayer);
GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
}
@@ -4299,7 +4320,7 @@
FrameView& frameView = m_renderView.frameView();
scrollingCoordinator.setNodeLayers(nodeID, { nullptr,
scrollContainerLayer(), scrolledContentsLayer(),
- fixedRootBackgroundLayer(), nullptr, rootContentsLayer(),
+ fixedRootBackgroundLayer(), clipLayer(), rootContentsLayer(),
frameView.layerForHorizontalScrollbar(), frameView.layerForVerticalScrollbar() });
} else {
auto& backing = *layer.backing();
Modified: tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerCompositor.h (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerCompositor.h 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerCompositor.h 2019-06-19 19:00:49 UTC (rev 246603)
@@ -246,8 +246,11 @@
GraphicsLayer* scrollContainerLayer() const { return m_scrollContainerLayer.get(); }
GraphicsLayer* scrolledContentsLayer() const { return m_scrolledContentsLayer.get(); }
+ GraphicsLayer* clipLayer() const { return m_clipLayer.get(); }
GraphicsLayer* rootContentsLayer() const { return m_rootContentsLayer.get(); }
+ GraphicsLayer* layerForClipping() const { return m_clipLayer ? m_clipLayer.get() : m_scrollContainerLayer.get(); }
+
#if ENABLE(RUBBER_BANDING)
GraphicsLayer* headerLayer() const { return m_layerForHeader.get(); }
GraphicsLayer* footerLayer() const { return m_layerForFooter.get(); }
@@ -437,8 +440,8 @@
void updateOverflowControlsLayers();
- void updateLayersForScrollPosition();
- void updateScrollContainerGeometry();
+ void updateScrollLayerPosition();
+ void updateScrollLayerClipping();
FloatPoint positionForClipLayer() const;
@@ -571,6 +574,7 @@
RefPtr<GraphicsLayer> m_rootContentsLayer;
// Enclosing clipping layer for iframe content
+ RefPtr<GraphicsLayer> m_clipLayer;
RefPtr<GraphicsLayer> m_scrollContainerLayer;
RefPtr<GraphicsLayer> m_scrolledContentsLayer;
Modified: tags/Safari-608.1.30/Source/WebKit/ChangeLog (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebKit/ChangeLog 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebKit/ChangeLog 2019-06-19 19:00:49 UTC (rev 246603)
@@ -1,3 +1,7 @@
+2019-06-19 Kocsen Chung <[email protected]>
+
+ Revert r246538. rdar://problem/51905737
+
2019-06-18 Dean Jackson <[email protected]>
UIContextMenuInteraction implementation for WKContentView
Modified: tags/Safari-608.1.30/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm (246602 => 246603)
--- tags/Safari-608.1.30/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm 2019-06-19 18:59:00 UTC (rev 246602)
+++ tags/Safari-608.1.30/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm 2019-06-19 19:00:49 UTC (rev 246603)
@@ -122,7 +122,9 @@
return;
}
- // Main frame scrolling is handled by the main UIScrollView.
+ auto scrollPosition = currentScrollPosition();
+ // FIXME: This is always wrong on iOS. Maybe assert that we always have a delegate.
+ [scrolledContentsLayer() setPosition:-scrollPosition];
}
void ScrollingTreeFrameScrollingNodeRemoteIOS::repositionRelatedLayers()