Commit graph

132 commits

Author SHA1 Message Date
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Dan Fox
559ff68b31 Get rid of servo_util 2015-03-05 17:42:05 +00:00
Matt Brubeck
04fb3a5267 Make dlist::split use new DList::split_off. 2015-02-12 15:39:08 -08:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Simon Sapin
d13d36f57f End the libstyle 'pub use' madness. 2015-01-30 15:08:29 +01:00
Patrick Walton
0f8e436745 layout: Implement text-overflow: ellipsis per CSS-UI-3 § 6.2.
Only the one-value syntax is supported for now.
2015-01-28 16:23:31 -08:00
Manish Goregaokar
b68b7e87c8 self import 2015-01-28 13:46:00 +05:30
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
024571dfa3 Use chars().count() rather than char_len().
The latter is obsolete in current Rust.
2015-01-22 14:49:26 +01:00
Patrick Walton
97d3443003 layout: Implement mix-blend-mode per COMPOSITING § 3.4.1.
`background-blend-mode` is not yet supported because we don't support
multiple backgrounds yet.
2015-01-12 08:02:41 -08:00
Patrick Walton
53b74ae853 layout: Implement text-rendering per SVG 1.1 § 11.7.4.
Like Gecko, we treat `geometricprecision` the same as
`optimizelegibility` for now.
2015-01-08 12:32:58 -08:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Ms2ger
b51e83819d Fix obsolete format traits.
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Patrick Walton
106fdb1d32 layout: Implement word-spacing per CSS 2.1 § 16.4.
This assumes that there are no ligatures that span across multiple
words. Since we have a per-word shape cache, this is a safe assumption
as of now. I have left comments to ensure that, if and when this is
revisted, we make sure to handle it properly.
2014-12-12 17:55:11 -08:00
Patrick Walton
07bc97e3e2 gfx: Implement letter-spacing per CSS 2.1 § 16.4.
The ligature disabling code has been manually verified, but I was unable
to reftest it. (The only way I could think of would be to create an
Ahem-like font with a ligature table, but that would be an awful lot of
work.)

Near as I can tell, the method used to apply the spacing (manually
inserting extra advance post-shaping) matches Gecko.
2014-12-12 11:43:43 -08:00
Joseph Crail
c254d195ad Fix spelling mistakes in comments. 2014-12-11 23:56:29 -05:00
Patrick Walton
877f02f1d1 layout: Implement text-transform.
The Unicode awareness of `text-transform` is implemented as well as
possible given the Rust standard library's Unicode support. In
particular, the notion of an alphabetic character is used instead of a
letter.

Gecko has a subclass of text run to handle text transforms, but I
implemented this in a simpler way.
2014-12-10 14:09:08 -08:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Glenn Watson
b1c226778f Cache last fontgroup. Style recalc on wikipedia/rust 66ms -> 41ms. 2014-10-24 08:25:10 +10:00
Patrick Walton
de5e2fd5e2 layout: Shrink fragments down from 448 bytes down to 128 bytes.
16% performance improvement in layout (!)
2014-10-23 09:13:41 -07:00
Clark Gaebel
b31f9e0188 properly incrementally set block size 2014-10-21 14:26:22 -07:00
Patrick Walton
bb6f557276 layout: Rewrite text and inline fragment handling during flow
construction to avoid cloning and moving flows so much.

Besides amounting to a 5%-10% win on a page with a lot of text, this
simplifies and refactors the text layout code.
2014-10-20 22:05:38 -07:00
Clark Gaebel
8496c056e7 Fixed the inline_element_border_a reftest with incremental layout turned on. 2014-10-17 11:11:14 -07:00
Patrick Walton
a6fcec468f layout: Remove FontStyle in favor of using the font style struct
directly, and optimize `get_layout_font_group()` to use a small vector.

Seems to be a 38% layout win on a site I tested with a lot of text.
2014-10-15 22:17:57 -07:00
Clark Gaebel
481adcd654 Fix whitespace_pre with incremental reflow turned on.
This implements fragment merging, in order to incrementally reflow linebroken
text. This makes the `whitespace_pre.html` reftest pass with incremental reflow
turned on with `-i`.
2014-10-15 16:04:21 -07:00
Glenn Watson
cf79e64a5a Improve acid2. Fix line height calculation. Text fragments get correct enclosing element style.
* Enabled acid2 on mac + linux. Updated the reference image. The only difference from the
real acid2 now is the paint order and a 1 pixel horizontal offset on the nose.
* Change line-height to be calculated correctly.
* Apply enclosing element style to text fragments.
2014-09-26 17:12:22 +10:00
Patrick Walton
d9f836bc75 Merge pull request #3458 from pcwalton/whitespace-nowrap
layout: Implement `white-space: nowrap`.
2014-09-23 20:22:33 -07:00
Patrick Walton
9aacd4c10c layout: Implement white-space: nowrap.
Improves the Reddit header.
2014-09-23 15:47:45 -07:00
Glenn Watson
0dd1b85739 Add support for small-caps font-variant.
Ref: 2554.
2014-09-23 14:21:41 +10:00
Keegan McAllister
dc86e83654 Eliminate warnings 2014-09-20 13:00:55 -07:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/layout/text.rs (Browse further)