26 Commits

Author SHA1 Message Date
Hixie
bd110a8a8c [Effen] Make syncChild() support the _new_ child being null.
This is needed for cases where the UINode doesn't have a list of
children (so it doesn't go through the RenderNodeWrapper sync logic
that removes children), but it still has multiple slots, and needs to
support removing nodes from those slots. (For example, removing a
drawer from a ScaffoldContainer.)

Also, expose syncChild (it used to be private) so it can be overridden
in descendants outside fn.dart.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1158563003
2015-05-27 11:00:40 -07:00
Hixie
e4ac84639e [Effen] Expose various private members so that fn classes can exist outside fn.dart
This is needed to create a ScaffoldContainer in scaffold.dart.

This exposes:
  UINode._root => root
  UINode._removeChild => removeChild
  RenderNodeWrapper._createNode => createNode
  RenderNodeWrapper._emptyNode => emptyNode
  RenderNodeWrapper._syncRenderNode => syncRenderNode

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1148323004
2015-05-27 10:50:45 -07:00
Hixie
acdebf5520 Expose the RenderView root through the AppView, so that you can change it.
Also, attach the RenderView so that it actually updates during a flush layout.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1149063007
2015-05-27 10:42:02 -07:00
Hixie
f1b7dff0c7 Rearrange AppView so that the constructor is first.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1154403002
2015-05-27 09:47:11 -07:00
Hixie
7adb9be998 Replace setBoxDecoration() with a decoration property.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1153893006
2015-05-27 09:30:25 -07:00
Hixie
bde2470ed6 [Effen] Point the stocks2 and components2 files at the forked libraries.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1153223003
2015-05-27 09:13:37 -07:00
Hixie
ad8d6de0d0 [Effen] Fork components/ since we'll be updating all the components before we're done.
Eventually this'll be merged back into components/, but we want to keep both running for now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1158713007
2015-05-27 08:50:55 -07:00
Hixie
e0299f111b [Effen] Fork stocks and fn.dart so we have something to work on during the porting process
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1156543004
2015-05-26 12:53:08 -07:00
Hixie
b96da3b2ad Rationalise hit testing in the new RenderNode world
- makes the event logic not involve a boolean return value (since we ignored it anyway)
- splits the event handling logic into two steps, hit testing and event dispatch
- introduces an App class on the Dart side to factor out the interaction with the C++ side
- ports sector-layout and simple_render_tree to the new App infrastructure
- port simple_render_tree to the new event handling logic
- implement hit testing for the sector-layout demo

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1143343004
2015-05-26 12:44:35 -07:00
Hixie
2f510d9f8c A proof of concept for annular sector layout.
Could be useful for watch faces. :-)
Includes some minor fixes to layout2.dart.
Includes adding a very basic path API.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1152383002
2015-05-26 08:33:13 -07:00
Collin Jackson
058f0222e8 WIP Flexbox Layout Manager for Sky framework.
This only handles really basic cases and doesn't understand
justification, wrapping, and so on. Submitting for code
review so I can get some early feedback before I invest
more time into making it correct.

R=ianh@google.com, abarth

Review URL: https://codereview.chromium.org/1151293002
2015-05-22 18:47:29 -07:00
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
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
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
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
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
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
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
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