Collin Jackson
45cbbc0fae
Implement radio button for Sky’s fn2
...
R=abarth@chromium.org , eseidel@chromium.org , abarth
Review URL: https://codereview.chromium.org/1157573012
2015-06-04 17:24:38 -07:00
Eric Seidel
a2ae29cb40
Various fixes in preparation for deploying
...
Fixed the mojo deploy script to no longer deploy mojo.
mojo now uses a more sophisticated CDN, etc.
Fixed old fn.dart to work again. :) Looks like it was
victim of a mass rename.
Fixed engine.cc to be able to handle navigating from
WebView content to SkyView content. We can't handle
the other direction yet, but we don't need to.
/sky_home is written in the .sky system but all of our
new examples are .dart (and thus SkyView).
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1165003006
2015-06-04 16:48:09 -07:00
Hixie
96aadc99b4
Rename "BorderSide.None" to "BorderSide.none", since it's a constant, and change the sky.Size.infinite() constructor to a constant.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1158263005
2015-06-04 16:17:20 -07:00
Hixie
10cda2fe28
Include DETACHED, NEEDS-LAYOUT, and relayoutSubtreeRoot info in the debug output for the render tree
...
R=chinmaygarde@google.com
Review URL: https://codereview.chromium.org/1149083011
2015-06-04 15:58:43 -07:00
Adam Barth
c5c3f31a17
Make the StockList actually work in stocks2
...
RenderScaffold needs to attach and detach its children when asked.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1149893025
2015-06-04 15:50:07 -07:00
Hixie
9b0cb975cb
Improve the RenderObject.toString() logic so that there's not blank lines everywhere and to generally be better.
...
Adds sizes, positions, transforms, improves RenderParagraph's output.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1160233004
2015-06-04 15:45:44 -07:00
Eric Seidel
ca3b643ca9
Start making input work
...
Does not work yet.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1163973005
2015-06-04 15:18:09 -07:00
Adam Barth
bd7af16cf5
Make fetch work in the DOM-less world
...
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1166953005
2015-06-04 15:00:08 -07:00
Adam Barth
b3a9abd09b
Fix bogus asserts in searchForOldNode
...
We should be asserting that old.root is a ContainerRenderObjectMixin because
we're able to manipulate its child list.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1169593002
2015-06-04 14:59:46 -07:00
Eric Seidel
54d01bc005
Attempt to write a RenderShadowedBox
...
The goal of this is to have a Renderer-layer abstraction
around the Sky Engine c++ apis for drawing a shadow.
R=mpcomplete@chromium.org
Review URL: https://codereview.chromium.org/1146893004
2015-06-04 14:49:24 -07:00
Hixie
67d883c506
We don't necessarily have a child, so debugDescribeChildren() needs to check for null.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1151533006
2015-06-04 14:30:17 -07:00
Hixie
77ef219796
Fix some minor warnings from the analyzer in the framework.
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1162623011
2015-06-04 14:11:02 -07:00
Hixie
8ee5aa0bc6
Give RenderObject a useful toString().
...
This makes debugging the render tree a lot easier. Just print the node
you care about, and you get an indented tree view of its subtree,
including settings. New subclasses should implement the new virtual
method debugDescribeSettings() to expose new settings.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1157993005
2015-06-04 14:10:07 -07:00
Adam Barth
0fcbeef342
Make FixedHeightScrollable understand heights
...
This CL makes FixedHeightScrollable able to measure heights. In the DOM-based
version, FixedHeightScrollable forced a synchronous layout in a microtask in
order to measure the size of itself and its children. In the DOM-less version,
we now require the subclass to tell us the item height and we measure our own
height using a layout callback.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1161063005
2015-06-04 13:42:16 -07:00
Collin Jackson
31f8f740d1
Implement menu_divider
...
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1163913004
2015-06-04 13:11:40 -07:00
Hixie
6a0d1ffb2f
Style guide says enum values should be lowerCamelCase.
...
https://www.dartlang.org/articles/style-guide/#names
R=jackson@google.com
Review URL: https://codereview.chromium.org/1158813004
2015-06-04 12:24:10 -07:00
Matt Perry
e584f258fe
Fix regression in RenderTransform caused by change to Canvas.concat.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1169583002
2015-06-04 14:31:19 -04:00
Hixie
9706fc588f
Assert that you can't mutate the tree during paint or layout.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1144933007
2015-06-04 11:14:39 -07:00
Adam Barth
22b39a9f88
Add RenderClip and use it in FixedHeightScrollable
...
In the future, we might want to extend this class to clip to a configurable
rect in addition to clipping to its bounds.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1145263006
2015-06-04 11:14:30 -07:00
Hixie
c023507973
Rename OneChildListRenderObjectWrapper to MultiChildRenderObjectWrapper to avoid the confusing similarity with OneChildRenderObjectWrapper.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1150543005
2015-06-04 11:14:18 -07:00
Collin Jackson
ab90994194
Stub out InkWell and implement Sky’s fn2 menu item
...
R=abarth@chromium.org , ianh@google.com , abarth, hixie
Review URL: https://codereview.chromium.org/1165983002
2015-06-04 11:04:01 -07:00
Adam Barth
4491168fcb
Make FixedHeightScrollable mostly work in fn2
...
We still need to add a clip and a way to integrate with layout, but those
changes are more invasive and I'll do them in separate CLs.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1166983003
2015-06-04 10:52:12 -07:00
Hixie
08b2a30e0f
Enable RenderDecoratedBox to draw borders.
...
Currently supports only solid borders, but of any colour and size, independently controlling each side.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1154903006
2015-06-04 10:50:59 -07:00
Adam Barth
05c7ca6bef
Fix build after hixie's rename
...
TBR=ianh@google.com
Review URL: https://codereview.chromium.org/1164073002
2015-06-04 10:49:05 -07:00
Hixie
8e34567652
Rename RenderNode to RenderObject.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1165013003
2015-06-04 10:45:21 -07:00
Hixie
04f10fbf64
Fix the crash when the drawer is hidden.
...
The root cause of the crash was threefold:
- you can't enumerate enums, in dart; you have to enumerate their values.
- RenderNodeWrapper was trying to call remove(child.root) on its root, but that's
not something that all RenderNodes have
- when a RenderNode was deparented, its relayoutSubtreeRoot wasn't removed, so
the node ended up in an inconsistent state regarding its parent tree
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1151573020
2015-06-04 10:39:34 -07:00
Hixie
0e06bfbee0
Make EdgeDims and BoxConstraints printable (for debugging)
...
R=jackson@google.com
Review URL: https://codereview.chromium.org/1166523006
2015-06-03 17:24:31 -07:00
Eric Seidel
8d52fb51dc
Make Icon work using space-aged base-url technology.
...
I also moved Icon back to using int, since double doesn't
actually make sense for an icon pixel size.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1164023005
2015-06-03 17:16:12 -07:00
Adam Barth
16f8b21601
Fix gesture events in fn2
...
This CL makes gesture events work again in fn2.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1146923005
2015-06-03 16:06:15 -07:00
Eric Seidel
8078665688
Make the Icon component use Image
...
Even though Image doesn't yet know how to handle
relative urls.
TBR=jackson@google.com
Review URL: https://codereview.chromium.org/1157163009
2015-06-03 15:42:34 -07:00
Collin Jackson
7552bf79d1
Fix Sky issue where RenderNode was not painting automatically in interactive situations
...
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1168623002
2015-06-03 15:42:21 -07:00
Eric Seidel
1f8892f709
Fork theme to theme2 and use sky.Color types directly.
...
This also works around an Android-only crasher for the Dart VM:
https://github.com/domokit/mojo/issues/192
R=ianh@google.com
Review URL: https://codereview.chromium.org/1157243012
2015-06-03 15:22:08 -07:00
Collin Jackson
e16e10d830
Implement RenderImage and Image for Sky
...
This also fixes a bug that was preventing markNeedsLayout from working
R=abarth@chromium.org , eseidel@chromium.org , abarth, eseidel
Review URL: https://codereview.chromium.org/1160013004
2015-06-03 15:17:12 -07:00
Adam Barth
6d5227ea0c
Make Drawer in components2 work
...
This CL introduces RenderStack and fixes a number of bugs to make the Drawer in
components2 work.
R=ianh@google.com , eseidel@chromium.org
Review URL: https://codereview.chromium.org/1147143005
2015-06-03 14:52:13 -07:00
Hixie
926eafbf47
Fix scaffold to work for the toolbar.
...
Also, make the scaffold code more generic (with slots in a map,
instead of dedicated members for each slot).
This may eventually benefit from being split into a general
"multislot" superclass and a scaffold-specific subclass, but for now
it'll do.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1152163007
2015-06-03 14:50:32 -07:00
Matt Perry
8c097b0892
Update BoxDecoration and RenderParagraph to use sky.Color instead of int.
...
Also add operator==, hashCode, toString, and some basic Color constants to
Color.
R=abarth@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1162023004
2015-06-03 16:57:04 -04:00
Eric Seidel
a90cc80a88
Fix min/max typo in BoxConstraints.deflate
...
R=ianh@google.com
Review URL: https://codereview.chromium.org/1153413003
2015-06-03 11:12:17 -07:00
Hixie
3fe1c0b38c
Fix logic in RenderPadding.
...
Previously, we were not adjusting the minimum width, so we ended up
offsetting the child but not shrinking it, when the parent expected
the child to be exactly fit to its dimensions.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1155303005
2015-06-03 10:25:05 -07:00
Adam Barth
81b8512b41
Add support for transforms to container
...
These transforms are currently very basic but they seem to mostly work.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1152273004
2015-06-03 10:20:33 -07:00
Przemyslaw Pietrzkiewicz
7cffe65163
Fix a missing url_request mojom import in fetch.dart.
...
Not exactly sure what I'm doing, but this makes the stocks example:
`sky/tools/skydb start out/Debug/ sky/examples/stocks/main.sky`
work again, fixing the UrlRequest import issue:
[0603/143348:ERROR:dart_error.cc(20)]
'http://localhost:9999/packages/sky/framework/net/fetch.dart ': malformed
type: line 32 pos 21: type 'UrlRequest' is not loaded
var request = new UrlRequest()
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1148963007
2015-06-03 16:56:23 +02:00
Eric Seidel
d9ed864cc9
Give the Stocks2 App a new improved toolbar.
...
Looks horrible. But it's a start.
R=abarth@chromium.org , ianh@google.com
BUG=
Review URL: https://codereview.chromium.org/1146913005
2015-06-02 16:13:31 -07:00
Adam Barth
898273c7b2
Implement Container in fn2
...
This CL is a first pass at implementing container in fn2. In this approach,
Container is a Component that builds a number of RenderNodeWrappers depending
on what is needed.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1158983005
2015-06-02 15:07:02 -07:00
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