Make the drawer, popup menus, dialogs, and settings page scrollable.
Also, fixes the stocks list to work properly including hit testing at the bottom of the screen. New classes: RenderViewport: a class that supports positioning a child inside itself and offsetting it. Viewport: a RenderObjectWrapper that wraps RenderViewport. ScrollableViewport: a Component that hooks Viewport up to some scrolling behaviour. Code changes: RenderBlock now only works when it has an unbounded height constraint. I removed the clipping in there since it's no longer needed. I made FixedHeightScrollable use Viewport instead of hand-rolling its clipping with Transform and Clip. This is what fixes the stocks list hit testing at the bottom of the screen. I made anywhere that used to use Block now use ScrollableViewport. RenderFlex now takes a list of children. Justifications for test changes: tests/examples/stocks: changing FixedHeightScrollable to use a RenderViewport instead of a RenderClipRect/RenderTransform combination removes the use of an actual transform. R=abarth@chromium.org Review URL: https://codereview.chromium.org/1223153004 .
This commit is contained in:
@@ -60,18 +60,12 @@ PAINT FOR FRAME #2 ----------------------------------------------
|
||||
2 | | | | | drawRect(Rect.fromLTRB(0.0, 104.0, 800.0, 600.0), Paint(color:Color(0xfffafafa)))
|
||||
2 | | | | | paintChild RenderSizeObserver at Point(0.0, 104.0)
|
||||
2 | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | paintChild RenderClipRect at Point(0.0, 104.0)
|
||||
2 | | | | | | paintChild RenderViewport at Point(0.0, 104.0)
|
||||
2 | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | save
|
||||
2 | | | | | | | clipRect(Rect.fromLTRB(0.0, 104.0, 800.0, 600.0))
|
||||
2 | | | | | | | paintChild RenderTransform at Point(0.0, 104.0)
|
||||
2 | | | | | | | paintChild RenderBlock at Point(0.0, 104.0)
|
||||
2 | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | save
|
||||
2 | | | | | | | | translate(0.0, 104.0)
|
||||
2 | | | | | | | | concat([1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0])
|
||||
2 | | | | | | | | paintChild RenderBlock at Point(0.0, 0.0)
|
||||
2 | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | restore
|
||||
2 | | | | | | | restore
|
||||
2 | | | paintChild RenderDecoratedBox at Point(0.0, 0.0)
|
||||
2 | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
@@ -176,18 +170,12 @@ PAINT FOR FRAME #3 ----------------------------------------------
|
||||
3 | | | | | drawRect(Rect.fromLTRB(0.0, 104.0, 800.0, 600.0), Paint(color:Color(0xfffafafa)))
|
||||
3 | | | | | paintChild RenderSizeObserver at Point(0.0, 104.0)
|
||||
3 | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
3 | | | | | | paintChild RenderClipRect at Point(0.0, 104.0)
|
||||
3 | | | | | | paintChild RenderViewport at Point(0.0, 104.0)
|
||||
3 | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
3 | | | | | | | save
|
||||
3 | | | | | | | clipRect(Rect.fromLTRB(0.0, 104.0, 800.0, 600.0))
|
||||
3 | | | | | | | paintChild RenderTransform at Point(0.0, 104.0)
|
||||
3 | | | | | | | paintChild RenderBlock at Point(0.0, 104.0)
|
||||
3 | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
3 | | | | | | | | save
|
||||
3 | | | | | | | | translate(0.0, 104.0)
|
||||
3 | | | | | | | | concat([1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0])
|
||||
3 | | | | | | | | paintChild RenderBlock at Point(0.0, 0.0)
|
||||
3 | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
3 | | | | | | | | restore
|
||||
3 | | | | | | | restore
|
||||
3 | | | paintChild RenderDecoratedBox at Point(0.0, 0.0)
|
||||
3 | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
|
||||
@@ -24,25 +24,37 @@ PAINT FOR FRAME #2 ----------------------------------------------
|
||||
2 | | | | | | drawRRect(Instance of 'RRect', Paint(color:Color(0xffffffff), drawLooper:true))
|
||||
2 | | | | | | paintChild RenderShrinkWrapWidth at Point(260.0, 218.0)
|
||||
2 | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | paintChild RenderBlock at Point(260.0, 218.0)
|
||||
2 | | | | | | | paintChild RenderDecoratedBox at Point(260.0, 218.0)
|
||||
2 | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | paintChild RenderPadding at Point(260.0, 218.0)
|
||||
2 | | | | | | | | drawRect(Rect.fromLTRB(260.0, 218.0, 540.0, 382.0), Paint(color:Color(0xfffafafa)))
|
||||
2 | | | | | | | | paintChild RenderSizeObserver at Point(260.0, 218.0)
|
||||
2 | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | paintChild RenderParagraph at Point(284.0, 242.0)
|
||||
2 | | | | | | | | | paintChild RenderViewport at Point(260.0, 218.0)
|
||||
2 | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | translate(284.0, 242.0)
|
||||
2 | | | | | | | | | | translate(-284.0, -242.0)
|
||||
2 | | | | | | | | paintChild RenderPadding at Point(260.0, 270.0)
|
||||
2 | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | paintChild RenderParagraph at Point(284.0, 290.0)
|
||||
2 | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | translate(284.0, 290.0)
|
||||
2 | | | | | | | | | | translate(-284.0, -290.0)
|
||||
2 | | | | | | | | paintChild RenderFlex at Point(260.0, 362.0)
|
||||
2 | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | paintChild RenderParagraph at Point(411.0, 362.0)
|
||||
2 | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | translate(411.0, 362.0)
|
||||
2 | | | | | | | | | | translate(-411.0, -362.0)
|
||||
2 | | | | | | | | | | save
|
||||
2 | | | | | | | | | | clipRect(Rect.fromLTRB(260.0, 218.0, 540.0, 382.0))
|
||||
2 | | | | | | | | | | paintChild RenderSizeObserver at Point(260.0, 218.0)
|
||||
2 | | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | | paintChild RenderBlock at Point(260.0, 218.0)
|
||||
2 | | | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | | | paintChild RenderPadding at Point(260.0, 218.0)
|
||||
2 | | | | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | | | | paintChild RenderParagraph at Point(284.0, 242.0)
|
||||
2 | | | | | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | | | | | translate(284.0, 242.0)
|
||||
2 | | | | | | | | | | | | | | translate(-284.0, -242.0)
|
||||
2 | | | | | | | | | | | | paintChild RenderPadding at Point(260.0, 270.0)
|
||||
2 | | | | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | | | | paintChild RenderParagraph at Point(284.0, 290.0)
|
||||
2 | | | | | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | | | | | translate(284.0, 290.0)
|
||||
2 | | | | | | | | | | | | | | translate(-284.0, -290.0)
|
||||
2 | | | | | | | | | | | | paintChild RenderFlex at Point(260.0, 362.0)
|
||||
2 | | | | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | | | | paintChild RenderParagraph at Point(411.0, 362.0)
|
||||
2 | | | | | | | | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | | | | | | | | translate(411.0, 362.0)
|
||||
2 | | | | | | | | | | | | | | translate(-411.0, -362.0)
|
||||
2 | | | | | | | | | | restore
|
||||
------------------------------------------------------------------------
|
||||
PAINTED 2 FRAMES
|
||||
|
||||
Reference in New Issue
Block a user