1865 Commits

Author SHA1 Message Date
Eric Seidel
c1cad6ccda Don't crash when main.dart is a 404.
Ideally we would show a failwhale or some such, but
I don't know how we would bundle that file with our
APK yet.

Fixes https://github.com/domokit/mojo/issues/228

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1182633002.
2015-06-11 14:07:49 -07:00
Matt Perry
08b0b8b540 Fix crash in stocks2 app caused by unspecified PaintBits.
TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1182613002.
2015-06-11 16:20:42 -04:00
Hixie
6cf4451a2c Add an example of an app that manipulates both a RenderObject tree and has some fn logic in it.
Also:
 - Make RenderProxyBox non-abstract
 - Upgrade the old container.dart example
 - Minor fixes to ui_mode.dart to make this work

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1183503003.
2015-06-11 13:08:00 -07:00
Matt Perry
502430f988 Fix bustage from my previous CL: "Color.fromARGB" becomes "new Color.fromARGB".
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1184523002.
2015-06-11 15:59:10 -04:00
Eric Seidel
b164b86e35 Teach roll_versions.py how to update CHANGELOG.md files.
This is feature creep.  But it was simple and fun. :p

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175393002.
2015-06-11 12:48:33 -07:00
Matt Perry
583b126b57 Remove redundant Paint.setARGB in favor of assigning to Paint.color.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1182563002.
2015-06-11 15:43:53 -04:00
Matt Perry
85670ba03d Expose and use constants for DrawLooperLayerInfo.setPaintBits to dart.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175403002.
2015-06-11 15:41:12 -04:00
Adam Barth
dcea536857 Teach stack to size to the max of its non-positioned children
Previously, it would always try to be as big as possible. This CL fixes a
problem with the search bar whereby the text wasn't centered. Now the Stack for
the text sizes its height properly and then becomes centered.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1184483002.
2015-06-11 12:32:43 -07:00
Adam Barth
2a86cc9ae3 Stop the search search button from crashing stocks2
There are still a number of problems with the search feature, but at least it
doesn't crash after this CL.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1179643004.
2015-06-11 11:08:14 -07:00
Eric Seidel
4ee96b73d9 Remove bogus CHECK in set_isolate.
This was added in 22da76be1ee64120f69ed35d6f21c85c31df08b6
but breaks all navigation (which is sadly only tested by our
demo site).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1182543002.
2015-06-11 11:05:36 -07:00
Hixie
9e73c7eeff Refactor fn2.dart, since it breached our 1000-line threshold.
This moves input.dart to editing2/, since that way we can define the layering as strictly unidirectional.
It also reorders a bunch of imports to fit the style guide.
I removed the old remnants of the widgets example, and put the fn2 examples into the examples/widgets/ directory, to parallel the framework directory names.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177243002.
2015-06-11 10:26:11 -07:00
Matt Perry
c9dd71253c Fix up constructor naming style for MaskFilter and ColorFilter.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1179913002.
2015-06-11 13:15:20 -04:00
Matt Perry
b973810865 Sky: Small fixes to Gradient interface. Added comments and renamed constructors.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1180873003.
2015-06-11 13:14:51 -04:00
Adam Barth
7d788ecfc9 Make the popup menu animation correct
This CL wires up the opacity of the popup menu items and teaches the popup menu
how to draw its background at the right size.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1175353002.
2015-06-11 10:09:39 -07:00
Viet-Trung Luu
3c2e575fac Update from https://crrev.com/333737
* Cherrypick crrev.com/333293 (freetype -> freetype-android).
* Update mojo/go/go.py to use android-16 (NDK API level 16), which is
  4.1 (first Jelly Bean). Chromium dropped support for 14.
* TODO (separately): also update tools/go/upload.py and upload new
  binaries?
* Roll android_tools (to match Chromium).
* Small fixes to match //base changes: base::ObserverList, TraceConfig,
  ThreadTicks, etc.
* Restore build/ls.py (and add it to the list of files to not roll).
* Remove the dependency on third_party/instrumented_libraries.
* Add "enable_topchrome_md = false" to build/config/ui.gni.
* Add build/config/ui.gni to files_not_to_roll in
  update_from_chromium.py. (We should probably get rid of the use_glib
  variable/argument, and others as well.)
* Remove mojo/tools/roll/{roll_network_service.py,
  roll_network_service_patches/network_service.patch}. These are for
  rolling from Chromium, whereas we now have/use monet.
* Roll buildtools (to match Chromium).
* Modify sanitizer gn/gni files to make it work (patch included).
  (Maybe the patch even works -- I haven't checked.)

TBR=rockot@chromium.org,jamesr@chromium.org,rogulenko@google.com

Review URL: https://codereview.chromium.org/1180693002.
2015-06-11 10:01:25 -07:00
Adam Barth
80fbf90cb9 Factor BoxPainter out of RenderDecoratedBox
This factoring will more code use BoxPainter in the future (in particular,
PopupMenu).

R=ianh@google.com

Review URL: https://codereview.chromium.org/1180633004.
2015-06-11 09:37:20 -07:00
Viktor Lidholt
96846207db Adds hit tests and transformations between coordinate systems in sprites
Sprite nodes use Point instead of Vector2

Updates sprite test app

Refactors accounting for pivot points in sprites

Adds abstract NodeWithSize class in Sprites.

Refactors SpriteNode to Sprite

Refactors TransformNode to Node (may need to find another name as it conflicts with Sky's Node).

Sprite system now uses and caches transformation matrices.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1180703002.
2015-06-11 08:44:22 -07:00
Adam Barth
d0c30be6ca Make the stocks popup menu fade in
The final animation is more involved, but this CL starts implementing the menu
animation by making it fade in.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1174253003.
2015-06-10 17:28:43 -07:00
Hixie
508ff93761 Spinning Square example for the RenderObject API.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1178783002.
2015-06-10 17:27:49 -07:00
Adam Barth
6cbea9ce7e Stop SkyShell from crashing on startup
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1178773002.
2015-06-10 17:17:39 -07:00
Collin Jackson
dd0cc7fc0b Support for alignItems (test incoming)
R=abarth@chromium.org, abarth, hansmuller

Review URL: https://codereview.chromium.org/1181533003
2015-06-10 16:35:49 -07:00
Hixie
5dabb87cd7 Separate out the raw (directly manipulating sky.view) examples from the rendering (using RenderObject et al) examples.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1173233002
2015-06-10 16:23:43 -07:00
Chinmay Garde
c230cc0adb sky/shell updates for Android and iOS
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1169983005.
2015-06-10 16:19:49 -07:00
Chinmay Garde
ac4f0bebc5 sky/engine updates for iOS targets
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1163323003.
2015-06-10 16:17:56 -07:00
Eric Seidel
b3949716cc Add a roll_versions.py script and roll versions once.
This isn't perfect, since it makes non-minimal modifications
to the yaml and xml files.  In the yaml case it sorts the keys
and in the xml case it doesn't do the fancy attribute wrapping,
but this seems good enough to use.

R=abarth@chromium.org, johnmccutchen@google.com

Review URL: https://codereview.chromium.org/1179633003.
2015-06-10 16:16:52 -07:00
Chinmay Garde
4857173554 Basic network service implementation for iOS
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1165283002.
2015-06-10 16:16:00 -07:00
Chinmay Garde
1f0c506d77 Basic Sky shell for iOS targets
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1171573002.
2015-06-10 16:14:39 -07:00
Hixie
232879f7dd Move spinning_arabic.dart to the raw/ examples directory for consistency with the others.
R=eseidel@chromium.org, eseidel

Review URL: https://codereview.chromium.org/1180623003
2015-06-10 16:07:12 -07:00
Collin Jackson
86b2b3ed28 Clip inkwell splash around the floating action button
R=abarth@chromium.org, ianh@google.com, abarth

Review URL: https://codereview.chromium.org/1174203002
2015-06-10 15:57:26 -07:00
Hixie
4ce574a199 Abstract out the AppView logic in fn so that it can also be used in non-pure-fn apps.
This lays the groundwork for using fn widgets in static environments.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1178703002
2015-06-10 15:55:25 -07:00
Hixie
4811d49753 Dispatch events to fn nodes for each RenderObject that the event goes through, instead of starting at the innermost target and just propagating through our tree.
This starts laying the groundwork for fn disconnected subtrees that are linked together into one RenderObject tree.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1181503002
2015-06-10 15:51:24 -07:00
Collin Jackson
e09dd96195 Fix analyzer warnings (and probably also bugs) in flex.dart
R=abarth@chromium.org, hixie

Review URL: https://codereview.chromium.org/1181523002
2015-06-10 15:36:12 -07:00
Adam Barth
358a22c9da Rename BlockContainer, StackContainer, and FlexContainer
These are now called Block, Stack, and Flex, respectively. Less verbose.

R=jackson@google.com, ianh@google.com

Review URL: https://codereview.chromium.org/1181533002.
2015-06-10 15:34:30 -07:00
Hixie
df5e4833d6 Replace some 'as' operators with equivalent code that doesn't do any checks in production mode.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1181453003
2015-06-10 15:00:34 -07:00
Adam Barth
26d59cc9d4 Rows in stocks app should have ink splashes
R=ianh@google.com

Review URL: https://codereview.chromium.org/1174153002.
2015-06-10 14:58:21 -07:00
Hixie
9470872543 Fix inconsistency about how to spell "statusBar" which was causing warnings.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1174143002
2015-06-10 14:24:35 -07:00
Adam Barth
19d0230a33 Ink should propagate at a constant velocity
Previously it was propagating for a constant duration.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1173173002.
2015-06-10 14:16:11 -07:00
Hixie
5a9c944b7b Change how we narrow the "root" type on RenderObjectWrappers.
Turns out that reintroducing the field in each subclass is probably allocating more storage per node. So let's not do that.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177483004
2015-06-10 14:13:36 -07:00
Adam Barth
df472efd57 Ink splashes should start at the touch point
Previously, they always started at the center of the RenderInkWell. Now we
remember the local coordinates we computed during the hit test and provide that
information when handling the event.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1180553002.
2015-06-10 13:55:20 -07:00
Hixie
32f027b65f Add some TODOs for renaming onTick and onValueChanged.
I'd do it now, but these files are still being used by fn.dart/stocks1, and it's not worth forking the whole animation directory just for this.

TBR=abarth

Review URL: https://codereview.chromium.org/1170033005
2015-06-10 13:43:42 -07:00
Eric Seidel
5c33736d67 Update versions in preparation for making a new sky release.
I'm starting to spec out a script to make these updates for me
but for now I'm still doing these by hand.

TBR=johnmccutchen@google.com

Review URL: https://codereview.chromium.org/1170863007.
2015-06-10 13:40:41 -07:00
Hixie
47b275c1ad Kill onDidMount()/onDidUnmount() in favour of just overriding the relevant methods.
In general, we are hugely inconsistent in what onFoo/onFoo() means.
I'm cleaning out all the cases where onFoo() is a method.

Also, this fixes EditableText, which got missed in the recent syncFields() pass.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175753003
2015-06-10 13:30:50 -07:00
Eric Seidel
a816e9fc5d Fix Sky not to crash when clicking the Home button.
Fixes https://github.com/domokit/mojo/issues/212

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1173153002.
2015-06-10 13:20:41 -07:00
Adam Barth
c17d58ab28 Fix shutdown crash in Sky
Previously, we would try to close some Dart persistent handles after destroying
the isolate. Now we revoke the weak pointers these handles are using to refer
to the isolate before trying to tear them down.

Fixes https://github.com/domokit/mojo/issues/233

R=chinmaygarde@google.com, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1175053002.
2015-06-10 12:59:07 -07:00
Collin Jackson
56d1aa0b94 Fix cross size of flex items in stocks app (more tests incoming)
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1176053002
2015-06-10 12:54:26 -07:00
Hixie
7fce9b4bdb Mention typedefs in the sky dart style guide.
TBR=jackson

Review URL: https://codereview.chromium.org/1178523005
2015-06-10 12:45:55 -07:00
Adam Barth
4806a4cc04 Remove _emptyList from fn2.dart
We can use const [] instead and we'll be sure we don't mutate this constant.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1178623002.
2015-06-10 12:42:41 -07:00
Hixie
633ba8c811 Sky Style Guide.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1176763006
2015-06-10 12:37:21 -07:00
Eric Seidel
58068b9e41 Add TODOs about components needing to adjust to screen size changes.
Our current static view_configuration design cannot work.

https://github.com/domokit/mojo/issues/231

R=ianh@google.com

Review URL: https://codereview.chromium.org/1169813009.
2015-06-10 11:28:00 -07:00
Eric Seidel
c87b98b687 Enable antialiasing on Paint by default.
The app looks so much better with this on.

R=jackson@google.com, abarth@chromium.org

Review URL: https://codereview.chromium.org/1172413002.
2015-06-10 11:11:03 -07:00