1. 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
  2. 10 Feb, 2016 1 commit
    • 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
  3. 09 Feb, 2016 3 commits
  4. 06 Feb, 2016 2 commits
    • Adam Barth's avatar
      Add more dartdoc to widgets.dart · 9251504a
      Adam Barth authored
      This patch includes documentation for transitions.dart and for
      scrollable.dart.
      9251504a
    • Adam Barth's avatar
      Remove HomogeneousViewport · 5b896694
      Adam Barth authored
      The virtual viewport machinery now handles all of these use cases.
      Previous clients of ScrollableWidgetList can use ScrollableLazyList
      instead.
      5b896694
  5. 27 Jan, 2016 1 commit
  6. 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
  7. 11 Jan, 2016 1 commit
  8. 06 Jan, 2016 1 commit
    • Adam Barth's avatar
      Switch clients of ScrollableList to ScrollableList2 · b1f9138f
      Adam Barth authored
      This patch also changed ScrollableList2 to use an Iterable instead of an
      List for its children. This change lets clients map their underlying
      data lazily. If the clients actually have a concrete list, we skip the
      extra copy and grab the child list directly.
      b1f9138f
  9. 05 Jan, 2016 3 commits
    • Adam Barth's avatar
      Complete features of ScrollableList2 · 37106ea6
      Adam Barth authored
      This patch implements the remaining missing features of ScrollableList2.
      It should now be nearly a drop-in replacement for ScrollableList. The
      next patch will switch callers over to the new machinery.
      37106ea6
    • Adam Barth's avatar
      Remove ScrollDirection.both · 7aa575b0
      Adam Barth authored
      Almost none of the clients of ScrollDirection can handle scrolling in both
      directions.
      
      Fixes #151
      7aa575b0
    • Adam Barth's avatar
      Introduce ScrollableList2 · 99bca282
      Adam Barth authored
      ScrollableList2 uses the same pattern as ScrollableGrid, which requires the
      client to allocate widgets for every list item but doesn't inflate them unless
      they're actually needed for the view. It improves on the original
      ScrollableList by not requiring a rebuild of the whole visible portion of the
      list when scrolling. In fact, small scrolls can often be handled entirely by
      repainting.
      99bca282
  10. 02 Jan, 2016 1 commit
  11. 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
  12. 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
  13. 07 Dec, 2015 1 commit
    • Adam Barth's avatar
      Add some dartdoc to basic widgets · 069fc6dd
      Adam Barth authored
      These docs are largely duplicated from the cooresponding rendering classes. I'm
      not sure how we can avoid repeating ourselves.
      069fc6dd
  14. 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
  15. 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
  16. 28 Oct, 2015 1 commit
  17. 20 Oct, 2015 1 commit
  18. 12 Oct, 2015 1 commit
    • Hixie's avatar
      Lots of trivial warning fixes · f2cc43a4
      Hixie authored
      Add type annotations in many places.
      Fix some identifiers to have more lint-satisfying names.
      Make all operator==s consistent in style.
      Reorder some functions for consistency.
      Make ParentData no longer dynamic, and fix all the code around that.
      f2cc43a4
  19. 10 Oct, 2015 2 commits
  20. 09 Oct, 2015 1 commit
    • Hixie's avatar
      Relative paths in internal flutter libraries · 37bda251
      Hixie authored
      Now that you import a top-level file for each layer of the Flutter
      framework, within the framework we can use relative paths without being
      worried about the copy/pasta problem we used to have.
      37bda251
  21. 01 Oct, 2015 1 commit
  22. 11 Sep, 2015 1 commit
  23. 02 Sep, 2015 1 commit
    • Adam Barth's avatar
      Move widgets and rendering inside src · 693ddcd8
      Adam Barth authored
      Code outside of package:sky should import this code using
      
      package:sky/rendering.dart
      package:sky/widgets.dart
      
      Moving this code into the "src" directory is a convention that signifies that
      and it cleans up the generated dartdoc because the libraries in the src
      directory aren't included in the generated documentation. Instead, the classes
      are documented in the widgets.dart and rendering.dart libraries.
      693ddcd8
  24. 20 Aug, 2015 1 commit
    • Hixie's avatar
      Improvements for Layers logic · 654fc734
      Hixie authored
      - Introduce some new Layer classes.
      - Introduce paintChildWith* methods.
      - Convert paint() methods to use paintChildWith* where appropriate.
      - Fix paintBounds logic in Layer world.
      - Introduce Layer.replaceWith(), so that it's clearer what's going on.
      - Make RenderObjects have a ContainerLayer, not a PictureLayer.
      - Introduce a PaintingContext.replacingLayer() constructor to highlight
        where we are creating a layer just to replace an older one.
      - Rename some layer-related methods and fields for clarity:
         requiresCompositing -> hasLayer
         hasCompositedDescendant -> needsCompositing
         updateCompositing -> updateCompositingBits
         _needsCompositingUpdate -> _needsCompositingBitsUpdate
         markNeedsCompositingUpdate -> markNeedsCompositingBitsUpdate
      - After updating compositing bits, if we find that the bit changed, we
        now call markNeedsPaint().
      - Reorder markNeedsPaint() logic for clarity.
      - Make flushPaint() start at the deepest node.
      - Make _compositeChild() avoid repainting children with hasLayer that
        aren't dirty, instead it just reuses their existing layer.
      - Made RenderView reuse the RenderObject layer instead of having its own.
      - Made RenderView have hasLayer set to true.
      - Add various asserts and comments.
      654fc734
  25. 19 Aug, 2015 1 commit
    • Adam Barth's avatar
      Split box.dart into many files · 50bfdedb
      Adam Barth authored
      Sadly, box.dart has grown much longer than 1000 lines. This patch splits it up
      into several files based on the class hierarchy. Fortunately, many of these
      classes are loosely coupled to each other.
      50bfdedb