1603 Commits

Author SHA1 Message Date
Adam Barth
12439e5ccf Address Ian's comments on layout2.dart
R=ianh@google.com

Review URL: https://codereview.chromium.org/1152603002
2015-05-21 13:32:21 -07:00
Eric Seidel
827e621238 Teach sky_viewer about the new main.dart hotness
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1147413003
2015-05-21 12:46:36 -07:00
Adam Barth
045620e027 Port touch-demo.sky to SkyView universe
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1151613005
2015-05-21 12:34:38 -07:00
Adam Barth
2c85651165 Port spinning_square to SkyView universe
This demo shows how to create a spinning square using the lowest-level APIs. We
should probably create more spinning square demos at the other layers of the
system.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1147393002
2015-05-21 12:14:10 -07:00
Adam Barth
b7c3f545f0 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
7870498e53 Actually perform a block layout
This CL teaches simple_render_tree how to do a block layout using layout2.dart.

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

Review URL: https://codereview.chromium.org/1144423002
2015-05-21 11:15:50 -07:00
John McCutchan
7367e532b4 Move 'dart:mojo.internal' into sdk_ext directory of mojo package
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1143073004
2015-05-21 11:02:43 -07:00
John McCutchan
47bd02f024 Rename internal Dart content handler unit testing library to _testing
- Also, fix clean builds, by not including the sdk_ext_directory as an input dependency because there is no rule to create it.

Review URL: https://codereview.chromium.org/1147223006
2015-05-21 09:55:57 -07:00
John McCutchan
4bc21d24a6 Start including sdk_ext sources in sky dart-pkg
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1147293003
2015-05-21 09:17:24 -07:00
Hixie
7cb2b7114e [Effen] Move responsibility for inserting nodes to the OneChildListRenderNodeWrapper.
Before, OneChildListRenderNodeWrappers were responsible for removing
the child nodes' RenderCSS nodes from their containers, and for moving
those around when nodes were reordered. Now, they're also responsible
for adding them.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1145953003
2015-05-20 15:56:10 -07:00
Matt Perry
4c5aee62cd Sky: different tack for custom Rect type in the Canvas API.
Rect is now a dart-only type, defined in its own .dart file. I use
DartConverter when passing a Rect into C++. I also special-cased Rect in the
IDL compiler so that it's passed by value, instead of allocating a new
Rect object on the heap.

This also adds a mechanism to add custom .dart files to dart_sky.dart - used by
Rect.dart.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1151673002
2015-05-20 17:58:38 -04:00
Adam Barth
ee7bb52bdd Rename setupPos to setParentData
As recommend by Ian.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1149843003
2015-05-20 14:50:41 -07:00
Adam Barth
0a09212fe5 Add a simple_render_tree example
This example shows how to draw a circle using subclasses of RenderNode.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1144193004
2015-05-20 13:49:29 -07:00
Hixie
66dd961fa5 [Effen] Try to catch more misuse of fn by asserting that UINode nodes are only built when we're updatin the tree.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1148253002
2015-05-20 12:47:52 -07:00
Hixie
edacf2a362 Layout API prototype, for discussion
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1093633002
2015-05-20 10:52:36 -07:00
Hixie
179d1b2969 [Effen] Now that we have RenderNode.parent again, we can have mid-tree sync() work properly again.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1145623003
2015-05-20 09:43:49 -07:00
Hixie
5c864ec91c [Specs] Ideas for linkability in Sky apps.
TBR=abarth

Review URL: https://codereview.chromium.org/1148123002
2015-05-20 09:32:50 -07:00
Adam Barth
67109ce3e1 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
Hixie
f31e6ec087 [Specs] Remove all the obsolete specs.
TBR=abarth

Review URL: https://codereview.chromium.org/1142853006
2015-05-19 16:39:32 -07:00
Hixie
c20a7f9c28 [Effen] Rename Action Bar to Tool Bar.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1133353008
2015-05-19 15:52:12 -07:00
Adam Barth
3acb930b0a Attempt to fix bad dependency in Sky build
Several people have run into trouble building Sky because of a missing
dependency in the build. From inspection, it looks like this might fix the
issue, but it's hard to be sure without being able to reproduce the issue
locally.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1130353013
2015-05-19 15:44:36 -07:00
Hixie
552f236bb4 More concrete Scheduler API proposal
Review URL: https://codereview.chromium.org/1139573005
2015-05-19 15:20:01 -07:00
Adam Barth
0906da7f0f 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
Adam Barth
aec042c97d Fix build
TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1138443005
2015-05-19 14:32:57 -07:00
John McCutchan
2f87b093cf 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
9f8b9bb96d 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
Hixie
1e29959ad6 [Effen] add an assert that you don't try to re-add a defunct node
R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1149533002
2015-05-19 14:19:49 -07:00
Hixie
cf4733f24a [Effen] Add a "parent" pointer to Node.
Per discussion about https://codereview.chromium.org/1093633002 it
appears that we don't have a way around having a parent pointer after
all, so this exposes it.

It also renames setAsChild() to adoptChild() for better readability.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1134593007
2015-05-19 14:14:59 -07:00
John McCutchan
b8b22315ee Fix domokit.github.io site deployment script
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1145843002
2015-05-19 14:03:13 -07:00
Adam Barth
1b45682ba9 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
Matt Perry
c69bcc245c Sky: Add a CustomDart attribute to the IDL compiler, and use that with Canvas
to provide a better Dart API.

When the attribute is present on an IDL interface, the generate Dart code will be a private interface that can extended by custom dart code.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1135283005
2015-05-19 13:59:05 -04:00
Adam Barth
9a4feca976 Teach SkyView how to load the main script
This CL implements SkyView::Load to start executing Sky content directly from
Dart's main(). This code isn't currently wired up to anything, so it's not yet
tested.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1130353009
2015-05-19 10:55:07 -07:00
John McCutchan
0a0975bf9e 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
afbae48f73 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
3c584b59a2 Add library names to many sky libraries
- Analyzer complains about libraries not having names. This adds names to many libraries.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1150433002
2015-05-19 10:19:11 -07:00
John McCutchan
0742438056 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
67b59fadb9 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
Eric Seidel
cd069f2a21 Add Canvas.drawPicture
I wrote another copy of paint_element_into_displaylist
using this new technology.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1129353010
2015-05-18 15:13:15 -07:00
Eric Seidel
d0613374d0 Make it possible to Paint elements into a display list.
Currently said elements need to be in the DOM and have
already been laid out for this to work, but follow-up patches
will remove these restrictions.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1144673002
2015-05-18 14:49:59 -07:00
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