Commit graph

352 commits

Author SHA1 Message Date
Ms2ger
524966e3af Use std::cmp::Ordering explicitly. 2015-01-22 14:49:25 +01:00
Simon Sapin
d034a6c6bc Port to the new cssparser.
https://github.com/servo/rust-cssparser/pull/68
2015-01-21 22:23:46 +01:00
Ms2ger
01ed338746 Move to to_owned rather than into_string.
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Bruno de Oliveira Abinader
dc008977f9 Share supported CSS properties between style and CSSStyleDeclaration
Avoids duplicated code when implementing the CSS properties accessors in
CSSStyleDeclaration WebIDL. Servo internal CSS properties are not
accessible.

CSS property "float" is unnacessible because we currently lack support
for BinaryName IDL annotation (#4435).

Fixes #4429, #4430.
2015-01-19 13:21:03 -04:00
Patrick Walton
97d3443003 layout: Implement mix-blend-mode per COMPOSITING § 3.4.1.
`background-blend-mode` is not yet supported because we don't support
multiple backgrounds yet.
2015-01-12 08:02:41 -08:00
Patrick Walton
15d60d7ea4 layout: Implement filter per CSS-FILTERS § 5.
`blur` and `drop-shadow` are not yet supported, because the
`text-shadow` PR makes some fundamental changes to blur rendering that
are needed first.
2015-01-09 07:26:13 -08:00
bors-servo
0793137631 auto merge of #4575 : mttr/servo/warnings, r=jdm
Notes:

* This adds `#![allow(missing_copy_implementations)]` to components/*/lib.rs. I'm not sure how to approach the missing Copy warnings (are there things for which Copy should NOT be implemented, and how can I tell?) so I stuck this in to make life easier when looking through the warnings. I can easily remove this if necessary. 
* This leaves the following type of warnings, which I couldn't figure out how to approach (I'll investigate it later if no one else wants to).
```
css/matching.rs:72:23: 72:35 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:72         this_as_query.equiv(other)
                                         ^~~~~~~~~~~~
css/matching.rs:95:10: 95:49 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:95 impl<'a> Equiv<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsCacheQuery<'a> {
```
2015-01-08 16:03:55 -07:00
bors-servo
4cd9eb1253 auto merge of #4574 : Ms2ger/servo/if_let, r=Manishearth
This feature is now supported unconditionally.
2015-01-08 14:42:53 -07:00
Patrick Walton
53b74ae853 layout: Implement text-rendering per SVG 1.1 § 11.7.4.
Like Gecko, we treat `geometricprecision` the same as
`optimizelegibility` for now.
2015-01-08 12:32:58 -08:00
Patrick Walton
af7cf26e76 layout: Implement outline-offset per CSS-UI-3 § 5.5. 2015-01-08 10:49:54 -08:00
bors-servo
a88e668091 auto merge of #4530 : pcwalton/servo/pointer-events, r=mbrubeck
SVG-only values are not yet supported.

r? @mbrubeck
2015-01-08 10:48:55 -07:00
Patrick Walton
0627d4c599 layout: Implement word-break: break-all per CSS3-TEXT § 5.2. 2015-01-08 09:04:24 -08:00
Matthew Rasmus
a3fc3a1581 Allow missing_copy_implementations 2015-01-08 08:51:11 -08:00
Patrick Walton
899c9429d0 layout: Implement pointer-events: none per SVG 1.1 § 16.6.
SVG-only values are not yet supported.
2015-01-08 08:32:26 -08:00
Ms2ger
5f31da82bd Remove if_let feature gates.
This feature is now supported unconditionally.
2015-01-08 17:26:06 +01:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Patrick Walton
bf540d590a layout: Explicitly thread border box dimensions and relative offsets
through display list building.

The old `flow_origin` concept was ill-defined (sometimes the border box
plus the flow origin, sometimes including horizontal margins and
sometimes not, sometimes including relative position and sometimes not),
leading to brittleness and test failures. This commit reworks the logic
to always pass border box origins in during display list building.
2015-01-04 17:43:05 -08:00
Ms2ger
3be587606f Import ast::ComponentValue more consistently. 2015-01-04 15:23:08 +01:00
Ms2ger
121904dd89 Slice some fixed-size arrays. 2015-01-04 11:59:50 +01:00
Ms2ger
af9a8bdc73 Stop using div_rem. 2015-01-04 11:59:50 +01:00
bors-servo
e8fac3681b auto merge of #4535 : servo/servo/pre-rustup_20141221, r=jdm
This prepares for the rust upgrade currently being conducted.
2015-01-03 14:39:46 -07:00
Ms2ger
fbf257f878 Remove obsolete attributes. 2015-01-03 10:06:17 +01:00
Ms2ger
d5c64f7f30 Remove dummy deriving attributes.
Traits cannot be derived for typedefs. The upcoming rust update will make
those attributes compilation errors.
2015-01-02 19:04:20 +01:00
Ms2ger
b51e83819d Fix obsolete format traits.
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
Ms2ger
b6117a57aa Replace the remaining to_string calls by into_string calls. 2014-12-31 10:34:44 +01:00
Simon Sapin
a29cb0e5d0 Move the define_css_keyword_enum macro to the style crate. 2014-12-29 21:52:12 +01:00
Simon Sapin
540d218885 Declare dependencies on text_writer.
Transitive dependencies being available is considered a bug:
https://github.com/rust-lang/cargo/issues/1037
2014-12-29 16:19:10 +01:00
Simon Sapin
b9a57531ea Remove some tabs
@jdm, can you configure your editor to not insert them in the first
place?
2014-12-29 16:19:09 +01:00
Simon Sapin
8be85c5e6b Implement ToCss for Cursor and de-duplicate variants and string values. 2014-12-29 16:19:09 +01:00
Simon Sapin
45a08c94a4 Implement ToCss for types in style::properties::common_values::specified 2014-12-29 16:19:09 +01:00
Simon Sapin
4a9d5b1130 Upgrade cssparser to a version with the new ToCss trait. 2014-12-29 16:19:09 +01:00
Manish Goregaokar
475ff4dcb7 style: to_string() -> into_string() 2014-12-27 14:48:35 +01:00
Patrick Walton
6b28965b94 layout: Implement clip per CSS 2.1 § 11.1.2.
Only the recommended, comma-separated syntax is supported.
2014-12-18 13:07:13 -08:00
bors-servo
824788649c auto merge of #4342 : jdm/servo/cssom, r=jdm,metajack
This does not implement any notion of CSSStyleDeclaration objects that do not have an owning element; there's no actual CSS object model in play here. This does support setting and getting properties of the style attribute for HTMLElement, and tries to implement the ambiguous CSS value serialization spec.
2014-12-18 11:54:52 -07:00
Josh Matthews
6bffc10445 Address review comments. 2014-12-18 12:54:03 -05:00
Josh Matthews
9d82e06e64 Implement RemoveProperty, SetProperty, and supported property indices. 2014-12-18 12:54:02 -05:00
Glenn Watson
037f6c2cae Rebase and update new css properties. 2014-12-18 12:54:02 -05:00
Glenn Watson
442c28d9f7 Fixups for rust upgrade and jsref changes. 2014-12-18 12:54:02 -05:00
Josh Matthews
5ca61c00b9 Add a ton of properties and improve a bunch of serialization. 2014-12-18 12:54:02 -05:00
Josh Matthews
755ebd6528 Improve color serialization by retaining author-specified keywords. 2014-12-18 12:54:02 -05:00
Josh Matthews
6f8a9b6d46 Implement setting element style properties. Improve serialization to return initial values when unspecified. 2014-12-18 12:54:02 -05:00
Josh Matthews
505e1855a3 Implement something like CSS value serialization. Fetch actual inline style declarations from owning elements. 2014-12-18 12:54:02 -05:00
Tetsuharu OHZEKI
135ee60f5a style: Remove glob imports added in #4405 2014-12-19 01:49:24 +09:00
bors-servo
e2267e0a07 auto merge of #4358 : pcwalton/servo/cursor, r=mbrubeck
I'm not sure how we want to handle Linux cursors, and GLFW has no
ability to set cursors (short of disabling it and managing it yourself).

If you test this in the wild you will probably hit #4357 until that PR lands.
2014-12-18 00:24:49 -07:00
Patrick Walton
7371e0b8e3 compositing: Implement cursor per CSS3-UI § 8.1.1 in the CEF/Mac port.
I'm not sure how we want to handle Linux cursors, and GLFW has no
ability to set cursors (short of disabling it and managing it yourself).
2014-12-17 22:58:52 -08:00
Patrick Walton
a3f6f4e75b layout: Implement caption-side per CSS 2.1 § 17.4.1.
`caption-side` is used by 4% of pages by number of loads.
2014-12-17 22:06:14 -08:00
Patrick Walton
5675274c44 layout: Implement empty-cells per CSS 2.1 § 17.6.1.1. 2014-12-17 21:25:12 -08:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
bors-servo
5951056973 auto merge of #4133 : mttr/servo/form_resetting, r=jdm
We can reset `<input type=text>` fields! I wish I could've done something with checkboxes, but unfortunately, that's it for now.

In addition to that, this PR implements `HTMLInputAttribute.defaultValue`, updates wpt-test to expect passing tests as a result of that implementation, and fixes an index error crash with text inputs.

edit: also includes an html example where one may lazily watch form resets in action: ` tests/html/form_reset_handsfree.html`
2014-12-16 15:03:49 -07:00
Matthew Rasmus
504f968b20 Implements :indeterminate pseudo-class
Addresses reviews
2014-12-16 11:34:04 -08:00