25 Commits

Author SHA1 Message Date
Adam Barth
9c09565712 Update paths to account for buildroot 2016-08-09 13:52:15 -07:00
Adam Barth
d5232635f9 Remove //base from //flutter/tonic 2016-08-07 12:35:25 -07:00
Adam Barth
1c9c7aa826 Switch to using //lib/tonic's DartWrappable (#2878)
This removes most (all?) of our dependency on base::RefCountedThreadSafe.
2016-08-05 16:43:35 -07:00
Adam Barth
f0967c24e5 Remove more //base dependencies (#2870)
WTF is now //base clean.
2016-08-05 00:00:24 -07:00
Adam Barth
5feb8266f8 Switch //sky/engine to ftl::TaskRunner (#2866)
The ftl::TaskRunner is still based on a base::MessageLoop, but this patch paves
the way to replace the message loop on Fuchsia.
2016-08-04 19:25:04 -07:00
Adam Barth
bc19388819 Switch to //lib/tonic's DartConverter (#2858)
Also, switch over to //lib/tonic's typed data classes.
2016-08-03 14:09:07 -07:00
Adam Barth
633d674c48 Move tonic to //flutter/tonic (#2742)
Now that tonic doesn't depend on anything in //sky/engine anymore, we
can move the code to a location where its dependencies are clearer.
2016-06-10 22:36:38 -07:00
Adam Barth
584d3928ce Remove dependency from tonic to wtf (#2740)
This patch paves the way to untangling a large amount of code from the engine.
2016-06-10 16:32:53 -07:00
Adam Barth
516c096d98 Fix encoded paragraph size 2016-03-30 09:38:39 -07:00
Adam Barth
5124a68e8e Merge pull request #2563 from abarth/paragraph_font
Add font styles to ParagraphStyle
2016-03-30 09:21:56 -07:00
Chinmay Garde
3a5dd866b2 Add static assert to check that all Dart wrappable instances are thread-safe reference-countable. 2016-03-29 16:30:26 -07:00
Adam Barth
d3d3e47b0a Add font styles to ParagraphStyle
Also, rename TextStyle#lineHeight to height.
2016-03-29 15:28:28 -07:00
Jason Simmons
41f93f4099 Rename DOMDartState to UIDartState 2016-03-02 10:47:30 -08:00
Jason Simmons
0b8038fa1e Support loading of custom fonts
The FLX will contain a font manifest JSON file that maps font family names
to custom font assets.  Flutter will provide a FontSelector that loads
fonts on demand and caches typeface and style data.
2016-02-17 12:07:22 -08:00
Adam Barth
0140555b54 Remove integration between tonic and WTFString
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.
2016-01-18 20:47:46 -08:00
Jason Simmons
10ce8a1928 Move the JNI bridge out of dart:ui and into a separate dart:jni library
This also extends DartClassLibrary to support multiple DartClassProviders
for different libraries
2016-01-08 11:04:22 -08:00
Ian Hickson
81f56588dc Implement wordSpacing and per-inline lineHeight.
Change line-height to use percentages rather than pixels.
2015-12-30 12:00:33 -08:00
Adam Barth
0633830c55 Remove the last remnants of CSS
This patch also lets us remove FontFamilyNames, which is one of two
remaining clients of jinja2.
2015-12-29 21:20:10 -08:00
Adam Barth
bd3a181dac Remove IDL from engine/core/text
Instead, use our new template magic.
2015-12-25 20:31:51 -08:00
Adam Barth
e5a42b6bb8 Add support for letterSpacing 2015-12-03 14:56:20 -08:00
Adam Barth
a5768f2718 Remove the DOM and CSS
We don't use the DOM or CSS anymore. Instead, we work directly with the render
tree.
2015-10-24 00:26:24 -07:00
Adam Barth
08729e37d2 Fix some fiddly bits in ParagraphBuilder 2015-10-23 09:47:02 -07:00
Adam Barth
eb594bffdc Make NewTextPainter actually work
The NewTextPainter is still disabled by default. A future patch will flip the
flag to enable it.

This patch uses a new approach to writing bindings by encoding data into array
buffers. This approach is more efficient than the existing IDL based approach.
If this works out well, we should convert our other performance-sensitive
interfaces to this approach in future patches.
2015-10-23 08:41:23 -07:00
Adam Barth
29ab28d922 ParagraphBuilder should be able to build a paragraph
This patch start down the road of implementing text layout and painting without
the DOM. We can construct a basic paragraph consisting of a single run of text
and we can get through layout without crashing.
2015-09-11 10:23:15 -07:00
Adam Barth
68b06c8736 Sketch a DOM-free API for laying out and painting text
Rather than using the DOM to upload text and styling information into the
engine, this patch begins sketching a more direct API that bypasses the DOM and
CSS. Currently, this API doesn't do anything, but it's a first step.

The approach is to have a ParagraphBuilder object that can record a tree of
style interior nodes and text leaves. The build() function then applies
container-level styling information (such as TextAlign) and returns a Paragraph
object that can undergo layout and paint.

The inputs to the builder process are immutable style objects constructed from
primitive values. These primitives are currently carbon-copies of the primitive
we use in the framework today. After this patch lands, I'll convert the frame
to re-expose these values instead of re-defining them.
2015-09-02 01:28:54 -07:00