1903 Commits

Author SHA1 Message Date
Hixie
bb53cd828c More minor cleanup around overriding fields to narrow types.
TBR=abarth

Review URL: https://codereview.chromium.org/1189833004.
2015-06-16 09:33:17 -07:00
Hixie
b3f47808bc Create an example app that demonstrates interactive coordination of an fn tree and a raw RenderObject tree.
Sector changes:
- implement the intrinsic sizing box API on RenderBoxToRenderSectorAdapter
- remove some debug print statements
- fix getIntrinsicDimensions() on RenderSolidColor to return true values
- factor out the default demo

RenderObject changes:
- BoxConstraints.isInfinite() now returns true only if both dimensions are infinite

fn changes:
- implement UINodeToRenderBoxAdapter
- rename RenderObjectToUINodeAdapter to RenderBoxToUINodeAdapter

Tests:
- add a test for sector layout
- make TestRenderView support being run without the unit test framework

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175423007.
2015-06-16 09:28:59 -07:00
Adam Barth
79455270b2 Make UINode's key a String
We need the key to be a String even though we claimed we could support any
Object. Also, clean up some style nits including shortening the |root| getters
on OneChildRenderNodeWrappers.

Fixes https://github.com/domokit/sky_sdk/issues/26.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1173293005.
2015-06-15 21:39:09 -07:00
Adam Barth
71c7be5ebc Give ParentDataNodes snappier names
FlexExpandingChild -> Flexible
StackPositionedChild -> Positioned

Also, name the child argument |child| for consistency.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1179763009.
2015-06-15 21:03:28 -07:00
Adam Barth
883f673a6b Update Dart dependency and patch dart_controller to account for non-backwards compatible API update
Patch originally by chinmaygarde.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1185233002.
2015-06-15 18:34:27 -07:00
Hixie
2b4cf61644 Make RaisedButton support being disabled.
R=jackson@google.com

Review URL: https://codereview.chromium.org/1179943005.
2015-06-15 17:32:13 -07:00
Hixie
a22064a7a3 Remove RenderSizedBox.
Make old users of RenderSizedBox use RenderConstrainedBox.
Change the semantics of BoxDecoration.apply* to actually apply the provided constraints to the current constraints, rather than the previous behaviour of merging them neutrally.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1189603003.
2015-06-15 15:51:56 -07:00
Chinmay Garde
9bf2fe7f3a Revert "Update Dart dependency and patch dart_controller to account for"
This reverts commit 42bb335967d4d9cbeb1a745111dd0fff985465f2.
2015-06-15 15:32:28 -07:00
Chinmay Garde
e027c6b874 Update Dart dependency and patch dart_controller to account for
non-backwards compatible API update

BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1183253002.
2015-06-15 15:11:31 -07:00
Collin Jackson
7530ed4643 Remove unneeded import and fix analyzer warnings
R=ianh@google.com, hixie

Review URL: https://codereview.chromium.org/1190573002.
2015-06-15 15:11:14 -07:00
Chinmay Garde
2ccb9b778f Fix iOS builds after ShellView refactor on Android
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1188633002.
2015-06-15 15:10:48 -07:00
Adam Barth
5f733de41c Don't build sky_packager on Mac hosts
sky_packager requires C++11 and the Mac host toolchain can't handle C++11.

R=cstout@chromium.org, cstout@google.com

Review URL: https://codereview.chromium.org/1183223003.
2015-06-15 15:04:53 -07:00
Collin Jackson
5566f08831 Fix stocks app usage of checkbox
TBR=hixie

Review URL: https://codereview.chromium.org/1188573004.
2015-06-15 13:17:50 -07:00
Collin Jackson
8758e72da5 Really basic Switch implementation in Sky. Could definitely use some polish
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1185173002.
2015-06-15 12:53:44 -07:00
Hans Muller
f8efd9c96f StockRow height, background color updates
Make stock2 exactly match the original stock demo.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1187563006.
2015-06-15 12:09:37 -07:00
Viet-Trung Luu
d887d2cd7e Fix sky/tools/packager/BUILD.gn.
scopes.h -> scope.h.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177123005.
2015-06-15 11:16:17 -07:00
Adam Barth
15fab09ab2 Introduce sky_packager
sky_packager is a tool that generates a Dart script snapshot for Dart files
intended to run with dart:sky. I plan to use this tool to experiment with
startup performance.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1178213003.
2015-06-15 10:42:17 -07:00
Viktor Lidholt
5dc39bace7 Updates game for new AppView API
Deletes old test game

Demo game is now playable

Updates demo game with steering and changes in sprites

Fixes smaller bugs in sprites

Refactor class names in game demo

Strips Box2D from game

Fixes ordering in game node

Adds frameRate property to SpriteBox and improves update methods.

Fixes node to box transformations for hit tests

Fixes minor code issues

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1179333002.
2015-06-15 09:11:16 -07:00
Adam Barth
5e5b220f8f Fix two minor issues with sky/sdk
1) BUILD.gn was missing internals.dart.
2) generators.dart was importing scheduler.dart from the wrong directory.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1189523003.
2015-06-15 01:10:12 -07:00
Adam Barth
773a0ddfa1 Fix typo in README.md
https://github.com/domokit/sky_sdk/pull/19

Patch by @danrubel

Review URL: https://codereview.chromium.org/1182873003.
2015-06-13 10:35:27 -07:00
Adam Barth
4fb2c9ffb0 Add missing dependency to the build
We've had a number of reports of a missing dependency in the build. I managed
to reproduce the issue locally today and this patch fixed the issue I was
seeing. Hopefully it fixes the issues other folks were seeing too.

The problem was that the C++ code we generate from IDL files depended on
various event classes in core, which in turn depended on the generated event
names files. This CL ensures that the event names files are created before we
try to build the C++ code generated from the IDL files.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1178173004.
2015-06-13 09:47:36 -07:00
Adam Barth
219ead3718 Rename all the things
This CL moves the bulk of the SkyView code out of the |framework| directory
because the |framework| directory was redundant in Dart package import
declarations.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1177383006.
2015-06-13 09:46:52 -07:00
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