1. 22 Apr, 2016 2 commits
  2. 21 Apr, 2016 2 commits
    • Ian Hickson's avatar
      Make the widgets binding reusable. (#3479) · 0e11b0e6
      Ian Hickson authored
      Previously the widgets layer only provided a concrete binding, which
      makes it awkward to extend it compared to other bindings. This moves
      widgets to the same style as the other layers.
      
      In a subsequent patch I'll use this to make the tests layer saner.
      0e11b0e6
    • Eric Seidel's avatar
      Add a service extension for toggling the PerformanceOverlay · 898b3ce8
      Eric Seidel authored
      This only works for apps which use WidgetsApp.  Apps which don't
      (like the game) could presumably read the static themselves
      off of WidgetsApp.
      
      @devoncarew @hixie
      898b3ce8
  3. 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
  4. 02 Apr, 2016 1 commit
    • 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
  5. 31 Mar, 2016 1 commit
    • Kris Giesing's avatar
      Part 2 of independent layout pipelines · 9dfd5d40
      Kris Giesing authored
      Adds BuildOwner to manage the dirty list and build processing for
      widgets/elements, and adds a widget unit test to make sure separation
      is enforced.
      
      Fixes #2723
      9dfd5d40
  6. 18 Mar, 2016 1 commit
  7. 14 Mar, 2016 1 commit
  8. 12 Mar, 2016 3 commits
  9. 11 Mar, 2016 1 commit
  10. 10 Mar, 2016 1 commit
  11. 04 Mar, 2016 2 commits
  12. 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
  13. 01 Feb, 2016 1 commit
  14. 24 Jan, 2016 1 commit
  15. 22 Jan, 2016 2 commits
  16. 07 Jan, 2016 1 commit
    • Adam Barth's avatar
      Move default back behavior to FlutterWidgetBinding · e3d587ea
      Adam Barth authored
      Previously MaterialApp was responsible for ending the activity when the
      back stack was empty. However, this behavior is more general than
      material. This patch moves the behavior to FlutterWidgetBinding, which
      has a global view of all the binding observers.
      
      Fixes #1086
      e3d587ea
  17. 16 Dec, 2015 1 commit
  18. 14 Dec, 2015 2 commits
  19. 09 Dec, 2015 2 commits
  20. 08 Dec, 2015 1 commit
  21. 02 Dec, 2015 1 commit
  22. 18 Nov, 2015 1 commit
  23. 06 Nov, 2015 1 commit
    • Adam Barth's avatar
      We throw an exception if you tap the screen during load · 060b34f7
      Adam Barth authored
      Inside runApp, we were building the render tree for the app, but we weren't
      calling layout, which meant we were running a hit test on a dirty tree. Now
      hitTest specifically asserts that the tree is clean and we synchronously call
      layout for your app during runApp.
      
      Fixes #1960
      060b34f7
  24. 22 Oct, 2015 1 commit
  25. 16 Oct, 2015 1 commit
    • Hixie's avatar
      Sundry debugging aids and fixes · d0d84e16
      Hixie authored
      (These are all the debugging-related fixes and trivial typo fixes that I
      extracted out of my heroes branch.)
      
      Fix rendering.dart import order.
      
      Introduce a debugLabel for Performances so that when you create a
      performance, you can tag it so that if later you print it out, you can
      figure out which performance it is.
      
      Allow the progress of a PerformanceView to be determined (but not set).
      
      Allow subclasses of PerformanceView that are constants to be created by
      defining a constant constructor for PerformanceView.
      
      Introduce a debugPrint() method that throttles its output. This is a
      test to see if it resolves the problems people have been having with
      debugDumpRenderTree() et al having their output corrupted on Android. It
      turns out (according to some things I read On The Internets) that
      Android only has a 64KB kernel buffer for its logs and and if you output
      to it too fast, it'll drop data on the floor. If this does in fact
      reliably resolve this problem, we should probably move the fix over to
      C++ land (where "print" is implemented) so that any use of print is
      handled (avoiding the interleaving problem we have now if you use both
      debugPrint() and print()).
      
      Fix a bug with the debugging code for "size". In the specific case of a
      RenderBox having a parent that doesn't set parentUsesSize, then later
      the parent setting parentUsesSize but the child having its layout
      short-circuited (e.g. because the constraints didn't change), we didn't
      update the _DebugSize object to know that now it's ok that the size be
      used by the parent, and we'd assert.
      
      Also, allow a _DebugSize to be used to set the size of yourself.
      Previously you could only set your size from a regular Size or from your
      child's _DebugSize.
      
      Add more debugging information to various Widgets where it might be
      helpful.
      
      Make GlobalKey's toString() include the runtimeType so that when
      subclassing it the new class doesn't claim to be a GlobalKey instance.
      
      Include the Widget's key in the Element's description since we don't
      include it in the detailed description normally (it's in the name part).
      
      Fix a test that was returning null from a route.
      d0d84e16
  26. 15 Oct, 2015 1 commit
    • Hixie's avatar
      Improve debugging output · 1f40d96f
      Hixie authored
      Teach dumpRenderTree() to draw actual trees.
      Make the TextStyle output terser so it doesn't overflow the output.
      Make debugDumpApp() say what mode we're in (checked vs release).
      Hide lifecycle state from release mode dumps (since it's checked-only state).
      1f40d96f
  27. 10 Oct, 2015 1 commit
  28. 09 Oct, 2015 1 commit
  29. 05 Oct, 2015 1 commit
    • Hixie's avatar
      Fix Focus · fbf8174c
      Hixie authored
      Focus.at() and company should be on Focus, not FocusState.
      
      _notifyDescendants() was using the wrong runtimeType.
      
      Let InheritedWidget update the descendants during build.
      
      When you setState() during build, assert that you're not
      markNeedsBuild()ing someone who isn't a descendant.
      
      Typo in Widget.toString().
      fbf8174c
  30. 03 Oct, 2015 1 commit
  31. 01 Oct, 2015 2 commits
    • Hixie's avatar
      EdgeDims changes and other fixes to core classes. · ce2c56b3
      Hixie authored
      - Rename EdgeDims constructor to EdgeDims.TRBL().
      
      - Add operator== to Size and Offset so that you can compare Size to
        DebugSize in checked mode.
      
      - Add Size.lerp().
      
      - Add various operators to EdgeDims. (*, /, ~/, %)
      
      - Add EdgeDims.lerp().
      
      - Update style guide. I went there to fix an EdgeDims constructor
        example, and stayed because some recent things came up and I wanted to
        add them before I forgot.
      ce2c56b3
    • Adam Barth's avatar
      Delay unmounting elements until the end of the frame · 0b542d5c
      Adam Barth authored
      This patch prepares us to move these elements around in the tree.
      0b542d5c