10 Commits

Author SHA1 Message Date
Hixie
41c3e58e27 Use the baseline information exposed by C++ to pipe baseline data through RenderBox.
This also fixes the C++ side to give the right baseline information.
Previously it was giving the baseline distance for the font, but not
for the actual laid-out text.

I considered also providing a "defaultBaseline" accessor that returns
the distance for the actual dominant baseline, but it turns out right
now we never decide the baseline is ideographic. We always use the
alphabetic baseline. We should probably fix that...

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1200233002.
2015-06-24 17:01:14 -07:00
Hixie
66fd8e7343 Minor optimisations and cleanup to the text rendering stuff.
R=eseidel@chromium.org, eseidel

Review URL: https://codereview.chromium.org/1210653002.
2015-06-24 12:37:07 -07:00
Ian Fischer
1799eacef5 Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia counterparts.
Also changes the framework dart code to use the
refactored APIs and fixes the various examples and
tests.

R=abarth@chromium.org, ianh@chromium.org

Review URL: https://codereview.chromium.org/1190123003.
2015-06-24 10:21:45 -07:00
Hixie
f59f4f2dde Fix the indenting of the toString() output of the RenderTree, which was broken around RenderParagraph.
TBR=eseidel

Review URL: https://codereview.chromium.org/1199913009.
2015-06-23 10:08:13 -07:00
Adam Barth
8f20fb6e9a Improve stocks2 performance
We're now 25% faster as scrolling the infinite list than stocks1.

This CL makes cleans up some code to avoid calling layout on all the rows in
the stocks list. Instead, we only layout a row when it first enters the list.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1195113002.
2015-06-19 15:44:37 -07:00
Hans Muller
33d72366a2 Add TextStyle fontFamily:, extend support for fontWeight:
Defined constants for all 9 CSS font-weight values
with conventional names from the "Common weight
name mapping" section of
https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight.

The FontWeight enum now just enumerates the actual
CSS weight values.

I've moved the TextStyle class into its own file.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1173323004.
2015-06-17 15:48:21 -07:00
Hans Muller
87e47ef04a Cleaned up a few analyzer warnings
R=ianh@google.com

Review URL: https://codereview.chromium.org/1194583002.
2015-06-17 10:35:47 -07:00
Adam Barth
fd249edff7 Fix typo in RenderParagraph's |inline| getter
R=hansmuller@chromium.org

Review URL: https://codereview.chromium.org/1183603003.
2015-06-17 08:01:00 -07:00
Hans Muller
61b71a6f32 Styling for text fragments
This is a completion of Eric's WIP patch:
https://codereview.chromium.org/1179663005/

Low level support for creating a paragraph that contains
runs of styled text. The styles may be nested.

The Paragraph and RenderParagraph classes have been
replaced by Inline and RenderInline. Styled text is defined
with a tree of InlineText and InlineStyle objects.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177833012.
2015-06-16 16:48:08 -07:00
Adam Barth
219ead3718 Rename all the things
This CL moves the bulk of the SkyView code out of the |framework| directory
because the |framework| directory was redundant in Dart package import
declarations.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1177383006.
2015-06-13 09:46:52 -07:00