Commit graph

281 commits

Author SHA1 Message Date
Corey Farwell
4f47b41fa7 Remove fnv & smallvec crate reexports from util
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.

These indirect dependencies through the util component are unnecessary.

This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.
2015-06-10 07:14:55 -07:00
bors-servo
8236221acf Auto merge of #6280 - glennw:transform-transitions, r=nox
Also tidy up some of the ComputedMatrix code.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6280)
<!-- Reviewable:end -->
2015-06-09 16:32:54 -06:00
Glenn Watson
6dd082278d Partial implementation of transform animations spec.
Also tidy up some of the ComputedMatrix code.
2015-06-10 07:07:28 +10:00
Manish Goregaokar
1be7f565e4 Audit and reduce unstable usage in script
Reasons behind existing unstable features:

alloc:

 - `Rc.make_unique()` _everywhere_

core:

 - `intrinsics::discriminant_value` for a small optimization. Not sure what's happening here

hash:

 - `Hasher.write_u16` (recently redesigned)
2015-06-10 01:24:03 +05:30
Eduard Burtescu
00e8e5f77d Use the correct log crate and setup env_logger in main. 2015-06-06 23:20:40 +03:00
Corey Farwell
a14c745a6a Bump rust-url version: 0.2.16 → 0.2.35 2015-06-04 16:45:15 -04:00
bors-servo
610de77e23 Auto merge of #6251 - glennw:fix-overflow, r=nox
This fixes layers being created with a 3x3 overflow that's not needed.

This exposes https://github.com/servo/servo/issues/6250, so update the affected reftest to use ahem font until it is fixed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6251)
<!-- Reviewable:end -->
2015-06-04 03:53:14 -05:00
Glenn Watson
958adc0f2b Only count outline width in overflow calculation if outline style is active.
This fixes layers being created with a 3x3 border that's not needed.

This exposes https://github.com/servo/servo/issues/6250, so update the affected reftest to use ahem font until it is fixed.
2015-06-04 13:30:52 +10:00
Manish Goregaokar
13b4bcfbb7 Remove all Arc-less ignores, force reasons, ignore_heap_size_of 2015-06-03 07:14:21 +05:30
Manish Goregaokar
5447d2af3d remove more heapsize ignores 2015-06-03 07:14:20 +05:30
bors-servo
05212b702d Auto merge of #6214 - glennw:parse-transforms, r=pcwalton
* Add parser support for 3d transforms.
 * Change ComputedMatrix to a representation that suits interpolation.
 * Switch stacking contexts to use 4x4 matrices.

The transforms themselves are still converted to 2d and handled by azure for now, but this is a small standalone part that can be landed now to make it easier to review.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6214)
<!-- Reviewable:end -->
2015-06-02 19:56:17 -05:00
Simon Sapin
595c726f51 Revert "Add support for 'padding-box' value for 'box-sizing' property (fixes #6032)"
This reverts commit 945adabd48.

The CSS Working Group resolved to drop this value from the spec:
http://log.csswg.org/irc.w3.org/css/2015-05-20/#e555680

The group was unable to come up with even a theoretical use case.
Gecko only implemented this value for completeness.
Other browsers vendors have clearly expressed they have no interest
in implementing this.
2015-06-02 15:31:59 +02:00
Glenn Watson
f47ba6fd33 First step towards 3d transforms.
* Add parser support for 3d transforms.
 * Change ComputedMatrix to a representation that suits interpolation.
 * Switch stacking contexts to use 4x4 matrices.

The transforms themselves are still converted to 2d and handled by azure for now, but this is a small standalone part that can be landed now to make it easier to review.
2015-05-29 09:47:38 +10: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
53c32cdc78 Remove usage of the mod_path compiler plugin.
https://github.com/rust-lang/rust/pull/20179 makes its use case much weaker.
2015-05-22 10:08:38 +02:00
Matt Brubeck
52ff175279 Enable 'direction' without --experimental 2015-05-19 11:42:43 -07:00
bors-servo
9f2079f6ba Auto merge of #6067 - Jinwoo-Song:backgroundclip, r=pcwalton
This property determines the background painting area, which determines the area
within which the background is painted.

Spec: http://dev.w3.org/csswg/css-backgrounds-3/#background-clip

Fixes #6066.

r? @pcwalton 
cc @yichoi

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6067)
<!-- Reviewable:end -->
2015-05-15 22:05:05 -05:00
Jinwoo Song
a51d5de860 Implement 'background-clip' property in CSS3 Background
This property determines the background painting area, which determines the area
within which the background is painted.

Spec: http://dev.w3.org/csswg/css-backgrounds-3/#background-clip

Fixes #6066.
2015-05-16 09:43:46 +09:00
bors-servo
68d135e671 Auto merge of #6033 - Jinwoo-Song:boxsizing_paddingbox, r=pcwalton
Spec: http://dev.w3.org/csswg/css-ui/#valdef-box-sizing-padding-box

Currently, only Firefox is supporting this value.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6033)
<!-- Reviewable:end -->
2015-05-15 09:42:18 -05:00
Jinwoo Song
b1b22c0c53 Implement 'background-origin' property in CSS3 Background
This property determines the background positioning area, that is the position of
the origin of an image specified using the 'background-image' CSS property.

'background-origin' is ignored when background-attachment is fixed.

Spec: http://dev.w3.org/csswg/css-backgrounds-3/#background-origin

Fixes #6045.
2015-05-15 10:02:58 +09:00
Jinwoo Song
945adabd48 Add support for 'padding-box' value for 'box-sizing' property (fixes #6032)
Spec: http://dev.w3.org/csswg/css-ui/#valdef-box-sizing-padding-box
Currently, only Firefox is supporting this value.
2015-05-14 09:11:43 +09:00
bors-servo
398e7f07fe Auto merge of #6019 - Ms2ger:preshint-border, r=pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6019)
<!-- Reviewable:end -->
2015-05-12 14:47:49 -05:00
Mike Blumenkrantz
082479344f fix Stylist::add_quirks_mode_stylesheet() to not panic when resources cannot be loaded 2015-05-12 13:45:48 -04:00
Mike Blumenkrantz
1cf5dd212c fix Stylist::new() to not panic when resources cannot be loaded 2015-05-12 13:45:47 -04:00
Ms2ger
69f92596ca Move table border to the new infrastructure. 2015-05-12 14:18:58 +02:00
Ms2ger
8b0505930f Move textarea cols/rows to the new infrastructure. 2015-05-12 09:14:42 +02:00
Ms2ger
f571a69b2e Move table/td width to the new infrastructure. 2015-05-12 09:14:40 +02:00
Ms2ger
0c8e55bff1 Move input size to the new infrastructure. 2015-05-11 23:43:58 +02:00
Ms2ger
83f4b077eb Move table cellspacing to the new infrastructure. 2015-05-11 23:43:56 +02:00
Patrick Walton
4b9cd4e65d layout: Implement <table width> and <center>.
Improves Hacker News.
2015-05-11 12:53:45 -07:00
Ms2ger
34e35df986 Move get_attr and get_attrs into TElementAttributes.
These methods are only called on LayoutElement.
2015-05-10 18:26:06 +02:00
bors-servo
0872ed922f Auto merge of #5940 - pcwalton:inline-margins, r=glennw
Improves the Google SERPs.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5940)
<!-- Reviewable:end -->
2015-05-07 19:10:31 -05:00
Patrick Walton
b17b90c8df layout: Implement inline margins.
Improves the Google SERPs.

We mark `html/rendering/replaced-elements/images/space.html` as failing.
This test tested whether `<img hspace>` and inline margins do the same
thing. Since this was trivially the case before (since we implemented
neither) and now is not, this test now fails.
2015-05-07 16:25:05 -07:00
Patrick Walton
be8a5a2939 layout: Don't rerun selector matching unless we need to when resizing
the window.
2015-05-07 15:48:14 -07:00
Simon Sapin
0d226722b7 Deduplicate some dependencies.
This uses some dependencies from crates.io instead of git
where the crates.io copy was already used in some other part
of the dependency tree, so we had two copies of the same library.

The `android_glue` crate is the only one left where we have two copies,
but solving that is more tricky since we hard-code a path in
`components/servo/.cargo/config`.
2015-05-07 01:56:49 +02:00
James Gilbertson
3f006f96b2 Move parsing of @viewport rules in a stylesheet behind --experimental.
This is for parsing of the rule within a stylesheet only. <meta name=viewport> could create a viewport rule and add it to the list of stylesheets for the page (like quirks mode).
2015-05-06 09:18:57 -06:00
James Gilbertson
226b757789 Convert remaining CSS values types to use AllowedNumericType when parsing numbers 2015-05-06 00:34:34 -06:00
James Gilbertson
138596e861 Constrain the viewport & zoom when reflowing 2015-05-06 00:34:33 -06:00
James Gilbertson
8977316d3e Implement constraining as per DEVICE-ADAPT § 6
Spec: http://dev.w3.org/csswg/css-device-adapt/#constraining
2015-05-05 21:04:27 -06:00
James Gilbertson
3b14c07051 Implement parsing of an @viewport rule 2015-05-05 21:01:31 -06:00
Simon Sapin
b1ecba9f3d Use i32 instead of isize in Au methods. 2015-05-05 18:40:00 +02: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
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Matt Brubeck
81e8f18662 Support text-align: start and end 2015-04-29 07:07:58 -07:00
bors-servo
1e150140bd Auto merge of #5480 - SimonSapin:multicol, r=pcwalton
This add some properties to the style system and a new flow type, but the larger issues of dealing with fragmentation in the flow tree is still an open question.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5480)
<!-- Reviewable:end -->
2015-04-28 19:48:45 -05:00
Simon Sapin
cc4749373a Add MulticolFlow and use it for multicol elements.
It currently "inherits" from BlockFlow and does not override anything.
2015-04-29 02:29:33 +02:00
Simon Sapin
f30cd4f377 Add column-width, column-count, columns and column-gap properties in the style system. 2015-04-29 02:29:32 +02:00
Ms2ger
903305416a Implement Clone for Copy types. 2015-04-28 23:31:10 +02:00
bors-servo
1cb012fc50 Auto merge of #5857 - Ms2ger:preshints, r=pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5857)
<!-- Reviewable:end -->
2015-04-28 03:24:14 -05:00
Patrick Walton
4d46d257cd Address review comments 2015-04-27 17:12:08 +02:00