Commit graph

98 commits

Author SHA1 Message Date
Glenn Watson
339a3f869b Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
Matt Brubeck
569b434023 Fix shaping of tab characters with Harfbuzz 1.0
Harfbuzz now renders tabs with a "missing character" glyph by default, so we
need to filter them out ourselves after computing an advance.
2015-09-29 14:34:51 -07:00
Matt Brubeck
371e6897e1 Break text runs by unicode script 2015-09-29 14:34:49 -07:00
Matt Brubeck
062493fac6 Upgrade to the new harfbuzz-sys crate 2015-09-29 14:34:48 -07:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Patrick Walton
757e2cf4e5 layout: Reformat some long lines and fix some whitespace issues. 2015-09-17 13:31:17 +02:00
Patrick Walton
af8fcdf073 gfx: Fix a minor typo. 2015-09-17 13:31:16 +02:00
Patrick Walton
53f47e74db gfx: Remove some useless calls to drop during HarfBuzz shaping. 2015-09-17 13:31:14 +02:00
Patrick Walton
dc26511ff3 gfx: Properly create continuation glyph entries for ligatures. 2015-09-17 13:31:09 +02:00
Patrick Walton
c62d8292c7 gfx: Add a Debug impl for GlyphStore instances.
Gecko has a `Dump()` routine in a similar spirit.
2015-09-17 13:31:08 +02:00
bors-servo
b05f4aa3aa Auto merge of #7559 - ddrmanxbxfr:RFC-0344-Work, r=nox
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server

Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values. 

I hope I didn't rename too much. 

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559)
<!-- Reviewable:end -->
2015-09-12 18:29:56 -06:00
Mathieu Rheaume
7320433cca Remove 'get_*' on getters as per RFC 0344 on various components 2015-09-12 20:14:01 -04:00
bors-servo
c838259383 Auto merge of #7527 - bjwbell:simd_advance_for_char_range, r=metajack
Use SIMD in fast path for advance_for_char_range

In advance_for_char_range add a fast SIMD code path for the the common
case where there are no detailed glyphs.


r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7527)
<!-- Reviewable:end -->
2015-09-09 16:55:16 -06:00
Bryan Bell
0c99b7e6a9 Add fast SIMD code path in advance_for_char_range
In advance_for_char_range add a SIMD code path for the the common
case of no detailed glyphs.

- gfx/Cargo.toml
  Add simd dependency https://github.com/huonw/simd

- servo/Cargo.lock
  Add simd dependency https://github.com/huonw/simd @
  d9ad79d86eab50a8f36d45fe17aa9e3a533389ee.

- SIMD isn't used on non-x86_65/aarch64 architectures.
2015-09-09 15:20:20 -07:00
Manish Goregaokar
8e2c37a542 Fix match_refs and let_returns in layout, address review changes 2015-09-04 18:30:46 +05:30
Manish Goregaokar
e94df1ed5c Remove needless returns 2015-09-04 09:13:48 +05:30
Matt Brubeck
afafb0b71c Implement get_table_for_tag on FreeType
Also fixes use-after-free of FontTable buffers.
2015-09-03 13:35:44 -07:00
bors-servo
60c72f601c Auto merge of #7475 - wilmoz:checkBracesSpaces, r=jdm
Make test-tidy check that braces have spaces before or after them

https://github.com/servo/servo/issues/7413
Posible future/past bug fixed in components/script/timers.rs

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7475)
<!-- Reviewable:end -->
2015-08-31 13:18:23 -06:00
wilmoz
64ac4f175f Make test-tidy check that braces have spaces before or after them 2015-08-31 12:30:55 -05:00
Matt Brubeck
5f126ff301 Remove unnecessary adapt_character_flags call 2015-08-28 11:14:52 -07:00
Matt Brubeck
4d32e8b20e Rearrange remaining bits of GlyphEntry 2015-08-28 11:14:50 -07:00
Matt Brubeck
9d4f5880d3 Remove unused glyph flags 2015-08-28 11:14:49 -07:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04: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
Josh Matthews
039929da5c Warning police.
Closes #6949.
2015-08-04 15:16:15 +02:00
bors-servo
d77f9415c5 Auto merge of #6937 - mbrubeck:hb_funcs, r=glennw
Store Harfbuzz callback functions in a static var

r? gw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6937)
<!-- Reviewable:end -->
2015-08-03 22:40:35 -06:00
Matt Brubeck
47a0d494ec Make Harfbuzz font_funcs static 2015-08-03 15:30:46 -07:00
Matt Brubeck
f8e92b2b01 Implement the unicode-bidi property 2015-08-03 14:12:33 -07:00
Matt Brubeck
dfac8ce4a1 Basic support for bidirectional text 2015-07-23 20:05:55 -07:00
Patrick Walton
6eacb0c995 gfx: Make display lists serializable using serde.
This commit introduces the `serde` dependency, which we will use to
serialize messages going between processes in multiprocess Servo.

This also adds a new debugging flag, `-Z print-display-list-json`,
allowing the output of display list serialization to be visualized.
This will be useful for our experiments with alternate rasterizers.
2015-07-15 19:04:17 -07:00
Matt Brubeck
e0d98acabc Remove dead code from gfx/text 2015-07-14 14:32:45 -07:00
Ms2ger
ce4d442941 Move away from the repeat().take().collect() pattern.
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
2015-07-14 16:19:30 +02:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
Corey Farwell
5c408d2be9 rust-geom API changes
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
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