1226 Commits

Author SHA1 Message Date
Hixie
fd4e2c76d2 sky-element stocks demo: add splashes and highlights to menu items
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/961873004
2015-03-04 09:25:31 -08:00
Adam Barth
0438646372 Clean up some Dart idioms in fn
This CL adds license blocks and cleans up a number of Dart idioms in fn.
Specifically, I've marked several fields as |final| and used Map#putIfAbsent in
some appropriate places.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/973613004
2015-03-04 08:27:04 -08:00
Rafael Weinstein
6e9f94b046 Update sky/examples/fn README.md 2015-03-03 21:26:25 -08:00
Adam Barth
d83aa61c46 Give the floating action button a slash effect
R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/970393002
2015-03-03 16:10:21 -08:00
Adam Barth
9381792e14 fn-drawer sometimes doesn't tick closed
If there is jank, we might not get a frame time that's just after the last
frame, which means we'll stop generating animation frames before hitting 1.0
exactly.

In this CL, we introduce state to takeWhile to cancel the stream after emitting the
1.0.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/975153002
2015-03-03 15:45:52 -08:00
Rafael Weinstein
aae2fbd500 Remove box shadow on floating action button until ganesh fixes its bug
TBR=abarth

Review URL: https://codereview.chromium.org/975203002
2015-03-03 15:36:21 -08:00
Hixie
80b4c2eadc fn: make menu items have material splashes also, by factoring out the splashes
TBR=raf

Review URL: https://codereview.chromium.org/974903005
2015-03-03 14:12:15 -08:00
Adam Barth
7d49301b3c Implement a floating action button in fn
R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/975913002
2015-03-03 14:05:02 -08:00
Scott Violet
74fe1ddecd Fixes ViewManagerClient name in sky
It needs to be mojo::ViewManagerClient; none-the-less we should use
the value from the header so we're insulated from whatever the name
happens to be.

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

Review URL: https://codereview.chromium.org/978603002
2015-03-03 14:02:56 -08:00
Eric Seidel
2959de0e37 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
8ea48be24b Change fn-stocks to use a different color toolbar.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/973133002
2015-03-03 11:17:10 -08:00
Eric Seidel
9e08140a15 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
Rafael Weinstein
8a42f9ec75 Initial commit of Effen reactive framework experiment for Sky
This is just a proof of concept. If we like this direction, it will move out of the examples directory (likely re-written) and be committed in smaller pieces with unit tests and formal reviews.

TBR=abarth
BUG=

Review URL: https://codereview.chromium.org/971183002
2015-03-02 20:55:02 -08:00
Adam Barth
11f482978c 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
Ojan Vafai
76f01e9f0e Some minor cleanup to RenderLayerClipper.
-Remove AbsoluteClipRects. It's never used.
-Inline some static functions. In the process,
noticed that the clip rects for CSS clip are broken.
In theory, this patch fixes that, but I didn't test it
since we probably want to just remove the feature anyways.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/964723004
2015-03-02 15:26:47 -08:00
Adam Barth
daf68295ca 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
2fa3e52b6d 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
4e1056c43f 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
610421048d 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
Adam Barth
ff51816b5a Images don't appear when they finish loading
RenderImage needs to notify its base class unconditionally so that it will
schedule a visual update.

This broke in https://codereview.chromium.org/791023006.

R=ojan@chromium.org
BUG=https://github.com/domokit/mojo/issues/55

Review URL: https://codereview.chromium.org/969863002
2015-03-02 13:03:36 -08:00
Eric Seidel
d842eb9500 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
ece11cc9ed 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
Aaron Boodman
88a3004d36 Simple multi-url support for mojo apps.
This patch makes it so that querystrings are no longer considered part of a mojo application's identity.

So if you connect to http://a?foo, then http://a?bar, you'll end up talking to the same application, just two different connections.

The URL of each connection is sent to the app via a new param in AcceptConnection().

This patch also adds some app tests that exercise http app loading, which wasn't tested before.

R=qsr@chromium.org

Review URL: https://codereview.chromium.org/943053003
2015-03-02 10:05:31 -08:00
Adam Barth
79aa3684b5 Attempt to fix the build
This CL attempts to fix clean builds by adding a missing dependency from
service_registry to service_provider.

Also, I've attempted to fix the sky tests by updating the reference to
service_registry.mojom.dart.

TBR=hansmuller@chromium.org

Review URL: https://codereview.chromium.org/968553002
2015-02-27 20:13:41 -08:00
Ojan Vafai
f01bea301b Move transforms from RenderLayer to RenderBox.
This is more member data on RenderLayer that is now only
used by RenderBox.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/965013003
2015-02-27 17:18:07 -08:00
Eric Seidel
c8912dd14c 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
29e3ba99e9 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
Hans Muller
49e78ed61c Moved service_registry from services to mojo/services/service_registry
It needs to be in a conventional public location to be available to consumer repos.

R=tonyg@chromium.org

Review URL: https://codereview.chromium.org/968493004
2015-02-27 16:36:41 -08:00
Adam Barth
b3b8d8cf1a 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
e8b988e226 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
Ojan Vafai
ef1b30faf7 Move FilterEffectRenderer out of RenderLayer into RenderBox.
It doesn't do anything RenderLayer specific anymore. This
does mean adding another pointer to RenderBox. We might want
to do something about that eventually, but for now it seems fine
to make forward progress in terms of getting rid of the RenderLayer
tree.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/963253002
2015-02-27 13:42:29 -08:00
Hans Muller
d679a524b5 Added ServiceRegistry interface
ServiceRegistry enables a chain of Mojo applications to accumulate
services without wrapping and forwarding the incoming ServiceProvider
request.

Sky's DocumentView adds ViewManagerClient to the ServiceRegistry (if any)
that's provided to it via ConnectToApplication(). Sky applications can add
additional services with embedder.serviceRegistry.addServices().

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/958673002
2015-02-27 07:41:56 -08:00
Ojan Vafai
4b60c28783 Simplify RenderLayer's handling of filters.
-Remove RenderLayerFilterInfo. It was just a static map for
FilterEffectRenderers. Instead, put the FilterEffectRenderer
directly on RenderLayer.
-Make FilterEffectRenderer not be RefCounted. This involved
deleting a ton of dead code around ReferenceFilters since they
were the other subclass of Filter. As best I can tell,
reference filters are already don't parse in Sky, so this should
just be removing dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/962543003
2015-02-26 15:38:14 -08:00
Zachary Anderson
7da01c7c5e 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
dc0b57a2e5 Don't crash when we 404.
This makes debugging that case much easier.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/958203002
2015-02-26 15:03:40 -08:00
Ojan Vafai
f36e7b49db Assorted cleanup of RenderLayer.
-Move perspectiveOrigin to RenderBox. It's only used in
one place and called on a RenderBox.
-Inline some methods that were just calling out to the renderer.
-Inline updateStackingNode() into the constructor and remove
the branch since requiresStackingNode is always true.
-Delete a bunch of dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/961053002
2015-02-26 13:07:20 -08:00
Eric Seidel
a3eeb2263c 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
4c771530c4 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
Ojan Vafai
ba092f1cd5 Remove dead code from RenderLayer and inline filter methods.
Inline a couple methods that are only called from one place
and remove a bunch of dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/961553003
2015-02-26 11:04:53 -08:00
Adam Barth
57f15eb89c 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
Benjamin Lerman
30cd9363cd Fix sky shell.
This add the missing RequestNavigateHistory method on sky::Engine.

It is currently not implemented.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/957973003
2015-02-26 10:46:25 +01:00
Ojan Vafai
cec128f499 Remove some dead RenderLayer code.
-m_hasSelfPaintingLayerDescendant is never read.
-remove showLayerTree. The layer tree is going away. We won't need this.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/952343003
2015-02-25 15:48:59 -08:00
Adam Barth
95a2e77844 Add missing dependency from Eric's last commit
TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/952213005
2015-02-25 15:36:24 -08:00
Eric Seidel
3d09314b22 Make WebView::close not crash and start to fix navigation in SkyShell
However WebView::close() no longer crashes.  close() is never called
in MojoShell since mojo can't shutdown yet.

I tried closing the existing WebView and replacing it
but somehow that caused it to only draw red.  After a while
of looking at this with abarth we decided to just load into
the same WebView for now.

Eventually we should do something smarter where we start the
provisional load and only replace the webview once the new one is
ready, but that's a later CL.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/952273003
2015-02-25 15:25:17 -08:00
Zachary Anderson
b3b197fcf8 Dart: Renames dart:mojo_blah -> mojo:blah
This improves consistency with the convention that the dart: scheme is
only for things from the Dart standard library.

BUG=
R=erg@chromium.org

Review URL: https://codereview.chromium.org/951783004
2015-02-25 14:29:41 -08:00
Adam Barth
e55e0605e6 Share sky::PlatformImpl bettween sky_viewer and SkyShell
This should let SkyShell load images.

R=eseidel@chromium.org
BUG=https://github.com/domokit/mojo/issues/52

Review URL: https://codereview.chromium.org/959773005
2015-02-25 14:26:53 -08:00
Ojan Vafai
78691e3c21 Inline RenderLayer::beginTransparencyLayers into RenderBox::paintLayerContents.
This is the only remaining caller.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/954913002
2015-02-24 20:59:01 -08:00
Ojan Vafai
82ab56a89b Remove some dead filters related code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/943333005
2015-02-24 20:45:53 -08:00
Ojan Vafai
5a5460c54e Fix clipping of content outside the bounds of the window.
https://codereview.chromium.org/899753003 incorrectly passed down the
RenderView's clipping rect all the down through transforms instead of
using the one from the LayerPaintingInfo, which is adjusted for transforms
as you recurse down the tree.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/957643002
2015-02-24 20:40:10 -08:00
Eric Seidel
2cbd4ebb91 Fix display of fonts in SkyShell
Originally reviewed for the branch on:
https://codereview.chromium.org/945083002

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/953933004
2015-02-24 17:43:54 -08:00