Commit graph

23 commits

Author SHA1 Message Date
Eli Friedman
3a451ff845 Add support for pre-wrap and pre-line values for white-space.
This is mostly straightforward.  I had to modify a couple of places
which were accidentally discarding whitespace.

Fixes #1513.
2015-10-20 10:44:51 -07:00
Patrick Walton
ae378a8c3e layout: Rewrite whitespace stripping.
This patch makes Servo unconditionally strip whitespace before text run
scanning (assuming that the `white-space` property allows it). Whitespace
stripping during reflow is now only used for handling whitespace at the ends of
lines; reflow now never attempts to handle ignorable whitespace.

Many CSS tests pass now. There are some new failures, however.

The following reference tests now fail due to a pre-existing bug whereby
whitespace is used to calculate the position of inline hypothetical boxes for
elements with `display: inline; position: absolute`:

* `absolute-replaced-height-036.htm`
* `vertical-align-sub-001.htm`
* `vertical-align-super-001.htm`

The following reference tests fail due to a pre-existing bug whereby we don't
handle `font-size: 0` properly in inline reflow:

* `font-size-zero-1.htm`
* `font-size-zero-2.htm`

The following reference test fails due to the fact that it relied on our
incorrect insertion of whitespace to make room for the black background:

* `inline-formatting-context-007.htm`
2015-08-11 11:42:20 -07:00
Matt Brubeck
f8e92b2b01 Implement the unicode-bidi property 2015-08-03 14:12:33 -07:00
Matt Brubeck
e0d98acabc Remove dead code from gfx/text 2015-07-14 14:32:45 -07:00
Ms2ger
903305416a Implement Clone for Copy types. 2015-04-28 23:31:10 +02:00
Patrick Walton
6d61468160 layout: Simplify and improve the correctness of whitespace stripping in
text layout, and unify the inline layout paths for pre- and
normally-formatted text.

This fixes a lot of "jumpiness" and removes the `new_line_pos` stuff.

Closes #2260.
2015-04-08 14:29:23 -07:00
bors-servo
83d9ab3ba5 Auto merge of #5571 - jdm:gfx_uint, r=Ms2ger
r? @Ms2ger
2015-04-08 03:06:09 -05:00
Simon Sapin
e0b98a35c4 Move gfx unit tests to the unit_tests crate. 2015-04-07 16:37:12 -04:00
Josh Matthews
a68fa74f4b Remove int_uint feature from gfx. 2015-04-07 11:58:28 -04:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Gilles Leblanc
9fe39951b0 Write a macro or syntax extension to generate OpenType tags
Fixes #4556
2015-01-15 20:01:40 -05:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Ms2ger
67eafea8ef Reformat the transform_text tests. 2014-12-30 10:11:40 +01:00
Ms2ger
767d0e11bf Cleanup the transform_text tests. 2014-12-28 12:03:25 +01:00
Ms2ger
aa18c84f0c Re-enable two transform_text unit tests.
Note that I had to change some expectations to make them pass.
2014-12-27 16:14:32 +01:00
Manish Goregaokar
e973213606 gfx: to_string() -> into_string() 2014-12-27 14:48:35 +01:00
Tetsuharu OHZEKI
a590012322 gfx: Remove glob imports added in #4405 2014-12-19 00:54:50 +09:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10: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
Patrick Walton
cdc59fe68a gfx: Fix imprecision in float_to_fixed.
Improves text rendering a lot.
2014-10-01 22:07:50 -07:00
Ms2ger
3a9e51ea17 Remove redundant into_string() calls. 2014-09-23 22:42:09 +02:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/gfx/text/util.rs (Browse further)