27629 Commits

Author SHA1 Message Date
Ian Fischer
c5ea40980a Most of the infrastructure needed to install an APK on Android. 2015-09-16 12:56:10 -07:00
Adam Barth
a15b27d433 Remove support for onGestureFoo from Listener
Please use GestureDetector instead.
2015-09-16 12:43:33 -07:00
Adam Barth
699fa2415c Merge pull request #1194 from abarth/drawer_gestures
Move Drawer to GestureDetector
2015-09-16 12:38:28 -07:00
Adam Barth
74f7d9efee Move Drawer to GestureDetector
This fixes an issue in the stocks app in horizontal mode where you could both
scroll and drag the drawer at the same time.
2015-09-16 12:33:51 -07:00
Hixie
07e010de1b FlexAlignItems.stretch didn't stretch 2015-09-16 12:22:37 -07:00
Hixie
cd6c4da3c6 Refactor rendering_tester
RenderView has to be a singleton for sanity during tests, otherwise they
all end up in the dirty lists and we end up pumping all of them each frame.
2015-09-16 12:03:57 -07:00
Ian Fischer
d8d87f1833 Add very-verbose flag and automatically log some more process-related things in verbose and very-verbose modes. 2015-09-16 10:57:15 -07:00
Ian Hickson
4c79cc2278 Merge pull request #1188 from Hixie/animatedcontainer
AnimatedContainer isn't an AnimatedComponent.
2015-09-16 10:41:43 -07:00
Hixie
46234aeba5 AnimatedContainer isn't an AnimatedComponent.
Turns out it gets nothing out of inheriting from AnimatedComponent.
2015-09-16 09:29:54 -07:00
Adam Barth
6e410fd84d Remove MimicOverlay
This widget has no client.
2015-09-16 09:27:50 -07:00
Adam Barth
ac266c6789 Fix analyzer warnings 2015-09-16 09:07:23 -07:00
Ian Hickson
6b4352bb14 Merge pull request #1182 from Hixie/ancestor
Clarify why we don't assert that ancestor != null.
2015-09-16 09:06:14 -07:00
Ian Hickson
63d3b6db95 Merge pull request #1183 from Hixie/dismissable
Be more explicit about what's state in dismissable
2015-09-16 09:06:09 -07:00
Hixie
adf7c48d3e Be more explicit about what's state in dismissable
Move _activeCardDragEndPoint near build() so it's more obvious that it
is part of the build state.

Make a couple of functions use setState() since they modify variables
that are used by build().

Add a more detailed comment to the empty setState() call, since those
are dubious in general and need explaining when they occur, lest people
start using them as magic incantations to Make Things Work.
2015-09-15 17:51:11 -07:00
Hixie
8b538540f4 Clarify why we don't assert that ancestor != null.
Follow-up for #1140.
2015-09-15 17:49:22 -07:00
Ian Fischer
b72d67a8fe Private setup methods for AndroidDevice. 2015-09-15 17:20:49 -07:00
Hixie
12a09822c3 "newChild == oldChild || !newChild.mounted" assert
If a StatefulComponent marks itself dirty, gets rebuilt, then its parent
gets rebuilt, its parent will find that its child is from a newer
generation and hasn't changed. Previously, we considered two stateful
nodes to not be syncable even if they were the same; combined with the
way the "old" node looks like it's been put elsewhere (since it's
already been synced), we end up confused as to why the new node is
already mounted.

This fixes the problem by making the canSync logic consider two
identical nodes as syncable (since they are; syncChild() short-circuits
that case), and by changing syncChildren to consider identical nodes as
matches even if they are already synced.
2015-09-15 17:07:26 -07:00
Ian Fischer
5678c12433 Add verbose flag to sky_tools and basic logging capabilities. 2015-09-15 16:08:59 -07:00
Hixie
daf5c31215 Improve exception reporting in Widgets framework
This specifically improves the reporting of exceptions in syncChild(),
and makes the way we've been adding information to toStringName() less
ad-hoc and easier to extend.
2015-09-15 15:39:51 -07:00
Hixie
dfd821e595 Ignore generation of child if child is unchanged
Also:

 - don't mark a node as from the new generation if it is dirty, since we
   know it still has to be built.

 - establish the rule that you can't call setState() during initState()
   or build().

 - make syncChild() return early for unchanged children.

 - update the tests, including adding a new one.
2015-09-15 13:20:37 -07:00
Adam Barth
2cb58ebf71 Rev pub package 2015-09-15 09:14:51 -07:00
Collin Jackson
8c0e5564fb Merge pull request #1164 from collinjackson/revert_iterable
Revert "MultiChildRenderObjectWrapper should take an Iterable instead of a List"
2015-09-14 15:13:24 -07:00
Collin Jackson
dc859ca28e Revert "MultiChildRenderObjectWrapper should take an Iterable instead of a List"
This reverts commit 7592213df29066cd357eaa4fffe4a19ed3bae189.
2015-09-14 14:59:04 -07:00
Hixie
69fcc4089d Clean up animation-related files.
Surface all the constructor arguments of AnimationTiming in all its subclasses.
Remove some pointless casts.
Fix some typos.
Put constructors first in class declarations.
Remove some blank lines where they just confused the structure of the code.
2015-09-14 14:07:03 -07:00
Ian Hickson
942d1fa6ac Merge pull request #1157 from Hixie/minor-fixes
Minor cleanups (spelling mistakes, unneeded casts)
2015-09-14 12:11:31 -07:00
Adam Barth
f81175eb2b Merge pull request #1159 from abarth/more_docs
Address more comments from #1153
2015-09-14 12:07:19 -07:00
Ian Hickson
d176b30898 Merge pull request #1158 from Hixie/mounted
Various and sundry code cleanup
2015-09-14 11:35:08 -07:00
Adam Barth
48fbd6e5b7 Address more comments from #1153 2015-09-14 11:01:26 -07:00
Hixie
61f8651c30 Code cleanup
- Add documentation for AnimationTiming.
- typo: defaules -> defaults.
- added type information to isWatching() signature.
- made Widget.toStringName() include more useful information.
- cleaned up StatefulComponent._sync(): more specific signature, change
  redundant if to else, remove redundant cast.
- change order of TransitionBase arguments for consistency.
- prevent TransitionBase from affecting the performance in its
  constructor when it didn't create it (but see #1103).
- remove TODO() from @mpcomplete... no, there is not currently a better
  way to inherit a constructor, unfortunately.
2015-09-14 10:39:05 -07:00
Adam Barth
b0c300e526 Add dartdoc for proxy_box.dart and other code in rendering
Almost done adding dartdoc to the rendering layer.
2015-09-14 10:35:31 -07:00
Hixie
0376c35ae4 Minor cleanups (spelling mistakes, unneeded casts)
Rename Outter to Outer.

Change _sync() in StatefulComponent to assert the argument type in the
signature rather than in the code.
2015-09-14 10:28:28 -07:00
Adam Barth
945b5bcd64 Remove use of some deprecated functions on sky.Paint
We now expose idiomatic setters for these properties. Eventually we'll remove
the setter functions.
2015-09-13 17:24:15 -07:00
Ian Hickson
d9a955e947 The painting.dart dartdoc was copypasta from rendering.dart 2015-09-11 18:53:23 -07:00
Devon Carew
e6b45c5023 use mokito in the init tests 2015-09-11 16:12:27 -07:00
Ian Fischer
ab441685e2 Test install command 2015-09-11 15:26:55 -07:00
Adam Barth
9de01b171d ancestor is Flex assert in widgets/basic.dart
We didn't mean to flag null ancestors for this debugging check.

Fixes #1140
2015-09-11 15:11:44 -07:00
Adam Barth
73b096934a Merge pull request #1129 from abarth/rendering_docs
Add some more docs to the rendering library
2015-09-11 15:09:53 -07:00
Adam Barth
8601e237be Add some more docs to the rendering library 2015-09-11 15:09:38 -07:00
Collin Jackson
4f7299841a MultiChildRenderObjectWrapper should take an Iterable instead of a List 2015-09-11 13:35:35 -07:00
Hixie
2e0d5f9292 Improve the debugging information for Widget
If the build stack got long before, it would get cropped.
2015-09-11 13:25:17 -07:00
Adam Barth
129238ed27 Merge pull request #1138 from abarth/fewer_settings
Disentangle FontSize from Settings
2015-09-11 13:12:48 -07:00
Adam Barth
b89d790a84 Disentangle FontSize from Settings
Instead, just store the default font sizes in statics. These statics are
constants for now, but we'll probably make them configurable at some point.
2015-09-11 12:51:27 -07:00
Ian Fischer
81746e980c Initial sketch of install command and what devices look like. 2015-09-11 12:44:47 -07:00
Andrew Wilson
844cf1fac7 Merge pull request #1131 from apwilson/shrinkwrap
Shrink wrap when constraints are infinite.
2015-09-11 12:37:51 -07:00
Andrew Wilson
380cfb265f Shrink wrap when constraints are infinite. 2015-09-11 12:12:59 -07:00
Adam Barth
0c4a86a98e Merge pull request #1128 from abarth/rm_init
Remove init.dart
2015-09-11 11:01:32 -07:00
Adam Barth
fddfe574c4 Merge pull request #1127 from abarth/scroll_drag
Rename scroll.dart to drag.dart
2015-09-11 10:59:10 -07:00
Adam Barth
99bc146642 Merge pull request #1133 from abarth/paragraph_builder
ParagraphBuilder should be able to build a paragraph
2015-09-11 10:59:02 -07:00
Adam Barth
3d3c50b2cf Rename scroll.dart to drag.dart
The gesture is now called "drag". The library name should match.
2015-09-11 10:55:54 -07:00
Hans Muller
1e18c38380 Uncomment the Dismissable unit test that checks for a #1068 fix 2015-09-11 10:44:38 -07:00