Commit graph

1110 commits

Author SHA1 Message Date
Simon Sapin
7cf98f6b01 Fix deprecation warnings 2019-01-28 11:32:40 +01:00
Josh Matthews
9f855ae847 Update webrender. 2019-01-17 17:52:35 -05:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Josh Matthews
496e2f621d mac: Treat CT returning 0 glyph indexes as failing to find indexes. 2018-12-14 15:50:29 -05:00
Shotaro Yamada
c44a2febe6 Remove redundant .clone()s 2018-12-11 10:43:51 +09:00
bors-servo
482923cec2
Auto merge of #22221 - Eijebong:random-depup, r=nox
Update dependencies

Those are all easy and unrelated dependency updates, hence the single PR

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22221)
<!-- Reviewable:end -->
2018-11-27 11:27:54 -05:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Bastien Orivel
4ca3a5c092 Update packed_simd 2018-11-19 12:06:28 +01:00
Pyfisch
a0937023b5 Enable old glyph assertion
The assertion had a note that it should be enabled
when something like debug_assert is available.
2018-11-10 13:27:49 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
bors-servo
da2d9b2228
Auto merge of #22126 - pyfisch:autoformat, r=jdm
Enforce rustfmt on CI

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22126)
<!-- Reviewable:end -->
2018-11-07 08:47:57 -05:00
bors-servo
618a790050
Auto merge of #22074 - jdm:wrup, r=nox
Update webrender.

Fixes #22114.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22074)
<!-- Reviewable:end -->
2018-11-07 00:40:42 -05:00
Josh Matthews
1c5e4b3067 Update webrender to 790b76f1547453615262c3037e1fb04bda22fbc8. 2018-11-06 16:51:58 -05:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
095d446ccd Manually format remaining problems
Use line comments instead of block comments
as block comments contain trailing whitespace
after formatting with rustfmt.

Skip tests for malloc_size_of and script_plugins
with rustfmt as they have many block comments.
2018-11-06 22:30:31 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Simon Sapin
9f9bf8f6bc Switch most crates to the 2018 edition 2018-11-06 16:12:04 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
bors-servo
a59a80b301
Auto merge of #22028 - asajeffrey:debug-all-the-things, r=emilio
Add lots of derived Debug impls

<!-- Please describe your changes on the following line: -->

Add a bunch of derived `Debug` impls. After this, pretty much anything that implements `Deserializable` also implements `Debug`. The exception is `webrender_api::RenderApiSender`, which would need a webrender PR.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's just debugging

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22028)
<!-- Reviewable:end -->
2018-10-29 14:17:02 -04:00
Alan Jeffrey
05391e27cd Add lots of derived Debug impls 2018-10-29 09:21:37 -05:00
Alan Jeffrey
dab8f4a97f Support building for Magic Leap. 2018-10-29 08:49:41 -05:00
Josh Matthews
4e5b3bcf15 Fix windows build errors. 2018-10-11 22:34:33 -04:00
Josh Matthews
8a2eec2714 Use upstream font weight values for windows. 2018-10-09 18:23:20 -04:00
Josh Matthews
171469c27c Update webrender to 923ee495bd9b0fda8a4a94c5a6cf42e2f0548731. 2018-10-09 18:23:19 -04:00
Andre Bogus
34b5d8fbe8 This updates the smallvec crate and enables the union feature
We had a mix of 0.6.2 and 0.6.5 (which is the current release),
this unifies to the latest version. It also enables the union
feature which removes the discriminant, reducing memory usage.
2018-09-19 07:16:30 +02:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
Matt Brubeck
a77d05538b Switch from new-ordered-float back to ordered-float
The `new-ordered-float` fork has been merged back into the original
`ordered-float` crate.
2018-09-11 09:59:01 -07:00
kingdido999
c0da829e33 Reorder gfx lib creates 2018-09-08 14:24:56 +08:00
kingdido999
3a3c4b8c8e Format the rest of gfx #21373 2018-09-08 08:05:42 +08:00
kingdido999
aa4a8eb88d Format gfx text #21373 2018-09-07 10:49:07 +08:00
kingdido999
f8d850bf38 Fix comments indentation issue in gfx platform 2018-09-05 20:34:01 +08:00
kingdido999
c57c99d9f7 Format gfx platform #21373 2018-09-05 08:39:05 +08:00
Josh Matthews
4f596edcbf gfx: Make FontHandleMethods::family_name return an optional value. 2018-08-08 15:29:22 -04:00
Paul Rouget
0d9161dd7b WR update 2018-08-06 07:22:24 +02:00
Fernando Jiménez Moreno
1649b6a528 Fix build errors after rebase 2018-07-30 14:23:45 +02:00
Simon Sapin
1c0941ffc0 Use the packed_simd crate instead of std::simd
`std::simd` was removed in https://github.com/rust-lang/rust/pull/52535.
https://crates.io/crates/packed_simd is in the rust-lang-nursery org.
2018-07-27 22:44:14 +02:00
Bastien Orivel
9e446971a8 Update euclid to 0.18 2018-07-18 09:27:24 +02:00
Bastien Orivel
6354cd9a5e WIP: Dedupe dependencies 2018-07-16 08:59:15 +10:00
Simon Sapin
3c992af8a1 Remove debugging println from a year ago 2018-07-02 13:25:44 +02:00
Glenn Watson
823f3e2eb1 Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
Matt Brubeck
f6404f0ec2 Update dependencies to use new_debug_unrechable
Because reem/rust-debug-unreachable#6 makes `debug_unreachable` enable debug checks even in release builds since Rust 1.0.
2018-06-06 08:54:51 -07:00
Anthony Ramine
a553964123 Upgrade to rustc 1.28.0-nightly (524ad9b9e 2018-05-29)
Fixes https://github.com/servo/servo/issues/20844
2018-05-30 10:50:59 +02:00
Simon Sapin
266cb29788 Use std::simd instead of the simd crate 2018-05-24 17:39:38 +02:00
bors-servo
77dcc678fe
Auto merge of #20506 - jonleighton:font-fallback, r=emilio,mbrubeck
Font fallback

This implements more complete support for font fallback, see #17267.

r? @glennw @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20506)
<!-- Reviewable:end -->
2018-05-19 09:53:29 -04:00
Jon Leighton
3025a269ec FontContext: Cache data fetched from the cache thread
Before this change, if we needed to create a Font which we've already
created, but at a new size, then we'd fetch the FontTemplateInfo again.
If the bytes of the font are held in memory, then this could be
expensive as we need to pass those bytes over IPC.
2018-05-19 14:33:39 +10:00
Jon Leighton
dc683a1fc9 Linux: Don't hold onto bytes of system fonts
FontTemplateData gets passed over IPC during the communication between
FontContext and FontCacheThread. Serializing and deserializing these
bytes is expensive, so this change ensures that we only do that when the
bytes can't be read from disk. A similar strategy is already used on
macos and windows.

The performance problem was particularly noticeable after implenting
font fallback, where the content process would potentially work through
a list of fonts, trying to find one which contains a certain glyph. That
could result in lots of font bytes going over IPC.
2018-05-19 14:33:39 +10:00
Jon Leighton
691c6c6f1a Implement font fallback
Prior to this change, if none of the fonts specified in CSS contained a
glyph for a codepoint, we tried only one fallback font. If that font
didn't contain the glyph, we'd give up.

With this change, we try multiple fonts in turn. The font names we try
differ across each platform, and based on the codepoint we're trying to
match. The current implementation is heavily inspired by the analogous
code in Gecko, but I've used to ucd lib to make it more readable,
whereas Gecko matches raw unicode ranges.

This fixes some of the issues reported in #17267, although colour emoji
support is not implemented.

== Notes on changes to WPT metadata ==

=== css/css-text/i18n/css3-text-line-break-opclns-* ===

A bunch of these have started failing on macos when they previously
passed.

These tests check that the browser automatically inserts line breaks
near certain characters that are classified as "opening and closing
punctuation". The idea is that if we have e.g. an opening parenthesis,
it does not make sense for it to appear at the end of a line box; it
should "stick" to the next character and go into the next line box.

Before this change, a lot of these codepoints rendered as a missing
glyph on Mac and Linux. In some cases, that meant that the test was
passing.

After this change, a bunch of these codepoints are now rendering glyphs
on Mac (but not Linux). In some cases, the test should continue to pass
where it previously did when rendering with the missing glyph.

However, it seems this has also exposed a layout bug. The "ref" div in
these tests contains a <br> element, and it seems that this, combined
with these punctuation characters, makes the spacing between glyphs ever
so slightly different to the "test" div. (Speculation: might be
something to do with shaping?)

Therefore I've had to mark a bunch of these tests failing on mac.

=== css/css-text/i18n/css3-text-line-break-baspglwj-* ===

Some of these previously passed on Mac due to a missing glyph. Now that
we're rendering the correct glyph, they are failing.

=== css/css-text/word-break/word-break-normal-bo-000.html ===

The characters now render correctly on Mac, and the test is passing. But
we do not find a suitable fallback font on Linux, so it is still failing
on that platform.

=== css/css-text/word-break/word-break-break-all-007.html ===

This was previously passing on Mac, but only because missing character
glyphs were rendered. Now that a fallback font is able to be found, it
(correctly) fails.

=== mozilla/tests/css/font_fallback_* ===

These are new tests added in this commit. 01 and 02 are marked failing
on Linux because the builders don't have the appropriate fonts installed
(that will be a follow-up).

Fix build errors from rebase

FontTemplateDescriptor can no longer just derive(Hash). We need to
implement it on each component part, because the components now
generally wrap floats, which do not impl Hash because of NaN. However in
this case we know that we won't have a NaN, so it is safe to manually
impl Hash.
2018-05-19 14:33:36 +10:00
Josh Matthews
e7979380ba Revert "Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)"
This reverts commit 46ad811017.
2018-05-18 11:44:47 -05:00