1. 31 Mar, 2017 1 commit
    • Adam Barth's avatar
      Improve focus management (#9074) · 89aaaa9c
      Adam Barth authored
      We now have an explicit focus tree that we manage. Instead of using
      GlobalKeys to manage focus, we use FocusNode and FocusScopeNode objects.
      The FocusNode is Listenable and notifies when its focus state changes.
      
      Focus notifications trigger by tree mutations are now delayed by one
      frame, which is necessary to handle certain complex tree mutations. In
      the common case of focus changes being triggered by user input, the
      focus notificiation still arives in the same frame.
      89aaaa9c
  2. 17 Mar, 2017 2 commits
  3. 15 Mar, 2017 2 commits
  4. 04 Mar, 2017 1 commit
  5. 23 Feb, 2017 1 commit
  6. 03 Feb, 2017 1 commit
  7. 02 Feb, 2017 2 commits
  8. 18 Jan, 2017 1 commit
  9. 19 Nov, 2016 1 commit
  10. 16 Nov, 2016 1 commit
  11. 26 Oct, 2016 1 commit
  12. 25 Oct, 2016 1 commit
  13. 13 Oct, 2016 1 commit
  14. 06 Oct, 2016 1 commit
  15. 28 Sep, 2016 1 commit
    • Ian Hickson's avatar
      Fix globalToLocal and update spinning_mixed (#6035) · e01592a0
      Ian Hickson authored
      * globalToLocal was just broken when there was a rotation and a
        translation at the same time. This fixes that and adds a test.
      
      * update graphic used by spinning_mixed since the old one went 404.
      
      * simplify some of the code in the demo.
      
      * fix MatrixUtils.transformPoint to be consistent with how we transform
        points elsewhere.
      
      * stop transforming points elsewhere, just use
        MatrixUtils.transformPoint.
      
      * make the Widget binding handle not having a root element.
      
      * make the spinning_mixed demo update its widget tree.
      e01592a0
  16. 16 Sep, 2016 1 commit
  17. 15 Sep, 2016 1 commit
  18. 09 Sep, 2016 1 commit
    • Ian Hickson's avatar
      Fix hot reload (#5799) · 03eaf1d1
      Ian Hickson authored
      I forgot that it was possible for the root view to get marked dirty
      without getting a new widget. This fixes that case to work.
      03eaf1d1
  19. 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
  20. 07 Sep, 2016 1 commit
  21. 29 Aug, 2016 1 commit
  22. 09 Aug, 2016 1 commit
  23. 04 Jul, 2016 1 commit
  24. 21 Jun, 2016 1 commit
  25. 06 Jun, 2016 1 commit
  26. 25 May, 2016 1 commit
  27. 16 May, 2016 1 commit
  28. 29 Apr, 2016 3 commits
    • Yegor's avatar
      7c017898
    • Ian Hickson's avatar
      Refactor the test framework (#3622) · 91dd9699
      Ian Hickson authored
      * Refactor widget test framework
      
      Instead of:
      
      ```dart
        test("Card Collection smoke test", () {
          testWidgets((WidgetTester tester) {
      ```
      
      ...you now say:
      
      ```dart
        testWidgets("Card Collection smoke test", (WidgetTester tester) {
      ```
      
      Instead of:
      
      ```dart
        expect(tester, hasWidget(find.text('hello')));
      ```
      
      ...you now say:
      
      ```dart
        expect(find.text('hello'), findsOneWidget);
      ```
      
      Instead of the previous API (exists, widgets, widget, stateOf,
      elementOf, etc), you now have the following comprehensive API. All these
      are functions that take a Finder, except the all* properties.
      
      * `any()` - true if anything matches, c.f. `Iterable.any`
      * `allWidgets` - all the widgets in the tree
      * `widget()` - the one and only widget that matches the finder
      * `firstWidget()` - the first widget that matches the finder
      * `allElements` - all the elements in the tree
      * `element()` - the one and only element that matches the finder
      * `firstElement()` - the first element that matches the finder
      * `allStates` - all the `State`s in the tree
      * `state()` - the one and only state that matches the finder
      * `firstState()` - the first state that matches the finder
      * `allRenderObjects` - all the render objects in the tree
      * `renderObject()` - the one and only render object that matches the finder
      * `firstRenderObject()` - the first render object that matches the finder
      
      There's also `layers' which returns the list of current layers.
      
      `tap`, `fling`, getCenter, getSize, etc, take Finders, like the APIs
      above, and expect there to only be one matching widget.
      
      The finders are:
      
       * `find.text(String text)`
       * `find.widgetWithText(Type widgetType, String text)`
       * `find.byKey(Key key)`
       * `find.byType(Type type)`
       * `find.byElementType(Type type)`
       * `find.byConfig(Widget config)`
       * `find.byWidgetPredicate(WidgetPredicate predicate)`
       * `find.byElementPredicate(ElementPredicate predicate)`
      
      The matchers (for `expect`) are:
      
       * `findsNothing`
       * `findsWidgets`
       * `findsOneWidget`
       * `findsNWidgets(n)`
       * `isOnStage`
       * `isOffStage`
       * `isInCard`
       * `isNotInCard`
      
      Benchmarks now use benchmarkWidgets instead of testWidgets.
      
      Also, for those of you using mockers, `serviceMocker` now automatically
      handles the binding initialization.
      
      This patch also:
      
      * changes how tests are run so that we can more easily swap the logic
        out for a "real" mode instead of FakeAsync.
      
      * introduces CachingIterable.
      
      * changes how flutter_driver interacts with the widget tree to use the
        aforementioned new API rather than ElementTreeTester, which is gone.
      
      * removes ElementTreeTester.
      
      * changes the semantics of a test for scrollables because we couldn't
        convince ourselves that the old semantics made sense; it only worked
        before because flushing the microtasks after every event was broken.
      
      * fixes the flushing of microtasks after every event.
      
      * Reindent the tests
      
      * Fix review comments
      91dd9699
    • Yegor's avatar
      fix first frame reporting logic (#3640) · e60a624a
      Yegor authored
      e60a624a
  29. 28 Apr, 2016 1 commit
  30. 25 Apr, 2016 1 commit
    • Adam Barth's avatar
      Block should work inside LazyBlock (#3546) · cc9d602b
      Adam Barth authored
      Previously we were locking down the state even when calling layout in
      LazyBlock. Now we lock only when building children. Making this work well
      involved moving the catch out of lockState and into the few callers who
      actually wanted it.
      
      Fixes #3534
      cc9d602b
  31. 22 Apr, 2016 3 commits
    • Adam Barth's avatar
      A blinking cursor should push only one frame (#3445) (#3506) · a5e794ca
      Adam Barth authored
      Prior to this patch, we were pushing two frames each time the cursor blinked.
      In turning the cursor on or off, the markNeedsPaint call was triggering another
      frame to be scheduled because we cleared a bit in the scheduler at the
      beginning of the frame instead of at the end of the frame.
      
      To implement scheduling correctly, we actually need two bits: one for
      ensureVisualUpdate, which just promises to get to the end of the pipeline soon,
      and scheduleFrame, which promises to get to the beginning of the pipeline soon.
      
      (Reland)
      a5e794ca
    • Ian Hickson's avatar
      Clean up our timeline events. (#3504) · b5a827bf
      Ian Hickson authored
      This adds in particular the ability to track the time at which the
      framework boots up, and the time at which we are confident we have
      completed the first useful frame.
      b5a827bf
    • Ian Hickson's avatar
      Rename binding abstract classes (#3482) · e968d91c
      Ian Hickson authored
      The old names were getting silly and started stepping on valuable namespace.
      
      The new names are consistent and clear.
      e968d91c
  32. 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