1847 Commits

Author SHA1 Message Date
Jason Simmons
7983d5f0c5 Fix a memory leak in CanvasImageDecoder
CanvasImageDecoder is instantiated with a callback into a Dart closure.
That closure was holding references to the ImageDecoder and the returned
Image.  The circular reference between the ImageDecoder and the callback
prevented the objects from being GCed, resulting in leakage of the image
buffer.

CanvasImageDecoder will now destroy the callback after it is invoked,
thus releasing its handle to the Dart closure.
2015-10-27 15:05:30 -07:00
Hans Muller
66d2fc33a3 Adds modal bottom sheets: showModalBottomSheet() 2015-10-27 14:57:18 -07:00
Hixie
e34aefbd8a Notification of metrics changes.
The Rendering layer binding now multiplexes the dart:ui metrics change
notification so that multiple consumers can all listen to the change.
2015-10-27 14:32:00 -07:00
Adam Barth
1e51daa530 Add the position at which drags start
Fixes #1807
2015-10-27 14:25:03 -07:00
Adam Barth
d25ff94259 Merge pull request #1832 from abarth/tap_position
Add a position to the onTap callback
2015-10-27 14:20:35 -07:00
Adam Barth
0d1e58072b Add a position to the onTap callback
Fixes #1807
2015-10-27 14:12:54 -07:00
Ian Hickson
4b56dd50a0 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
9c8196b4d1 Use VoidCallback in more places
We still use special-purpose typedefs in the gesture code for symmetry with
other gesture callbacks.

Fixes #1827
2015-10-27 11:19:44 -07:00
Adam Barth
b507577966 Merge pull request #1822 from abarth/custom_shifted_box
Add CustomOneChildLayout
2015-10-27 11:10:00 -07:00
Adam Barth
c8b9359b7d Merge pull request #1825 from abarth/tap_tracker
Make TapTracker and TapGesture private classes
2015-10-27 11:09:34 -07:00
Adam Barth
fbfbd57f65 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
Adam Barth
e448acb008 Use VoidCallback for onPressed and friends
Previous these callbacks were leaking the implementation detail that they were
triggered by taps. In a later patch, we're going to add a parameter to
GestureTapCallback that these callbacks won't have.

Related to #1807
2015-10-27 10:21:10 -07:00
Adam Barth
1099c7bcd4 Make TapTracker and TapGesture private classes
We don't want to expose these from the gesture package. This patch moves
DoubleTapGestureRecognizer into tap.dart so we can make TapTracker and
TapGesture private to that file.
2015-10-27 10:08:48 -07:00
Ian Hickson
5f2c17b1ff Merge pull request #1819 from Hixie/new-enabled-approach
Use the presence of handler to determine 'enabled'
2015-10-27 09:30:34 -07:00
Adam Barth
b5639a1959 Merge pull request #1814 from abarth/fix_right_align
Right-aligned text paints offscreen sometimes
2015-10-26 19:41:24 -07:00
Hixie
6e31784bf4 Use the presence of handler to determine 'enabled'
Instread of an explicit 'enabled' bool, this uses the presence of the
event handler to determine if a widget is enabled or not. This means
that if you've not passed a handler, your widget will be disabled, which
makes sense, since it wouldn't work anyway.

Adds this feature to checkbox, and ports raised button, flat button, and
radio buttons to this new model.

Adds a checkbox to card_collection that can be disabled.

Hide a (basically bogus) hint from the (soon to be disabled) strong hint
mode in the analyzer that this reveals.
2015-10-26 17:35:41 -07:00
Hixie
c0c7f9d412 Make ink wells animate their highlight. 2015-10-26 17:24:14 -07:00
Chinmay Garde
ee995e31a6 Merge pull request #1815 from chinmaygarde/master
On iOS, avoid the unnecessary dependency on sky_snapshot (which generates a script snapshot)
2015-10-26 17:02:09 -07:00
Chinmay Garde
47b52a4d1c On iOS, avoid the unnecessary dependency on sky_snapshot (which generates a script snapshot) 2015-10-26 17:01:48 -07:00
Adam Barth
96087ea239 Right-aligned text paints offscreen sometimes
We were assuming that the text extended from 0.0 to its max content width.
That's not correct for right-aligned text. Instead, we need to layout the text
again at the width we want it to occupy.
2015-10-26 15:49:47 -07:00
krisgiesing
e3f8f0959f Merge pull request #1809 from krisgiesing/event-fix
Handle mouseover events in pointer event conversion
2015-10-26 15:35:54 -07:00
Kris Giesing
b681670ed9 Handle mouseover events in pointer event conversion
Fixes #1806
2015-10-26 15:29:43 -07:00
Hixie
800ff311e7 Radio button 'disabled' state.
Also:
 - give card_collection an option to turn on or off the edit widgets
 - give card_collection an option to control text alignment (when not editing)
 - give card_collection a "dump" option to aid debugging
 - make the gesture detector report which gestures it is listening to
2015-10-26 14:49:58 -07:00
krisgiesing
ff77fbed1e Merge pull request #1799 from krisgiesing/tap-fix
Restore previous tap behaviors: no timeout, one pointer
2015-10-26 13:49:23 -07:00
Adam Barth
1fa881bed1 Merge pull request #1798 from abarth/inherit_text_style
Be explicit about whether text styles inherit
2015-10-26 13:42:01 -07:00
Kris Giesing
e6e77318d0 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
Adam Barth
ba96347f76 Be explicit about whether text styles inherit
Now TextStyle has a boolean "inherit" value, which controls whether null values
should use should inherit from the current default text style or whether they
should use their initial values.
2015-10-26 13:25:20 -07:00
Hixie
02f45a5d06 Port ensure_visible.dart to fn3.
This concludes the fn3 port!
2015-10-26 12:44:54 -07:00
Ian Hickson
e75b9b0815 Merge pull request #1777 from Hixie/debug-touches
debugPaintPointersEnabled mode
2015-10-26 12:02:27 -07:00
Ian Hickson
1af5aa52c5 Merge pull request #1782 from Hixie/gesture-fixes
trivial cleanup in gesture code
2015-10-26 12:02:24 -07:00
Ian Hickson
6efc36632a Merge pull request #1783 from Hixie/better-feedback-for-null-child
better feedback for null child to a Block or Column
2015-10-26 12:02:18 -07:00
Ian Hickson
48f4170da5 Merge pull request #1789 from Hixie/ValueChange
Radio<T> and ValueChanged<T>
2015-10-26 12:02:09 -07:00
Chinmay Garde
37f70d0e99 Merge pull request #1793 from chinmaygarde/master
Nuke unused document watcher on iOS
2015-10-26 11:56:39 -07:00
Chinmay Garde
40314239aa Nuke unused document watcher on iOS 2015-10-26 11:54:24 -07:00
Matt Perry
0f9ecd3edd Add LICENSE file to flx package. 2015-10-26 14:52:52 -04:00
Matt Perry
a52bb04c1f Merge pull request #1723 from mpcomplete/flx.2
Change updater to use shared flx package
2015-10-26 14:45:29 -04:00
Matt Perry
cf097758bf Change updater to use shared flx package.
This changes flutter's updater package to depend on and use the new flx
package. I also did a little cleanup of the Bundle interface.
2015-10-26 14:20:32 -04:00
Chinmay Garde
1c19bdbd36 Merge pull request #1790 from chinmaygarde/master
Update Dart revision
2015-10-26 11:19:05 -07:00
Chinmay Garde
ae7f980d31 Update Dart revision 2015-10-26 11:12:03 -07:00
Hixie
f3f1fd8d7c Radio<T> and ValueChanged<T>
Make Radio widgets take a type that describes the type of their value,
so that you can catch when you use the wrong value.

Standardise on ValueChanged<Foo> instead of having a FooValueChanged
for every value of Foo.
2015-10-26 11:03:24 -07:00
Adam Barth
abe6ee9b90 Rev pub packages 2015-10-26 10:42:14 -07:00
Adam Barth
27e5b1b0ba Merge pull request #1786 from abarth/roll_skia
Roll Skia
2015-10-26 10:36:48 -07:00
Adam Barth
3327356aee Roll Skia 2015-10-26 10:36:00 -07:00
Jason Simmons
d3ad502cb8 Merge pull request #1762 from jason-simmons/selection_delete_surround
Keep the selection within bounds in deleteSurroundingText
2015-10-26 09:58:06 -07:00
Ian Hickson
fc03dcb00c better feedback for null child to a Block or Column
Fixes #1687.
2015-10-25 20:27:10 -07:00
Ian Hickson
6b301ba44c trivial cleanup in gesture code 2015-10-25 20:09:20 -07:00
Ian Hickson
e617b2c8f3 debugPaintPointersEnabled mode
Implements a mode that highlights RenderBoxes while events are being
routed through them.

Also, moves the size painting to after paint, so that opaque boxes
don't obscure the debugging lines.
2015-10-25 18:30:52 -07:00
Adam Barth
0c03d1c560 Rework how we lookup native functions from Dart
This patch changes how we lookup native functions from Dart to be more
extensible. This patch paves the way for removing the dart:ui_internals
library.
2015-10-25 00:41:45 -07:00
Adam Barth
b7a66619a4 Merge pull request #1773 from abarth/rm_dead_code
Remove a bunch of dead code
2015-10-24 19:08:38 -07:00
Ian Hickson
5306923ab8 Merge pull request #1769 from Hixie/moanalyze
Strong modeify the examples
2015-10-24 17:36:50 -07:00