This scenario verifies that the cyan "container" element scrolls properly with squashing enabled.
CASE 1, original layer tree:
-(GraphicsLayer
- (bounds 785.00 4050.00)
- (children 1
- (GraphicsLayer
- (bounds 785.00 4050.00)
- (contentsOpaque 1)
- (drawsContent 1)
- (children 1
- (GraphicsLayer
- (bounds 400.00 200.00)
- (contentsOpaque 1)
- (drawsContent 1)
- (backfaceVisibility hidden)
- (backgroundColor #0000FF)
- (children 1
- (GraphicsLayer
- (children 2
- (GraphicsLayer
- (bounds 50.00 50.00)
- (contentsOpaque 1)
- (drawsContent 1)
- (backfaceVisibility hidden)
- (backgroundColor #FF0000)
- )
- (GraphicsLayer
- (position 100.00 50.00)
- (bounds 200.00 4000.00)
- (drawsContent 1)
- )
- )
- )
- )
- )
- )
- )
- )
-)
+{
+ "bounds": [785, 4050],
+ "children": [
+ {
+ "bounds": [785, 4050],
+ "contentsOpaque": true,
+ "drawsContent": true,
+ "children": [
+ {
+ "bounds": [400, 200],
+ "contentsOpaque": true,
+ "drawsContent": true,
+ "backfaceVisibility": "hidden",
+ "backgroundColor": "#0000FF",
+ "children": [
+ {
+ "children": [
+ {
+ "bounds": [50, 50],
+ "contentsOpaque": true,
+ "drawsContent": true,
+ "backfaceVisibility": "hidden",
+ "backgroundColor": "#FF0000"
+ },
+ {
+ "position": [100, 50],
+ "bounds": [200, 4000],
+ "drawsContent": true
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
CASE 2, scrolling y to 80, the "container" element should remain positioned with respect to the scrolled document, the fixed-pos layer compensates for the new scroll position:
-(GraphicsLayer
- (bounds 785.00 4050.00)
- (children 1
- (GraphicsLayer
- (bounds 785.00 4050.00)
- (contentsOpaque 1)
- (drawsContent 1)
- (children 1
- (GraphicsLayer
- (position 0.00 80.00)
- (bounds 400.00 200.00)
- (contentsOpaque 1)
- (drawsContent 1)
- (backfaceVisibility hidden)
- (backgroundColor #0000FF)
- (children 1
- (GraphicsLayer
- (children 2
- (GraphicsLayer
- (bounds 50.00 50.00)
- (contentsOpaque 1)
- (drawsContent 1)
- (backfaceVisibility hidden)
- (backgroundColor #FF0000)
- )
- (GraphicsLayer
- (position 100.00 -30.00)
- (bounds 200.00 4000.00)
- (drawsContent 1)
- )
- )
- )
- )
- )
- )
- )
- )
-)
+{
+ "bounds": [785, 4050],
+ "children": [
+ {
+ "bounds": [785, 4050],
+ "contentsOpaque": true,
+ "drawsContent": true,
+ "children": [
+ {
+ "position": [0, 80],
+ "bounds": [400, 200],
+ "contentsOpaque": true,
+ "drawsContent": true,
+ "backfaceVisibility": "hidden",
+ "backgroundColor": "#0000FF",
+ "children": [
+ {
+ "children": [
+ {
+ "bounds": [50, 50],
+ "contentsOpaque": true,
+ "drawsContent": true,
+ "backfaceVisibility": "hidden",
+ "backgroundColor": "#FF0000"
+ },
+ {
+ "position": [100, -30],
+ "bounds": [200, 4000],
+ "drawsContent": true
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}