32 Commits

Author SHA1 Message Date
Jason Simmons
fd478815c6
Validate UTF-16 input in ParagraphBuilder::addText (#4300)
Fixes https://github.com/flutter/flutter/issues/12772
2017-11-01 11:26:01 -07:00
Jason Simmons
054a2cca35 libtxt: some cleanup (#4268)
* rename glyph_position_x to glyph_lines
* use round instead of roundf
* return a range start/end struct in Paragraph::GetWordBoundary
2017-10-23 17:18:00 -07:00
P.Y. Laligand
6fcb45991d Move //dart to //third_party/dart. (#4245) 2017-10-19 01:20:38 -07:00
Jason Simmons
6f4eb92020 libtxt: support the use_test_font flag required by framework tests (#4216)
This registers a test font manager that maps all fonts to the Ahem font
2017-10-13 11:31:35 -07:00
Jason Simmons
199620a57b libtxt: support right-to-left text (#4198) 2017-10-11 16:15:57 -07:00
Jason Simmons
a7e14ea474 libtxt: refactor glyph position calculation (#4134)
* Remove padding values in line_heights and glyph_position_x.  Each value
  in glyph_position_x now represents an actual glyph in the layout.

* Remove code intended to handle extra characters beyond the end of the
  last line.  The LineBreaker should ensure that the end of the last run
  matches the end of the last line.

* Return the upstream/downstream affinity of the cursor position in
  GetGlyphPositionAtCoordinate.

* Account for the space at the end of a word wrapped line in
  GetGlyphPositionAtCoordinate / GetCoordinatesForGlyphPosition
2017-09-22 15:15:59 -07:00
Michael Goderbauer
08961f8ec5 Format all c-like sources with clang-format (#4088)
* format

* license script adaptions

* updated licenses

* review comments
2017-09-12 15:36:20 -07:00
George Kulakowski
3aa7522c11 Rename ftl to fxl in Fuchsia specific code (#4090) 2017-09-11 15:58:48 -07:00
Ian Hickson
2d7c30033d Pass TextDirection to ParagraphBuilder. (#4001) (#4019) 2017-09-07 15:37:25 -07:00
Jason Simmons
1c6433fab4 Ellipsizing implementation for libtxt (#4048) 2017-09-01 14:17:04 -07:00
Chinmay Garde
a0f9084f48 Wire up support for multiple font managers in txt::FontCollection. (#4042) 2017-09-01 11:56:38 -07:00
Jason Simmons
0fc962f0dc Rebase the libtxt integration by @GaryQian onto the current engine head (#4022)
See https://github.com/flutter/engine/pull/3964
2017-08-28 13:01:15 -07:00
Ian Hickson
49d06b3860 Revert "Pass TextDirection to ParagraphBuilder. (#4001)" (#4004)
This reverts commit 86591145a320f2978c3f4c742c972a32bb8cb02a.
2017-08-23 11:14:26 -07:00
Ian Hickson
86591145a3 Pass TextDirection to ParagraphBuilder. (#4001) 2017-08-23 10:34:57 -07:00
Jason Simmons
e556332932 Report size estimates to Dart for Image/Picture/Paragraph objects (#3840)
Fixes https://github.com/flutter/flutter/issues/11007
2017-06-29 14:14:33 -07:00
Chris Bracken
fffe502d43 Revert libtxt integration (#3802)
* Revert "Fix licenses_lib golden file (#3798)"

This reverts commit d8ac43c3c9123fead15af3004d1e445834115bbd.

* Revert "Remove ParagraphConstriants (#3796)"

This reverts commit 8ccf767ff71c781588fb1e79cf3369604099a7cc.

* Revert "Reland "Initial integration of libtxt with Flutter alongside Blink." (#3793)"

This reverts commit 3c049219e1429c8e08632889b6c9e7b070bba534.
2017-06-20 09:59:56 -07:00
Gary Qian
8ccf767ff7 Remove ParagraphConstriants (#3796) 2017-06-19 17:12:54 -07:00
Gary Qian
3c049219e1 Reland "Initial integration of libtxt with Flutter alongside Blink." (#3793)
* Transition to Hybrid lib/txt and blink text system.
2017-06-19 15:21:41 -07:00
Ian McKellar
d2c77f973d Revert "Initial integration of libtxt with Flutter alongside Blink." (#3785)
* Revert "Enable line join styles and miter limit. (#3777)"

This reverts commit 5403f65bcad98bd0d434cae590e2a337a1ea218c.

* Revert "Revert "Update switches to use StringView." (#3784)"

This reverts commit 80f039ff324b827cc17567867bd17c788277b0cf.

* Revert "Initial integration of libtxt with Flutter alongside Blink. (#3771)"

This reverts commit c548c65b5020653087b63f1f156741a1f95b5117.
2017-06-16 15:15:48 -07:00
Gary Qian
c548c65b50 Initial integration of libtxt with Flutter alongside Blink. (#3771) 2017-06-16 14:15:53 -07:00
Jason Simmons
cd34b0ef39 Remove ParagraphStyle.lineCount, which has been superseded by maxLines (#3390)
Fixes https://github.com/flutter/flutter/issues/7723
2017-02-03 13:49:10 -08:00
Matt Perry
2efc78cc24 Stop processing multiline text after maxLines. (#3342)
Added a Paragraph.didExceedMaxLines property to query when this occurs.

Needed for https://github.com/flutter/flutter/issues/7271
2017-01-18 10:53:24 -05:00
Matt Perry
17237e98dd Add support for a maxLines property on Paragraph. (#3338)
Also fix 'ellipsis' overflow handling to work for multiline text.

Fixes https://github.com/flutter/flutter/issues/7271
2017-01-17 13:55:43 -05:00
Jason Simmons
cdd7db2674 Fix a leak of RenderObjects in Paragraph/ParagraphBuilder (#3189)
The RenderView destructor does not delete its descendants.
RenderObject::destroy must be called to delete the object tree along with
other cleanup tasks.

Also associate a CustomFontData with dynamically loaded fonts in order to get
the desired FontDataCache behavior at RenderObject::destroy time.
2016-10-31 11:16:04 -07:00
Jason Simmons
9f65114e20 Provide the paragraph style at ParagraphBuilder construction time (#3171)
This enables text span styles to inherit attributes from the paragraph style
2016-10-25 10:58:05 -07:00
Jason Simmons
d46107120a Revise the paragraph style API to include custom ellipsis strings (#3071) 2016-09-28 15:52:31 -07:00
Jason Simmons
8eab44c623 Implement ellipsizing of text in the engine (#3056)
See https://github.com/flutter/flutter/issues/4478
2016-09-26 11:30:11 -07:00
Adam Barth
9fe7992df5 Update DCHECKS 2016-09-15 12:06:53 -07:00
Adam Barth
a971482577 Polish dart:ui API (#3032)
This patch makes three API changes:

 * The dart:ui library now always communicates in physical pixels. The
   framework is responsible for converting to whatever logical coordinate
   system it wishes to use.
 * The textBaselien property is now on TextStyle rather than ParagraphStyle,
   which will let us choose which baseline to use on a per-span basis rather
   than on a per-paragraph basis.
 * This patch also removes the old MojoServices function endpoints.

Fixes https://github.com/flutter/flutter/issues/3779
Fixes https://github.com/flutter/flutter/issues/1360
2016-09-15 10:26:04 -07:00
Adam Barth
92973b377b Remove Paragraph stubs (#3002)
We can now use the real thing on Fuchsia.
2016-09-07 22:33:56 -07:00
Adam Barth
a5c3a3134d Add stubs for text handling on Fuchsia (#2935)
We don't yet have support for text on Fuchsia. This patch add stub
implementations of Paragraph and ParagraphBuilder so that Flutter apps
that use text don't error out. Instead, the text is 0x0 and invisible.

Also, teach MojoServices not to crash if it hasn't been created by the
time Dart tries to use it.
2016-08-17 09:56:41 -07:00
Adam Barth
4cab94e949 Invert the relationship between lib/ui and sky/engine (#2920)
Now lib/ui depends on sky/engine rather than the reverse.
2016-08-12 16:12:07 -07:00