1881 Commits

Author SHA1 Message Date
Adam Barth
2811c03484 Rename widgets/wrappers.dart to widgets/basic.dart
Although the basic widgets are wrappers, that's an implementation detail and
shouldn't be encoded in the name of the library.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1182983002.
2015-06-12 22:16:48 -07:00
Hixie
9fc0a3f2ae Verify that callers correctly set parentUsesSize if they use the child's size (and fix a few cases that didn't).
This introduces a bunch of code that should only run in debug builds, but we don't have #ifdefs yet.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1182933003.
2015-06-12 17:09:57 -07:00
Adam Barth
d59f88b826 Port sky_home to the new SkyView world
R=ianh@google.com, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1178293004.
2015-06-12 16:53:29 -07:00
Hixie
17e6849273 Make it easier to debug examples/widgets/container.dart, since it is currently showing a crazy clipping/transform bug.
TBR=abarth

Review URL: https://codereview.chromium.org/1186653003.
2015-06-12 15:17:33 -07:00
Eric Seidel
a300cb7770 Use drawable_xxhdpi instead of 2x_web
This makes the icons look nicer on the Nexus 5

I briefly played with trying to figure out which drawable_*
to use dynamically, but I couldn't seem to write a reasonable
solution which worked on both Desktop and my Nexus 5, leading
me to believe I didn't understand how it should work and just
went with xxhdpi for now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1186633003.
2015-06-12 13:50:03 -07:00
Adam Barth
ede4797da8 Add the ability for Sky content to trigger Android intents
We can use these intents to move the demo launcher to the new world.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1187583002.
2015-06-12 13:43:01 -07:00
Adam Barth
c8e5668ddb Refactor SkyShell to allow multiple SkyViews
This CL separates the view-specific state from the process-global state. The
view-specific state now lives on Instance rather than Shell.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1187503003.
2015-06-12 13:29:53 -07:00
Hixie
be5a2f8bc5 Fixes tests, logic, and analyzer warnings due to recent checkins.
- Fix the expectations file for stocks, since floating action button changed how it was being drawn.
- Fix edges theme data to not use a rounded rect path for canvas material.
- Add debugging hooks for TextStyle, and fix a warning.

TBR=eseidel

Review URL: https://codereview.chromium.org/1187483003.
2015-06-12 13:25:35 -07:00
Collin Jackson
dd1df9f5ed Animate checkboxes. I based it on the dialer app. Could probably use more improvement, but I think this is an improvement on what we are doing currently.
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1182743002.
2015-06-12 12:45:11 -07:00
Eric Seidel
518ecd24e5 Add support for text styles.
This is a completion of Hans's WIP patch:
https://codereview.chromium.org/1176133002/

Makes it possible for us to style text in fn2 apps.

The title style in the toolbar doesn't look quite right
but as far as I can tell its the same color as the
old typography code produced.  Will need further investigation.

Fixes #213

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

Review URL: https://codereview.chromium.org/1178913003.
2015-06-12 12:28:52 -07:00
Hixie
77dd41ad69 Material and RaisedButton.
Make Material actually create material, with opinions about what that
means.

Make FloatingActionButton use this.

Make Scrollable use this.

Make BoxDecoration support drawing a circle instead of a rectangle, so
that floating action button doesn't need a custom painter.

Implement RaisedButton (and remove button.dart, since there's no
"button" in Material Design).

Make InkWell have a "child" argument instead of "children", and not
have it introduce a Flex into the hierarchy.

Update container.dart example. Clean up some imports.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1179713004.
2015-06-12 11:46:08 -07:00
Ian Fischer
332e07663c Add a new target, sky_apk, that builds a minimal subset of the tree for creating working sky demo apks.
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1181893002.
2015-06-11 16:35:12 -07:00
Hixie
406d7dbae1 Make it possible to test that the stock app doesn't crash on startup and paints the basic scaffold more or less correctly.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177043008.
2015-06-11 15:36:40 -07:00
Eric Seidel
e8b2d8ad89 Update paths in sky_home.dart
I also removed the leading /, so it is now possible
to use shelldb start sky/sky_home to test.

Also fixed touch_demo.dart and sector layout to
work and not crash.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1177343002.
2015-06-11 15:17:12 -07:00
Adam Barth
2795216f6a Wire up Android back button in SkyShell
The back button now triggers an event of type |back|.

R=eseidel@chromium.org, jackson@chromium.org

Review URL: https://codereview.chromium.org/1176373004.
2015-06-11 14:33:01 -07:00
Eric Seidel
f8dbe972ef Move sky_home.* from domokit.github.io into our repo
This makes it easier to keep sky_home links working.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1185473002.
2015-06-11 14:22:34 -07:00
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