1114 Commits

Author SHA1 Message Date
Adam Barth
95eb66856e Reduce paint time for Stocks drawer animation by 88%
Now we use a forced layer around the reprojected content of the drawer, which
means we don't have to re-record it during the slide animation. This saves 2ms
per frame.

The total main-thread time for the drawer animation is now 2.0ms.
2015-11-18 16:14:54 -08:00
Adam Barth
ec5b1c1a96 Merge pull request #476 from abarth/forced_layer
Reduce record time in Stocks drawer animation by 55%
2015-11-18 15:44:35 -08:00
Adam Barth
298f4a6eca Reduce record time in Stocks drawer animation by 55%
Now we use a ForcedLayer in the navigator overlay to cache the recording for
each entry in the overlay. This mechanism just caches the display list, not the
underlying pixels.

Also, remove the "dispose" notification in the Layer tree because it was
disposing layer too eagerly. We don't actually need this notification for
anything other than eagerly freeing some C++ memory.
2015-11-18 15:31:13 -08:00
Hans Muller
0dc652bd66 Corrected Card resting elevation, tabs example toolbar 2015-11-18 14:33:08 -08:00
Adam Barth
c964a1f1f8 Switch from ui.tracing to dart:Developer Timeline
This change will let us remove the tracing interface from dart:ui and also
makes these timeline events show up in Observatory.
2015-11-18 12:57:58 -08:00
Hans Muller
d9153a13c6 Update shadow rendering
Shadows now render as three seprate MaskFilter.blur components per the most recent Material spec.

The shadows Map was replaced by a similar Map called elevationToShadow with entries that match the 10 elevations specifed by http://www.google.com/design/spec/what-is-material/elevation-shadows.html.

The "level" property (many classes) is now called "elevation", to match the Material spec.

BoxShadow now includes a spreadRadius parameter - as in CSS box-shadow. Renamed the BoxShadow blur property to blurRadius to further align BoxShadow with CSS box-shadow.
2015-11-18 07:58:28 -08:00
Adam Barth
b065036a0a Merge pull request #454 from abarth/repeating_performance
Add support for repeating performances
2015-11-17 22:19:08 -08:00
Adam Barth
49b0843c84 Add support for repeating performances
Fixes #447
2015-11-17 17:05:38 -08:00
Hixie
65d814516b Pave the Foo.of() cowpath.
I'm planning on adding more .of() functions and so to avoid further
copypasta I'm providing some general utility functions here.
2015-11-17 16:49:22 -08:00
Adam Barth
e69e6c3eb1 Rename StatisticsBox to RenderStatisticsBox
Fixes #441
2015-11-17 16:10:15 -08:00
Florian Loitsch
7d7e20fd41 Merge pull request #405 from floitschG/scheduler
Add a task scheduler.
2015-11-17 16:05:26 -08:00
Florian Loitsch
371bf37dd9 Add a task-scheduler.
The current implementation is still pretty rudimentary.
2015-11-17 15:59:54 -08:00
Hixie
ad2dccf9d2 Fix focus bug that was breaking nested navigators
Turns out we were assuming that once the global key is gone, our
listener is unregistered. It isn't.

I'm planning on adding a test as part of my nested navigator work.
2015-11-17 15:54:05 -08:00
Hixie
173a71ea5b Notify the previous route when pushing and popping
This makes HeroController ignore StateRoutes when deciding where to
animate heroes to and from.
2015-11-17 13:15:10 -08:00
Adam Barth
0585a44a14 Merge pull request #435 from abarth/event_duration
Convert PointerInputEvent to Duration for timestamp
2015-11-17 11:56:38 -08:00
Hixie
56b9245b1a Allowing us to have a single error seems silly. 2015-11-17 11:08:46 -08:00
Adam Barth
7b2004b0e9 Convert PointerInputEvent to Duration for timestamp
To make the units clear.
2015-11-17 11:07:50 -08:00
Ian Hickson
1d3f734a92 Merge pull request #414 from Hixie/fix-demos
Fix some examples.
2015-11-17 09:53:54 -08:00
Adam Barth
c769d120c4 Add a Positioned constructor from a Rect
A common pattern is to use a Positioned with a Sized box to give both an offset
from the edge as well as a fixed size to the child. This patch rolls into into
the Stack layout algorithm for simplicity.

Fixes #250
2015-11-16 23:23:54 -08:00
Collin Jackson
31f6b8f6a5 Make fetch.dart and mojo_client.dart share a network service singleton 2015-11-16 22:00:47 -08:00
Collin Jackson
b07d55d1b3 Remove redundant fetch functions and avoid crashing when no headers are set 2015-11-16 18:31:57 -08:00
krisgiesing
3350c0c3e4 Merge pull request #415 from krisgiesing/editable_fix
Fix issue with forward-delete in editable text widget
2015-11-16 16:31:05 -08:00
Kris Giesing
2acc2f6f84 Back out irrelevant change 2015-11-16 16:26:42 -08:00
Kris Giesing
58df220ea4 Fix issue with forward-delete in editable text widget 2015-11-16 16:07:21 -08:00
Hixie
5e221334fa Fix some examples.
- drag and drop was using the wrong draggables (long press vs short
  press).

- navigation.dart wasn't using material correctly and so was ending up
  with some red text.

- piano wasn't followig our style guide even a little.

- date picker was not scrollable.
2015-11-16 15:54:40 -08:00
Collin Jackson
e3b9094f2a Fix #104 Support for setting HTTP headers 2015-11-16 14:10:58 -08:00
Hixie
309d25d4bb Move Material page animations to Material layer.
PageRoute is now MaterialPageRoute.

This also changes the following:

- Now the HeroController is a Navigator observer, rather than a feature
  of HeroPageRoutes, which are gone. This means heroes can work between
  any kind of ModalRoute now.

- ModalPageRoute is moved from modal_barrier.dart to routes.dart.

- It allows routes to opt-out of their modal barrier being a shortcut to
  popping the route.

- Features of PageRoute that aren't Material-specific get promoted to
  ModalRoute features: storage, the subtree key, offstageness...

The AnimatedModalBarrier is still a ModalRoute feature.
2015-11-16 12:53:12 -08:00
Hans Muller
8b1dd598e1 Merge pull request #376 from HansMuller/stocks_bug
Safely clear SnackBack and BottomSheet placeholders

Correct one stocks demo bug: displaying the stock symbol viewer (single tap on a row) while a BottomSheet or SnackBar was up, would assert.

Thep SnackBack and BottomSheet placeholder keys are cleared when they're obscured by a route with an opaque OverlayEntry. So in that case there's no need to try and clear the placeholder's child again.
2015-11-16 08:11:15 -08:00
Hans Muller
7955995f24 Safely clear SnackBack and BottomSheet placeholders 2015-11-13 16:13:35 -08:00
Adam Barth
fc2e31b8aa You should be able to nest Scaffolds
Prior to this patch, MultiChildLayoutDelegate couldn't be re-entered because it
cleared _idToChild when unwinding its stack. Now we restore the previous value
of _idToChild when we unwind.
2015-11-13 15:35:39 -08:00
John McCutchan
d1e62a39e2 Update four callers of Message constructor to pass in required arguments 2015-11-13 14:39:06 -08:00
Adam Barth
69e511d207 Cursor is tiny when there's no text in an input
Now we use a zero-width space to force the engine to resolve the font and tell
us how large the text is likely to be once there's text in the widget.

Fixes #302
2015-11-13 10:17:23 -08:00
Ian Hickson
fc5832dcdf Merge pull request #355 from Hixie/tap-bugs
Fix tapcancel on slop.
2015-11-12 22:22:42 -08:00
Ian Hickson
16471d92b9 Merge pull request #353 from Hixie/hit-testing-cleanup
Hit Testing Cleanup
2015-11-12 22:22:36 -08:00
Ian Hickson
876459e898 Merge pull request #354 from Hixie/more-debugging-for-listeners
More detailed debugging info for RenderPointerListener et al
2015-11-12 22:22:34 -08:00
Ian Hickson
c40cb176e3 Fix tapcancel on slop.
Make sure to send tapcancel when the primary pointer fails because of
slop, even if the gesture won by default.

Also, minor cleanup and clarification of an invariant.
2015-11-12 22:17:47 -08:00
Ian Hickson
1aa2751ba8 Trivial whitespace fixes. 2015-11-12 22:10:16 -08:00
Ian Hickson
c78e81f566 More detailed debugging info for RenderPointerListener et al
Elaborate on the debugging information exposed by
RenderPointerListener, Listener, and GestureDetector.
2015-11-12 21:22:38 -08:00
Ian Hickson
92b9d91af1 Hit Testing Cleanup
- Drop the unused BindingHitTestEntry class. (Well, it was
  constructed, but its member was never used, so it wasn't doing
  anything a boring old HitTestEntry couldn't already do.)

- Add toString()s to HitTestEntry and HitTestResult, to aid in
  debugging hit-test related code.
2015-11-12 20:57:08 -08:00
Adam Barth
679a423b3d Explicitly dispose heavy C++ objects
This patch calls dispose() explicitly on a number of heavy C++ objects so that
they can be eagerly finalized instead of waiting for GC.
2015-11-12 17:07:49 -08:00
Adam Barth
b628ff4051 Merge pull request #349 from abarth/reparent_data
Parent data not updated when reparenting using global keys
2015-11-12 16:58:57 -08:00
Adam Barth
35464f447b Parent data not updated when reparenting using global keys
When we reactivate a subtree that had a global key, we weren't updating the
parent data because:

1) The child wasn't in the tree when we updated the parent data element.
2) The activated child didn't go through mount (just through update).

This patch moves the parent data update work to when we attach the render
object, which we do both during mount and when reactivating a child.

Fixes #345
2015-11-12 16:51:56 -08:00
Hans Muller
45e1211677 Fix Dialog and PopupMenu completion logic 2015-11-12 16:31:24 -08:00
Ian Hickson
4a71f38224 Merge pull request #332 from Hixie/flutter-analyze
flutter analyze command
2015-11-12 12:28:48 -08:00
Hixie
a0227cab15 flutter analyze command
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
  pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
  changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
  things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
  upon further reflexion it was determined it didn't work anyway.
  We'll probably have to add better diagnostics here and say to run the
  updater script.
- Remove the native velocity tracker script, since it was testing code
  that has since been removed.

Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
  in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
  strong mode because even though it's not really relevant to our needs,
  it does (more or less accidentally) catch a few things that are
  helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
  platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
  where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
  files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
  identifiers using lowerCamelCase.' lint, to allow one-letter variables
  that use capital letters (e.g. for physics expressions) and to allow
  multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
  incantation and a "#" character:
    // analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
    // analyzer says "..."
  ...then we ignore any errors that have that "..." string in them.
2015-11-12 12:23:29 -08:00
Adam Barth
0259ad81db ItemBuilder should also get the index of the item
This seems useful for numbering the entries in the list, for example.

Fixes #328
2015-11-12 12:05:42 -08:00
Hans Muller
1aac53a500 showSnackBar() returns a Future, clears its placeholder
TransitionRoute completer is now optional.
2015-11-12 08:57:09 -08:00
Devon Carew
d057343b1b update double tap reference 2015-11-11 20:49:29 -08:00
Adam Barth
8a256abdde Merge pull request #321 from alhaad/fix_service_registry_handle
service_registry.dart should use the service registry handle instead of shell handle
2015-11-11 18:29:50 -08:00
Alhaad Gokhale
d0cfff1688 service_registry.dart should use the service registry handle instead of
shell handle.

R=@abarth,@tonygentilcore
2015-11-11 17:14:35 -08:00