Commit Graph

245 Commits

Author SHA1 Message Date
Hans Muller
7bafe54a5e Added LayoutId widget, MultiChildLayoutDelegate.isChild() 2015-11-04 16:58:21 -08:00
Adam Barth
9bc64540c5 Improve hit testing
Now a RenderBox is considered hit if one of its children are hit or it itself
decides that it's hit. In particular, empty space inside a flex won't be hit
because none of the children are located there and a RenderFlex doesn't
consider itself hittable.

Fixes #53
Fixes #1221
2015-11-04 16:51:19 -08:00
Matt Perry
6185fa14d2 Remove use of FakeAsync in signing_test.dart 2015-11-04 16:13:10 -05:00
Matt Perry
60fa30a644 Use crypto package for BASE64 encoding.
This means we no longer depend on the dart 1.13 beta SDK.
2015-11-04 14:28:04 -05:00
Matt Perry
d74a7517ef flx: Support for seeding the RNG for package signing.
Add a test for signing/verifying with a random generated key pair.
2015-11-04 14:02:00 -05:00
Adam Barth
c44dd17d47 Always reset parentData when dropping children
Previously, we'd leave the old values in the parent data if the types matches,
but not all render objects would reset these values during layout. For example,
RenderProxyBox doesn't set the position field because it doesn't read the
position field. However, leaving the old data there violates the invariants of
the box protocol and can cause trouble (e.g., localToGlobal giving the wrong
result).

Fixes #1939
2015-11-04 08:02:05 -08:00
Hixie
7925e060b9 Fix double tap constants, add a doubletap test
Document the Gesture Detector constants.

Remove kEdgeSlop since it's obsolete on Android.

Add a test that verifies that when the first tap is canceled, the second
tap can become the first tap of a subsequent two-tap sequence.
2015-11-03 16:53:08 -08:00
Adam Barth
78ba7d9281 Merge pull request #1934 from abarth/stocks_list
Stocks list doesn't update when stocks are loaded
2015-11-03 14:28:23 -08:00
Adam Barth
78d35391ce Stocks list doesn't update when stocks are loaded
Previously, we passed widgets up the hierarchy to display them in the overlay,
but that breaks the change propagation logic because those widgets won't get
rebuilt.  Now we pass WidgetBuilders instead, which can be rebuilt when the
overlay rebuilds.

Fixes #1913
2015-11-03 14:27:54 -08:00
Matt Perry
b1f17c9c9d Merge pull request #1923 from mpcomplete/tests.2
Add tests for flx Bundle.
2015-11-03 15:11:15 -05:00
Matt Perry
713d654330 Add tests for flx Bundle.
Also cleaned up the flx code a bit. Replaced custom KeyPair class with
cipher's AsymmetricKeyPair.
2015-11-03 14:50:47 -05:00
Hans Muller
827af771b6 Merge pull request #1922 from HansMuller/justifycontent_collapse
Adds FlexJustifyContent.collapse
2015-11-03 11:29:08 -08:00
Hans Muller
d88cad16e6 fixed unit test dart analyzer-O 2015-11-03 11:10:41 -08:00
Hans Muller
a052842360 Adds FlexJustifyContent.collapse 2015-11-03 11:01:38 -08:00
Hans Muller
766eda6bf6 Restored BottomSheet dismiss tap 2015-11-03 09:34:28 -08:00
Ian Hickson
a0c8a4c61e Merge pull request #1911 from Hixie/so-long-show-press
Replace ShowPress with TapDown
2015-11-02 20:26:22 -08:00
krisgiesing
33f13940c5 Merge pull request #1865 from krisgiesing/velocity-dart
Move velocity tracker to dart
2015-11-02 19:34:20 -08:00
Hixie
8a4a36d0fa Replace ShowPress with TapDown 2015-11-02 19:10:33 -08:00
Hans Muller
5ea50bf485 Adds CustomMultiChildLayout
CustomMultiChildLayout delegates to a MultiChildLayoutDelegate. Widget children are specified by their index in the list of children.
2015-11-02 14:06:00 -08:00
Kris Giesing
24ea0f0d14 Move velocity tracker to dart 2015-11-02 11:14:17 -08:00
Adam Barth
6ee6ae03c9 Black flash when returning to a PageRoute
We were trying to do a hero animation from a page to itself, which doesn't make
any sense. Now we only render the "to" page offstage if it is different from
the "from" page and if its performance isn't already complete.
2015-10-31 15:36:32 -07:00
Hixie
56b2576308 Disable crashing test
This test currently crashes the engine.
Because of a bug in the test harness, it then causes the tests to hang.
This disables the test for now, so that we can get test coverage again.
2015-10-30 16:44:29 -07:00
Adam Barth
50a177b7aa Switch to Navigator2 2015-10-29 23:18:56 -07:00
Adam Barth
fab160cfce Rationalize embedder.dart and shell.dart
This patch combines embedder.dart and shell.dart into one thing. We should now
handle a bunch of error cases better.

  * embedder.connectToApplication has moved to shell.connectToApplication,
    matching the rest of the mojo universe.
  * embedder.connecttoService has moved to shell.connnectToService (and merged
    with shell.requestService).
  * shell.requestService is now shell.connectToService, matching the rest of
    the mojo universe.
  * serviceRegistry has moved from embedder.serviceRegistry to a top-level
    getter.

Fixes #1803
2015-10-29 10:47:34 -07:00
Ian Hickson
6d4221cb95 Merge pull request #1851 from Hixie/MixedViewport-bug
Fix crash when removing a card in card_collection
2015-10-28 14:47:40 -07:00
Matt Perry
114d8fe6c4 Merge pull request #1853 from mpcomplete/tests
Some initial unit tests for package signing
2015-10-28 16:57:27 -04:00
Matt Perry
bee7119e33 Add some unit tests for flx signing code. 2015-10-28 15:52:34 -04:00
Hixie
a8a32a972a Fix crash when removing a card in card_collection
MixedViewport didn't use the building:true flag when locking itself, so
when it caused a rebuild of its children, we assumed that nobody was
allowed to mark things dirty below the list, and things crashed when
Inherited people did in fact rebuild.

Also:
 - default offset for MixedViewport
 - don't bother rebuilding if the underlying RenderObject is going to
   rebuild anyway for some reason
 - better docs for the "items must have keys" assert
 - keep the FlipComponent stuff together in test_widgets.dart
2015-10-28 10:31:12 -07:00
Adam Barth
3373d0ba01 Switch clients from ui.view to ui.window 2015-10-28 07:16:56 -07:00
Kris Giesing
25ed15773c #1834 Reset tap state after successful tap 2015-10-27 14:47:09 -07:00
Adam Barth
1e446ffc28 Add the position at which drags start
Fixes #1807
2015-10-27 14:25:03 -07:00
Ian Hickson
8a900f9042 Track scroll position
- Change RouteArguments to pass the route's BuildContext rather than
  the Navigator. This caused the bulk of the examples/ and .../test/
  changes (those are mostly mechanical changes). It also meant I could
  simplify Navigator.of().

- Make initState() actually get called when the State's Element is in
  the tree, so you can use Foo.of() functions there. Added a test for
  this also.

- Provide a RouteWidget so that routes have a position in the Widget
  tree. The bulk of the route logic is still in a longer-lived Route
  object for now.

- Make Route.setState() only rebuild the actual route, not the whole
  navigator.

- Provided a Route.of().

- Provided a Route.writeState / Route.readState API that tries to
  identify the clients by their runtimeType, their key, and their
  ancestors keys, up to the nearest ancestor with a GlobalKey.

- Made scrollables hook into this API to track state. Added a test to
  make sure this works.

- Fix the debug output of GestureDetector and the hashCode of
  MixedViewport.

- Fixed ScrollableWidgetListState<T> to handle infinite lists.
2015-10-27 13:46:07 -07:00
Adam Barth
f06559afed Add CustomOneChildLayout
A CustomOneChildLayout is a widget that lets you perform a custom layout in the
simplified setting of sizing and positioning a single child.
2015-10-27 11:04:32 -07:00
krisgiesing
5d0c090d44 Merge pull request #1799 from krisgiesing/tap-fix
Restore previous tap behaviors: no timeout, one pointer
2015-10-26 13:49:23 -07:00
Kris Giesing
f2fd5e32a5 Restore previous tap behaviors: no timeout, one pointer
Don't use a timeout to cancel tap tracking. Track only one primary pointer
and ignore non-primary pointers. Update tests to reflect desired behaviors.

Fixes #1779, #1780, #1781.
2015-10-26 13:41:29 -07:00
Hixie
fd842810c9 Port ensure_visible.dart to fn3.
This concludes the fn3 port!
2015-10-26 12:44:54 -07:00
Jason Simmons
76f83d1de1 Keep the selection within bounds in deleteSurroundingText
If the text is empty, the IME may call deleteSurroundingText(1, 0) if the user
hits the delete key.  The selection should remain at position 0 if this
happens.
2015-10-23 14:55:14 -07:00
Adam Barth
375f3247a7 Merge pull request #1761 from abarth/rm_old_text_painter
Delete OldTextPainter
2015-10-23 12:22:19 -07:00
Adam Barth
aa418844ea Delete OldTextPainter
Also, delete all references to DOM APIs.
2015-10-23 12:07:55 -07:00
Kris Giesing
73eae93b74 Remove inadvertently committed file 2015-10-23 12:02:18 -07:00
krisgiesing
739fda1af4 Merge pull request #1743 from krisgiesing/doubletap
Fix #1471 Add double tap gesture
2015-10-23 11:31:06 -07:00
Hans Muller
6c27d38337 Use FractionalOffset alignment value in Stack and IndexedStack 2015-10-22 15:44:25 -07:00
Kris Giesing
608e971f5b Add another double-tap test 2015-10-22 15:29:39 -07:00
Kris Giesing
219e189a18 Merge branch 'master' into doubletap 2015-10-22 15:08:04 -07:00
Adam Barth
de395582d5 Add Navigator.of
Now you don't need to pass the navigator around everywhere.
2015-10-22 12:32:42 -07:00
Kris Giesing
18e154d40b Improve tap; add double tap; add tests 2015-10-20 15:50:07 -07:00
Ian Hickson
37b4800734 Merge pull request #1695 from Hixie/offstage-tests
RenderOffStage test
2015-10-20 10:28:31 -07:00
Hixie
ff76ceb40e RenderOffStage test
Also, give RenderViewport a default offset.
2015-10-20 10:17:05 -07:00
Hixie
1e9e4e159d RenderOverflowBox baseline logic
I accidentally lost this when extracting RenderOverflowBox from
RenderProxyBox.
2015-10-20 09:52:48 -07:00
Adam Barth
f79fdff2d0 Move animation curves into a Curves namespace 2015-10-19 18:08:52 -07:00