James Graham
79e548905e
Enable resetable and String prefs.
...
This allows both boolean and string-type preferences. It
also implements a system where prefs that are read from a
configuration file can be reset back to their initial value,
which is useful in a number of cases e.g. when running tests
to ensure that each test starts with the same values for
the prefs.
2015-09-25 00:58:48 +01:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Manish Goregaokar
3c969b346a
Upgrade rust to f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev.
2015-09-23 14:44:59 +02:00
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
Philipp Hartwig
c2db10217c
Use computed display
property for hypothetical box of root element
...
The root element should never be treated as an inline element by the
flow construction.
Closes #7558 .
2015-09-18 23:08:10 +02:00
Hugo Thiessard
6565e7b02f
Issue #7390 correct the order of mod declaration
2015-09-18 22:02:04 +02:00
Simon Sapin
feaf6f4c3f
Initial support for custom properties in CSSStyleDeclaration
2015-09-17 14:48:56 +02:00
Simon Sapin
d56ea10770
var() substitution: insert /**/ between tokens that would be parse as one token.
2015-09-17 14:48:20 +02:00
Simon Sapin
81dd1ab363
Record first and last token type of custom property values.
2015-09-17 14:48:19 +02:00
Simon Sapin
389d537451
Look for var() in a non-custom property declaration after a parse error.
2015-09-17 14:48:17 +02:00
Simon Sapin
70ea5f61a2
Don’t ignore input at the end of a declaration with var().
2015-09-17 14:48:16 +02:00
Simon Sapin
54ef8055ec
The function name var() is case-insensitive.
2015-09-17 14:48:15 +02:00
Simon Sapin
ab9e1af206
Allow whitespace-only custom property values.
2015-09-17 14:48:14 +02:00
Simon Sapin
c7622bf22f
Fix !important in custom properties.
...
Test changes are also in https://github.com/w3c/csswg-test/pull/847/files
2015-09-17 14:48:13 +02:00
Simon Sapin
4abe7cdf97
Support var() in shorthands.
2015-09-17 14:48:12 +02:00
bors-servo
8f0b702018
Auto merge of #7642 - bjwbell:shorthand-parse-elliptical-border-radius, r=jdm
...
gfx: Add elliptical border-radius shorthand parsing
Adds support for parsing shorthand border-radius values such as:
/* 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;
r? @pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7642 )
<!-- Reviewable:end -->
2015-09-16 10:13:52 -06:00
bors-servo
6a12f00d6d
Auto merge of #7605 - nox:skew, r=mbrubeck
...
Implement "transform: skew()"
Thanks to @Jinwoo-Song for the original commit, which I just rebased and cleaned up. Fixes #6237 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7605 )
<!-- Reviewable:end -->
2015-09-16 06:31:48 -06: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
Ms2ger
9faa2de0fc
Use static atoms in some places.
2015-09-14 10:33:16 +02:00
Jinwoo Song
d524601cf5
CSS 'transformation: skew()' should take <angle> type as parameters
...
Current implementation is taking <number> type as parameter so skew()
does not work properly. Let the skew() to get <angle> as specification
described.
Fixes #6237 .
2015-09-12 01:06:35 +02:00
Anthony Ramine
f11fcebd9c
Bump euclid to 0.2
2015-09-12 01:06:26 +02: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
bors-servo
9d42179900
Auto merge of #7545 - jgraham:get_pref_option, r=jdm
...
Update prefs API to return an Option<bool>.
This allows for situations where there is no reasonable default
to apply for the pref value e.g. when we are just listing values
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7545 )
<!-- Reviewable:end -->
2015-09-04 11:02:12 -06:00
James Graham
a208379f46
Update prefs API to return an Option<bool>.
...
This allows for situations where there is no reasonable default
to apply for the pref value e.g. when we are just listing values
2015-09-04 15:55:29 +01:00
bors-servo
c2c2646d37
Auto merge of #7536 - Manishearth:clippyfix, r=Ms2ger
...
More clippy fixes
Elided almost all the lifetimes and removed needless returns. Mostly done by sed + manual fixes.
r? @nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7536 )
<!-- Reviewable:end -->
2015-09-04 07:59:04 -06: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
Manish Goregaokar
35dd1816a9
Improve style in properties.mako.rs
2015-09-04 08:16:32 +05:30
bors-servo
05deb3dcc8
Auto merge of #7518 - servo:custom-properties, r=pcwalton
...
Initial support for CSS Custom Properties
https://drafts.csswg.org/css-variables/
Missing:
* `var()` in shorthand property declarations.
* Correct handling of EOF in custom property declarations.
r? @pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7518 )
<!-- Reviewable:end -->
2015-09-03 16:09:02 -06:00
Simon Sapin
c651c2f3db
Remove obsolete FIXME comment.
...
See https://lists.w3.org/Archives/Public/www-style/2015Jul/0360.html
2015-09-03 23:02:25 +02:00
Simon Sapin
a9db4eef14
Factor out custom property name parsing.
2015-09-03 23:02:24 +02:00
Simon Sapin
b4fdb5d803
Substitute var() in longhand property declarations.
2015-09-03 23:02:22 +02:00
Simon Sapin
b2ee828520
[T]::position_elem is deprecated.
2015-09-03 23:02:22 +02:00
Simon Sapin
1d47857be9
Invalid at computed-value time customp properties get their inherited value.
2015-09-03 23:02:21 +02:00
Simon Sapin
a18a1a8d79
Add a FIXME comment of EOF handling in custom properties.
2015-09-03 23:02:20 +02:00
Simon Sapin
c3b8b39437
An empty <declaration-value> is invalid.
2015-09-03 23:02:19 +02:00
Simon Sapin
4bf28417b4
Make custom property substitution do less work.
...
When var() is substituted, record that result rather than re-compute it later.
2015-09-03 23:02:18 +02:00
Simon Sapin
1c1a9379a3
Substitute var() in custom properties at computed value time.
2015-09-03 23:02:17 +02:00
Simon Sapin
7bcf9f0c9a
Use nested parsers as appropritate
2015-09-03 23:02:16 +02:00
Simon Sapin
5fb6acb753
Rename DeclaredValue::SpecifiedValue to DeclaredValue::Value
2015-09-03 23:02:15 +02:00
Patrick Walton
ee8741b7a8
layout: Fix several bugs relating to inline borders, padding, and
...
margins.
* The code that attempted to strip out borders that span multiple
fragments in the same element could go wrong if fragments were
stripped out due to text clumping or whitespace stripping. This patch
rewrites that code to maintain flags in the inline fragment context
specifying whether the node is the beginning or end of the element.
Not only is this easier to maintain, it's closer in spirit to what roc
originally suggested two years ago: it's isomorphic to "begin element,
end element" markers for inline layout.
* Padding and margins for spans containing inline-blocks are now
properly handled via a division of labor between the `InlineBlock`
fragment and the `BlockFlow` that represents the inline-block.
* Unscanned text fragments may not be joined together into a text run if
borders, padding, or margins separate them.
Because Servo now matches the rendering of Gecko and WebKit on the
`input_button_margins_a` reftest, I had to modify it to add some
vertical alignment.
The combined effect of all of these fixes places "Advertising" on the
right place on google.com.
2015-09-03 10:24:59 -07: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
97422ad252
Various fixes in style
2015-09-03 03:16:00 +05:30
Manish Goregaokar
840e4c90d5
Fix match_ref_pats issues in values.rs
2015-09-03 03:15:46 +05:30
Manish Goregaokar
768cc79146
Various fixes in stylesheets
2015-09-03 03:15:16 +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
3fcd8938f3
Support CSS-wide keywords in custom properties
2015-09-02 18:32:38 +02:00