496 Commits

Author SHA1 Message Date
Ian Hickson
28e097f489 Merge pull request #978 from Hixie/sync-removal
Still try to sync even if a node has been removed from the tree.
2015-09-01 14:08:23 -07:00
Ian Fischer
051cf4b5f8 Log a warning when developers are using a dev build of the sky package. 2015-09-01 13:42:00 -07:00
Ian Fischer
c938128873 Merge pull request #990 from iansf/remove_required_arg
Don't require -p for ios_sim commands
2015-09-01 13:39:51 -07:00
Hixie
8f580207f8 Still try to sync even if a node has been removed from the tree.
This should handle a case like a stateful component inside a Container
inside another Container having one of those Containers removed while
still keeping that stateful component around with its state.

The problem of how to handle the Container then being reinserted is a
separate issue not handled by this patch.
2015-09-01 13:32:28 -07:00
Adam Barth
e70448c179 Merge pull request #979 from abarth/render_object_docs
Add dartdocs for RenderObject
2015-09-01 12:25:04 -07:00
Adam Barth
dc671f272a Add dartdocs for RenderObject
... and other code in object.dart.
2015-09-01 12:24:27 -07:00
Ian Fischer
07c2379338 Don’t require specifying -p in ios_sim commands under normal circumstances. 2015-09-01 11:26:46 -07:00
Ian Fischer
33470ab2e7 Refactor sky_tool install slightly and fix non-local builds. 2015-09-01 10:37:27 -07:00
Ian Fischer
63763ab0e8 Fix missing paren 2015-09-01 10:07:20 -07:00
Ian Fischer
23958b15e1 Make it possible to download trace files on rooted devices using sky_tool stop_trace 2015-08-31 17:12:09 -07:00
Ian Fischer
2956f669e7 Merge pull request #976 from domokit/iansf-update-readme-install
Update README.md to reflect removal of --install flag.
2015-08-31 16:55:46 -07:00
Ian Fischer
8f96a4efff Update README.md to reflect removal of --install flag. 2015-08-31 16:48:16 -07:00
Hans Muller
3a25de84c6 Merge pull request #974 from HansMuller/dismissable-uses-gestures
Convert Dismissable to use gestures

Convert Dismissable to use the ScrollStart, ScrollUpdate, and ScrollEnd gestures. Support for fling gestures is TBD.

Included a basic unit test that checks that one item can be dismissed with a press-drag-release gesture.

Fixed the scroll gesture recognizer: if the last pointer goes up and candidate recognizers still exist, then reject the gesture.
2015-08-31 16:46:26 -07:00
Hans Muller
7d6119c2de Convert Dismissable to use gestures
Convert Dismissable to use the ScrollStart, ScrollUpdate, and ScrollEnd gestures. Support for fling gestures is TBD.

Included a basic unit test that checks that one item can be dismissed with a press-drag-release gesture.

Fixed the scroll gesture recognizer: if the last pointer goes up and candidate recognizers still exist, then reject the gesture.
2015-08-31 16:44:25 -07:00
Adam Barth
0c15b35045 Merge pull request #972 from abarth/parent_data_madness
Positioned 'remembers' things it shouldn't
2015-08-31 16:41:36 -07:00
Adam Barth
1119f36040 Positioned 'remembers' things it shouldn't
This patch makes ParentDataNode less general purpose and instead teaches Flex
and Stack how to program the parent data for their children. We used to have
this general system because parent data used to carry CSS styling, but we don't
need it anymore.

Fixes #957
2015-08-31 16:41:14 -07:00
Hixie
c01bb264c7 Remove the inner SizeObserver from ScrollableWidgetList.
Adds a HomogeneousViewport class that works like MixedViewport but
handles only children that have all the same height.

Converts ScrollableWidgetList to use that, so that we don't waste a
frame looking at the size of the contents each time we change size.

This allows a number of seemingly pointless double-pumps in the tests
to be removed.

Other changes that were necessary to support the above:

 - RenderBlock now supports minExtent (think 'min-height' in CSS)
 - RenderBlock now supports itemExtent (forces the height of each
   child to be the same, so that the itemExtent passed to the fixed-
   height scrollables are all authoritative instead of a source of
   bugs when they don't match)
 - RenderBlockViewport now supports horizontal scrolling
 - improved the style of the isInfinite assert in box.dart
 - fixed the position of a comment in mixed_viewport.dart
 - added a test
 - made the logic for how many items to show be more precise
2015-08-31 15:57:45 -07:00
Adam Barth
d57e9ca53c Make these constants private
These constants aren't useful outside these files and are cause noise in the
dartdoc.
2015-08-31 15:53:33 -07:00
Ian Fischer
ede7233afc Merge pull request #969 from iansf/extract_install
Extract install from StartSky
2015-08-31 14:30:29 -07:00
Ian Fischer
c1315e5bb2 Extract install into its own sky_tool command. 2015-08-31 14:20:18 -07:00
Adam Barth
696372a293 Basic widgets should validate their parameters with asserts
Also fixes #937.
2015-08-31 13:34:30 -07:00
Adam Barth
187146e841 Merge pull request #961 from abarth/transform_origin
Add an origin parameter to transforms
2015-08-31 13:22:01 -07:00
Adam Barth
aa778b3190 Add an origin parameter to transforms
This parameter makes it easier to do math when you don't want to center your
tranform at (0, 0).
2015-08-31 13:21:26 -07:00
Ian Fischer
12d82fdef2 Merge pull request #960 from iansf/fix_ios_deploy_crashes
Avoid crashing when an iOS device isn't connected
2015-08-31 10:43:23 -07:00
Ian Fischer
1dfcbbd76d Avoid crashing when an iOS device isn’t connected. 2015-08-31 10:41:52 -07:00
Ian Hickson
c36ddfe008 Merge pull request #897 from Hixie/sync-children
Provide a fast path for MultiChildRenderObjectWrapper.syncRenderObject() when the children lists are identical.
2015-08-31 10:36:28 -07:00
Adam Barth
9f43b5a490 Merge pull request #953 from abarth/painting_docs
Add dartdoc for the painting code
2015-08-31 09:37:10 -07:00
Adam Barth
e2638c189d Add dartdoc for the painting code 2015-08-31 09:36:35 -07:00
Adam Barth
c6c4c5d26a onPressed not called when in a Positioned Flex
We were setting the main axis extent to zero because we had a sign error.

Fixes #918
2015-08-31 09:12:40 -07:00
Adam Barth
088958e8f6 Unbreak link when deployed 2015-08-30 18:43:17 -07:00
Ian Hickson
969dfe5273 Add gestures/ to README.md prose 2015-08-30 16:30:59 -07:00
Ian Hickson
9152f4643f Add gestures/ to README.md diagram 2015-08-30 16:29:48 -07:00
Adam Barth
92857ceef8 Add dartdoc for base 2015-08-30 13:03:03 -07:00
Adam Barth
bffdcf84f5 Update box_painter.dart 2015-08-30 11:03:00 -07:00
Adam Barth
0d3c62ef72 Merge pull request #946 from abarth/infinite_border_radius
BoxDecoration's borderRadius should be able to handle a value of double.INFINITY
2015-08-29 22:34:30 -07:00
Adam Barth
2dd8365201 Scrolls should start immediately when possible
If there are no other gestures in the arena, we should kick off the scroll
gesture right away. This change pulled a refactoring of how we dispatch events
to Widgets. Now we dispatch events to Widgets interleaved with their associated
RenderObjects. (Previously we dispatched to all of the RenderObjects first.)
2015-08-29 22:30:49 -07:00
Adam Barth
8d0a2426a6 Rename ParagraphPainter to TextPainter
Also, add asserts that the text has layout before being painted.
2015-08-29 11:41:20 -07:00
Adam Barth
acec6d0171 BoxDecoration's borderRadius should be able to handle a value of double.INIFINITY
We just need to enforce some finite clamp and Skia will do the rest.

Fixes #939
2015-08-28 20:58:34 -07:00
Adam Barth
d45ca99539 Merge pull request #941 from abarth/scroll_disambig
Disambiguate horizontal and vertical scrolling
2015-08-28 20:33:31 -07:00
Adam Barth
bf3db503fd Disambiguate horizontal and vertical scrolling
We now have separate gestures for horizontal, vertical, and pan scrolling.
2015-08-28 20:33:14 -07:00
Ian Fischer
cdbb26c627 Merge pull request #944 from iansf/no_android
Don't crash when no Android device is attached
2015-08-28 19:28:51 -07:00
Misha Dynin
9d19587e9d Fixed a typo in the README. 2015-08-28 17:54:14 -07:00
Ian Fischer
987d0d5f7d Make it so that sky_tool doesn’t crash if an Android device isn’t attached.
Refactors a bunch of Android-related things into an AndroidDevice singleton class.
2015-08-28 17:13:39 -07:00
Hixie
7a53576ff8 Fix crash when a MixedViewport is initially offset at a non-zero position.
We need to always remove the widget when you sync a non-visible
widget, even if we already have it, because otherwise we'll try to
sync it with null again later, which causes a crash.

Test in #938.
2015-08-28 16:57:05 -07:00
Adam Barth
537a192e50 Rev pub package 2015-08-28 16:13:02 -07:00
Adam Barth
fc3e91600c Rev pub package 2015-08-28 16:08:30 -07:00
Hixie
9fee250249 Set and remove the callbacks on the RenderObject when we create and remove it.
...and not when we mount and dismount.

Turns out that when we dismount, it's too late -- we've already set
renderObject to null.

We also mark the mixed viewport as dirty when it is removed from its parent.
Without this, we try to reuse the child nodes in subsequent syncs, which is a disaster.
2015-08-28 15:07:51 -07:00
Adam Barth
ab13ea240d onScrollStart shouldn't have an offset
Instead, we pump a onScrollUpdate with the offset if there is an offset.
2015-08-28 15:07:30 -07:00
Hixie
2f3d1fdeb8 Add support for 'direction' to MixedViewport. 2015-08-28 14:27:51 -07:00
Adam Barth
9c8406f99f Merge pull request #930 from abarth/scroll
Add scroll gestures and use them in Scrollable
2015-08-28 14:05:36 -07:00