Commit graph

673 commits

Author SHA1 Message Date
bors-servo
3bfa4cc741 Auto merge of #10749 - servo:split-mako, r=nox
Prepare related files to make it easier to split up the Mako template

https://github.com/servo/servo/pull/10586#issuecomment-211490049

r? @nox

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10749)
<!-- Reviewable:end -->
2016-04-21 10:38:09 +05:30
Simon Sapin
515c5ef540 Tidy 2016-04-20 17:19:25 +02:00
Simon Sapin
2d8c17e600 Extract some Python code from properties.mako.rs into a separate file. 2016-04-20 15:30:27 +02:00
Ms2ger
0f2b83ca0f Use num-traits in style. 2016-04-20 15:11:41 +02:00
Simon Sapin
7787b21e30 Move Mako-related files into a new sub-directory.
There’s gonna be more of them.
2016-04-20 14:49:27 +02:00
Simon Sapin
b7eb720c74 Merge list_properties.py into build_properties_rs.py 2016-04-20 14:41:42 +02:00
zakorgyula
95bebb9945 Remove extra definition of WHITESPACE under components/util/str.rs 2016-04-20 10:40:57 +02:00
Corey Farwell
c37ab1facd Make read_resource_file param simpler and more idiomatic.
`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.
2016-04-16 23:06:59 -04:00
bors-servo
15e76eb6e2 Auto merge of #10643 - mbrubeck:empty-span-border, r=pcwalton
Fix handling of borders and padding for empty/stripped inline flows

This forces fragment generation for empty inline flows, if they have borders or padding.  Fixes #10533 and #2001.  Also includes fixes for other bugs that were uncovered by this change; see the individual commit messages for detailed explanations.  r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10643)
<!-- Reviewable:end -->
2016-04-17 03:31:12 +05:30
Keith Yeung
f5021fc0c5 Add missing gecko keyword values to styles 2016-04-16 14:06:02 -04:00
Matt Brubeck
1807fd3cc5 Generate a fragment for an empty elements with borders or padding 2016-04-16 11:01:40 -07:00
Bobby Holley
38d2063a9d Make single_keyword take kwargs. 2016-04-15 10:08:57 -07:00
Bobby Holley
e4a8613f6d Make single_keyword_computed take kwargs. 2016-04-15 10:08:57 -07:00
Bobby Holley
dea08f4ca0 Make longhand take kwargs. 2016-04-15 10:08:57 -07:00
Bobby Holley
f58ff4a4f7 Make raw_longhand take kwargs. 2016-04-15 10:08:57 -07:00
Bobby Holley
0fe55f01b5 Alter the semantics of derived_from so that it is [] rather than None when the property is not derived.
This simplifies some logic in this patch and going forward. Note that the old code stored the
derived_from array as rust idents, but then used the parameter (not rust-ident-ified) to access
DERIVED_LONGHANDS. No other consumers actually seem to use the values in derived_from, so we
change the representation to the more natural thing.
2016-04-15 10:08:57 -07:00
Per Lundberg
8815bb9594 Extracted Mako compilation to separate .py files.
This breaks out some of the parts on #10586, that should be easily mergeable. The idea would be to let you review & merge it first, and then I'll complete the other PR rebase off of this stuff.
2016-04-14 23:26:04 +03:00
bors-servo
e21e5551ec Auto merge of #10556 - bholley:keyword_setters, r=SimonSapin
Automatically generate Gecko style struct setters for most keyword properties

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10556)
<!-- Reviewable:end -->
2016-04-14 21:58:34 +05:30
Simon Sapin
6889f37d9e Remove the url! plugin.
In rust-url 1.0 the `Url` struct is going to have private fields, and there
is no way to to create an aribitrary one without going through the parser.

The plugin never had a clear demonstrated performance benefit,
it was made mostly because it was possible and relatively easy at the time.
2016-04-14 15:35:28 +02:00
Bobby Holley
873bd82fff Stop cascading servo-internal properties in geckolib builds. 2016-04-14 00:13:42 -07:00
Bobby Holley
1bbdadc1ba Massage some of the newly-added properties to line up with Gecko. 2016-04-13 23:45:58 -07:00
Bobby Holley
8ece21e651 Add support for gecko_constant_prefix kwarg for Keyword.
This allows us to auto-generate settings when the gecko naming is slightly
different than the obvious auto-generated thing.
2016-04-13 18:14:55 -07:00
Bobby Holley
c61a04bd82 Add a gecko_ffi_name property on longhands for the cases where Gecko has a weird property name.
Long-term it'd be better to just rename the stuff in Gecko, but this is more expedient for now.
2016-04-13 18:14:55 -07:00
Bobby Holley
d8e0d97fd8 Add more annotations to the properties. 2016-04-13 18:14:55 -07:00
Mauricio Collares
002b4af8b9 Add some Gecko-supported CSS keyword properties 2016-04-12 18:52:44 -03:00
bors-servo
a4991f536c Auto merge of #10488 - perlun:remove-t-prefix-on-style-structs, r=SimonSapin
Removed the T prefix for the style traits

More work as described in #10185.

I am getting _extremely_ weird compile-time errors with this one, when it's trying to expand the `lazy_static!` macro. I think I'll need help getting that part sorted out. The rest should be pretty OK.

Anyone has ideas on how to resolve it?

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10488)
<!-- Reviewable:end -->
2016-04-13 02:24:25 +05:30
Per Lundberg
c7758a8ad8 Removed the T prefix for the style traits
More work as described in #10185.

The reason I upgraded lazy_static to 0.1.16 is because it fixes an issue with the Box name (std::boxed::Box was used in an unqualified name, which can cause name clashes when there is another type that exists with the same name).
2016-04-12 23:02:02 +03:00
bors-servo
11927da165 Auto merge of #10527 - servo:cr, r=larsbergstrom
Work around a Mako bug on Windows

http://logs.glob.uno/?c=mozilla%23servo#c403766
https://i.imgur.com/j5Zv4LX.png
https://bitbucket.org/zzzeek/mako/issues/150/line-ending-handling-broken-on-win32

r? @larsbergstrom

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10527)
<!-- Reviewable:end -->
2016-04-12 07:13:22 +05:30
bors-servo
61865f66b5 Auto merge of #10505 - amarant:10491-HTMLInputElement-attr, r=KiChjang
Issue #10491 add HTMLInputElement attributes that reflect content ide…

…ntically

it uses a new version of string-cache https://github.com/servo/string-cache/pull/148

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10505)
<!-- Reviewable:end -->
2016-04-12 05:58:16 +05:30
Arnaud Marant
9b8f183cba Issue #10491 add HTMLInputElement attributes that reflect content identically
it uses a new version of string-cache https://github.com/servo/string-cache/pull/148
2016-04-12 00:15:57 +02:00
Daniel Robertson
3580f91291 Implement flexbox reordering
Add style property for order and implement reordering by this property
in flex flow. Based on previous work by @zentner-kyle.
2016-04-11 16:55:16 -04:00
Simon Sapin
d1c09bc84c Work around a Mako bug on Windows
http://logs.glob.uno/?c=mozilla%23servo#c403766
https://i.imgur.com/j5Zv4LX.png
https://bitbucket.org/zzzeek/mako/issues/150/line-ending-handling-broken-on-win32
2016-04-11 21:11:55 +02:00
Per Lundberg
96835c6d6f Renamed style structs.
The idea is to rename all style structs from Foo to ServoFoo, as described out in #10185.
2016-04-08 21:47:36 +03:00
bors-servo
2491af84fc Auto merge of #10461 - bholley:per_product, r=SimonSapin
Add some machinery to allow us to disable CSS properties/values per-product

Here's an initial stab at solving the issues @SimonSapin brought up in #10408.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10461)
<!-- Reviewable:end -->
2016-04-08 18:56:43 +05:30
Bobby Holley
4861d5add8 Add some machinery to allow us to disable CSS properties (or a subset of values for a property) on a per-product basis. 2016-04-07 16:31:31 -07:00
bors-servo
eda8784c34 Auto merge of #10438 - KiChjang:text-decoration-fix, r=mbrubeck
Properly inherit text decorations

Fixes #8684.
Fixes #8783.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10438)
<!-- Reviewable:end -->
2016-04-08 03:39:41 +05:30
Keith Yeung
b8971867f8 Properly inherit text decorations 2016-04-07 17:16:45 -04:00
bors-servo
39ab006c8f Auto merge of #10402 - mbrubeck:make_mut, r=pcwalton
Avoid unnecessary Arc::clone and Arc::make_mut

r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10402)
<!-- Reviewable:end -->
2016-04-07 23:22:37 +05:30
Matt Brubeck
f7139484a2 Avoid unnecessary make_mut in inline border drawing 2016-04-07 09:29:31 -07:00
bors-servo
256b865055 Auto merge of #10407 - mauricioc:issue10403, r=bholley
Move some CSS properties to match Gecko's representation

Fixes #10403. Animation had an extra transition-delay property, which was also moved to Box. Let me know if I should squash the commits.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10407)
<!-- Reviewable:end -->
2016-04-07 03:18:15 +05:30
Mauricio Collares
c3d6bfc3df Move some CSS properties from Animation to Box and delete Animation 2016-04-05 00:28:19 -03:00
Mauricio Collares
d8222dd63d Move CSS line-height property from InheritedBox to InheritedText 2016-04-05 00:28:18 -03:00
Mauricio Collares
bbc5c51be8 Move CSS flex-direction property from Flex to Position and delete Flex 2016-04-05 00:28:08 -03:00
Mauricio Collares
aae8919da4 Move some CSS properties from Box to Position 2016-04-05 00:21:49 -03:00
Mauricio Collares
281e385ab2 Rename PositionOffsets to Position 2016-04-05 00:21:48 -03:00
Mauricio Collares
841aef06e0 Move CSS content property from Box to Counters 2016-04-05 00:21:47 -03:00
Mauricio Collares
8c8090b5cd Move CSS text-shadow property from Effects to InheritedText 2016-04-05 00:21:46 -03:00
Mauricio Collares
347cf0580c Move CSS text-overflow property from InheritedText to Text 2016-04-05 00:21:39 -03:00
Mauricio Collares
4f0558e84f Move CSS image-rendering property from Effects to InheritedBox 2016-04-04 21:36:51 -03:00
bors-servo
a3b55d68a8 Auto merge of #10359 - bholley:style_struct_management, r=SimonSapin
Implement construction, destruction, and copying of gecko style structs

This requires some new machinery on the gecko side, which I'll get up in bugzilla shortly.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10359)
<!-- Reviewable:end -->
2016-04-04 20:11:29 +05:30