Commit graph

322 commits

Author SHA1 Message Date
Simon Sapin
4833204653 Support @font-face in user and user agent stylesheets. 2015-08-07 21:08:53 +02:00
Simon Sapin
9317a30b91 Add support for user stylesheets specified on the command-line. 2015-08-07 21:08:52 +02:00
Patrick Walton
ed4172b2c6 layout: Make sure anonymous table flows are statically positioned.
The failing `float-applies-to-*` CSS 2.1 tests never really should have
been passing in the first place; they depend on floats inside
fixed-layout tables working properly, which they don't.

Closes #6078.
Closes #6709.
Closes #6858.
2015-08-06 18:49:07 -07:00
Josh Matthews
8620fe5995 Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks. 2015-08-03 23:05:00 -04:00
Matt Brubeck
f8e92b2b01 Implement the unicode-bidi property 2015-08-03 14:12:33 -07:00
Glenn Watson
b9fea3deb3 Fix percentage height calculation, absolute containing block height calculations.
It's not possible to correctly determine during the css cascade whether the container height
is explicitly specified. Additionally, the spec https://drafts.csswg.org/css2/visudet.html#the-height-property
says this should affect the *used* height, rather than the computed height.

This significantly improves the layout in #6643.
2015-08-03 10:47:56 +10:00
Patrick Walton
9bd8edea4a script: Use Arc::make_unique instead of Arc::get_mut when updating
inline styles.

Transitions make the reasoning in the comment in the relevant sections
not true.
2015-08-02 09:10:17 -07:00
Patrick Walton
cac01edf80 style: Switch animation timestamps to be doubles instead of floats.
32-bit floats are not enough to hold timestamps since the epoch and
result in jank.
2015-08-01 17:46:39 -07:00
bors-servo
c6b043582b Auto merge of #6741 - servo:fix-setpropertypriority, r=pcwalton
Fix CSSStyleDeclaration::setPropertyPriority and some refactoring

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6741)
<!-- Reviewable:end -->
2015-08-01 15:00:06 -06:00
Patrick Walton
ad7bfa2289 style: Fix misdirected animation properties.
left redirected to top, and padding redirected to margin.
2015-08-01 10:23:41 -07:00
Patrick Walton
2aa5174246 script: Make the resource task communication use IPC channels. 2015-07-31 11:28:09 -07:00
Simon Sapin
80867917af Update rust-selectors and enable unstable features. 2015-07-31 17:36:43 +02:00
Simon Sapin
06ba62b012 Remove some PropertyDeclaration cloning. 2015-07-31 08:09:25 +02:00
Simon Sapin
d2bd070dc3 Refactor CSSStyleDeclaration::setProperty to not synthesize a name: value string to parse. 2015-07-31 08:09:24 +02:00
Simon Sapin
1033886409 Fix CSSStyleDeclaration.setPropertyPriority
Before, it was a complicated no-op. (`parse_style_attribute` expects
input like `a: b; c: d;`, when given just a name it return an empty
vector.)
2015-07-31 08:08:36 +02:00
Simon Sapin
1094ce202c Show Mako template errors on the console 2015-07-31 08:08:36 +02:00
bors-servo
acbca7b3aa Auto merge of #6798 - dzbarsky:gCS, r=pcwalton
Implement getComputedStyle

It's not quite done but can probably be reviewed anyway.
I still need to finish up a few of the ToCss impls, I just got lazy and wanted to make sure things worked.

The computation of the used values is definitely not right, I'm going to investigate that.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6798)
<!-- Reviewable:end -->
2015-07-29 18:48:45 -06:00
David Zbarsky
e484d6b5e3 Implement getComputedStyle 2015-07-29 20:17:50 -04:00
Glenn Watson
1963a5af51 Add ToCss serialization support for translation transforms.
Ref #6643.
2015-07-29 15:15:52 +10:00
bors-servo
a409699a0b Auto merge of #6796 - glennw:transform-translate-fix, r=pcwalton
Change transforms to use LengthOrPercentage.

This simplifies an upcoming PR to support serializing transform values for css style declarations.

Related to issue #6643.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6796)
<!-- Reviewable:end -->
2015-07-28 20:40:57 -06:00
Glenn Watson
c27388cb81 Change transforms to use LengthOrPercentage.
This simplifies an upcoming PR to support serializing transform values for css style declarations.

Related to issue #6643.
2015-07-28 09:42:05 +10:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
Patrick Walton
bb99b2f3c8 script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
2015-07-25 00:50:12 -07:00
Simon Sapin
055a1c5cee Update rust-selectors
Update for https://github.com/servo/rust-selectors/pull/37
2015-07-23 18:53:57 +02:00
Bogdan Cuza
681b11c08b Fix #6680 2015-07-22 16:45:43 +03:00
Bogdan Cuza
0baa6b477c Replace astersisks with appropriate versions in deps 2015-07-20 20:08:08 +03:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07:00
Patrick Walton
6eacb0c995 gfx: Make display lists serializable using serde.
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.
2015-07-15 19:04:17 -07:00
Simon Sapin
83d2a11d86 Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) 2015-07-15 00:46:43 +02:00
Ms2ger
a666d5faed Silence unused variable warnings in properties.rs. 2015-07-07 14:34:25 +02:00
Patrick Walton
5d8b213201 layout: Outline the individual property cascading functions to reduce
I-cache footprint.

Reduces the size of `properties::cascade` from over 100K of code to
under 5K. Due to the improved I-cache utilization, improves ARM scaling
on 4 cores by 15%.
2015-07-06 12:42:31 -07:00
Simon Sapin
75e3e787f6 Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03) 2015-07-04 11:32:41 +02:00
Simon Sapin
9e1a674b16 Update rust-selectors 2015-06-26 12:35:08 -07:00
Ms2ger
73a7e92bfd Update to rustc 2d0cbf3e3e25e092bd9e4c94d08e446b680869f0. 2015-06-25 20:02:36 +02:00
Glenn Watson
39ddbbb0e1 Implement enough of 3d transforms spec to run the CSS FPS demo. 2015-06-23 14:10:44 +10:00
Simon Sapin
fc25397c91 Update rust-selectors
https://github.com/servo/rust-selectors/pull/30
2015-06-20 07:05:43 +02:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
Glenn Watson
229dfbd117 Fix computed value of outline width when outline style is not set. 2015-06-18 12:13:14 +10:00
Simon Sapin
0229de822b Use string-cache from crates.io 2015-06-16 00:27:50 +02:00
Manish Goregaokar
94fa868d2b Add unsafe blocks to make_unique
See #6376
2015-06-14 20:52:27 +05:30
Corey Farwell
5c408d2be9 rust-geom API changes
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
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