37998 Commits

Author SHA1 Message Date
Przemyslaw Pietrzkiewicz
071910999a Pull Sky debugger up to services/debugger.
Sky debugger is a native mojo app that puts up an http server and talks
to other mojo apps in response to http requests, allowing to
interactively start/stop tracing, profile, etc.

This is generally useful also when one does not run mojo_shell through
skydb, hence this patch pulls the debugger into services/debugger.

We can then add plumbing for running with the debugger in devtools.

Bug: domokit/devtools/#4.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1151573010
2015-06-01 19:05:15 +02:00
Eric Seidel
8dcd36b95b Fix skydb on linux when adb is not in path.
TBR=iansf@google.com

Review URL: https://codereview.chromium.org/1159193003
2015-05-29 15:38:59 -07:00
Eric Seidel
f4971649a5 Make --gdb and gdb_attach mostly work in shelldb
I'm not sure this is 100% working, but hopefully this
will help get jackson@ up and running with a shelldb
workflow.

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

Review URL: https://codereview.chromium.org/1167513003
2015-05-29 12:31:22 -07:00
Eric Seidel
78be882cb4 Fix sky_server.py on Mac and make sky_server executable if it's not already
R=eseidel@chromium.org, eseidel

Review URL: https://codereview.chromium.org/1161133002
2015-05-29 10:47:16 -07:00
Ian Fischer
a439f7504e Cache .so files for debugging per device and don't redownload .so's that are in your cache
BUG=
R=eseidel@chromium.org, eseidel

Review URL: https://codereview.chromium.org/1158493005
2015-05-28 17:41:49 -07:00
Hixie
30035f03b5 Make our raw/ tests actually check the paint output.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1153053012
2015-05-28 17:35:59 -07:00
Adam Barth
798729bcf4 Split layout2.dart into several files
Previously layout2.dart was a thousand lines long.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1161003002
2015-05-28 16:42:04 -07:00
Hixie
57d269086c Make RenderParagraph mutable, and make it fit the new RenderNode protocols
R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1165463002
2015-05-28 15:19:36 -07:00
Adam Barth
95333572dd Replace BoxDimensions with sky.Size
R=ianh@google.com

Review URL: https://codereview.chromium.org/1150253005
2015-05-28 14:29:29 -07:00
Adam Barth
6ddb6c5b09 Move simple_render_tree into tests as render_flex
R=ianh@google.com

Review URL: https://codereview.chromium.org/1146123003
2015-05-28 14:29:10 -07:00
Eric Seidel
46b12b313c Add hello_fn2.dart and make Text("Hello fn2") actually render something.
R=ianh@google.com

Review URL: https://codereview.chromium.org/1160843005
2015-05-28 13:56:36 -07:00
Adam Barth
2a27cc84ce Introduce RenderProxyBox and RenderSizedBox
Also makes Point, Size, and Rect immutable.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1162033002
2015-05-28 13:39:26 -07:00
Adam Barth
0a6723479e Use Point, Size, and Rect in layout2.dart
R=ianh@google.com

Review URL: https://codereview.chromium.org/1156303004
2015-05-28 12:42:54 -07:00
John McCutchan
ae8299a784 Roll Dart forward
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1159443002
2015-05-28 07:45:06 -07:00
James Robinson
91f69b02ba Move mojom definitions of URL{Request,Response} into SDK
This moves the definition of the mojom URLRequest and URLResponse
objects into the SDK at //mojo/public/interfaces/network/. These are
used directly by the shell and have a special place in the system. This
patch does the minimal amount of import/include updating to get tests
passing but doesn't fully update everything - in particular it
doesn't update all the C++ code that #includes url_loader.mojom.h for
the URLRequest or URLResponse definitions to #include the more specific
mojom.h files, or the equivalent in other languages. I'll do that in a
follow-up to minimize churn.

R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/1129063008
2015-05-27 17:07:51 -07:00
Adam Barth
da02cd53bb Introduce RenderNodeWithChildMixin
R=ianh@google.com

Review URL: https://codereview.chromium.org/1156013003
2015-05-27 14:31:08 -07:00
Hixie
37d689c4e8 [Effen] port fn and stock to RenderNode, part 1 of many
This gets things off the ground barely enough to show some pixels.
These are not pixels that are actually part of the stock app, but
it's a start.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1157033006
2015-05-27 13:36:01 -07:00
Ian Fischer
e3f337f934 Make skydb --gdb work on mac.
R=eseidel@chromium.org
TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1155583006
2015-05-27 13:16:42 -07:00
Adam Barth
1f16cbca7d Add support for testing content in SkyView
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1160763004
2015-05-27 13:14:08 -07:00
Eric Seidel
a328df8634 Make it possible to draw Text in the new window/document-less world
I had to add back document.createText() since new Text()
does not work in the new world yet.

LayoutRoot is a new Dart-exposed class which holds the Frame and
all associated machinery, sufficient to trigger a restyle
and layout of the subtree.

This is all kinda hacky and I'm sure likely to cause many
crashes if folks call random methods on these disconnected
trees.

But this makes it at least possible to paint text for now
and we can improve this in the coming days.

This really should have Adam's review.  It's hugely hacky
but I'd like to negotiate out with him the timeline on
which we should fix some of these hacks.

R=ianh@google.com
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1148253003
2015-05-27 11:05:42 -07:00
Eric Seidel
dc82febb38 Add support for Mac vs. Linux sky_server builds
I also made sky_server get pulled down via DEPS
since thats how all the rest of our google storage-based
binaries work.

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

Review URL: https://codereview.chromium.org/1150033006
2015-05-27 10:42:33 -07:00
Collin Jackson
9d9486d20e Speed up shelldb by skipping unnecessary copies of APK to device
Right now I'm storing a SHA1 in a folder in /sdcard since
that seems likely to work on non-rooted devices, but
I haven't tested it.

This cuts build times from 6.5 seconds to 1.5 seconds for
me. You can save another 0.5sec by passing the --no_install
flag to avoid the SHA1 check altogether if you're sure
that nothing has changed.

R=eseidel@chromium.org, eseidel, hixie

Review URL: https://codereview.chromium.org/1149113005
2015-05-26 17:51:19 -07:00
Eric Seidel
64637bf47f Fix dart:sky.internals to work in SkyView
R=ianh@google.com
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1156203003
2015-05-26 16:01:25 -07:00
Collin Jackson
e47db7ae1d Sky shelldb should restart app when using --no_install and forward observatory port
R=eseidel@chromium.org, eseidel

Review URL: https://codereview.chromium.org/1156993004
2015-05-26 11:16:08 -07:00
Eric Seidel
8a32e93506 Fix android build
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1147153005
2015-05-22 13:11:39 -07:00
Eric Seidel
c6cacd7e34 Make SkyView vs. WebView controlable via url path
We're currently in a transition between using main.sky and main.dart
files as our main() entry point for Sky applications.

This CL makes this runtime controlable by path name.  If it finds
a .dart in the path name it will use SkyView, otherwise it will
fall back to the existing WebView codepath.

SkyView does not expose a window object and much of the existing
Sky Engine is not initialized when main() is run.  Clients should
be transitioning away from main.sky towards main.dart in the near
future, however main.dart is probably not ready for general
consumption at this point.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1152313002
2015-05-22 12:59:21 -07:00
John McCutchan
12b9f613f2 Remove deploy_sdk.py and mojo_demo.py
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1143333006
2015-05-22 06:52:35 -07:00
Adam Barth
b435fe37f2 Make hit testing work in layout2.dart
This CL makes simple_render_tree.dart interactive by making the hit testing
system work. I've also added a mechanism for requesting an animation frame.

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

Review URL: https://codereview.chromium.org/1153543002
2015-05-21 11:22:17 -07:00
Adam Barth
224f559c4c Plumb input events into SkyView
Clients can now register a callback that gets called whenever we have an event
for the view. We'll need to update the Event class at some point, but this is a
start.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1129333005
2015-05-19 16:50:28 -07:00
Adam Barth
7c90e5e9bf Plumb display metrics into SkyView
This CL teaches SkyView the width, height, and device pixel ratio of the
display. In the future, we'll want some sort of notification system for when
these values change.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1139823010
2015-05-19 14:54:08 -07:00
John McCutchan
ad1f78f42b Have shelldb and skydb automatically download assets for you if they don't exist.
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1131373005
2015-05-19 14:22:55 -07:00
Adam Barth
e3743e5101 Teach SkyView path to draw a circle
This CL adds a global view object that can receive a Picture and be signaled to
draw. When using SkyView, this Picture shows up on screen.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1134913003
2015-05-19 14:20:04 -07:00
Adam Barth
44c10c9f6b Teach SkyView code path to print hello, world
This CL makes the SkyView codepath smart enough to print "hello, world" to the
console. The code path is off by default but can be enabled by changing one
line of code.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1131673011
2015-05-19 13:51:12 -07:00
John McCutchan
826623c1f1 Fix skydb workflow
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1132723010
2015-05-19 10:44:47 -07:00
John McCutchan
9f6d79df33 Suppress unnamed library analyzer spam in shelldb
Revert "Add library names to many sky libraries"

This reverts commit 1337e0a803a54ee92d6dce7f8c4a6335f7cbb9fa.

BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1142893007
2015-05-19 10:25:43 -07:00
John McCutchan
7a91ed422e Fix shelldb workflow
- Add a real internals.dart entry point.
- Don't run deploy_sdk from shelldb.
- Suppress native functions error from analyzer output.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1145823002
2015-05-19 10:12:41 -07:00
Adam Barth
5aa94de11a Make android directory for Android-specific bits of SkyShell
This CL prepares us to create an iOS version of SkyShell by moving the
Android-specific bits into an android directory.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1139873004
2015-05-19 09:41:44 -07:00
John McCutchan
eca04d9938 Rationalize Dart mojo and sky package structure.
NOTE: This CL appears far larger than it actually is for two reasons:

1) Many files were moved around to use the Dart package directory structure.
2) Many .dart files had to have import paths updated.

- Organize mojo/public/dart so that it uses standard Dart package layout
- Organize mojo/dart/apptest so that it uses a standard Dart package layout
- Organize sky/sdk so that it uses a standard Dart package layout
- Create a mojo/testing package (used by unittests)
- Introduce the 'dart_pkg' gn rule which populates gen/Config/dart-pkg
- All internally vended Dart packages must have a corresponding dart_pkg rule
- It is now possible to use dependency_overrides: in pubspec.yaml to mix internal and external package dependencies (enables analyzer, editor, webstorm usage for internal developers).
- Package root for dart content handler ends with "packages/"
- Imports of mojo package uris no longer need the "public/dart"
- mojo/public/tools/dart_package.py is a clone of mojo/public/tools/gn/zip.py
- Sky tests no longer run 'deploy_sdk' script.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1132063007
2015-05-18 14:41:39 -07:00
Adam Barth
e8d8c1aaa8 public org.domokit.sky.shell.SkyMain.ensureInitialized()
It's useful to be able to call org.domokit.sky.shell.SkyMain.ensureInitialized() when implementing custom Android Activities. This commit makes ensureInitialized() public for this purpose.

Unrelated changes:
Added curly braces to pass PRESUBMIT check.
Add Lex Berezhny <lex@damoti.com> to AUTHORS file in order to be able to commit fixes (and pass PRESUBMIT check).

Patch by Lex Berezhny <lex@damoti.com>.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1135953004
2015-05-16 13:57:23 -07:00
Eric Seidel
5b60d0a358 Bump versionCode of SkyDemo.apk to avoid downgrade warning.
Also teach both skydb and shelldb to ignore version downgrades
I did not change sky_tool since maybe the warning makes sense
there?

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

Review URL: https://codereview.chromium.org/1138343002
2015-05-13 17:34:09 -07:00
Roozbeh Pournader
e92a3c62b5 Support hyphenation frequency in Minikin.
Three hyphenation frequencies are now supported:

kHyphenationFrequency_None, which turns off both automatic
hyphenation and soft hyphens.

kHyphenationFrequency_Normal, which has aconservative amount of
hyphenation useful as a conservative default.

kHyphenationFrequency_Full, which has a typographic-quality amount of
hyphenation useful for running text and tight screens.

Bug: 21038249
Change-Id: I2800f718c887c9389a1a059d7ec07d7fa2ca1dee
2015-05-12 14:51:36 -07:00
Colin Blundell
cff10ebf23 Dart: Adds mojom pub package.
Creates generate.dart script that installs generated .mojom.dart files into
the mojom pub package.

Updates Sky's deploy_sdk.py script to put mojom.dart files in locations where
they can be consumed by the generate.dart script once the SDK is published and
obtained via "pub get".

This CL is adapted from a patch by zra@google.com; most of the work here is his.

R=iposva@google.com

Review URL: https://codereview.chromium.org/1106383006
2015-05-07 15:23:03 +02:00
James Robinson
17c616b420 Update from https://crrev.com/327068
This rolls in //base, //build and //sandbox/linux and updates other
things to match, in particular:

*) Update build_v8.patch
*) Add junit, mockito and roboelectric to DEPS for android test rules
*) Update DEPS for grit
*) Fix up various GN files for os->target_os rename
*) Fix up a few places that were using //base/float_util to use std::isnan
*) Fix up a few places using ApiCompatibilityUtil to use Android SDK directly

as well as a few miscellaneous fixes.

Many portions based on ncbray's work in
https://codereview.chromium.org/1108173002/

R=ncbray@chromium.org
TBR=ncbray@chromium.org

Review URL: https://codereview.chromium.org/1124763003
2015-05-05 16:31:51 -07:00
yzshen
41e9b9f5b9 Remove some InterfacePtr<> methods which directly deal with message pipe handles.
Users should use the corresponding methods dealing with
InterfacePtrInfo<>.

BUG=None
TEST=None
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/1118843003
2015-05-04 14:47:01 -07:00
James Robinson
f041711454 Teach the mojo_shell --trace-startup flag to gather data from services
This makes passing --trace-startup to mojo_shell (or MojoShell.apk)
collect and save data from all apps/services that support tracing, not
just the shell itself.

R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/1105773002
2015-05-01 11:03:09 -07:00
Eric Seidel
d51f3d349d Add pubspec.yaml files for each of the examples/ directories
so that pub get will create a packages/ directory for each
and users of packages/sky/sky_tool can run these examples
from sky_sdk as the instructions say to.

TBR=ianh@google.com
https://github.com/domokit/mojo/issues/128

Review URL: https://codereview.chromium.org/1110283002
2015-04-28 16:26:38 -07:00
John Reck
1be122da96 Move Bitmap to a different namespace
namespace naming collision. Move minikin's
Bitmap out of android:: and into minikin::

Change-Id: I5ae3925f81b848dc79576429ab55243b96f7fed2
2015-04-27 17:23:29 +00:00
Hixie
30074007c7 shelldb: Make shelldb analyze also analyze the packages, since that's where most development is actually happening at the moment.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1101893002
2015-04-27 09:16:50 -07:00
Jim Beveridge
2cd1e6fc22 Copy of Issue 1100753003, so I can roll Mojo to Modular.
Add support for extra mojom dirs to deploy_sdk.py

TBR=blundell

Review URL: https://codereview.chromium.org/1102883003
2015-04-24 15:03:47 -07:00
Ojan Vafai
675ce1c882 Expose minContentWidth/maxContentWidth and a callback for computing them.
This exposes the last hooks needed to implement flexbox layout. For now,
I didn't worry too much about the exact API we're exposing since this will
all change with the upcoming redesign (e.g. https://codereview.chromium.org/1093633002).

minContentWidth == the width if the element were to wrap at every wrapping point (not including border/padding)

maxContentWidth == the width if the element were to only wrap at hard wrapping points (e.g. \n inside a whitespace: pre).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1101793003
2015-04-24 13:14:41 -07:00