WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
194179
Clarify layer nomenclature for the root scrolling layers
https://bugs.webkit.org/show_bug.cgi?id=194179
Summary
Clarify layer nomenclature for the root scrolling layers
Simon Fraser (smfr)
Reported
2019-02-01 16:21:53 PST
We want to end up with "scroll container layer" and "scrolled contents layer" in RenderLayerCompositor. However, on macOS, we use a different hierarchy: (layer [0 55 0] [0 0 763 801] [0 0 0] (name "CALayer(0x60000040bac0) GraphicsLayer(0x1ce4fa580, 44) frame clipping") (masksToBounds true) (sublayers (array (layer [0 0 0] [0 0 0 0] [0 0 0] (name "CALayer(0x60000040bb60) GraphicsLayer(0x1ce4fa2c0, 43) frame scrolling") (sublayers (array (layer [0 0 0] [0 0 768 31377] [0 0 0] (name "CALayer(0x60000040bb20) GraphicsLayer(0x1ce4ecdc0, 41) content root") "frame clipping" is like "scroll container". "frame scrolling" is a 0x0 layer whose position we change to effect scrolling. "content root" hosts the RenderView's layer and the document overlay root. Scrollbar layers are siblings of the "frame clipping layer".
Attachments
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2019-02-01 16:24:17 PST
The "frame scrolling" layer (m_scrollLayer) can gain children for headers and footers, overhang areas, and content shadow. So I think m_scrollLayer counts as the scrolled contents layer, but we don't ever set its size.
Simon Fraser (smfr)
Comment 2
2019-02-01 17:13:46 PST
On iOS, for the root we make no scrolling views in RenderLayerCompositor. For subframes, the UIView is equivalent to the "frame scrolling" layer, which is confusing. Here's the GraphicsLayer tree on iOS: RenderLayerCompositor::updateCompositingLayers - GraphicsLayers post, contentLayersCount 1 (GraphicsLayer 0x346cfe840 "GraphicsLayer(0x346cfe840, 14) content root" (bounds 980.00 5029.00) (children 2 (GraphicsLayer 0x346cfeb00 "GraphicsLayer(0x346cfeb00, 17) RenderView" (bounds 980.00 5029.00) (children 1 (GraphicsLayer 0x346cfedc0 "GraphicsLayer(0x346cfedc0, 19) Page TiledBacking containment" (children 1 (GraphicsLayer 0x346ce4b00 "GraphicsLayer(0x346ce4b00, 26) <iframe>" (offsetFromRenderer width=-20 height=-20) (position 38.00 110.50) (bounds 580.00 480.50) (children 1 (GraphicsLayer 0x346cff340 "GraphicsLayer(0x346cff340, 21) overflow controls host" (position 40.00 40.00) (children 1 (GraphicsLayer 0x346cff600 "GraphicsLayer(0x346cff600, 22) frame scrolling" (anchor 0.00 0.00) (bounds 500.00 400.00) (children 1 (GraphicsLayer 0x346cff080 "GraphicsLayer(0x346cff080, 20) content root" (anchor 0.00 0.00) (bounds 500.00 1304.00) (children 1 (GraphicsLayer 0x346cff8c0 "GraphicsLayer(0x346cff8c0, 23) RenderView" (bounds 500.00 1304.00) (children 1 (GraphicsLayer 0x346ce4000 "GraphicsLayer(0x346ce4000, 25) Page TiledBacking containment" (primary-layer-id 25) and the UIViews built from it: <WKWebView: 0x7f9a3a800800; frame = (0 0; 768 1024); gestureRecognizers = <NSArray: 0x7f9a38d07ed0>; layer = <CALayer: 0x7f9ad64322a0>> | <WKScrollView: 0x7f9a3a81d000; baseClass = UIScrollView; frame = (0 0; 768 1024); gestureRecognizers = <NSArray: 0x7f9ad6433ad0>; layer = <CALayer: 0x7f9ad6433190>; contentOffset: {0, -61.5}; contentSize: {768, 3941}; adjustedContentInset: {70, 0, 0, 0}> | | <WKContentView: 0x7f9a3a824000; frame = (0 0; 768 3941.09); transform = [0.78367346938775506, 0, 0, 0.78367346938775506, 0, 0]; gestureRecognizers = <NSArray: 0x7f9a36724810>; layer = <CALayer: 0x7f9ad6435a00>> | | | <UIView: 0x7f9a365307c0; frame = (0 0; 980 5029); clipsToBounds = YES; layer = <CALayer: 0x7f9a365002e0>> | | | | <UIView: 0x7f9a365305e0; frame = (0 0; 980 5029); autoresize = W+H; layer = <CALayer: 0x7f9a3650aaf0>> | | | | | <WKCompositingView: 0x7f99fa50f5b0; frame = (0 0; 980 5029); layer = <CALayer: 0x7f99fa517340>> layerID = 1 "GraphicsLayer(0x346cfe580, 1) drawing area root" | | | | | | <WKCompositingView: 0x7f9a38f399d0; frame = (0 0; 980 5029); layer = <CALayer: 0x7f9a38f08290>> layerID = 14 "GraphicsLayer(0x346cfe840, 14) content root" | | | | | | | <WKCompositingView: 0x7f9a38f39140; frame = (0 0; 980 5029); layer = <CALayer: 0x7f9a38f1f9e0>> layerID = 17 "GraphicsLayer(0x346cfeb00, 17) RenderView" | | | | | | | | <WKCompositingView: 0x7f9a38f111c0; frame = (0 0; 0 0); transform = [1.2760416269302368, 0, 0, 1.2760416269302368, 0, 0]; layer = <CALayer: 0x7f9a38f0fe50>> layerID = 18 "TileGrid container" | | | | | | | | | <WKPlainRemoteLayer: 0x7f9a38f0d470> layerID = 27 "tile at 0,0" (layer) | | | | | | | | | <WKPlainRemoteLayer: 0x7f9a38f58ff0> layerID = 28 "tile at 0,512" (layer) | | | | | | | | | <WKPlainRemoteLayer: 0x7f9a38e39130> layerID = 31 "tile at 0,1024" (layer) | | | | | | | | <WKCompositingView: 0x7f9a38f19540; frame = (0 0; 0 0); layer = <CALayer: 0x7f9a38f5e2a0>> layerID = 19 "GraphicsLayer(0x346cfedc0, 19) Page TiledBacking containment" | | | | | | | | | <WKCompositingView: 0x7f9a38f4f240; frame = (37.9623 110.378; 580 480.5); layer = <CALayer: 0x7f9a38f4e730>> layerID = 26 "GraphicsLayer(0x346ce4b00, 26) <iframe>" | | | | | | | | | | <WKCompositingView: 0x7f9a38f08960; frame = (40 40; 0 0); layer = <CALayer: 0x7f9a38f23480>> layerID = 21 "GraphicsLayer(0x346cff340, 21) overflow controls host" | | | | | | | | | | | <WKChildScrollView: 0x7f9a3b818000; baseClass = UIScrollView; frame = (0 0; 500 400); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7f9a38f0e710>; layer = <CALayer: 0x7f9a38f471f0>; contentOffset: {0, 65.5}; contentSize: {500, 1304}; adjustedContentInset: {0, 0, 0, 0}> "frame scrolling (20)" | | | | | | | | | | | | <WKCompositingView: 0x7f9a38f0b110; frame = (0 0; 500 1304); layer = <CALayer: 0x7f9a38f07c20>> layerID = 20 "GraphicsLayer(0x346cff080, 20) content root" | | | | | | | | | | | | | <WKCompositingView: 0x7f9a38f08e40; frame = (-0.161467 -0.246099; 500 1304); layer = <CALayer: 0x7f9a38f15d20>> layerID = 23 "GraphicsLayer(0x346cff8c0, 23) RenderView" | | | | | | | | | | | | | | <WKCompositingView: 0x7f9a38f2b9c0; frame = (0 0; 0 0); transform = [1.2760416269302368, 0, 0, 1.2760416269302368, 0, 0]; layer = <CALayer: 0x7f9a38f59260>> layerID = 24 "TileGrid container" | | | | | | | | | | | | | | | <WKPlainRemoteLayer: 0x7f9a38f5b370> layerID = 29 "tile at 0,0" (layer) | | | | | | | | | | | | | | | <WKPlainRemoteLayer: 0x7f9a38f5db50> layerID = 30 "tile at 0,512" (layer) | | | | | | | | | | | | | | <WKCompositingView: 0x7f9a38f02e90; frame = (0 0; 0 0); layer = <CALayer: 0x7f9a38f22e00>> layerID = 25 "GraphicsLayer(0x346ce4000, 25) Page TiledBacking containment" | | | | | | | | | | | | <UIImageView: 0x7f9a38f19e50; frame = (3 460; 491.5 2.5); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x7f9a38f2cfb0>> | | | | | | | | | | | | <UIImageView: 0x7f9a38f5e440; frame = (494.5 88.5; 2.5 121); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x7f9a38f5ec00>> | | | | | | | <WKCompositingView: 0x7f9a38f39320; frame = (0 0; 0 0); layer = <CALayer: 0x7f9a38f39500>> layerID = 15 "GraphicsLayer(0x346cfe000, 15) Document overlay Container" | | | | | | <WKCompositingView: 0x7f9a38f2cd50; frame = (0 0; 0 0); layer = <CALayer: 0x7f9a38f5c840>> layerID = 16 "GraphicsLayer(0x346cfe2c0, 16) View overlay container" | | <UIView: 0x7f9a36724070; frame = (0 0; 0 0); opaque = NO; layer = <CALayer: 0x7f9a36703aa0>> | | <UIImageView: 0x7f99f7f07de0; frame = (3 957; 759.5 2.5); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x7f99f7f07c20>> | | <UIImageView: 0x7f99f7f080e0; frame = (762.5 5; 2.5 244); opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x7f99f7f080c0>>
Simon Fraser (smfr)
Comment 3
2019-02-01 17:17:22 PST
I don't think we need "overflow controls host" on iOS. The UIScrollView should equate to the scrollContainerLayer, and the "content root" to the scrolledContentsLayer I think (though UIKit may add other children to the UIScrollView. Wherever we set the scroll position on a scrollable thing, we need to pass both the scrollContainerLayer and the scrolledContentsLayer, and for iOS set the bounds origin on the scrollContainerLayer, and on macOS set the position on the scrolledContentsLayer.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug