1. 14 Mar, 2016 1 commit
  2. 12 Mar, 2016 1 commit
  3. 11 Mar, 2016 1 commit
    • Adam Barth's avatar
      Add RotatedBox which applies a rotation before layout · e59b25b2
      Adam Barth authored
      Transform applies its transform before painting, but sometimes you want
      the widget to layout after its transform has been applied. We can't
      handle general tranforms in this way because we can't couple width and
      height constriants, but we can handle certain rotations.
      
      Fixes #1214
      e59b25b2
  4. 08 Mar, 2016 1 commit
    • Adam Barth's avatar
      Remove bogus intrinsic size assert · 501b948e
      Adam Barth authored
      This patch tweaks the definition of max intrinsic size to give implementations
      more wiggle room to compute there intrinsic sizes more efficiently.
      Specifically, implementations can now ignore the incomming constraint in the
      cross axis if they prefer.
      
      This patch removes an assert that is no longer valid w.r.t. the new definition
      of intrinsic sizing.
      
      Fixes #2099
      501b948e
  5. 23 Feb, 2016 1 commit
  6. 14 Feb, 2016 1 commit
  7. 11 Feb, 2016 1 commit
    • Ian Hickson's avatar
      Clean up imports and exports. · a94999ba
      Ian Hickson authored
      Each layer is supposed to reexport the parts of the previous layer
      that are part of its API.
      
      - In painting.dart, export from dart:ui all the Canvas-related APIs
        that make sense to be used at higher levels, e.g. PaintingStyle.
      
      - Delete painting/shadows.dart. It was dead code.
      
      - In rendering/object.dart, export all of painting.dart.
      
      - In widgets/basic.dart, export all of painting.dart and
        animation.dart. Some classes in animation/ are renamed to make this
        less disruptive and confusing to the namespace.
      
      - Split out Stocks back into an import model rather than a part model,
        so that it's easier to manage its dependencies on a per-file basis.
      
      - Move Ticker to scheduler library.
      
      - Remove as many redundant imports as possible now.
      
      - Some minor nit picking cleanup in various files.
      a94999ba
  8. 10 Feb, 2016 2 commits
    • Hixie's avatar
      More BoxConstraints asserts · 29654016
      Hixie authored
      The asserting will continue until morale improves!
      
      * Convert all assert(*.isNormalized) checks to use the new
        debugAssertIsNormalized technology.
      * Convert CustomMultiChildLayout to use the new RenderingError
        technology to greatly improve the detail in errors you get when
        writing CustomMultiChildLayout delegates.
      * Add BoxConstraints.copyWith().
      * Indent the descendants in the rendering exception data dump so that
        when you have multiple children it's clearer what's going on.
      29654016
    • Hixie's avatar
      Improve asserts around BoxConstraints · 3bd8bc33
      Hixie authored
      Negative constraints never make sense, so catch those too.
      
      Make RenderObject.layout's isNormalized assert use the newer more fancy
      debug version of isNormalized.
      3bd8bc33
  9. 06 Feb, 2016 1 commit
  10. 05 Feb, 2016 1 commit
    • Hixie's avatar
      Improve exceptions and asserts for rendering lib. · 1a0484cc
      Hixie authored
      * Use actual exceptions rather than assertions containing code
        containing strings when trying to give messages to authors.
      * Introduce RenderingError which is an AssertionError that takes a
        string argument, to support the above.
      * Provide a BoxDimensions.hasBoundedWidth/hasBoundedHeight API.
      * Document BoxDimensions.isNormalized.
      * Provide more useful information when we assert isNormalized and find
        that it is false.
      * When finding the size is infinite, crawl the tree to figure out which
        render box is likely responsible for the infinite constraints.
      * Provide more information when size doesn't match the constraints.
      * Provide more information when intrinsic dimension methods violate the
        constraints.
      * Only spam a huge amount of information for the first exception from
        the rendering library. I've noticed a lot of people looking at the
        last exception printed rather than the first and that's very
        misleading -- after the rendering library hits an exception, all bets
        are off regarding what'll happen in the future. All kinds of asserts
        might fire.
      * Improve docs around the debug methods and flags for the above.
      * Make Block default to have no children. Previously, giving no children
        crashed with a confusing message about a null deref in an assert.
      1a0484cc
  11. 27 Jan, 2016 1 commit
  12. 20 Jan, 2016 1 commit
  13. 18 Jan, 2016 1 commit
    • Ian Hickson's avatar
      Fix some intrinsic constraints contract violations. · 60d9ab7e
      Ian Hickson authored
      RenderBlock wasn't constraining the results.
      RenderPadding wasn't constraining the results (which matters
      especially when the constraints can't fit the padding in the first
      place).
      RenderViewport wasn't constraining the results.
      
      Add a test for the block case.
      
      To catch this kind of thing in the future, add some asserts to
      debugDoesMeetConstraints() that all four intrinsic functions return
      values that are within the constraints.
      
      RenderBlockViewport doesn't support returning intrinsics, so turn off
      the "no intrinsic support" asserts (and return zero) when we're doing
      this new assert.
      
      This new assert screwed up the custom layout classes' tests, so adjust
      those tests to ignore the callbacks invoked from these asserts.
      
      Add to the _debugReportException() method a short summary of the
      descendants of this node. It's important to have this information when
      debugging errors like these intrinsic constraints contract violations
      because often nodes just pass the values through to their child so you
      have to go several steps down to find the actual problem.
      
      Fixes https://github.com/flutter/flutter/issues/1210
      60d9ab7e
  14. 15 Jan, 2016 1 commit
  15. 13 Jan, 2016 1 commit
    • Adam Barth's avatar
      Handle degenerate transforms better · 192c6e24
      Adam Barth authored
      No you can't hit things inside degenerate transforms. Tranforming from global
      coordaintes to degenerate local coordinates gives you Point.origin. Also,
      upgrade vector_math to get a better invert constructor.
      
      Fixes #1161
      Fixes #1224
      192c6e24
  16. 12 Jan, 2016 1 commit
  17. 11 Jan, 2016 2 commits
  18. 09 Jan, 2016 1 commit
  19. 02 Jan, 2016 2 commits
    • Adam Barth's avatar
      Generalize grid layout · 46a178dc
      Adam Barth authored
      This patch make grid layout much more flexible. The behavior is factored
      out into a GridDelegate that's modeled after the custom layout
      delegates. The patch includes a MaxTileWidthGridDelegate that implements
      the old behavior and a FixedColumnCountGridDelegate that implements a
      grid layout with a fixed number of columns.
      
      Fixes #1048
      46a178dc
    • Adam Barth's avatar
      RenderBox should use Offset for child offset · e9ac6d30
      Adam Barth authored
      Previously we used Position, which makes it harder to accumulate offsets
      when walking the render tree.
      e9ac6d30
  20. 16 Dec, 2015 1 commit
  21. 11 Dec, 2015 1 commit
    • Ian Hickson's avatar
      applyPaintTransform() improvements · d1364643
      Ian Hickson authored
      Previously, applyPaintTransform() had to know how it was positioned in
      its parent, even though that's really the parent's responsibility.
      
      Now, applyPaintTransform() is given a child and applies the transform
      that it would give the child during paint.
      
      This makes it possible for applyPaintTransform() to work across
      coordinate system boundaries (e.g. box to sector, or view to box --
      previously, view to box only worked because we explicitly skipped that
      step -- since view doesn't actually apply a transform, it doesn't
      really matter).
      d1364643
  22. 10 Dec, 2015 2 commits
  23. 09 Dec, 2015 1 commit
    • Ian Hickson's avatar
      Catch un-normalized BoxConstraints · 1a049c14
      Ian Hickson authored
      Add BoxConstraints.isNormalized feature.
      
      Use this feature in asserts in all the intrinsic dimension methods, in
      various relevant BoxConstraints methods, and in layout().
      
      Wrap the _DebugSize logic in BoxConstraints.constrain() in an assert
      block to avoid a branch in release mode.
      
      Remove the logic in BoxConstraints.isSatisfiedBy() that dealt with
      non-normalized values.
      
      Add BoxConstraints.normalize().
      
      Make RenderCustomOneChildLayoutBox.performLayout() only set
      parentUsesSize on the child if the constraints aren't tight.
      1a049c14
  24. 08 Dec, 2015 1 commit
    • Ian Hickson's avatar
      Make BoxDecoration replaceable. · 2afa87df
      Ian Hickson authored
      Factor out a reusable interface called Decoration from BoxDecoration.
      
      Make all the consumers of BoxDecoration and the erstwhile BoxPainter
      into consumers of Decoration.
      
      Make a BoxPainter be something you get from a Decoration, rather than
      something to which you pass a BoxDecoration.
      
      Rename Shape to BoxShape now that it's documented specifically as
      applying to boxes.
      
      Move EdgeDims to its own file.
      
      Move FractionalOffset up so that it's with the other helper classes in
      its file rather than alone at the end.
      
      Minor change to RenderClipOval's hit testing to avoid taking an
      unnecessary square root.
      
      Rename BoxDecorationPosition to DecorationPosition since
      RenderDecoratedBox now takes any Decoration.
      
      Implement hit testing for rounded rects.
      
      Rename AnimatedBoxDecorationValue to AnimatedDecorationValue, and make
      it support lerping across any Decoration (by deferring to the objects
      involved).
      2afa87df
  25. 05 Dec, 2015 1 commit
    • Ian Hickson's avatar
      PointerInput refactor · f1625556
      Ian Hickson authored
      Instead of PointerInputEvent having a "type" field, we now have a
      different class for each pointer type.
      
      This has ripple effects throughout the system.
      
      I also did code cleanup in affected files while I was there.
      f1625556
  26. 20 Nov, 2015 1 commit
  27. 19 Nov, 2015 1 commit
    • Adam Barth's avatar
      Refactor PaintingContext · fc576814
      Adam Barth authored
      This patch simplifies PaintingContext with several goals:
      
      1) We now call a callback instead of assuming the caller has a single child to
         paint. This change will let us handle render objects that wish to paint more
         than one child.
      2) We now avoid creating lots of empty picture layers because we don't eagerly
         start recording pictures. Instead, we wait for the first caller to touch the
         canvas before creating the picture recorder.
      3) We now are more consistent about which values have incorporated the painting
         offset.
      fc576814
  28. 13 Nov, 2015 2 commits
    • Ian Hickson's avatar
      Trivial whitespace fixes. · 1aa2751b
      Ian Hickson authored
      1aa2751b
    • Ian Hickson's avatar
      Hit Testing Cleanup · 92b9d91a
      Ian Hickson authored
      - Drop the unused BindingHitTestEntry class. (Well, it was
        constructed, but its member was never used, so it wasn't doing
        anything a boring old HitTestEntry couldn't already do.)
      
      - Add toString()s to HitTestEntry and HitTestResult, to aid in
        debugging hit-test related code.
      92b9d91a
  29. 06 Nov, 2015 2 commits
  30. 05 Nov, 2015 1 commit
    • Adam Barth's avatar
      Improve hit testing · 9bc64540
      Adam Barth authored
      Now a RenderBox is considered hit if one of its children are hit or it itself
      decides that it's hit. In particular, empty space inside a flex won't be hit
      because none of the children are located there and a RenderFlex doesn't
      consider itself hittable.
      
      Fixes #53
      Fixes #1221
      9bc64540
  31. 04 Nov, 2015 1 commit
    • Hixie's avatar
      Get more debug info into the rendering layer · 6d389722
      Hixie authored
      - change how we expose settings at the RenderObject layer so that it's
        easier to maintain.
      - expose the Widget owner chain in the RenderObject layer debug output
      - add debug info to RenderOpacity, RenderIgnorePointer, RenderListener
      - make the output for text nodes prettier
      6d389722
  32. 26 Oct, 2015 1 commit
    • Ian Hickson's avatar
      debugPaintPointersEnabled mode · 76381b8f
      Ian Hickson authored
      Implements a mode that highlights RenderBoxes while events are being
      routed through them.
      
      Also, moves the size painting to after paint, so that opaque boxes
      don't obscure the debugging lines.
      76381b8f
  33. 20 Oct, 2015 1 commit
  34. 19 Oct, 2015 1 commit