1. 12 May, 2016 1 commit
  2. 03 May, 2016 1 commit
  3. 22 Apr, 2016 2 commits
  4. 19 Apr, 2016 1 commit
    • Ian Hickson's avatar
      Refactor service extensions (#3397) · 261923e5
      Ian Hickson authored
      Bindings now have a debugRegisterServiceExtensions() method that is
      invoked in debug mode (only). (Once we have a profile mode, there'll be
      a registerProfileServiceExtensions() method that gets called in that
      mode only to register extensions that apply then.)
      
      The BindingBase class provides convenience methods for registering
      service extensions that do the equivalent of:
      
      ```dart
      void extension() { ... }
      bool extension([bool enabled]) { ... }
      double extension([double extension])  { ... }
      Map<String, String> extension([Map<String, String> parameters]) { ... }
      ```
      
      The BindingBase class also itself registers ext.flutter.reassemble,
      which it has call a function on the binding called
      reassembleApplication().
      
      The Scheduler binding now exposes the preexisting
      ext.flutter.timeDilation.
      
      The Renderer binding now exposes the preexisting ext.flutter.debugPaint.
      
      The Renderer binding hooks reassembleApplication to trigger the
      rendering tree to be reprocessed (in particular, to fix up the
      optimisation closures).
      
      All the logic from rendering/debug.dart about service extensions is
      replaced by the above.
      
      I moved basic_types to foundation.
      
      The FlutterWidgets binding hooks reassembleApplication to trigger the
      widget tree to be entirely rebuilt.
      
      Flutter Driver now uses ext.flutter.driver instead of
      ext.flutter_driver, and is hooked using the same binding mechanism.
      Eventually we'll probably move the logic into the Flutter library so
      that you just get it without having to invoke a special method first.
      261923e5
  5. 15 Apr, 2016 2 commits
    • Ian Hickson's avatar
      Use the same logic in flushPaint as flushLayout (#3353) · d348f28d
      Ian Hickson authored
      If two repaint boundaries mark themselves dirty, but the second one is a
      child of the first, then the second one will get repainted by the first
      and then when we come to paint it directly, we get confused because it
      isn't dirty any more.
      
      We ran into this in layout before. Apply the same fix. Also, apply the
      same fix to composition while we're at it.
      d348f28d
    • Ian Hickson's avatar
      Split services/ into services/ and foundation/ (#3350) · e41c1c0b
      Ian Hickson authored
      We're getting back to the point where we have a bunch of foundation APIs
      and it's getting confusing having them mixed with services/.
      e41c1c0b
  6. 12 Apr, 2016 1 commit
  7. 11 Apr, 2016 1 commit
    • Ian Hickson's avatar
      Add even more careful checks around BoxConstraints (#3243) · 47f5c6f2
      Ian Hickson authored
      I ran into a case where I was setting minHeight=∞ and then calling
      layout() with that constraint, which is all kinds of bad. To try to
      catch this earlier, this patch now provides a way to catch constraints
      that are requiring infinite values.
      
      We don't _always_ check this because there are valid uses for
      BoxConstraints.biggest, e.g. as an additionalConstraint.
      47f5c6f2
  8. 06 Apr, 2016 1 commit
  9. 05 Apr, 2016 1 commit
  10. 03 Apr, 2016 1 commit
  11. 02 Apr, 2016 2 commits
    • Ian Hickson's avatar
      Rationalise all our exception handling. · ee703da9
      Ian Hickson authored
      - Create a FlutterErrorDetails struct-like class that describes an
      
        exception along with more details that aren't in the exception, like
      
        where it was caught and what was going on when it was caught.
      
      
      
      - Provide a FlutterError static API for handling these objects:
      
      
      
        - FlutterError.onError which is called whenever Flutter catches an
      
          error.
      
      
      
        - FlutterError.reportError() which handles an error.
      
      
      
        - FlutterError.dumpErrorToConsole() which is the default behavior
      
          for onError.
      
      
      
      - Removes all the existing exception handler callbacks.
      
      
      
      - Replaces all the existing places that described exceptions using
      
        debugPrint with calls to FlutterError.reportError().
      
      
      
      - Extend lockState() to also catch exceptions, so that we catch
      
        exceptions that happen during finalizers.
      
      
      
      - Make the test framework catch errors and treat them as failures.
      
      
      
      - Provide a mechanism to override this behavior in the test framework.
      
      
      
      - Make the tests that used to depend on the exception handler
      
        callbacks use this new mechanism.
      
      
      
      - Make pump() also support the phase argument.
      
      
      
      - Improve some tests using these new features.
      
      
      
      Fixes #2356, #2988, #2985, #2220.
      ee703da9
    • Adam Barth's avatar
      Add support for backdrop filters · 665ac49b
      Adam Barth authored
      For example, to implement backdrop blur effects.
      665ac49b
  12. 01 Apr, 2016 1 commit
    • Adam Barth's avatar
      Capture closures around megamorphic dispatches · 622bec43
      Adam Barth authored
      The performLayout and build callsite are highly megamorphic because they
      dispatch into a large number of clients. However, for a given caller, the
      callee is always of the same type, which means the megamorphic lookup exactly
      factors by the caller. We can speed up the dispatch by capturing a closure at
      initialization and then monomorphically dispatching through the closure.
      622bec43
  13. 29 Mar, 2016 1 commit
    • Ian Hickson's avatar
      More elaborate exceptions. · aedf41bf
      Ian Hickson authored
      The elaboration will continue until morale improves.
      
      Specific exceptions considered here:
      
       - size setter checking when you set the size
       - layout verifying that you do set the size
       - hitTest verifying that you aren't dirty and have a size
       - flex complaining about canFlex
      aedf41bf
  14. 28 Mar, 2016 2 commits
  15. 24 Mar, 2016 1 commit
  16. 23 Mar, 2016 1 commit
  17. 21 Mar, 2016 1 commit
    • Ian Hickson's avatar
      Provide more documentation for MojoShell · bef6ff3b
      Ian Hickson authored
      As usual, as I was doing this I ran into some stuff that seemed hard
      to document as-is and so I changed it. In this case, in the "http"
      library. The new code is more or less equivalent, I think, but the
      resulting documentation makes it more obvious that it's wrong...
      bef6ff3b
  18. 19 Mar, 2016 1 commit
  19. 18 Mar, 2016 1 commit
  20. 16 Mar, 2016 1 commit
  21. 14 Mar, 2016 1 commit
  22. 12 Mar, 2016 1 commit
  23. 11 Mar, 2016 2 commits
    • Adam Barth's avatar
      Update engine · aee2ad5a
      Adam Barth authored
      aee2ad5a
    • Ian Hickson's avatar
      Enable ALL THE LINTS · 1b9cd520
      Ian Hickson authored
      Well, all the easy ones, anyway.
      
      For some reason `// ignore:` isn't working for me so I've disabled
      lints that need that. Also disabled those that require a ton of work
      (which I'm doing, but not in this PR, to keep it reviewable).
      
      This adds:
      - avoid_init_to_null
      - library_names
      - package_api_docs
      - package_names
      - package_prefixed_library_names
      - prefer_is_not_empty
      - sort_constructors_first
      - sort_unnamed_constructors_first
      - unnecessary_getters_setters
      1b9cd520
  24. 25 Feb, 2016 1 commit
  25. 14 Feb, 2016 2 commits
  26. 12 Feb, 2016 1 commit
  27. 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
  28. 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
  29. 09 Feb, 2016 1 commit
  30. 06 Feb, 2016 1 commit
  31. 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
  32. 03 Feb, 2016 1 commit
    • Adam Barth's avatar
      Initial work to add Mozart child views · f30398a4
      Adam Barth authored
      This patch sketches out the basic widgets for creating Mozart child
      views. We're still missing some of the machinery, so we can't quite
      create child views yet, but once we supply the ViewHost and teach the
      compositor how to actually display the child scenes, we'll have
      something that works.
      f30398a4
  33. 02 Feb, 2016 1 commit
    • Adam Barth's avatar
      Viewport fails to clip its AssetImage child · 167fbced
      Adam Barth authored
      We were getting confused about our layer tree offsets, which caused us
      to set an incorrect cull rect for the recording inside a viewport.
      
      This patch does away with layer tree offsets almost entirely. We now use
      them only at repaint boundaries, which is where we want the layer tree
      to be mutable.
      
      Fixes #1460
      167fbced