Commit graph

62 commits

Author SHA1 Message Date
Manish Goregaokar
5447d2af3d remove more heapsize ignores 2015-06-03 07:14:20 +05:30
Corey Farwell
435e551753 Remove get_ prefix on getters
Part of #6224

I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
2015-06-02 08:54:44 -04:00
Corey Farwell
8e3f4bba85 Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Simon Sapin
8b522f2e7d Rename Au methods with f32/f64 instead of frac32/frac/subpx 2015-05-05 18:23:29 +02:00
Simon Sapin
32d5e24922 Replace Au-related free functions in util::geometry with Au methods. 2015-05-05 17:36:03 +02:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Ms2ger
903305416a Implement Clone for Copy types. 2015-04-28 23:31:10 +02:00
Ms2ger
6a55ae06d7 Remove some as_slice calls. 2015-04-24 17:44:47 +02:00
Glenn Watson
3815cb4a81 Remove unneeded assert (code below handles it) and a warning. Fixes #5230. 2015-04-10 09:55:59 +10: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
bors-servo
40fab8e362 auto merge of #5470 : bjwbell/servo/tab-in-pre, r=mbrubeck
Display tab characters as 4 spaces for pre and other elements that don't
compress whitespace.

Fixes https://github.com/servo/servo/issues/4651

@pcwalton r?
2015-04-03 04:18:42 -06:00
Bryan Bell
29852bb111 Show tabs in pre elements
Display tab characters as 8 spaces for pre and other elements that don't
compress whitespace.
2015-04-02 22:15:39 -07:00
Ms2ger
6d7dead4ef Use isize for CharIndex. 2015-04-02 14:45:49 +02:00
dhneio
069f53a25e Fix is_simple_advance check. Fixes #4614. 2015-04-01 12:11:56 -04:00
Ms2ger
43ed033eff Use isize/usize in range. 2015-03-28 15:36:36 +01:00
Ms2ger
ba87666cdb Update some code that's feature-gated under core. 2015-03-21 18:44:39 +01:00
Ms2ger
e25322ce5b Fix warnings in gfx. 2015-02-13 11:00:20 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Ms2ger
e2408355a7 Fix build warnings. 2015-02-03 18:22:27 +01:00
Patrick Walton
7934bf294d layout: Fix warnings. 2015-01-30 11:35:50 -08:00
Patrick Walton
5fdaba05a6 layout: Implement text-align: justify and text-justify per
CSS-TEXT-3 § 7.3.

`text-justify: distribute` is not supported.

The behavior of `text-justify: none` does not seem to match what Firefox
and Chrome do, but it seems to match the spec.

Closes #213.
2015-01-29 17:00:41 -08:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
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
Ms2ger
524966e3af Use std::cmp::Ordering explicitly. 2015-01-22 14:49:25 +01:00
Ms2ger
7eb659371d Stop calling is_not_null.
It has been removed from Rust.
2015-01-20 13:08:49 +01:00
Ms2ger
05c4e3b9f5 Stop using Vec::from_elem.
It is obsolete on Rust master.
2015-01-19 14:42:30 +01:00
Gilles Leblanc
9fe39951b0 Write a macro or syntax extension to generate OpenType tags
Fixes #4556
2015-01-15 20:01:40 -05:00
Glenn Watson
c8e3d13821 Update png/harfbuzz, use prefixed symbol names. 2015-01-13 14:34:11 +10: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
be5e9b4278 Remove some obsolete formatting traits. 2015-01-04 11:59:51 +01:00
Ms2ger
121904dd89 Slice some fixed-size arrays. 2015-01-04 11:59:50 +01: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
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
Simon Sapin
bf4480bb79 Simplify util::range::RangeIndex to always require std::num::Int,
and fix remaining warnings.
2014-12-18 11:34:23 +00:00
Simon Sapin
084a63df45 Remove usage of the deprecated std::num::Zero trait. 2014-12-18 11:16:47 +00:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Patrick Walton
6943ddb93e layout: Implement overflow-wrap/word-wrap per CSS-TEXT § 6.2.
This property is used by approximately 55% of page loads.

To implement the line breaking behavior, the "breaking strategy" has
been cleaned up and abstracted. This should allow us to easily support
other similar properties in the future, such as `text-overflow` and
`word-break`.
2014-12-13 13:05:05 -08: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
Tetsuharu OHZEKI
f04c64f500 Replace almost "render" to "paint" words in gfx crate. 2014-12-08 14:55:30 +09:00