Matt Perry
7382a261aa
Change the way we provide custom dart code for IDL bindings.
...
Rather than appending the custom Foo.dart code to the end of the generated
interface, we now copy it to a CustomFoo.dart file in the output directory.
This allows us to declare it as a proper dependency.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1171743002
2015-06-08 17:26:51 -04: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
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
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
Eric Seidel
e3a8059796
Fix all dartanalyzer errors in dart:sky except the Native ones.
...
I also fixed all warnings. :)
This is the only error remaining:
[error] Native functions can only be declared in the SDK and code
that is loaded through native extensions
My understanding is that we need to do something similar to:
https://codereview.chromium.org/950063002/
in order to work around the 'native' issue.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/981733009
2015-03-05 13:36:48 -08:00
Adam Barth
085b988e6a
Make it possible for sky-element to register any tag name
...
... instead of hard-coding "example".
We do this by adding a custom constructor for Element that gets the |tagName|
property off the instance.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/943153002
2015-02-21 08:02:32 -08:00
Adam Barth
0a6bdfed49
Make it possible to create reasonable subclasses of Event
...
After this CL, authors can create custom subclasses of Event that actually work
in a reasonable way, including being able to dispatch.
R=hansmuller@google.com , hansmuller@chromium.org
Review URL: https://codereview.chromium.org/938003004
2015-02-19 23:19:06 -08:00
Adam Barth
f562073fe2
Make it possible to inherit from any constructable host object
...
This CL makes it possible for authors to extend any host object (e.g., DOM
objects) and to use those objects in all the usual places they can be used in
the API.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/936193005
2015-02-19 23:09:51 -08:00
Adam Barth
b0ef81ac95
Make element.style["color"] work in Sky
...
This CL makes CSSStyleDeclaration a bit less painful to use by replacing the
crazy Java-style APIs with overloading operator[] and operator[]=.
R=esprehn@chromium.org , ojan@chromium.org
Review URL: https://codereview.chromium.org/942553002
2015-02-19 13:06:01 -08:00
Eric Seidel
7c33481af9
Fix the tests after my previous commit.
...
This actually makes [Named] work, previously it was
generating invalid dart.
TBR=abarth@chromium.org
BUG=
Review URL: https://codereview.chromium.org/931273002
2015-02-17 11:09:27 -08:00
Eric Seidel
9aba803749
Add support for named arguments to our bindings generation.
...
This doesn't yet support having both named and optional
arguments, but once I have an example of that it should
be trivial to add.
I also cleaned up the generation a little so the generated
dart file looks nicer. :)
R=abarth@chromium.org
BUG=
Review URL: https://codereview.chromium.org/923093003
2015-02-17 11:00:07 -08:00
Adam Barth
52b56750a1
Rename sky/engine/bindings2 to sky/engine/bindings
...
There's only one bindings system now.
TBR=eseidel@chromium.org
Review URL: https://codereview.chromium.org/915293003
2015-02-12 20:16:17 -08:00