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
Viktor Lidholt
2d8240aa75
Adds support for transfer mode in Paint and SpriteNode classes. Adds support for opacity in sprites, and modifies example game.
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1164633004
2015-06-04 11:14:07 -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
Matt Perry
8afcb0fe2d
Canvas.concat takes a 16-element Float32List instead of an array.
...
The array should be in column-major format, in the format used by vector_math.dart.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1155193004
2015-06-04 13:51:44 -04: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
Seth Ladd
ba9af31ed9
Add the sky sdk README back.
...
Was removed in 1a396394dd
R=eseidel@chromium.org , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1159013011
2015-06-04 09:13:15 -07:00
Adam Barth
6d7a850e25
Remove outdated copy of download_material_design_icons
...
The current copy is in //sky/sdk/lib.
TBR=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1160393003
2015-06-04 08:43:00 -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
05a7ed066c
Rename skydb to mojodb
...
The skydb tool is actually used to run many mojo apps that aren't related to
Sky.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1164023004
2015-06-03 17:03:42 -07:00
Adam Barth
1e9184d282
Make Uri.base work in SkyView
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1153673005
2015-06-03 17:00:44 -07:00
Eric Seidel
73c76d5031
Make OKNet not throw bananas when asked to parse 'banana'.
...
Catch the MalformedURLException instead of dying.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1153033010
2015-06-03 16:53:36 -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
Hixie
d53de8ad97
Plug the drawer into stock2.
...
Not tested on device.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1160523005
2015-06-03 15:36:48 -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
Viktor Lidholt
ef070b2cfb
Sky example game enhancements, adds preloading of images and adds transform modes to SpriteBox
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1149183004
2015-06-03 15:05:55 -07:00
Hixie
a18d06f34c
Add overlays back to stocks2.
...
Except that nothing actually uses these now so it's a no-op really.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1157243011
2015-06-03 15:03:34 -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
Hixie
57fef366d1
Provide Point+Size, Point-Point, Point.toSize(), and Rect.toPoint().
...
Also some minor code cleanup in affected files and nearby files.
R=mpcomplete@chromium.org
Review URL: https://codereview.chromium.org/1160453006
2015-06-03 14:21:46 -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
Matt Perry
3aa1e23d7d
Sky: Convert TransferMode to an enum.
...
It looked and smelled like an enum, so lets just make it one. This also gives us a nice toString() method.
R=abarth@chromium.org , eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1144233004
2015-06-03 16:19:14 -04:00
Eric Seidel
b18eecb50d
Make tracing work in the new .dart world.
...
R=abarth@chromium.org , viktorl@google.com
Review URL: https://codereview.chromium.org/1152483006
2015-06-03 12:40:38 -07:00
Eric Seidel
00ead9f76f
Don't run adb as part of shelldb boot
...
This defers running adb until we actually need the device-id
which makes shelldb not crash when adb isn't avaiable.
I also fixed to use ADB_PATH.
Chinmay ran into this when trying shelldb on Mac.
R=chinmaygarde@google.com , iansf@google.com
Review URL: https://codereview.chromium.org/1161843007
2015-06-03 11:20:33 -07: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
Matt Perry
72ca1d9f32
Simplify TransferMode and Color types.
...
They are no longer wrappers in C++, but are converted directly to their Skia types.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1162393002
2015-06-03 13:33:33 -04: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
John McCutchan
87fd276d3d
Enable Dart's checked mode in the Sky controller by default for debug builds
...
This matches the behaviour of the Mojo Dart controller and was requested by tonyg@
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1152873006
2015-06-03 09:33:17 -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
Viktor Lidholt
109271ea62
Initial version of working game with Box2D, images, nodes and sprites.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1161023006
2015-06-02 15:09:01 -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
Matt Perry
485523560f
Add a MaskFilter interface to dart:sky to handle blur.
...
For this, I added back my previous CustomDart attribute for customizing the
generated Dart code of an interface.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1162843003
2015-06-02 17:26:32 -04: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