Add more rules to determine which overloaded Java method should be invoked
for a given Dart call. In particular, check whether the class of a
Dart-wrapped Java object matches the type declared for the corresponding
argument in the Java method.
When we removed position: sticky, we introduced a subtle line breaking
bug to pre-wrap that would cause whitespace to accumulate at the
beginning of lines that follow unclean breaks. This patch adds back the
deleted code (cleansed of the position sticky bits).
Now that we understand window insets, we don't need to hard-code the size of
the status bar. Also, convert the viewport metrics to be consistently in
physical pixels.
Remove the non-initializer version of DartInvokeAppClosure and rename
the function to the simpler DartInvoke. Also, add a special case for
DartInvokeVoid to make the callers prettier.
We used to share memory between Dart strings and WTF::String objects by
way of the Dart externalized strings. That used to be important when the
DOM shared many strings between C++ and Dart. However, now that we don't
retain strings in C++ much anymore, we don't need this complexity.
This patch removes DartStringCache and the integration. It also unwinds
several cases where we were converting back and forth between
WTF::String and std::string for no reason. Now we use std::string more
consistently.
For the case of ParagraphBuilder::addText, we now take a raw const
char*, which more closely matches the API the DartVM exposes. That means
we do a single copy out of the VM and into the render tree at that
point.
Moving the microtask queue into tonic solves three problems:
1) Removes three levels of indirection when invoking microtask
callbacks.
2) Removes the sky/engine/dom directory entirely.
3) Removes the last client of the (inefficient) DartValue class.
* Conversion of all primitive types, wrapped Java objects, and nulls between Dart and Java
* A way to distinguish float arguments from doubles when calling Java methods
* Construction of a Dart JniClass from a Java class object
In changing the binding systems, I broke the colors parameter to drawAtlas. It
was looking for an array of ints rather than an array of Colors. Now we use
CanvasImage, which has the proper converter.
Fixes#1137
We don't need the strict mode for legacy compatibility because we don't have
any legacy yet. At some point, we might want to expose the strict mode for
people who want to pack their sprite sheets very tightly, but the sprites
library uses drawAtlas instead already.
Also, remove compositor_options in favour of four int constants, four
bitwise ands, and a few zero-equality comparisons, since it doesn't
seem we'll need this to scale much after all.
Rather than relying upon the rects passed in from Dart, the compositor
should compute the paint bounds of layers from the cull rects of the
underlying SkPictures. This approach is better because it will handle
effects like shadows that paint outside the incorrect paint bounds we
use today (as well as shrinking around empty space).
DartArgIterator was starting at argument index 1 because it assumed that the
arguments include a pointer to the "this" object for an instance method.
DART_REGISTER_NATIVE makes the same assumption in the argument count.
This change adds versions of the macros that are suitable for static methods
with no implicit arguments.