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
Simon Sapin
65d4ecaa39
Remove custom property declarations in dependency cycles.
2015-09-02 18:32:37 +02:00
Simon Sapin
09e60beb78
Add parsing of CSS Custom Properties.
2015-09-02 18:32:36 +02:00
bors-servo
a547ae6826
Auto merge of #7496 - servo:calc_, r=SimonSapin
...
Implement CSS3 Calc
This is #7185 with one commit added to make it build merged with master, which got support for the `ch` unit in the meantime.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7496 )
<!-- Reviewable:end -->
2015-09-02 02:33:18 -06:00
Simon Sapin
b51b7dd2ce
Fix ch/em confusion.
2015-09-02 10:14:00 +02:00
Simon Sapin
9f48dcd858
Fix font-size keywords parsing.
2015-09-02 09:54:38 +02:00
Simon Sapin
40b4348824
Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01)
2015-09-02 09:22:17 +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
bors-servo
940bcadc13
Auto merge of #7432 - jdm:dashedprops, r=nox
...
Add dashed CSS properties in CSSStyleDeclaration
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7432 )
<!-- Reviewable:end -->
2015-08-30 08:20:57 -06:00
Josh Matthews
b62d1a1c43
Add dashed CSS properties to CSSStyleDeclaration.
2015-08-28 13:15:17 -04:00
Josh Matthews
a3ee9b5dd9
Replace catch-all experimental flag with fine-grained boolean preferences initialized from a JSON document.
2015-08-28 10:30:04 -04: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
Simon Sapin
133d7c14a8
Make display: flex
experimental.
2015-08-21 15:59:20 -07:00