1. 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
  2. 22 Oct, 2015 1 commit
  3. 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
  4. 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
  5. 10 Oct, 2015 1 commit
  6. 09 Oct, 2015 1 commit
  7. 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
  8. 03 Oct, 2015 1 commit
  9. 01 Oct, 2015 3 commits
  10. 29 Sep, 2015 1 commit
  11. 28 Sep, 2015 1 commit
    • Adam Barth's avatar
      Actually notify GlobalKey listeners in fn3 · 64dfb849
      Adam Barth authored
      This patch makes a number of changes:
      
      1) buildDirtyComponents now prevents all calls to setState, not just those
         higher in the tree. This change is necessary for consistency with
         MixedViewport and HomogeneousViewport because those widgets already build
         subwidgets with that restriction. If the "normal" build didn't enforce that
         rule, then some widgets would break when put inside a mixed or homogeneous
         viewport.
      
      2) We now notify global key listeners in a microtask after beginFrame. That
         means setState is legal in these callbacks and that we'll produce another
         frame if someone calls setState in such a callback.
      64dfb849
  12. 26 Sep, 2015 1 commit
  13. 23 Sep, 2015 3 commits
    • Adam Barth's avatar
      Add tests for ParentData · fa119c38
      Adam Barth authored
      fa119c38
    • Hixie's avatar
      fn3: Minor cleanup · 2a5fad93
      Hixie authored
      - Remove the unique objects used as slots since we decided 'null' was
        fine after all
      - Rename 'slot' to 'newSlot' when it's used as an argument to change the
        _slot field, to clarify which variable has the newer value
      - Remove the RenderObject registry since we'll do listeners a different
        way. This also removes handleEvent for the same reason.
      - Remove the TODOs for mount/unmount becoming didMount/didUnmount since
        the methods do in fact do the mounting/unmounting.
      2a5fad93
    • Hixie's avatar
      fn3: Binding to RenderView · 555138e6
      Hixie authored
      In the old world, we had two ways to bind a Widget tree to a
      RenderObject node, one way for RenderView and one mostly untested way
      for other cases (it's only tested by the spinning_mixed.dart demo). For
      fn3, I made these the same code path.
      
      This patch also introduces GlobalKey, though the GlobalKey logic isn't
      hooked in yet.
      
      This is Hello World in the new world:
      
      ```dart
      import 'package:sky/src/fn3.dart';
      
      void main() {
        runApp(new Text('Hello World!'));
      }
      ```
      555138e6
  14. 22 Sep, 2015 2 commits
    • Hixie's avatar
      Fix warnings and build errors · 5fb2cb32
      Hixie authored
      Fixes errors from #1285 and #1281.
      5fb2cb32
    • Hixie's avatar
      fn3: Add a binding for fn3 and sky. · b73b06e4
      Hixie authored
      - I extracted the BuildScheduler into a separate binding.dart file.
      - Various changes to expose private members that are needed by
        binding.dart.
      - Registering the render objects for event dispatch.
      - Convert the tests to use the new binding mechanism.
      
      This doesn't yet have a RenderView or event handling.
      b73b06e4