Commit graph

38 commits

Author SHA1 Message Date
Simon Sapin
5405fb0d73 Use FamilyName instead of FontFamily in @font-face
… to exclude generic families, per spec:
https://drafts.csswg.org/css-fonts/#font-family-desc
2017-02-02 19:37:31 +01:00
bors-servo
d03039757c Auto merge of #14588 - servo:log-font-face, r=jdm
Add logging to font-face loading.

<!-- 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/14588)
<!-- Reviewable:end -->
2016-12-14 21:29:10 -08:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Ms2ger
476a209c45 Add logging to font-face loading. 2016-12-14 17:28:56 +01:00
Ms2ger
d485bbec09 Implement Display for LowercaseString. 2016-12-14 17:28:07 +01:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Ms2ger
953fa89463 Use fetch_async in the font cache. 2016-11-02 16:15:18 +01:00
Ms2ger
44c80d5b18 Ignore the Content-Type header completely for @font-face.
This matches the previous default (network.mime.sniff off) behaviour in all
but one case: we will now accept a font without a `Content-Type` header, which
would previously have been ignored.
2016-11-02 16:15:15 +01:00
Glenn Watson
acfdfd2fa9 Remove old rendering backend.
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.

The use_webrender option has been removed, however I've left
the "-w" command line option in place so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.

Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
2016-10-18 10:21:27 +10:00
Ms2ger
1a2db0b327 Privatize PendingAsyncLoad. 2016-10-04 13:24:03 +02:00
bors-servo
a82d5106bd Auto merge of #12076 - jdm:font-load, r=pcwalton
Make font template data load fallible

Remove a TODO around dealing with a failed file operation.

Can we write an automated test for this? I don't really know what font template data is, but this failure seems to be fontconfig-specific...

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12037
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12076)
<!-- Reviewable:end -->
2016-09-19 09:14:55 -05:00
Keegan McAllister
6cbf9e75df Sanitise web fonts
Fixes #3030.
2016-08-22 16:10:31 +02:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
Anthony Ramine
dc3c469085 Use expect calls to investigate #12540 and #12288 2016-08-08 16:53:34 +02:00
Rahul Sharma
1e6293ea1d Integrate service worker manager thread 2016-07-16 23:29:44 +05:30
bors-servo
3679b0a328 Auto merge of #12208 - nox:fontloading, r=metajack
Continue loading font-face sources on missing local font

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12208)
<!-- Reviewable:end -->
2016-07-06 10:16:23 -07:00
Josh Matthews
fb943ab54b Make font template data load fallible. Fixes #12037. 2016-07-05 10:02:40 -04:00
bors-servo
e3eeb643f0 Auto merge of #12237 - hgallagher1993:servo, r=jdm
Avoid many uses of unwrap in font_cache_thread.rs

Replaced `result.send(...blah...).unwrap()` with `let _ = result.send(...blah...);` in `components/gfx/font_cache_thread.rs`

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12188

- [X] These changes do not require tests because @jdm said if it compiles it's good enough

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12237)
<!-- Reviewable:end -->
2016-07-05 00:06:44 -07:00
Hugh Gallagher
267f96e731 avoid many uses of unwrap in font_cache_thread.rs 2016-07-05 07:59:25 +01:00
Anthony Ramine
74a4d76bb1 Continue loading font-face sources on missing local font 2016-07-04 09:52:36 +02:00
Corey Farwell
22928f50ac Refactor util::prefs operations to be methods on static struct. 2016-07-02 16:43:39 -04:00
Anthony Ramine
b97c7a8c4d Don't load all font faces sources
We stop at the first one we manage to load.
2016-06-10 21:51:06 +02:00
Ms2ger
c2e8916168 Move LowercaseString near its only consumer. 2016-06-06 08:54:35 +02:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Rahul Sharma
3766cd1673 adding interface for custom responses 2016-05-20 12:11:56 +05:30
Zhen Zhang
a51db4cfa8 Implement trait-based ResourceThreads and clean up related naming issues
Changes include:

- Introduce an IpcSend trait to abstract over a collection of IpcSenders
- Implement ResourceThreads collection to abstract the resource-related
  sub threads across the component
- Rename original ResourceThread and ControlMsg into an unifed CoreResource__
  to accommodate above changes and avoid confusions
2016-05-20 08:00:16 +08:00
Bobby Holley
b521c293dc Add string_cache override for geckolib based on gecko atoms.
The work in these patches is based on Ms2ger's gecko-atom crate.
2016-05-18 11:33:38 -07:00
Emilio Cobos Álvarez
f6434a9790
gfx: Add expect messages to FontCacheThread::exit()
One of these two unwraps is the one that is causing most occurrences
of #8815.

I'd go with removing the second unwrap entirely, but let's get some
debug info first, since it might probably be a race.
2016-05-13 01:15:35 +02:00
Patrick Walton
479c6c9c42 gfx: Perform fuzzy matching on font weights if an exact match wasn't
found.

Partially addresses #190.
Partially addresses #9487.
2016-05-10 10:34:28 -07:00
Patrick Walton
2ac9747023 gfx: Map sans-serif to Helvetica on Mac, DejaVu Sans on Linux, and
Roboto on Android.

This matches what I believe the OS native defaults to be.

Partially addresses #9487.
2016-05-09 12:45:52 -07:00
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
Ravi Shankar
5e6f32a59b Propagating the load errors from network loader 2016-04-20 12:38:35 -04:00
Corey Farwell
07209c75db Rename net.mime.sniff pref to network.mime.sniff.
Gecko uses the `network` prefix for network related items. Might be good
to mirror that here.
2016-04-17 16:15:24 -04:00
Anthony Ramine
cc030df36e Make use of From<String> for Atom 2016-02-24 17:52:13 +01:00
Glenn Watson
c0531c312f Add WebRender integration to Servo.
WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
2016-02-18 10:35:29 +10:00
Brandon Fairchild
dce7c7bb69 Remove multiple unused imports in gfx
Fixes #9342.
2016-01-16 14:16:03 -05:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Renamed from components/gfx/font_cache_task.rs (Browse further)