Hixie
e8cafd9d71
Rename rendering/render_*.dart to rendering/*.dart
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1166773003
2015-06-02 13:55:20 -07:00
Adam Barth
499988ec1b
Remove the concept of an empty RenderNodeWrapper
...
This machinery existed only to save one null check.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1163933002
2015-06-02 12:45:35 -07:00
Adam Barth
3f57030cef
Add BlockContainer to fn2
...
BlockContainer uses a RenderBlock to lay out its children.
R=eseidel@chromium.org , jackson@chromium.org
Review URL: https://codereview.chromium.org/1166473005
2015-06-02 12:19:25 -07:00
Adam Barth
55eb0b38f0
Mark fn2's EventListenerNode work for PointerEvent
...
Prevously we listened for events on the document and then walked up the
component hierarchy looking for EventListenerNodes. Now we do something similar
by hooking the event dispatching logic in the AppView.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1153343004
2015-06-02 12:18:13 -07:00
Matt Perry
4f2d78a5bb
Re-land "Add a Color class to dart:sky."
...
The previous patch broke the sky tests. I have updated the framework to use the new Color class.
R=jackson@google.com
Review URL: https://codereview.chromium.org/1159663003
2015-06-02 14:09:42 -04:00
Collin Jackson
f396442e0a
Implement a simple image cache for Sky in Dart. This doesn't yet do any eviction from the cache.
...
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1165753004
2015-06-02 10:44:48 -07:00
Adam Barth
6eba4a04f9
Add a simple inksplash example
...
We'll eventually turn this into a full fn2 component, but for now it's just an
example.
To make this work, I created a schedule.dart as a start to implementing
scheduler.md. For now, I've kept the API similar to the web platform so that
the old world can continue use it backed by sky.window.requestAnimationFrame.
R=eseidel@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1145973009
2015-05-29 13:55:12 -07:00
Adam Barth
9accf81dd9
Improve RenderNode performance
...
Experimenting with using the observatory profiler, I noticed two pieces of
low-hanging performance fruit. This change removes about 4% of the total
profile for layouting out and painting the flex demo.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1155043004
2015-05-29 10:55:34 -07:00
Adam Barth
b8953a4bbc
Fix Dart analyzer warnings in scaffold.dart
...
TBR=ianh@google.com
Review URL: https://codereview.chromium.org/1154013006
2015-05-28 16:55:09 -07:00
Adam Barth
8cbfd0a9fa
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
9f086ea445
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
ad4249a804
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
aa8c852c06
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
7e7ed88f29
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
9a73fe989e
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
bf94f5c027
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
Eric Seidel
3971d9af9c
Remove bogus assert in layout()
...
TBR=ianh@google.com
Review URL: https://codereview.chromium.org/1157433006
2015-05-28 12:28:41 -07:00
Eric Seidel
faf554f03d
Move RenderParagraph into layout2.dart
...
TBR=ianh@google.com
Review URL: https://codereview.chromium.org/1155103003
2015-05-28 12:26:09 -07:00
Hixie
d99ee82260
Refactor layout/relayout into a single method.
...
This dramatically simplifies the layout model.
I haven't gone through and simplified the existing functions, we should probably go through and figure out if they can be cleaned up a bit.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1161983004
2015-05-28 11:15:58 -07:00
Eric Seidel
2cd0e5f4a0
Make app.dart not spew exceptions on mouse hover
...
app.dart assumes touch devices, which is great. We
just don't need to spam exceptions when testing inside
mojo_shell with a mouse. :)
R=jackson@google.com , ianh@google.com
Review URL: https://codereview.chromium.org/1160853003
2015-05-28 10:57:41 -07:00
Collin Jackson
b5b6a10004
In Sky framework AppView, cache the hit test result for pointer events and continue using that result until pointerup or pointer cancel event is received
...
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1158933004
2015-05-27 17:49:14 -07:00
Hixie
26be5af114
Refactor padding out of RenderBlock.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1143153011
2015-05-27 17:11:45 -07:00
Adam Barth
a998a86caf
Introduce RenderNodeWithChildMixin
...
R=ianh@google.com
Review URL: https://codereview.chromium.org/1156013003
2015-05-27 14:31:08 -07:00
Adam Barth
1012325d88
DOM-less stocks app shouldn't crash on touch
...
R=ianh@google.com
Review URL: https://codereview.chromium.org/1162463002
2015-05-27 13:46:22 -07:00
Hixie
3cd544479f
remove debugging prints that snuck through
...
TBR=abarth
Review URL: https://codereview.chromium.org/1162443003
2015-05-27 13:42:50 -07:00
Hixie
63d5c73dd1
[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
Adam Barth
f179203848
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
Hixie
e2e68550af
Make RenderView support changing the root dynamically, including being null.
...
Remove the ScaffoldBox class (it'll move to the fn components directory).
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1157563007
2015-05-27 12:25:34 -07:00
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