-
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