1390 Commits

Author SHA1 Message Date
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
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
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
Hixie
5125bd5d0b Change how we decide if two nodes can sync.
If it's a StatefulComponent, then it's ok to reuse it so long as it
hasn't been initialised.

If it's a regular Component or a TagNode, then it's always ok to reuse.

If it's a RenderObjectWrapper, then it's ok to reuse so long as it
doesn't have a renderObject.

To put it another way, this changes how we prevent the following
nonsensical situations from arising:

 - Sync two stateful StatefulComponents together
 - Sync two RenderObjectWrappers with RenderObjects together

When either of those cases happen, we just drop the old one on the
ground and use the new one unchanged.
2015-09-11 10:26:36 -07:00
Adam Barth
403441d2ab ParagraphBuilder should be able to build a paragraph
This patch start down the road of implementing text layout and painting without
the DOM. We can construct a basic paragraph consisting of a single run of text
and we can get through layout without crashing.
2015-09-11 10:23:15 -07:00
Hans Muller
639f9d9b06 Finish converting Dismissable from Listener to GestureDetector
Dismissable now only depends on GestureDetector.

Added a unit test that verifies that issue #1068 has been fixed. It's commented out for now.

Cleaned up VelocityTracker.cc et al a little.
2015-09-11 09:37:55 -07:00
Adam Barth
d5e1af106d Remove init.dart
We haven't used init.dart in several releases. We can safely remove this no-op
script now.
2015-09-10 22:03:35 -07:00
Adam Barth
63101e49bc Fold fling gesture into onDragEnd
That way the fling engages in the same direction as the scroll. For example, if
you have a horizontal scroll nested inside a vertical scroll, the fling will
take place in the same direction as the scroll.
2015-09-10 12:38:11 -07:00
Adam Barth
d76f5652e6 Merge pull request #1120 from abarth/fewer_handlers
Don't register gesture detectors when Scrollable can't scroll
2015-09-10 12:10:09 -07:00
Adam Barth
707d8606c8 Don't register gesture detectors when Scrollable can't scroll
Previously, if you used a number of nested Blocks, they'd each try to register
drag gesture detectors even though they can't actually scroll. This CL teaches
Scrollable to watch for drag gestures only when it can actually scroll.
2015-09-10 12:03:35 -07:00
Matt Perry
dfab52c706 Compare versions before updating an app bundle.
The version and update URL are stored in the app's manifest (sky.yaml).
2015-09-10 14:17:58 -04:00
Scott Graham
c1262abc03 Merge pull request #1108 from sgraham/android-home
Look in $ANDROID_HOME/platform-tools/adb too
2015-09-10 11:00:51 -07:00
Scott Graham
f2075ebb2e Look in ANDROID_HOME/platform-tools/adb for adb too 2015-09-10 09:55:21 -07:00
Adam Barth
87c75d6e76 Remove redundant enum declarations from text_style.dart
These are now declared in dart:sky as part of ParagraphBuilder.
2015-09-10 08:03:48 -07:00
Adam Barth
a6aa0265bd Rev pub package 2015-09-09 17:24:06 -07:00
Adam Barth
3d80c2b61f Merge pull request #1115 from abarth/no_more_disqualify
Remove "disqualified" concept
2015-09-09 17:18:29 -07:00
Adam Barth
2234294dd4 Remove "disqualified" concept
Allows a non-initialised stateful component to be used as a source of
settings more than once. Instead of asserting that it was only being
used once, we assert that once you are stateful you don't get used as a
bag of settings, which is the real thing we were trying to avoid.

A lot of code ends up using StatefulComponents as a source multiple
times in a row, and before this would fail.

Patch by Ian Hickson
2015-09-09 17:17:03 -07:00
Adam Barth
829645c151 Merge pull request #1107 from sgraham/fiddle-mine-digger
mine_digger: Fix not being able to de-flag on Android
2015-09-09 17:10:04 -07:00
Hans Muller
67410a5add Initial support for the fling gesture detector
Added FlingGestureRecognizer and exposed it in the GestureDetector class. FlingGestureRecognizer is based on the Android/Chromium VelocityTracker class which computes a velocity vector for for a list of X,Y,Time tuples.

The Scrollable classes now use the FlingGestureRecognizer. Dismissable and Drawer still need to be updated
2015-09-09 16:49:31 -07:00
Scott Graham
4a7718d344 mine_digger: Fix not being able to de-flag on Android 2015-09-09 14:53:35 -07:00
Adam Barth
c5edfa19d6 Rev pub package 2015-09-09 14:50:27 -07:00
Ian Fischer
c8278303af Merge pull request #1106 from iansf/sky_tool_log_tag
Only log the tag and the message from Android, so logs look like “ANDROID: I/sky     : Hello from Sky!”.
2015-09-09 14:25:20 -07:00
Ian Fischer
c5735d3e01 Only log the tag and the message from Android, so logs look like “ANDROID: I/sky : Hello from Sky!”. 2015-09-09 14:22:48 -07:00
Adam Barth
b4ea078f6b Merge pull request #1102 from abarth/mv_getting_started
Move Getting Started and Tutorial to GitHub pages
2015-09-09 14:12:51 -07:00
Adam Barth
b136dedac1 Move Getting Started and Tutorial to GitHub pages
Along with some other docs.
2015-09-09 13:52:03 -07:00