Anthony Ramine
cc030df36e
Make use of From<String> for Atom
2016-02-24 17:52:13 +01:00
Anthony Ramine
db8d502f41
Move util::logical_geometry to style
2016-02-18 10:17:13 +01:00
bors-servo
f0d4c03bd9
Auto merge of #9636 - nox:mv-cursor, r=Ms2ger
...
Move util::cursor to style_traits
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9636 )
<!-- Reviewable:end -->
2016-02-16 16:50:20 +05:30
Anthony Ramine
290694b27e
Move util::cursor to style_traits
2016-02-16 00:50:01 +01:00
David Raifaizen
8fa82f611c
Adding warning to properties.mako.rs regarding the Mako parser mangling Rust code
2016-02-14 12:23:53 -05:00
Glenn Watson
b954432b60
Ensure that text nodes don't inherit opacity.
2016-02-02 14:40:47 +10:00
Simon Sapin
6fd46b5e6a
Update cssparser.
...
https://github.com/servo/rust-cssparser/pull/91
2016-01-21 17:58:03 +01:00
Bobby Holley
384cdfcfff
Hoist ParseErrorReporter into style and remove the dependency on msg.
...
The pipeline id stuff is currently unused. If someone needs it, they can add
an additional trait bound on their css error reporter to get the pipeline id.
2016-01-11 18:01:48 -08:00
Manish Goregaokar
46a9c92b70
Avoid whitespace collapse for text inputs ( fixes #8772 )
2016-01-03 13:18:26 +05:30
bors-servo
ebf4ce8288
Auto merge of #9070 - antrik:debug-fonts, r=nox
...
Derive Debug for more font-related types
Needs to pull in newer ipc-channel and azure.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9070 )
<!-- Reviewable:end -->
2016-01-03 08:11:57 +05:30
Olaf Buddenhagen
3c5a3ca4ff
Derive Debug for more font-related types
2016-01-03 02:54:55 +01:00
David Raifaizen
d942bfb474
Enabled use of FontFamily enum type and replaced plain string parameters with enum
2015-12-30 18:21:37 -05:00
Patrick Walton
74d5170dda
style: Stop cloning error reporters all the time during cascading, and
...
outline the custom property handler into a slow path.
2015-12-14 13:57:01 -08:00
GauriGNaik
fc81276c8e
Add pipeline information to CSS error reporting.
2015-12-14 11:18:30 -05:00
GauriGNaik
afdc60fa57
Make log_css_error in parser.rs take a &ParserContext argument and call this method
2015-12-02 16:03:04 -05:00
GauriGNaik
996e9e06b2
Defined new trait ParseErrorReporter and added error_reporter member to ParserContext
2015-11-25 18:28:30 -05:00
Alan Jeffrey
3dec6edd10
Update string_cache to 0.2.
...
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
bors-servo
6449cd09eb
Auto merge of #8542 - KiChjang:style-whitespace-methods, r=SimonSapin
...
Extend whitespace::T with additional helper methods
Fixes #8128 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8542 )
<!-- Reviewable:end -->
2015-11-23 23:39:07 +05:30
Keith Yeung
7de7cb4786
Extend whitespace::T with additional helper methods
2015-11-20 11:05:36 -08:00
Glenn Watson
f555e3861c
Include transform changes in list that cause incremental reflows.
...
Also ensure that 3d translations get layers.
Fixes #8329 .
2015-11-18 10:28:37 +10:00
Simon Sapin
40e6cc118e
Detect var() in shorthand declarations.
2015-11-06 23:01:54 +01:00
Simon Sapin
6ed5b561df
Derive more Debug impls.
2015-11-06 23:01:12 +01:00
Simon Sapin
886459de6b
Fix serialization of shorthands pending var() substitution.
2015-11-06 23:01:11 +01:00
Simon Sapin
020d03b656
Custom properties: handle premature EOF correctly.
2015-11-06 23:01:10 +01:00
Simon Sapin
69d398f29a
Update to rust-cssparser 0.4.0
2015-11-05 08:57:01 +01:00
Simon Sapin
80dbd29528
counter-reset defaults to 0, not 1.
2015-11-04 10:55:16 +01:00
Simon Sapin
75bc88b3d4
Counter names serialize as identifiers, not strings.
2015-11-04 10:29:25 +01:00
bors-servo
5070c873d0
Auto merge of #8111 - gilles-leblanc:issue-8002, r=SimonSapin
...
Compute value of float according to position value
According to CSS2 Section 9.7, if 'position' has a value of 'absolute'
or 'fixed' the computed value of 'float' should be 'none'.
This changes the float to a single_keyword_computed which checks the
positioned value of the element to compute the float value.
Fixes #8002
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8111 )
<!-- Reviewable:end -->
2015-11-03 21:39:32 +05:30
David Zbarsky
00980ea595
Implement calc expressions for more value types
2015-11-01 23:16:14 -08:00
Gilles Leblanc
725484d619
Compute value of float according to position value
...
According to CSS2 Section 9.7, if 'position' has a value of 'absolute'
or 'fixed' the computed value of 'float' should be 'none'.
This changes the float to a single_keyword_computed which checks the
positioned value of the element to compute the float value.
Fixes #8002
2015-10-23 20:56:52 -04:00
Eli Friedman
3a451ff845
Add support for pre-wrap and pre-line values for white-space.
...
This is mostly straightforward. I had to modify a couple of places
which were accidentally discarding whitespace.
Fixes #1513 .
2015-10-20 10:44:51 -07:00
bors-servo
0f8493a566
Auto merge of #7918 - nox:partialeq-font, r=mbrubeck
...
Derive PartialEq on the style Font structure
We check the hash first.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7918 )
<!-- Reviewable:end -->
2015-10-10 12:26:07 -06:00
bors-servo
ab42ca4296
Auto merge of #7825 - eefriedman:div-align, r=mbrubeck
...
Fully implement the "align descendants" rule for div.
This adds -servo-left and -servo-right to complement -servo-center.
~~This intentionally doesn't try to address issue #7301.~~ Commit added to address #7301 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7825 )
<!-- Reviewable:end -->
2015-10-08 12:20:55 -06:00
Anthony Ramine
6d6dbf0129
Derive PartialEq on the style Font structure
...
We check the hash first.
2015-10-08 00:32:58 +02:00
Eli Friedman
69ca066802
Fully implement the "align descendants" rule for div.
...
This adds -servo-left and -servo-right to complement -servo-center.
This intentionally doesn't try to address issue #7301 .
2015-10-02 12:53:20 -07:00
Corey Farwell
74e4c4fdc7
Implement size attribute for <font> element
2015-09-30 22:51:30 -04:00
Glenn Watson
339a3f869b
Split Au type into separate crate, with minimal dependencies.
2015-10-01 07:16:11 +10:00
bors-servo
45a0c48efd
Auto merge of #7711 - aopicier:root_layout, r=pcwalton
...
Use computed `display` property for hypothetical box of root element
Closes #7558 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7711 )
<!-- Reviewable:end -->
2015-09-27 17:03:58 -06:00
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
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
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
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