Commit Graph

211 Commits

Author SHA1 Message Date
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
Adam Barth
529fa95f87 Give the CustomPaint and SizeObserver callbacks better names
The style we use for callbacks in widgets is "onFoo". These classes were using
an order naming convention and just called their callbacks "callback".
2015-10-19 17:27:40 -07:00
Hixie
4f96083e66 Fix warning in test. Arguments must be typed. 2015-10-19 16:07:01 -07:00
Hixie
ed195cfa19 requestPostFrameCallback()
Provide a way to schedule a callback for immediately after the current
frame has been sent to the GPU thread. This is useful for times where
you want to immediately schedule yourself for another build or layout
because, for instance, you just displayed frame zero of an animation and
you want to use the metrics from that layout to set up the actual
animation to begin immediately, such that the very next frame is frame 1.
2015-10-19 16:05:01 -07:00
Adam Barth
8402b54858 Merge pull request #1676 from abarth/align_uses_fractional_offset
Convert Align to use FractionalOffset instead of two doubles
2015-10-19 13:10:34 -07:00
Hixie
552f26d713 Stop AnimatedContainer from animating every build
It turns out that an AnimatedContainer with a BoxDecoration would
start animating every single time it was built, whether or not the
container's decoration had changed.
2015-10-19 13:06:59 -07:00
Adam Barth
715b304ea2 Convert Align to use FractionalOffset instead of two doubles
It was confusing as to whether these were fractions or pixels.

Fixes #1622
2015-10-19 12:56:38 -07:00
Hixie
fb8fe97a9b Enable Positioned to be animated.
Add a AnimatedRelativeRectValue class for animating RelativeRects.

Add a PositionedTransition class for animating Positioned using
AnimatedRelativeRectValues.

Add a test for PositionedTransition.

Fix a math bug a RelativeRect found by the test.

Fix a logic bug in the two ParentDataWidget classes found by the test.
Specifically, they were marking the child dirty, rather than the parent.
The parentData is for the parent's layout, not the child's, so they have
to mark the parent dirty. (I didn't hoist this up to the superclass
because ParentData could be used for painting, hit testing,
accessibility, or any number of other things, and I didn't want to bake
in the assumption that it needed markNeedsLayout.)
2015-10-17 19:06:42 -07:00
Hixie
d0d84e1666 Sundry debugging aids and fixes
(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.
2015-10-16 16:41:56 -07:00
Hans Muller
09ac8de2d6 Fix scollable tabs, add basic unit test 2015-10-16 15:10:26 -07:00
krisgiesing
d923a8c35f Merge pull request #1617 from krisgiesing/arena_sweep
Arena sweep
2015-10-15 13:08:34 -07:00
Jason Simmons
5b72a2fdaf Fix warnings seen when running skyanalyzer in strong mode 2015-10-15 10:56:03 -07:00
Jason Simmons
6bdd288379 Merge pull request #1615 from jason-simmons/edit_text_action_button_2
Implement better synchronization between the state of the input widget and the keyboard IME
2015-10-14 17:36:33 -07:00
Kris Giesing
e8a0ea3593 Add release semantics, add test 2015-10-14 17:03:26 -07:00
Hixie
3c95ce621c Transform alignment
For those times where you want to spin something around a point relative
to the size of your box, but you don't know the size of your box.
2015-10-14 15:30:56 -07:00
Jason Simmons
98b83e0cf5 Implement better synchronization between the state of the input widget and the keyboard IME
Also add an input widget API for the keyboard submit button
2015-10-14 15:19:46 -07:00
Kris Giesing
0284321483 Address more comments 2015-10-13 17:32:04 -07:00
Kris Giesing
9f74a178fd Address comments 2015-10-13 16:57:40 -07:00
Kris Giesing
ec205ac5c5 Add dart-layer input event abstraction 2015-10-13 15:16:04 -07:00
Hixie
f2cc43a483 Lots of trivial warning fixes
Add type annotations in many places.
Fix some identifiers to have more lint-satisfying names.
Make all operator==s consistent in style.
Reorder some functions for consistency.
Make ParentData no longer dynamic, and fix all the code around that.
2015-10-12 16:31:20 -07:00
Adam Barth
f9a7ed047d Reattach fitness to the build
We can build Fitness again now that playfair has been updated to account for
the package:flutter rename.
2015-10-12 00:24:24 -07:00
Adam Barth
ecce1eb389 Import dart:ui as ui (instead of as sky) 2015-10-09 20:55:54 -07:00
Adam Barth
65eba90843 Rename package:sky to package:flutter 2015-10-09 20:44:52 -07:00
Adam Barth
5b37f8750d Rename dart:sky to dart:ui 2015-10-09 19:27:13 -07:00
Adam Barth
db3b9e8052 Rename App to MaterialApp
MaterialApp assumes that you're using material design.

Also move radial reaction and fix imports for stats box.
2015-10-09 10:27:22 -07:00
Adam Barth
cc809491ba Split material design widgets out of widgets.dart
These are now part of material.dart.
2015-10-09 10:07:06 -07:00
Hixie
4254f5fba8 Drawer test. 2015-10-08 12:17:53 -07:00
Hans Muller
3cfc9c4d95 Allow Stacks with no children or only poisitioned children 2015-10-08 11:09:41 -07:00
Adam Barth
67367974ef Merge pull request #1538 from abarth/fix_snackbar
SnackBar throws exception on creation
2015-10-08 10:27:58 -07:00
Hans Muller
09d26302cb IndexedStack
Added horizontal and vertical alignment properties to Stack so that the origin of non-positioned children can be specified. Currently all of the non-positioned children just end up with their top-left at 0,0. Now, for example, you can center the children by specifying verticalAlignment: 0.5, horizontalAlignment: 0.5.

Added IndexedStack which only paints the stack child specified by the index property. Since it's a Stack, it's as big as the biggest non-positioned child. This component will be essential for building mobile drop down menus.

Added a (likely temporary) example that demonstrates IndexedStack.
2015-10-08 10:21:24 -07:00
Adam Barth
6b1c85a8b0 SnackBar throws exception on creation
It was trying to grab the route's performance before it was created. Now we
create the performance eagerly again.
2015-10-08 10:17:19 -07:00
Adam Barth
d234ed932e Re-enable passing tests 2015-10-07 20:12:39 -07:00
Hixie
fbf8174c87 Fix Focus
Focus.at() and company should be on Focus, not FocusState.

_notifyDescendants() was using the wrong runtimeType.

Let InheritedWidget update the descendants during build.

When you setState() during build, assert that you're not
markNeedsBuild()ing someone who isn't a descendant.

Typo in Widget.toString().
2015-10-05 16:41:50 -07:00
Hixie
90a0f6300f Simplify the usage of Navigator's routes argument
(These are changes cherry-picked from in-flight branches since they are
more independent and could be helpful even without those changes.)

- Change RouteBuilder's signature to take a single argument in which the
  other fields are placed, so that we can keep iterating on those
  arguments without having to break compatibility each time. Also, this
  makes defining route builders much simpler (only one argument to
  ignore rather than a variable number).

- Expose the next performance to RouteBuilders, since sometimes the
  route itself might not be where it's used.

- Allow BuildContext to be used to walk children, just like it can for
  ancestors

- Allow BuildContext to be used to get the Widget of the current
  BuildContext

- Allow StatefulComponentElement to be referenced with a type
  specialisation so that you don't have to cast when you know what the
  type you're dealing with actually is.
2015-10-05 13:59:30 -07:00
Adam Barth
db191e96bd Switch scheduler over to Duration
This patch prepares us to switch to using integers when handing off the
animation time from the engine to the framework.
2015-10-03 13:48:57 -07:00
Adam Barth
7271698496 Merge pull request #1458 from Hixie/dismiss-1215
Regression test for #1215
2015-10-02 23:05:57 -07:00