Commit Graph

76 Commits

Author SHA1 Message Date
Matt Brubeck
3b39a53a78 servo: Merge #12291 - Bail out gracefully on malformed kern table headers (from mbrubeck:font-panic); r=Wafflespeanut
This changes a debug assert to a debug log and early return.

---
<!-- 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 fix #12081 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I'm just removing an assertion

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

Source-Repo: https://github.com/servo/servo
Source-Revision: b3c58f25ef9b9c503dcdbbc74883f702c8494531
2016-07-07 11:54:11 -07:00
Ms2ger
4264bd5479 servo: Merge #11619 - Some cleanup in gfx (from Ms2ger:freetype); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: d768ee5d4c2ef0429e88191f01f977338c964359
2016-06-05 06:57:18 -05:00
Cullen Rhodes
2bd22f97ce servo: Merge #11329 - Report use statements that use {} with only one entry (from c-rhodes:11320); r=jdm
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 --faster` does not report any errors
- [X ] These changes fix #11320  (github issue number if applicable).

Either:
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f9796fa696e9514280777398467696dd4f004b3
2016-05-27 07:11:17 -05:00
Matt Brubeck
88b9e1fcd2 servo: Merge #11273 - Add a fast path for shaping ASCII text (from mbrubeck:fast-shape); r=pcwalton
On both my Linux laptop and iMac, this is about twice as fast as Harfbuzz text shaping on https://en.wikipedia.org/wiki/Barack_Obama.

I haven't tested this on any high-DPI (retina) displays, and I'm not 100% certain that the font unit scaling is correct there.

Depends on servo/core-text-rs#50.

Source-Repo: https://github.com/servo/servo
Source-Revision: c0c70ef0946da25ce31c44037f4a5ff2028b9aee
2016-05-20 17:58:23 -07:00
Patrick Walton
b6bde70e16 servo: Merge #11103 - gfx: Map CSS normal font weight to Regular font weight on the Mac (from pcwalton:mac-font-matching); r=metajack
This series of commits fixes #9487, and improves the look of nytimes.com among others.

r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd9c5583455b873fca1c95b2784f969870073bd
2016-05-10 14:11:35 -07:00
Patrick Walton
969a1ef5d7 servo: Merge #10937 - gfx: Map sans-serif to Helvetica on Mac and DejaVu Sans on Linux (from pcwalton:mac-helvetica); r=metajack
This matches what I believe the OS native defaults to be.

Partially addresses #9487.

r? @metajack
cc @paulrouget

Source-Repo: https://github.com/servo/servo
Source-Revision: 180a9813aa5ecce0a3013cdd30c1ef99ed1d1f6d
2016-05-09 13:02:23 -07:00
Patrick Walton
a7b88944ec servo: Merge #10493 - gfx: Clamp the font size we supply to Core Text to 0.01pt (from pcwalton:inline-font-size-zero); r=mbrubeck
Core Text treats a font size of 0.0 as 12.0, which is obviously not what
we want.

Improves Twitter.
Improves Reddit /r/rust.

Closes #10492.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 65120756c06ee2d0357cca6357e30694a0ec6559
2016-04-12 04:10:37 +05:01
Anthony Ramine
ace9b5c608 servo: Merge #10055 - Bump serde to 0.7 (from servo:serde); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 7a9dc577617b442ff0fe07eaa683207234c519ee
2016-03-17 17:58:36 +05:01
Glenn Watson
c6d5efc75f servo: Merge #9589 - Add WebRender integration to Servo (from glennw:webrender); r=pcwalton
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!

Source-Repo: https://github.com/servo/servo
Source-Revision: ab07b06823ea9748a6091aee2281495f86f00bce

--HG--
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/clear.fs.glsl
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/debug_color.fs.glsl
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/mask.fs.glsl
2016-02-19 00:25:06 +05:01
Anthony Ramine
c0e4adbd32 servo: Merge #9622 - Bump heapsize to 0.3 (from nox:heapsize); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: a164176876bb6abccf729eb5d6334e3c22230103
2016-02-13 18:21:41 +05:01
Anthony Ramine
08f5c3da70 servo: Merge #9532 - Say farewell to in-tree HeapSizeOf (from nox:dedup-heapsize); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 2a6707ce58df27d93e865bffb6b44d396b810c99
2016-02-05 03:11:36 +05:01
Lars Bergstrom
5d2bc22040 servo: Merge #9385 - Win32 support (from larsbergstrom:win32); r=frewsxcv,pcwalton,jdm,ecoal95
r? @frewsxcv for python stuff
r? @pcwalton for the "remove usage of Gaol" stuff for Win32
r? anybody else for misc cargo.lock updates, etc.

This replaces #7878.

This works best with https://github.com/servo/mozjs/pull/71, too, to enable static linking, but can be run without (via some PATH hackery).

The instructions are here, and will be added to a .md file in the repo once the mozjs changes also land:
https://hackpad.com/Servo-on-Windows-C1LPcI2bP25

I'd like to get these changes landed because I've been rebasing them for months, they're otherwise quite stable, and don't affect our other platforms and targets.

Source-Repo: https://github.com/servo/servo
Source-Revision: 525e77f64fc65ea2397b4ff3849f5b1f39386698
2016-01-23 06:58:27 +05:01
Matthew Kuo
0e37316f1a servo: Merge #9352 - Convert private types to public (from mattkuo:cleanup-private-types); r=nox
fixes #9347

Source-Repo: https://github.com/servo/servo
Source-Revision: 380541bd48bb7ce0b36a8be90f756734e531ca5f
2016-01-18 01:29:01 +05:01
Johannes Linke
38405ee47e servo: Merge #9123 - Fix a bunch of clippy lints (from karyon:clippy_cleanup); r=Manishearth
This fixes about 130 clippy lints. Let me know if i should split up the commit.

I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)

There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.

cc @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 9da739acefc7d1776bf727c8bf782eb79f241028
2016-01-03 08:47:34 +05:01
Olaf Buddenhagen
c17165f0d9 servo: Merge #9013 - Derive Debug for FontGroup and Homu is a bully (from antrik:debug-fontgroup); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6490d1e1c59c6de3d7ef030c209ad33e22bc6b26
2015-12-18 13:54:15 +05:01
Alan Jeffrey
f4ab2bfdb5 servo: Merge #8667 - Update string cache (from asajeffrey:update-string-cache); r=SimonSapin
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 188fa9378c103093f1f8dac24bff0d9d237fd2bc
2015-11-25 23:41:39 +05:01
Michael Wu
64aafda294 servo: Merge #8552 - Avoid overflow in freetype/font_context.rs (from michaelwu:avoid_overflow); r=glennw
When new_actual_size < old_actual_size, there is an overflow panic since we're using usize. This breaks Reddit for me.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8950345e0e2c803cfa87105374dfdb30a550cfe0
2015-11-17 12:35:47 +05:01
Corey Farwell
7ef53c6ece servo: Merge #7987 - Fix issues found by rust-clippy (from frewsxcv:clippy); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: eb7039d04d4c83800ba9d92dc251222f79b83040
2015-10-12 18:33:30 -06:00
Glenn Watson
40d2827806 servo: Merge #7795 - Split Au type into separate crate, with minimal dependencies (from glennw:app-units-crate); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 35888e5a1d48511ec54ddf8c58f1c7b0c47c5d3c
2015-09-30 15:19:33 -06:00
Glenn Watson
5f3d6b85ab servo: Merge #7766 - A few clean ups for Au type (from glennw:au-tidy); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 007c22737df0f002203ca4e42b56afff7d4e1661
2015-09-28 11:35:04 -06:00
Ravi Shankar
7d512d50d1 servo: Merge #7698 - sorted the declarations in various files (from Wafflespeanut:sorting); r=frewsxcv
This is a direct extract from my abandoned PR for a lint (#7546), along with some rather clumsy modifications (only on `components/script/dom/mod.rs` and `components/style/lib.rs`), because I had to sort some of the files again to make peace with tidy, which hasn't been educated about sorting yet!

Source-Repo: https://github.com/servo/servo
Source-Revision: a7208869f2903e36f9b2f540b55b50283d7df466
2015-09-23 15:02:56 -06:00
Manish Goregaokar
a0f53e1f0e servo: Merge #7697 - Rust upgrade to rustc 1.5.0-dev (6217b002b 2015-09-21) (from servo:rustup_20150921); r=Ms2ger
Snapshot doesn't exist yet. Rust master+ should work.

Also https://github.com/serde-rs/aster/pull/33 hasn't merged yet.

r? @Ms2ger @larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: f7f16870bebdc9359661544054259b37780f1331
2015-09-23 06:45:18 -06:00
Brandon Fairchild
f7fb1e4b4a servo: Merge #7662 - Check for multiple import blocks separated by whitespace (from nerith:import); r=frewsxcv
Fixes #7381.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0d3c9223f09757124b1520c4f17e94fa8bbe249
2015-09-19 13:34:51 -06:00
Mathieu Rheaume
fe567c36c0 servo: Merge #7559 - Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server (from ddrmanxbxfr:RFC-0344-Work); r=nox
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: b05f4aa3aa3085e65cb75433ae37bf272216d033
2015-09-12 18:29:56 -06:00
Matt Brubeck
2393e84084 servo: Merge #7443 - Implement get_table_for_tag on FreeType (from mbrubeck:get_table); r=pcwalton
Updates freetype to pick up servo/rust-freetype#37

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 0ad284766b3f12097dce1e5858b5d07e870478eb
2015-09-03 14:37:38 -06:00
erneyja
c4747f6c7e servo: Merge #7468 - Making test-tidy check that = have space after them (from JoshTheGoldfish:Issue7460); r=jdm
For issue #7460. Need to ensure compatibility with #7390.

Source-Repo: https://github.com/servo/servo
Source-Revision: 15de679f115f06a8ce33625d77e820b049730d4b
2015-09-01 08:33:02 -06:00
Matt Brubeck
b58fd6468e servo: Merge #7434 - Remove unused font shaping code and flags (from mbrubeck:drop-table); r=pcwalton
r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 108251bece897b96a8b205df22e7d3e790979331
2015-08-31 12:20:49 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
Josh Matthews
6a81d499fc servo: Merge #7203 - Add automated style nit checks to test-tidy (from jdm:style); r=Ms2ger
Expands on the work by @wilmoz and cleans up the existing errors. Closes #7180. Closes #7111.

Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
2015-08-16 08:37:40 -06:00
Corey Farwell
a038876aad servo: Merge #6867 - Utilize match guard; make methods more similar (from frewsxcv:match-guard-and-similar); r=jdm
Make the structure for the `stretchiness` and `boldness` methods more
similar

Source-Repo: https://github.com/servo/servo
Source-Revision: 55a9abdf358dd8f05b06849f0d39b4e8ca8f6ba3
2015-08-12 22:13:16 -06:00
Patrick Walton
eec46242dc servo: Merge #6981 - gfx: Fix Core Text font instantiation for Web fonts on Mac (from pcwalton:github-font-fallback); r=metajack
r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: 11acfbc29fd3412c18b6bf62e51faef5c2435fd3
2015-08-05 06:11:36 -06:00
Patrick Walton
a214f0c03f servo: Merge #6795 - Send display lists over IPC in multiprocess mode (from pcwalton:display-list-e10s-fixes); r=glennw
This patch set introduces the `--multiprocess` (`-M`) switch. Right now, all it does it cause display lists to be serialized, but eventually it will cause actual processes to be spawned.

r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: c4480b5d0309acc7f154166b91992f73a85de57f
2015-07-31 09:43:40 -06:00
Huon Wilson
f1c5de846f servo: Merge #6852 - Avoid undefined behaviour by allocating with align 1 (from huonw:fix-alignment); r=pcwalton
The allocation APIs require that the alignment is a power-of-two;
meaning 1 is the "I don't care" alignment, not 0.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3792bd7611df7343c1bad6119a07bd14296c9ba6
2015-07-30 12:35:26 -06:00
Patrick Walton
f2de86fd3c servo: Merge #6583 - gfx: Make display lists serializable using serde (from pcwalton:serializable-display-list); r=metajack
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.

r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: ef9715203edf0a280d019b6e8823666f0e7020be
2015-07-15 14:04:55 -06:00
Glenn Watson
0a5cf5ac60 servo: Merge #6606 - Use atoms for font template structures (from glennw:font-atoms); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: c3fc943c6627b0248e1e61b106a964131209cb6d
2015-07-12 10:29:33 -06:00
Ms2ger
8e614a31b9 servo: Merge #6474 - Use the heap module through its facade in libstd (from Ms2ger:alloc); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: e6db6ae61f3962b17b6e6b3af6249037484fdf0e
2015-06-26 15:26:25 -06:00
Ms2ger
99cf771646 servo: Merge #6464 - Use Box::into_raw rather than boxed::into_raw (from Ms2ger:into_raw); r=saneyuki
The latter is deprecated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9eb3cc2a241dff4df57d644fa5257fcf3a52325f
2015-06-26 04:50:54 -06:00
Nicholas Nethercote
679452a543 servo: Merge #6309 - Instrument FreeType allocations (from nnethercote:instrument-freetype); r=glennw
This will allow reporting of memory usage by FreeType instances, which
are measured in the MiBs for LayoutWorker threads.

This change also makes FreeType allocations happen with jemalloc instead
of the system malloc, which is a good thing.

Finally, the change documents some dubiousness involving
FontContextHandle.

Source-Repo: https://github.com/servo/servo
Source-Revision: fdeebf86a1424e9fffa122efa08fe397f6e7cd7d
2015-06-10 16:53:55 -06:00
Corey Farwell
a869e68c38 servo: Merge #6316 - Utilize if let instead of match in a few places (from frewsxcv:if-let); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6e0d0072b83bade910a6c2a0dee06d94f6f9fb17
2015-06-10 03:11:13 -06:00
Corey Farwell
2196fc505a servo: Merge #6230 - Remove get_ prefix on getters (from frewsxcv:getters-get); r=nox
Part of #6224

I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`

Source-Repo: https://github.com/servo/servo
Source-Revision: f6fe1953343a417b62fb310a380af7c6973849b0
2015-06-02 08:17:03 -05:00
Nicholas Nethercote
e5ec07f5a0 servo: Merge #6202 - Freetype fixes (from nnethercote:freetype-fixes); r=jack
Because #6198 wasn't quite right.

Source-Repo: https://github.com/servo/servo
Source-Revision: dddd222d2967bcf29dbb29856ddd7265c83e4d08
2015-05-28 09:04:08 -05:00
Jinwoo Song
aafaa7ed0d servo: Merge #6198 - Use FT_Done_Library instead of FT_Done_Freetype (from Jinwoo-Song:freetype); r=metajack
It is recommended to use FT_Done_Library with FT_New_Library
from freetype document.

Fixes #6191.

r? @jdm @nnethercote
cc @yichoi

Source-Repo: https://github.com/servo/servo
Source-Revision: af81db54790efbeb86ee03e6ca63fb9046c6111a
2015-05-27 21:06:12 -05:00
Corey Farwell
333cc6c59d servo: Merge #6174 - Reduce max line length from 150 to 120 characters (from frewsxcv:cleanup-long-lines); r=SimonSapin
Part of https://github.com/servo/servo/issues/6041

Source-Repo: https://github.com/servo/servo
Source-Revision: 542519ebfd073662bc9421ac5fa0aa01ebc0d6fe
2015-05-24 18:27:26 -05:00
Michael Wu
6b72c7862a servo: Merge #6143 - Avoid selecting bitmap fonts from fontconfig (from michaelwu:truetype-only); r=pcwalton
I have a number of pcf fonts installed. One of them is Adobe Helvetica, and it turns out many websites try to use Helvetica. This crashes servo.

Source-Repo: https://github.com/servo/servo
Source-Revision: 165bfd6d5f901ef2e2619dbcc010166106cebd0b
2015-05-20 02:36:43 -05:00
Ms2ger
ca69a28ef0 servo: Merge #5967 - Remove unused imports (from Ms2ger:warnings); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 0ec6d80b6ed61c6950b8e5f50d04f994f0021101
2015-05-07 03:50:17 -05:00
Simon Sapin
da599fc5b9 servo: Merge #5951 - Clean up the Au API (from SimonSapin:au-cleanup); r=mbrubeck
Fix #5943.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 1721cf45ed59306a69f3ade08feca065804c3804
2015-05-05 15:08:12 -05:00
Simon Sapin
95c8716656 servo: Merge #5935 - Upgrade Rust (from servo:rustup_2015-04-25); r=Ms2ger
r? everybody

Source-Repo: https://github.com/servo/servo
Source-Revision: 49aed6555dbc008c1a378c5cbb303f5467232b6b
2015-05-05 09:11:30 -05:00
Ms2ger
374d18472e servo: Merge #5827 - Use as_slice less (from Ms2ger:slice); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 79be3b967668e46a4289f4fc8fce2b4f457cab23
2015-04-24 12:12:53 -05:00
Ms2ger
3837dc8fef servo: Merge #5604 - Remove recently introduced int/uint use in gfx (from Ms2ger:int); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: acadb2b0c56d3a89174a4b0834142762f3ab6ca8
2015-04-08 20:33:17 -05:00
Josh Matthews
8be8eb016b servo: Merge #5571 - Remove int_uint feature from gfx (from jdm:gfx_uint); r=Ms2ger
r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 83d9ab3ba5c6a725632a954cf2b9f65832f89832
2015-04-08 03:06:09 -05:00