1564 Commits

Author SHA1 Message Date
Adam Barth
d78476524d Sketch new SkyView interface to the engine
The SkyView interface will replace WebView as the interface to the SkyEngine.
The SkyView interface won't have a root level Document or Frame object but
instead will implement the base layers of the framework.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1135013006
2015-05-18 14:48:27 -07:00
John McCutchan
b017dfd995 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
Hixie
1adc12d781 [Effen] Rationalise RenderNodeWrapper and OneChildListRenderNodeWrapper.
The style syncing logic that was in OneChildListRenderNodeWrapper is now in RenderNodeWrapper.
TextFragment and Image now just inherit directly from RenderNodeWrapper.
OneChildListRenderNodeWrapper now only deals with syncing children.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1142123004
2015-05-18 14:40:57 -07:00
Hixie
183184bab7 [Effen] Move EventListenerNode up so that all the ContentNode subclasses are together in fn.dart.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1128803007
2015-05-18 14:11:48 -07:00
Hixie
0ba562ef98 [Effen] Rename SkyNodeWrapper and SkyElementWrapper to match their current actual roles, RenderNodeWrapper and OneChildListRenderNodeWrapper.
This lays the groundwork for supporting RenderNode classes that have more complicated child setups.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1134303006
2015-05-18 13:57:41 -07:00
Adam Barth
dd74567382 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
Hixie
3ceb5dc0df [Effen] Start removing 'position'.
This creates a new RenderNode class that does positioning.
It then creates an fn Container class that uses it just to position things at 0,0 at the full extent of the container.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1128103009
2015-05-15 16:39:26 -07:00
Hixie
e97a10ed74 [Layout] Put in some guards to prevent us from reintroducing 'display' properties into the CSS.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1132983007
2015-05-15 15:16:25 -07:00
Hixie
9466cbbcb4 [Effen] remove the last traces of the 'display' property from the effen component library.
Previously, the fn "Text" class rendered as a single block of text.
Now, there's a "Paragraph" class that contains "TextFragment"s, and "Text" is just a component that places a single TextFragment into a single Paragraph.
This allows other components, notably the Input component, to build more complicated paragraphs of styled text, without using 'display'.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1139123007
2015-05-14 15:21:29 -07:00
Hixie
68624e8042 [Effen] fix the stock README to be better markdown.
TBR=eseidel

Review URL: https://codereview.chromium.org/1141013003
2015-05-14 14:41:17 -07:00
Hixie
8ddd37ffc2 [Effen] Add a README.txt file that describes how to test Effen using the stock app.
Also includes a link to all the know bugs that affect the stock app.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1145523003
2015-05-14 14:34:45 -07:00
Hixie
80318f6e81 [Effen] Remove 'display' from drawer_header.dart.
This moves DrawerHeader to using FlexContainer instead of Container and 'display', in the continuing quest to remove our dependency on CSS.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1139123005
2015-05-14 14:08:30 -07:00
Hixie
8b19459c9e [Effen] remove more CSS
This continues my attempt to remove our dependency on CSS.
It adds support for column-based flex to FlexContainer.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1132113007
2015-05-14 13:20:11 -07:00
Hixie
17aeeb1c51 [Effen] Make the stock app use the radio button widget so that it's being tested.
Changes:
- adds a couple of radio buttons to the drawer menu list.
- makes menu items support being tapped and reporting the tap.
- hooks up the checkbox to actually support being checked.
- changes the drawer menu items to make more sense in a stock app.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1137373004
2015-05-14 13:16:35 -07:00
Hixie
636d169c7f [Effen] remove some redundant styles
Some of the styles we have aren't really needed, so remove them to make it clearer what we weed to actually support to keep the stocks app running.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1128173007
2015-05-14 10:21:55 -07:00
Hixie
878336e8a2 [Effen] Make the drawer not be included in the build output when the drawer is not shown.
This is a prerequisite to dropping 'display:none'.
Included in this CL is making AnimatedValue able to animate more than one field.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1126333006
2015-05-14 09:44:22 -07:00
Eric Seidel
bd6319898b 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
Matt Perry
6729917a2d Flesh out the Painting API a bit.
This exposes most methods from Skia's C canvas API to Dart. For now, SkRect and
SkMatrix are represented simply as an array of floats, which requires a
conversion at the bindings layer. More complex types like SkPath are still TODO.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1144483002
2015-05-13 17:17:26 -04:00
Eric Seidel
1eb17996fb Make it possible to custom-paint without an Element.
This adds a new abstract 'Canvas' which is similar to SkCanvas.
PaintContext implements Canvas while still having its
own commit() method to cause the paint actions to apply to
the Element for the next frame.
This adds a new PictureRecorder which also implements Canvas
and has an endRecording() method which returns a Picture
(another new interface) which can be held from Dart.

There is also now a rootPicture setter on Document which takes
a Picture and will then make the Document draw that Picture
until changed.

This piggybacks on the existing custom painting system
which adds the painting at background-and-borders paint
time so technically if you both set rootPicture as well as
construct a DOM you will draw the DOM on top of your picture. :)

R=mpcomplete@chromium.org

Review URL: https://codereview.chromium.org/1122423009
2015-05-13 13:16:47 -07:00
Colin Blundell
2772b9e4d8 Create wrapper script around mojom's generate.dart in the Sky package.
This CL does the following:
- Moves mojom's generate.dart from bin/ to lib/ to make it available for use
  by a wrapper scripts in the Sky package, thus avoiding all consumers of Sky
  needing to directly depend on mojom to be able to call
  "pub run mojom:generate".
- Adds a sky->mojom pub dependency and creates a wrapper script around mojom's
  generate.dart in the Sky package.
- Augments the Sky README to explain the usage of this script.

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

Review URL: https://codereview.chromium.org/1136503002
2015-05-13 11:48:47 +02:00
Hixie
396a04df4a [Effen] Use the checkbox widget in the stocks app.
- add a checkbox to the stock app, so that we're testing the checkbox widget
  (it's not currently wired up to anything, that can come later)
- make InkSplash use FlexContainer so that we can use flex in the popup menu items
- make effen's Text be more similar to Image and Container, so that it can be styled
- make layout.dart's RenderCSSText correctly support being styled
- also fixes a bug with the stock list where we were rendering one too few a row when scrolling
- check in the code to dump the DOM so I don't have to keep remembering how to do this

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1134163003
2015-05-12 14:39:43 -07:00
Hixie
02045e37a4 [Effen] Move 'flex' out of CSS also. (mark II)
This introduces a new kind of ContentNode similar to Style but which
instead of changing the styles that apply to the node, provides new
settings to apply to the "parentData" structure.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1122413006
2015-05-12 10:40:43 -07:00
Benjamin Lerman
42fc77f4b4 Revert "[Effen] Move 'flex' out of CSS also."
This reverts commit 1a4db2e964de8a2eba7c76c0904027150cc0c387.

This broke the bots.

TBR=github.com@spam.hixie.ch

Review URL: https://codereview.chromium.org/1137153002
2015-05-12 14:25:34 +02:00
Hixie
8873061dff [Effen] Move 'flex' out of CSS also.
This introduces a new kind of ContentNode similar to Style but which
instead of changing the styles that apply to the node, provides new
settings to apply to the "parentData" structure.

If you have better ideas for the class names here let me know.

Note that the layout.dart backend of this is hacky (more so than
before, even); once we have something other than the DOM and CSS to
back it, it'll get rewritten.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1129893006
2015-05-11 16:20:20 -07:00
Hixie
dd1d195482 [Effen] Convert action_bar.dart to using a FlexContainer.
FlexContainer is a (pretend) new layout primitive that implements Flex layout.
It's only pretend because right now it's still just backed by CSS.
This is a step along the way to removing all the CSS from fn.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1128743003
2015-05-11 15:06:23 -07:00
Hixie
bba43773e2 [Effen] Update test for recent fn change.
We dropped Anchor support, and the markup changed a bit (mostly it got debug='' attributes to help debug output).
TBR=eseidel

Review URL: https://codereview.chromium.org/1129883004
2015-05-08 14:05:45 -07:00
Eric Seidel
e7ae9fa30f Merge pull request #149 from maqnouch/patch-1
Fix typos in README.md
2015-05-08 13:10:01 -07:00
Eric Seidel
786792fdfd Merge pull request #152 from domokit/sethladd-patch-1
Update README with explicit step to start the sky tool
2015-05-08 13:09:35 -07:00
Eric Seidel
5b4d3452bc Merge pull request #154 from domokit/sethladd-patch-2
Fix typo in Sky's framework's README
2015-05-08 13:09:18 -07:00
Hixie
e8ead8bbbe [Effen] Port fn.dart from the legacy sky.Node backend to the RenderNode backend, which is currently just a sky.Node-backed shim, but will eventually be the core Sky interface for layout and painting.
- the custom layout class in fn is removed by this patch; a new class
  will be added in a later CL

- the version of layout.dart in this CL is a subset of what we're
  targetting on the long run with
     https://codereview.chromium.org/1093633002

- a couple of lines of dead code are removed in this CL also

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1117143003
2015-05-08 13:06:47 -07:00
Seth Ladd
bf8418349e Fix typo in Sky's framework's README 2015-05-07 18:40:32 -07:00
Seth Ladd
1fb4adac3c Update README with explicit step to start the sky tool 2015-05-07 18:20:59 -07:00
Eric Seidel
77803d3826 Add a note at the top of the SDK README.md to explain how to contribute to the Sky SDK.
I will also disable issues on the sky_sdk repo.

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

Review URL: https://codereview.chromium.org/1135553002
2015-05-07 11:14:31 -07:00
Eric Seidel
6220b1093b Merge pull request #140 from domokit/rename
Rename view-configuration to view_configuration to make analyzer happy.
2015-05-07 11:00:17 -07:00
Colin Blundell
6e8347d042 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
John McCutchan
76da439f44 Add Observatory to sky dart_controller
- Bump Dart and Observatory DEPS to 45576 and 45565 respectively.
- Include 'dart:io' in snapshot
- Add 'dart:io' native bindings to sky bindings.
- Initialize 'dart:io' in sky dart_controller.
- Include Observatory and service isolate resources in build.
- Bring up service isolate.
- Start handle watcher isolate from service isolate (hides handle watcher isolate from debugger and Observatory).
- Hook up debugger.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1107803002
2015-05-06 15:36:12 -07:00
AQNOUCH Mohammed
402497b210 Fix typos 2015-05-06 20:55:42 +01:00
James Robinson
04dec88f74 Update from https://crrev.com/328418
This includes the switch to libc++ on android.

Fixes outside of the rolled code:

*) ::TestSuite -> base::TestSuite
*) base::ScopedPtrHashMap's second parameter Value->scoped_ptr<Value>
*) re2 std::tr1 changes from upstream libc++ changes
*) tracked_objects:: api changes in mojo/common/task_tracker*

Review URL: https://codereview.chromium.org/1128733002
2015-05-05 18:12:15 -07:00
James Robinson
209153d192 Fix up strings Sky passes to base/trace_event
String parameters passed to the trace macros in base/trace_event must
either be std::string (which Sky doesn't use very much), pointers to
null terminated C-style strings that live forever (like a string
literal) pointers to C-style strings that are annotated by macro as
needing to be copied. This fixes up a few instances that passed pointers
to temporary strings without the copying annotation or pointers to
non-null-terminated strings so the trace data doesn't have random
garbage memory in it.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1107853003
2015-05-05 17:59:09 -07:00
James Robinson
3507c90d4b 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
e3fe2a2fcc 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
Eric Seidel
d04c87cbbc Rename view-configuration to view_configuration to make analyzer happy.
Analyzer was complaining about '-' not being an allowed character
in dart file names.

R=jamesr@chromium.org
2015-05-04 14:18:19 -07:00
Eric Seidel
db103b53cc Add missing semicolon.
Thanks to the many reports:
https://github.com/domokit/sky_sdk/pull/13
https://github.com/domokit/sky_sdk/pull/8

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1127733002
2015-05-04 13:18:36 -07:00
James Robinson
a3de4df656 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
Mitch Rudominer
741c887e97 Removed errant word "is".
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1105113004
2015-04-30 12:30:57 -07:00
Eric Seidel
3afd5e5a77 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
Eric Seidel
817e2a08df Update SDK README to discuss about:tracing and observatory.
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1114553004
2015-04-28 12:05:46 -07:00
Eric Seidel
c76bf3bdaf Add missing include in sky_tool
Also fixed missing entry in CHANGELOG.md

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1108393003
2015-04-28 11:34:12 -07:00
Eric Seidel
fc50331d21 Update CHANGELOG with recent changes to Sky's pub package
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1104093004
2015-04-27 17:01:09 -07:00
Eric Seidel
dbd54f73b0 Add start-tracing and stop-tracing commands to sky_tool
This is just copy-pasted from shelldb but should work.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1112433003
2015-04-27 16:59:17 -07:00