1. 09 Sep, 2016 1 commit
  2. 08 Sep, 2016 1 commit
    • Ian Hickson's avatar
      Make tests more realistic (#5762) · 5bc8888e
      Ian Hickson authored
      Previously, pumpWidget() would do a partial pump (it didn't trigger
      Ticker callbacks or post-frame callbacks), and pump() would do a full
      pump. This patch brings them closer together. It also makes runApp run a
      full actual frame, rather than skipping the transient callback part of
      the frame logic. Having "half-frames" in the system was confusing and
      could lead to bugs where code expecting to run before the next layout
      pass didn't because a "half-frame" ran first.
      
      Also, make Tickers start ticking in the frame that they were started in,
      if they were started during a frame. This means we no longer spin a
      frame for t=0, we jump straight to the first actual frame.
      
      Other changes in this patch:
      
      * rename WidgetsBinding._runApp to WidgetsBinding.attachRootWidget, so
        that tests can use it to more accurately mock out runApp.
      
      * allow loadStructuredData to return synchronously.
      
      * make handleBeginFrame handle not being given a time stamp.
      
      * make DataPipeImageProvider.loadAsync protected (rather than private),
        and document it. There wasn't really a reason for it to be private.
      
      * fix ImageConfiguration.toString.
      
      * introduce debugPrintBuildScope and debugPrintScheduleBuildForStacks,
        which can help debug problems with widgets getting marked as dirty but
        not cleaned.
      
      * make debugPrintRebuildDirtyWidgets say "Building" the first time and
        "Rebuilding" the second, to make it clearer when a widget is first
        created. This makes debugging widget lifecycle issues much easier.
      
      * make debugDumpApp more resilient.
      
      * debugPrintStack now takes a label that is printed before the stack.
      
      * improve the banner shown for debugPrintBeginFrameBanner.
      
      * various and sundry documentation fixes
      5bc8888e
  3. 01 Sep, 2016 1 commit
  4. 29 Aug, 2016 2 commits
  5. 22 Jul, 2016 2 commits
    • Adam Barth's avatar
      Improve compositing strategy for Shrine (#5014) · 39e75921
      Adam Barth authored
      This patch includes a number of improvements:
      
       * Material page routes now put a repaint boundary inside their transition so
         they don't repaint during the transition.
       * Heroes that are on a quest now get a repaint boundary so we repaint them
         individually.
       * I've hoisted the transparent material for the product items up in the widget
         tree, which doesn't affect performance but makes the ink splashes reach the
         edge of the product cards.
       * I've changed the repaint rainbow visualization to make it easier to see
         what's going on.
      39e75921
    • Adam Barth's avatar
      Hint that painting shadows are complex (#5000) · 1a292ff6
      Adam Barth authored
      Previously, we considered them one operation in the compositor, which didn't
      trigger caching. Now we have a way to explicitly hint that the compositor
      should cache a layer.
      1a292ff6
  6. 07 Jul, 2016 1 commit
  7. 04 Jul, 2016 1 commit
  8. 02 Jul, 2016 1 commit
  9. 01 Jul, 2016 2 commits
    • Adam Barth's avatar
      Add semantics for Sliders (#4808) · 5ed8f1a1
      Adam Barth authored
      Also, make SemanticsOwner into a real class and use it instead of a static in
      several places.
      5ed8f1a1
    • Adam Barth's avatar
      Update use of `@protected` (#4805) · 8c535ad7
      Adam Barth authored
      Now that protected can be accessed from inside the same library, we can
      use protected in a number of new places and we can remove some
      trampolines we were using to work around its previous semantics.
      8c535ad7
  10. 28 Jun, 2016 1 commit
    • pq's avatar
      Cleanup empty statements. · 543f705a
      pq authored
      The new `empty_statements` lint (in the next DEV roll), flags these empty statements.  Harmless, except the one in `basic.dart` that fixes a real-life bug. :)
      543f705a
  11. 16 Jun, 2016 1 commit
  12. 09 Jun, 2016 1 commit
  13. 08 Jun, 2016 1 commit
  14. 06 Jun, 2016 1 commit
  15. 01 Jun, 2016 3 commits
    • Ian Hickson's avatar
      PaginatedDataTable (part 1) (#4306) · 0618da7c
      Ian Hickson authored
      This introduces the key parts of a paginated data table, not including
      the built-in pagination features.
      
      * Provide more data for the data table demo, so there's data to page.
      
      * Introduce a ChangeNotifier class which abstracts out
        addListener/removeListener/notifyListeners. We might be able to use
        this to simplify existing classes as well, though this patch doesn't
        do that.
      
      * Introduce DataTableSource, a delegate for getting data for data
        tables. This will also be used by ScrollingDataTable in due course.
      
      * Introduce PaginatedDataTable, a widget that wraps DataTable and only
        shows N rows at a time, fed by a DataTableSource.
      0618da7c
    • Adam Barth's avatar
      020b0688
    • Adam Barth's avatar
      Start using protected annotation (#4288) · 887e3396
      Adam Barth authored
      There are many more places we can use this annotation. This patch starts out
      small to test the waters.
      887e3396
  16. 30 May, 2016 1 commit
  17. 29 May, 2016 1 commit
    • Adam Barth's avatar
      Remove OverlayPainter mechanism (#4264) · 76772608
      Adam Barth authored
      We used to use this mechanism to paint scrollbars, but it's awkward. The
      new approach to scrollbars is much cleaner. This mechanism has no other
      clients, so we should remove it.
      76772608
  18. 27 May, 2016 1 commit
  19. 26 May, 2016 1 commit
  20. 25 May, 2016 1 commit
  21. 18 May, 2016 1 commit
  22. 16 May, 2016 1 commit
    • Ian Hickson's avatar
      Make it possible to run tests live on a device (#3936) · 32527017
      Ian Hickson authored
      This makes it possible to substitute 'flutter run' for 'flutter test'
      and actually watch a test run on a device.
      
      For any test that depends on flutter_test:
      
      1. Remove any import of 'package:test/test.dart'.
      
      2. Replace `testWidgets('...', (WidgetTester tester) {`
            with `testWidgets('...', (WidgetTester tester) async {`
      
      3. Add an "await" in front of calls to any of the following:
          * tap()
          * tapAt()
          * fling()
          * flingFrom()
          * scroll()
          * scrollAt()
          * pump()
          * pumpWidget()
      
      4. Replace any calls to `tester.flushMicrotasks()` with calls to
         `await tester.idle()`.
      
      There's a guarding API that you can use, if you have particularly
      complicated tests, to get better error messages. Search for
      TestAsyncUtils.
      32527017
  23. 12 May, 2016 1 commit
  24. 03 May, 2016 1 commit
  25. 22 Apr, 2016 2 commits
  26. 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
  27. 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
  28. 12 Apr, 2016 1 commit
  29. 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
  30. 06 Apr, 2016 1 commit
  31. 05 Apr, 2016 1 commit
  32. 03 Apr, 2016 1 commit
  33. 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