Commit graph

352 commits

Author SHA1 Message Date
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
Simon Sapin
133d7c14a8 Make display: flex experimental. 2015-08-21 15:59:20 -07:00
Kyle Zentner
0488a36862 Create FlexFlow's for 'display: flex' nodes.
This commit doesn't implement any flexbox behavior at all.
It just constructs FlexFlow's, which act just like the BlockFlow from
which they "inherit."
2015-08-21 15:59:18 -07:00
Kyle Zentner
45b7ee9bdb Parse flex-direction CSS property. 2015-08-21 15:59:16 -07:00
bors-servo
a5fbb2f2a6 Auto merge of #7265 - tafia:tidy-use, r=Ms2ger
Add alphabetical order check for use statements

close #7112

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7265)
<!-- Reviewable:end -->
2015-08-20 07:43:56 -06:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
Theodore Kokkoris
f4178cd115 Combine transform-origin, perspective-origin code
Fix #7194.
2015-08-20 09:24:29 +03:00
Patrick Walton
c328c38804 layout: Make inline absolute hypothetical boxes not clip their contents.
Improves the logo on ebay.com.
2015-08-18 16:58:18 -07:00
João Oliveira
067a22a868 Replace uses of for foo in bar.iter(),
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)
2015-08-18 01:46:11 +01:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04: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
bors-servo
13e7de482c Auto merge of #7195 - servo:rustup_20150814, r=Ms2ger
Upgrade Rust to nightly 2015-08-10

Still needs snapshot.

Snapshot probably could also work as today's nightly (I wasn't able to download the latest one due to choppy internet), there isn't any plugins churn I know of

r? @larsbergstrom

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7195)
<!-- Reviewable:end -->
2015-08-14 12:53:54 -06:00
Manish Goregaokar
91bc14711d Upgrade Rust to nightly 2015-08-10 2015-08-15 00:21:33 +05:30
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
Patrick Walton
8fe2f8930c layout: Make inline margins on <input type=button> and friends apply
only to the button and not to the text inside.

Improves the Google home page.
2015-08-13 09:51:17 -07:00
Patrick Walton
8640cf5588 layout: Take relative position offsets for inlines and inline-blocks
into account only once.

There were two bugs here: (1) relative position applied to
scanned/unscanned text fragments independently of the container element
that applied that relative position, causing double-counting; (2)
relative position applied to inline block fragments independently of the
wrapped block itself, causing double-counting.

This commit also removes the `cascade_anonymous` function and the
related `Fragment` constructor. They were unused, and their
functionality has been replaced by the `modify_style_for_*` series of
functions.

Closes #7067.
2015-08-12 08:28:35 -07:00
Patrick Walton
6b32e5d7a7 servo: Update ipc-channel to pick up bincode support.
Large improvement in page load times, especially in debug builds.
2015-08-08 09:43:53 -07:00
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