37534 Commits

Author SHA1 Message Date
Viet-Trung Luu
5488627f20 Move services/files/*.mojom -> mojo/services/files/public/interfaces/.
Ditto for terminal_client.mojom, previously in examples/echo_terminal.

Fix the sky terminal example.

R=erg@chromium.org

Review URL: https://codereview.chromium.org/1013313002
2015-03-17 14:31:56 -07:00
Adam Barth
9f4e29c2ce Add a basic popup menu widget
Currently this widget is demoed in widgets-fn, but I'll move it into stocks-fn
soon.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1017873002
2015-03-17 14:18:13 -07:00
Eric Seidel
a72afec746 Make mojo and sky dart packages deployable
The packages produced from this CL were deployed
as v0.0.1:
https://pub.dartlang.org/packages/sky
https://pub.dartlang.org/packages/mojo

There is still no tool included with the sky
package due to pub's inability to run anything
other than Dart:
https://code.google.com/p/dart/issues/detail?id=22877

I'm likely just going to write a dart version
of my "sky" script. :(

R=ojan@chromium.org, abarth@chromium.org

Review URL: https://codereview.chromium.org/1015833002
2015-03-17 11:09:33 -07:00
Dave Moore
720b96294a Make http_server part of the published services.
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/1012773008
2015-03-16 17:09:11 -07:00
Adam Barth
8e39231ad3 Make the status bar translucent
This CL lets Sky apps draw behind the Android status bar, better matching the
material design spec.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1010493007
2015-03-16 11:14:04 -07:00
Adam Barth
fb91aaee88 Update shelldb to work with new sky_sdk
We need to teach shelldb to deploy the Sky SDK and run SkyServer with the right
package root.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1007393002
2015-03-16 09:15:18 -07:00
Tony Gentilcore
c5322c6941 Disable flaky custom-elements/registration.sky test.
BUG=#62
TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1006353002
2015-03-16 07:06:52 -07:00
Eric Seidel
7cbfb05f21 Currently we use package: to mean "/gen", which is not at all how
Dart actually expects package: to work.  This CL makes package:foo
map to /packages/foo, similar to how Dartium or bin/dart would expect.

This also means overlaying the /gen directory over the actual package
outputs (as consumers of an SDK would expect) as well as adding
an additional /lib indirection for the actual package source as
the Dart pub tool will expect.

This is far from perfect, but it unlocks us actually producing a
sky SDK.

I expect there may be some fallout from this change as I'm sure I
missed some package: uses.  We also don't have a general solution
for all /foo/bar/baz includes which randomly included parts
of mojo's source directory.  Those will need to be updated to use
a package: and deploy_sdk.py taught how to build a package for them.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/990493002
2015-03-13 16:58:53 -07:00
Adam Barth
06f46a22c1 SkyShell DCHECKs on startup
We need to update how we initialize JNI to make sure we get an AtExitManager.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1003813004
2015-03-13 10:48:41 -07:00
Nick Bray
0bde9320f4 Update from https://crrev.com/320343
This required some manual patching to ui/event and ui/gfx.

Sky tests were suppressed.
https://github.com/domokit/mojo/issues/64

BUG=401761
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/1001833005
2015-03-12 16:29:36 -07:00
Raph Levien
aa1337a41a HyphenEdit in support of hyphenation
Adds a "HyphenEdit" field to the Minikin Paint object, which represents
an edit to the text to add a hyphen (and, in the future, other edits to
support nonstandard hyphenation).

Change-Id: Ib4ee690b0fe2137e1d1e2c9251e5526b274ec3a7
2015-03-12 14:37:55 -07:00
Viet-Trung Luu
507da045d2 Terminal: Add support for (and "fix") backspace.
Also:
* Fix consecutive spaces (don't collapse them).
* Add support for ^L.

Still doesn't work:
* Totally blank lines. (I know why, but I don't know why I can't seem to
  fix it.)

R=erg@chromium.org

Review URL: https://codereview.chromium.org/997873004
2015-03-11 16:54:17 -07:00
Zachary Anderson
804248a6e3 Dart: Rename mojo:X -> dart:mojo.X
This is to better support integration with Dart SDK tools.

BUG=
R=erg@chromium.org

Review URL: https://codereview.chromium.org/998933005
2015-03-11 16:22:21 -07:00
Viet-Trung Luu
c3e748dab8 Fix terminal since sky-* moved.
D'oh.

TBR=erg@chromium.org

Review URL: https://codereview.chromium.org/998103002
2015-03-11 14:58:36 -07:00
Viet-Trung Luu
15a9f5645a Add a simple prototype "terminal" example.
(Together with an app that echoes stuff from the terminal.)

R=erg@chromium.org

Review URL: https://codereview.chromium.org/999193002
2015-03-11 14:34:25 -07:00
Adam Barth
48ee31cb4c Update Button to be made of Material
To accomplish this, I made the following changes:

1) Material is now in charge of drawing the material shadows.
2) In order to mix in the style for the shadow, Element now takes a list of
   Styles instead of a single style.
3) Update all clients of Element#style to understand that we now have a list.
4) Update components that drawer shadows to have Material do that work instead.
   a) One exception: FloatingActionButton draws its own shadow because of its
      crazy clip requirements. We'll probably want to find a better way for
      FloatingActionButton to clip in the future.

I've also added a widgets-fn example to demo the fn material widgets.

This CL introduces a bug into Drawer whereby you can get ink splashes
everywhere in the drawer. In the future, we'll need to separate out the
different material aspects to get non-splashable materials.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/1003553002
2015-03-11 14:20:11 -07:00
Eric Seidel
5f5237aa1d Move sky-*.sky into framework/elements
We're not actively developing these at the moment.

I could also just delete them, not sure if we're ready for that yet.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/999873002
2015-03-11 13:50:09 -07:00
Adam Barth
b8f3d891f6 Wire up gesturetap in SkyShell
R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/997073003
2015-03-11 12:54:47 -07:00
Eric Seidel
4c1068fb0e Remove the last bits of the Sky Inspector
Unclear what if any of this we will want in the Dart world.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/993203002
2015-03-11 10:13:25 -07:00
Dave Moore
f29a08e7d7 Update from https://crrev.com/319330
- New chromium clang rules require explicit external destructors so
  system/lib added for MessagePipe, DataPipe and SharedBuffer
- New chromium clang rules require override and no virtual in
  declarations, so many files updated.
- cc_strip_video patch updated.

BUG=
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/988693005
2015-03-10 15:23:04 -07:00
Adam Barth
f54dbe91e1 Move material Input component into sky/framework
The implementation details are in sky/framework/editing.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/983213005
2015-03-10 15:03:10 -07:00
Adam Barth
9889757ca7 Make a material design Input component
We don't yet have a focus controller, which means once this control becomes
focused there's no way for it to lose focus.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/999553002
2015-03-10 14:58:12 -07:00
Adam Barth
b19dbcdea4 Make Sky's EditableText mostly work
This CL factors EditableString out of EditableText and implements more of the
InputConnection functions. As a result, EditableText now basically works.

This CL also paves the way to make EditableText stateless by using
EditableString as its state object. However, there's still a bit more work to
do to make that a reality (e.g., factoring out the cursor blink timer and the
connection to the keyboard).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/995073002
2015-03-10 12:31:55 -07:00
Adam Barth
ae27b3ee0e Implement a basic IME-aware input element
This CL introduces a new keyboard service that understands Android IME and
starts work on a Input component that interacts with this service to provide an
editing control.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/995613002
2015-03-09 16:19:56 -07:00
Adam Barth
1a573cf3eb SkyShell DCHECKs on startup sometimes
Sometimes we try to draw a 0x0 picture. We shouldn't bother trying to turn a
0x0 picture into actual pixels.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/984153004
2015-03-09 16:19:33 -07:00
Ojan Vafai
31489a771b Fix hit-testing of elements with the same z-index.
hit-testing needs to walk in backwards order from paint.
The previous attempt at reverse sorting by z-index didn't
reverse things with the same z-index. Instead, forward
sort the same way as we do with paint and then reverse
the whole vector.

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

Review URL: https://codereview.chromium.org/986793002
2015-03-06 15:53:02 -08:00
Eric Seidel
66d5d9e270 Re-enable dart:sky in shelldb analyze.
It show 600+ "native" warnings, but those can be ignored
for now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/981103002
2015-03-05 16:22:50 -08:00
Eric Seidel
5916b0ba41 Fix test_sky after 14270f1151aacfa650985c4333572c356d15c024
In order to make the Dart Analyzer stop complaining about
Event not having a default constructor (and all Event subclasses
not having an explicit constructor, thus having an implicit one
which calls the default Event() constructor), I made all of
Event()'s parameters named and thus optional, but did not update
our one sky test which used Event().

The real fix is probably to make the autogenerator smart enough
to have FooEvent() call super("foo"), but I was lazy.

This at least fixes the tests (and greens the waterfall) for now.

TBR=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/988573002
2015-03-05 15:45:06 -08:00
Eric Seidel
db770fd79a Fix all dartanalyzer errors in dart:sky except the Native ones.
I also fixed all warnings. :)

This is the only error remaining:
[error] Native functions can only be declared in the SDK and code
that is loaded through native extensions

My understanding is that we need to do something similar to:
https://codereview.chromium.org/950063002/
in order to work around the 'native' issue.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/981733009
2015-03-05 13:36:48 -08:00
Eric Seidel
fd65c40766 Add a new analyze command to shelldb to run the dart analyzer
This just makes it easier to run with the correct flags.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/982093003
2015-03-05 11:28:57 -08:00
Adam Barth
d7fb378e60 stocks and stocks-fn should share the stocks data
Previously, the two versions of this sample app had separate copies of the
stock data. This CL moves the common data to the common data directory so that
they can share. Also, I've switched the data files to be |dart| files rather
than |sky| files to make them easier to use from fn examples.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/980953002
2015-03-05 09:56:51 -08:00
Adam Barth
2fc5b764b8 Clean up examples directory
This CL removes a bunch of examples that don't actually work in the current
engine. I've also renamed example-element to custom-element and
example-scrollable to scrolling because the word "example" in the name is
redundant with the name of the directory.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/980323003
2015-03-05 09:55:55 -08:00
Adam Barth
3dc89e8182 Update SDK.md 2015-03-05 08:42:17 -08:00
Eric Seidel
9e00d123de Make shelldb not crash.
I clearly hadn't actually tested it.  Sorry.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/955263004
2015-03-03 12:49:56 -08:00
Eric Seidel
1a1026919f Add super-primitive shelldb
This is basically skydb v2, except only for android.

I revisited some of the architecture decisions I made
in writing skydb.  I also separated skyserver.py from
dependency on skypy/paths.py since it wasn't really adding
any value.

We could make this way fancier, but this should at least
make working with SkyDemo.apk easier for now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/960233007
2015-03-03 10:55:22 -08:00
Adam Barth
20d1a8146d Stocks app shouldn't show black when resuming from recents list
Previously, we weren't scheduling a visual update when our surface was created,
so we'd just continue to show black until the author requested a new animation
frame. After this CL, we schedule a visual update as soon as our surface is
created.

As part of this change, I've removed knowledge of the GPU delegate from
PlatformView. Now, all the calls from PlatformView to the GPU system bounce
through the UI delegate, which serializes the commands with other commands from
the UI engine to the GPU rasterizer.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/974483004
2015-03-02 16:25:24 -08:00
Adam Barth
6000b80b50 Add instructions for using the Sky SDK
These instructions don't work yet, but they're something to aim for.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/968213005
2015-03-02 14:57:29 -08:00
Ojan Vafai
151db532d7 Make removing a transform not crash.
This broke with https://codereview.chromium.org/965013003.
Before that patch, updateTransform was only called on the
RenderLayer itself. Now it's called on the RenderBox,
so we need to null check the RenderLayer.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/969893002
2015-03-02 14:37:12 -08:00
Adam Barth
4b2e936b19 Make it possible for SkyShell embedders to register services
We now register the sensor service from SkyDemo, which shows that embedders of
SkyShell can register their own Java services.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/969753003
2015-03-02 13:33:56 -08:00
Adam Barth
e69fc6a47d Use double rather than float
double is a built-in type in Dart. float isn't...

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/968293003
2015-03-02 13:11:05 -08:00
Eric Seidel
588825a6e1 Add support for pressure on pointer events
The touch demo needs some basic smoothing, right now
it looks rather jittery after this change.  But the pressure
code is definitely working!

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/970493003
2015-03-02 12:38:29 -08:00
Ojan Vafai
45a4417dcb Remove unused foregroundRect argument to RenderLayerClipper::calculateRects.
The only thing that uses it is RenderTreeAsText.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/964023002
2015-03-02 12:10:05 -08:00
Eric Seidel
999fc7afa6 Add support for scroll and fling gestures to SkyShell.
This is not complete gesture support by far, but it's a start.
MojoShell and Chrome use a C++ GestureDetector, this code attempts
to use the Android (Java) GestureDetector instead.

We probably should not be sending gesturetap until we've decided
it's not a scroll, etc, but this implementation does not go that far.

I had to fix a bug whereby we were assuming the InputEvent.time_stamp
was in TimeDelta's internal format, which was wrong.  When we get
time_stamp from Android its in ms since boot.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/969493002
2015-02-27 16:46:19 -08:00
Adam Barth
3c90612675 Make shake-to-reload actually work
We need to create a new service provider when we navigate to a new page
otherwise the new page is sad that the old page took its service provider.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/962383003
2015-02-27 16:38:40 -08:00
Adam Barth
468ad2751c Implement shake-to-reload
Apps can import this library if they wish to reload on shake.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/963303004
2015-02-27 15:31:11 -08:00
Adam Barth
bf076f75b7 Expose Android sensors to via Mojo services
This CL adds a sensor_service to sky/services and wires it into SkyShell
The plan is to eventually use this data to implement shake-to-refresh.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/962043002
2015-02-27 14:37:50 -08:00
Zachary Anderson
7d03344783 Dart: Removes name conflicts from generated bindings.
This change causes the generated abstract class having the same name as the interface to contain only the interface's method declarations. The generated Proxy class then implements the base class. In addition to implementing the interface methods, the generated Proxy class has one private field _proxyImpl, which is a MojoEventStreamListener and manages sending messages and receiving responses. Operations on the ProxyImpl (close, bind, etc.) are exposed through generated utility functions.

The generated Stub is largely as before with the difference that a class providing a service will implement the mojo interface and *have* a Stub rather than be a Stub. Where appropriate, this change also calls listen() immediately where a Stub is constructed.

BUG=
R=hansmuller@google.com, sky@chromium.org

Review URL: https://codereview.chromium.org/959993002
2015-02-26 15:16:14 -08:00
Eric Seidel
f17af20890 Fix multi-touch to work in SkyShell.
Before this patch it crashed.

Also updated the touch-demo to support multi-touch.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/961483004
2015-02-26 12:23:18 -08:00
Adam Barth
148ce10dc6 Introduce Stocks.apk
This CL renames SkyShell.apk to SkyDemo.apk and adds a Stocks.apk which
defaults to the stocks demo app. Sky Shell is now a library that can be
packaged by different APKs.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/965493002
2015-02-26 12:05:17 -08:00
Adam Barth
72d111c8c6 Delete sky/scheduler
This code is unused. It's not even built.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/963513004
2015-02-26 10:27:02 -08:00