Commit graph

606 commits

Author SHA1 Message Date
Anthony Ramine
290694b27e Move util::cursor to style_traits 2016-02-16 00:50:01 +01:00
Anthony Ramine
966da85791 Derive HeapSizeOf for GradientDisplayItem 2016-02-13 11:13:20 +01:00
Anthony Ramine
55dcee94be Bump heapsize to 0.3 2016-02-13 11:13:19 +01:00
Anthony Ramine
680c817d53 Bump url to 0.5.5 2016-02-13 00:08:12 +01:00
Anthony Ramine
874fa5595f Bump euclid to 0.6.2 2016-02-13 00:08:08 +01:00
Anthony Ramine
e2d9734609 Bump string_cache to 0.2.9 2016-02-13 00:08:06 +01:00
Anthony Ramine
2d6ac4da97 Bump app_units to 0.2.1 2016-02-13 00:08:05 +01:00
Anthony Ramine
c6262c368f Reorder dependencies in some Cargo.toml files 2016-02-13 00:08:04 +01:00
bors-servo
87aaa5ffe0 Auto merge of #9523 - ruud-v-a:hasher, r=Wafflespeanut
Upgrade to new Hasher API

This fixes #9494.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9523)
<!-- Reviewable:end -->
2016-02-05 07:32:13 +05:30
bors-servo
2a6707ce58 Auto merge of #9532 - nox:dedup-heapsize, r=Manishearth
Say farewell to in-tree HeapSizeOf

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9532)
<!-- Reviewable:end -->
2016-02-05 03:40:36 +05:30
Anthony Ramine
cb5cd8d881 Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
Anthony Ramine
1da19170d2 Bump string_cache to 0.2.7 2016-02-04 14:10:02 +01:00
bors-servo
647637193d Auto merge of #9512 - timvandermeij:feature-cleanup, r=frewsxcv
Remove old features 'clone_from_slice' and 'convert'

Fixes #9495.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9512)
<!-- Reviewable:end -->
2016-02-04 18:11:52 +05:30
Ms2ger
2ea9f2d028 Update Euclid. 2016-02-04 11:02:09 +01:00
Ruud van Asseldonk
95be0b9a25 Upgrade to new Hasher API 2016-02-03 20:06:39 +01:00
bors-servo
64ad9e17d9 Auto merge of #9498 - KiChjang:update-url, r=nox
Update rust-url

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9498)
<!-- Reviewable:end -->
2016-02-03 11:38:51 +05:30
Keith Yeung
9b23839394 Update rust-url 2016-02-02 20:04:01 -05:00
Tim van der Meij
a9472ede64 Remove old features 'clone_from_slice' and 'convert' 2016-02-03 00:55:13 +01:00
Ms2ger
2fd53c266e Use the select macro on the paint thread. 2016-02-01 17:40:58 +01:00
Patrick Walton
32a68a43ec Make hit tests against box shadows always fail.
Closes #9268.
2016-01-25 16:30:04 -08:00
Lars Bergstrom
e9d9d1d9e9 Cargo.lock updates 2016-01-22 19:28:46 -06:00
Lars Bergstrom
095658e098 Cargo updates and small workqueue change 2016-01-20 08:38:27 -06:00
Vladimir Vukicevic
025ed57c04 win32: use fontconfig/freetype on windows as well (for now) 2016-01-20 08:38:20 -06:00
bors-servo
380541bd48 Auto merge of #9352 - mattkuo:cleanup-private-types, r=nox
Convert private types to public

fixes #9347

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9352)
<!-- Reviewable:end -->
2016-01-18 01:58:01 +05:30
Matthew Kuo
8ecc120211 changed gfx private types to public 2016-01-17 04:48:32 -08:00
Brandon Fairchild
dce7c7bb69 Remove multiple unused imports in gfx
Fixes #9342.
2016-01-16 14:16:03 -05:00
bors-servo
3c6e16c9ad Auto merge of #9289 - mskrzypkows:move_FrameTreeId, r=KiChjang
Move FrameTreeId type to gfx_traits #9221

Fixes #9221.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9289)
<!-- Reviewable:end -->
2016-01-14 02:06:47 +05:30
Maciej Skrzypkowski
e52c53a7f2 Move FrameTreeId type to gfx_traits #9221 2016-01-13 13:36:28 +01:00
Ms2ger
86d3c576f2 Remove some unused extern crates. 2016-01-13 09:37:28 +01:00
John DeSilva
f32995543d Move Epoch to gfx_traits
Resolves #9222. Moved Epoch from components/msg/compositor_msg to
components/gfx_traits/lib. Updated use statements to reflect the move.
2016-01-10 17:36:52 -05:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Martin Robinson
d720452698 Use DisplayListSection everywhere
DisplayListSection, StackingLevel, and BackgroundAndBorderLevel all
represent pretty much the same thing, a particular section of the
display list. Instead of maintaining three enums which do the same
thing, just use DisplayListSection everywhere. It's a superset of the
other two and this change will make it easier to flatten the DisplayList
in the future for WebRender.
2016-01-08 10:19:03 -08:00
bors-servo
58111a6420 Auto merge of #9177 - pcwalton:filter-out-useless-clips, r=glennw
gfx: Eagerly transform clips into `ClippingRegion::max()` if possible.

This helps WebRender look for useless clips and optimize them out.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9177)
<!-- Reviewable:end -->
2016-01-08 21:24:45 +05:30
bors-servo
8e75a05e6b Auto merge of #9149 - adrianheine:webFonts, r=glennw
Correctly handle local sources for CSS3 fonts

Currently, servo panics for me when loading something like this:

```
@font-face {
  font-family: "test family";
  src: local(test font face);
}
```

That's due to a bug in `FontCacheTask`. `FontCacheTask` tries to get the value for the key
"test font face" from `self.web_families`, but previously initialized a value for the key "test family".

These two commits add an awkward test and fix the bug by not shadowing the variable `family_name`. Since the argument to `local()` should explicitly not be the name of a font family, the previous variable name was wrong and misleading anyways.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9149)
<!-- Reviewable:end -->
2016-01-08 04:47:55 +05:30
Patrick Walton
3103b03262 gfx: Eagerly transform clips into ClippingRegion::max() if possible.
This helps WebRender look for useless clips and optimize them out.
2016-01-06 19:48:14 -08:00
Patrick Walton
154f970b5b Remove the fontgroup address cache.
It's not clear to me that it actually helps. Moreover, it's wrong and
results in fonts randomly changing e.g. on GitHub when mousing over
elements.
2016-01-06 17:06:59 -08:00
Tetsuharu OHZEKI
574f934314 gfx: handle the ResponseAction::ResponseComplete error case in font_cache_task 2016-01-06 04:59:10 +09:00
Adrian Heine
4069645729 Don't shadow family_name
The argument to `local()` is not a font family, but the name of a
»single font face within a larger family« according to
http://www.w3.org/TR/css3-fonts/#src-desc.

The previous implementation of `FontCache::run` would panic if the argument to
`local()` would not be the name of a font family present in `self.web_families`.
That happened since `FontCacheTask` tried to use the argument to `local()` as a
key for `self.web_families`, although it previously correctly initialized a
value for the `family` field of the `AddWebFont` command.
2016-01-04 15:23:27 +01:00
bors-servo
9da739acef Auto merge of #9123 - karyon:clippy_cleanup, r=Manishearth
Fix a bunch of clippy lints

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9123)
<!-- Reviewable:end -->
2016-01-03 09:16:34 +05:30
bors-servo
ebf4ce8288 Auto merge of #9070 - antrik:debug-fonts, r=nox
Derive Debug for more font-related types

Needs to pull in newer ipc-channel and azure.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9070)
<!-- Reviewable:end -->
2016-01-03 08:11:57 +05:30
Olaf Buddenhagen
3c5a3ca4ff Derive Debug for more font-related types 2016-01-03 02:54:55 +01:00
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
Josh Matthews
20668da061 Accept all Content-Type values for fonts if sniffing is disabled. Restore the status quo. 2015-12-31 09:12:59 -05:00
Josh Matthews
afb4d90ad3 Send a response to font load initiators even when a font is ignored. 2015-12-31 07:45:50 -05:00
Josh Matthews
e17e553f04 Restrict font loads to known MIME types. 2015-12-31 07:45:48 -05:00
David Rajchenbach-Teller
1e81b8c133 Resolves #4183 - Implemementing context-based MIME type sniffing
The version of the standard is not finalized at the time of this writing.
Specifications may be found here: https://mimesniff.spec.whatwg.org/#context-specific-sniffing .
2015-12-31 07:45:03 -05:00
bors-servo
66c8aa8cda Auto merge of #8420 - craftytrickster:8371/generic-font-family, r=glennw
Enabled use of FontFamily enum type

https://github.com/servo/servo/issues/8371

In addition to replacing loose strings with the FontFamily enum in `font_cache_task.rs`, I also centralized the add_generic_font calls into one single function. If centralizing into one function is not desired or if anything else needs to be changed, please let me know.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8420)
<!-- Reviewable:end -->
2015-12-31 16:49:48 +05:30
David Raifaizen
d942bfb474 Enabled use of FontFamily enum type and replaced plain string parameters with enum 2015-12-30 18:21:37 -05:00
Bobby Holley
47059d2d26 Separate style+layout and layout-specific wrapper functionality.
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.

There's still more to do to make the style system usable standalone, but
this is a good start.
2015-12-29 11:50:03 -08:00
bors-servo
f77c792886 Auto merge of #9055 - simartin:issue_9042, r=Wafflespeanut
Issue #9042: Report incorrect number of spaces around => in the style checker

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9055)
<!-- Reviewable:end -->
2015-12-24 10:55:48 +05:30