Commit graph

74 commits

Author SHA1 Message Date
Glenn Watson
339a3f869b Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Corey Farwell
4898f34d95 Remove unnecessary allow(dead_code) function attributes 2015-09-21 18:53:04 -04:00
Michael Howell
554a4cf9f2 Add transitions for CSS calc().
Closes #7284
2015-09-19 19:39:55 -07:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Bryan Bell
48f1159845 gfx: Add elliptical border-radius shorthand parsing
Adds elliptical border-radius shorthand parsing, e.g.:

    /* The syntax of the second radius allows one to four values */
    /* (first radius values) / radius */
    border-radius: 10px 5% / 20px;

    /* (first radius values) / top-left-and-bottom-right | top-right-and-bottom-left */
    border-radius: 10px 5% / 20px 30px;

    /* (first radius values) / top-left | top-right-and-bottom-left | bottom-right */
    border-radius: 10px 5px 2em / 20px 25px 30%;

    /* (first radius values) / top-left | top-right | bottom-right | bottom-left */
    border-radius: 10px 5% / 20px 25em 30px 35em;
2015-09-15 16:51:17 -07:00
bors-servo
5bad6b1b6e Auto merge of #7502 - bjwbell:elliptical-borders, r=pcwalton
gfx: Add elliptical border radius support

TODO: Add code for parsing shorthand border-radius e.g. "border-radius: 10px 5% / 20px".

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7502)
<!-- Reviewable:end -->
2015-09-04 18:46:24 -06:00
Bryan Bell
3e5fb49b6f gfx: Add elliptical border radius support 2015-09-04 14:42:44 -07:00
João Oliveira
4a305d1e62 Add style_traits crate to improve crate separation,
closes #7353
2015-09-04 12:59:37 +01:00
Simon Sapin
24a6a53633 Fix or silence some warnings. 2015-09-04 10:11:57 +02:00
bors-servo
d01ab61734 Auto merge of #7519 - Manishearth:clippyfix, r=SimonSapin
Make style clippy-free

(except for properties.rs)

I might add more fixes to this PR later.

r? @SimonSapin

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7519)
<!-- Reviewable:end -->
2015-09-02 16:11:30 -06:00
Manish Goregaokar
840e4c90d5 Fix match_ref_pats issues in values.rs 2015-09-03 03:15:46 +05:30
bors-servo
3424e234c8 Auto merge of #7499 - nerith:style, r=metajack
Improve style nit check for space after a comma

Fixes #7345.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7499)
<!-- Reviewable:end -->
2015-09-02 12:05:58 -06:00
Simon Sapin
b51b7dd2ce Fix ch/em confusion. 2015-09-02 10:14:00 +02:00
Brandon Fairchild
d61a6e2161 Fix reported test-tidy errors
This fixes lines that were reported to have missing
space after a comma.
2015-09-01 16:30:42 -04:00
Simon Sapin
b30c4f70f9 Add support for the ch unit in calc() 2015-09-01 18:45:14 +02:00
Simon Sapin
80d471d5cf Merge branch 'master' into calc 2015-09-01 18:39:16 +02:00
Anthony Ramine
8ab6bea0f3 Implement the ch unit as 0.5em 2015-08-30 22:39:12 +02:00
David Zbarsky
cdae523cd4 Address review comments 2015-08-26 14:43:10 -07:00
David Zbarsky
5ac205b3e5 Clean up some stray lines 2015-08-26 14:15:10 -07:00
David Zbarsky
53e8f7d823 Get rid of some cloning 2015-08-26 14:15:09 -07:00
David Zbarsky
dcac654057 Use the type system to enforce that product nodes are simplified away 2015-08-26 14:15:07 -07:00
David Zbarsky
164af05ba9 Expand out nested products 2015-08-26 14:15:05 -07:00
David Zbarsky
f8bd7c46ae Fix some calc parsing panics 2015-08-26 14:15:03 -07:00
David Zbarsky
67db4fbc2e Remove stray changes 2015-08-26 14:15:01 -07:00
David Zbarsky
63d0429bed Simplify the calc AST simplification code 2015-08-26 14:14:59 -07:00
David Zbarsky
663e0f606c Simplify like terms in all sum expressions, not just toplevel calc 2015-08-26 14:14:58 -07:00
David Zbarsky
6573e8088c Properly serialize % values in calc expressions 2015-08-26 14:14:56 -07:00
David Zbarsky
cfa1e467f1 Clean up AST simplification code 2015-08-26 14:14:54 -07:00
David Zbarsky
64dc95436d Clean up serialization code a little 2015-08-26 14:14:52 -07:00
David Zbarsky
af4d2e910e Clean up serialization and other hacks 2015-08-26 14:14:50 -07:00
David Zbarsky
5df4b82a6b Implement font relative and viewport relative units for calc 2015-08-26 14:14:49 -07:00
David Zbarsky
2bb6b4582a Implement proper calc parsing 2015-08-26 14:14:47 -07:00
David Zbarsky
cb4d878169 Implement Calc for LengthOrPercentageOrAuto 2015-08-26 14:14:45 -07:00
David Zbarsky
9556141e57 Implement Calc for LengthOrPercentage 2015-08-26 14:14:43 -07:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
João Oliveira
0038580abf Replace uses of for foo in bar.iter() and for foo in bar.iter_mut()
closes #7197
2015-08-15 02:27:39 +01: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
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
David Zbarsky
e484d6b5e3 Implement getComputedStyle 2015-07-29 20:17:50 -04: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
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
Glenn Watson
39ddbbb0e1 Implement enough of 3d transforms spec to run the CSS FPS demo. 2015-06-23 14:10:44 +10:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02: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
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