Emilio Cobos Álvarez
2a499d5a0b
layout: Stop storing PrecomputedStyleData in LayoutNode
...
Use the SharedStyleContext instead.
2016-04-29 22:54:48 +02:00
Emilio Cobos Álvarez
979c3a54b9
layout: Tidy a bit style pseudo-elements stuff
2016-04-29 22:54:47 +02:00
Emilio Cobos Álvarez
5a43c7e3cd
style: Allow inheritance when computing anonymous box styles
...
This is used a lot by Gecko, not still for servo though.
2016-04-29 22:54:46 +02:00
Emilio Cobos Álvarez
3563ecb770
style: Use precomputation for the -servo-details-content pseudo-element
2016-04-29 22:54:45 +02:00
Emilio Cobos Álvarez
b6402a81d0
style: Add infrastructure for non-eagerly-cascaded pseudo-elements
...
This commit also removes StylistWrapper and uses Arc::get_mut instead.
2016-04-29 22:54:45 +02:00
bors-servo
ac8406f4ae
Auto merge of #10834 - yoava333:master, r=SimonSapin
...
added support for :read-only and :read-write pseudo-classes
partial fix for https://github.com/servo/servo/issues/10732
It's not a full fix because:
1. there's a bug in wpt-test https://github.com/w3c/web-platform-tests/issues/2889#issuecomment-214144420
2. we don't fully support all input types (namely image, color, hidden and range), which are defaulted to input text. this means that :read-write which is applicable to input text is mis-handled in those cases.
3. we don't support contenteditable, which is also possibly :read-write
<!-- 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/10834 )
<!-- Reviewable:end -->
2016-04-29 08:12:18 -07:00
Cameron McCormack
dafc683aef
Specialize text node style resolution so geckolib can avoid inheriting non-inherited structs.
2016-04-29 10:07:59 +10:00
bors-servo
e079e01320
Auto merge of #10848 - heycam:struct-accessor, r=bholley
...
Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues
r?@bholley
<!-- 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/10848 )
<!-- Reviewable:end -->
2016-04-27 02:20:17 -07:00
Cameron McCormack
88f51af3f8
Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues.
...
While we're here we also:
* remove any code conditional on style_struct.gecko_ffi_name, since all
style structs now do have a corresponding Geckos struct
* add new UIReset and XUL style structs, so that all Gecko structs are
now present (apart from Variables, which is special)
2016-04-27 17:13:26 +10:00
Akshit Khurana
4a3addb72f
Return a Result<i64, ()> from do_parse_integer
...
Fixes #10860
2016-04-26 23:03:16 -07:00
bors-servo
2729864af7
Auto merge of #10857 - servo:toml, r=nox
...
Simplify TOML syntax
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]` section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)` conditions instead of exact target triples: https://github.com/rust-lang/cargo/pull/2328
<!-- 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/10857 )
<!-- Reviewable:end -->
2016-04-26 15:46:37 -07:00
Yoav Alon
9bf909ac2f
added support for :read-only and :read-write pseudo-classes
...
partial fix for https://github.com/servo/servo/issues/10732
2016-04-27 01:38:58 +03:00
Simon Sapin
83b3ebf6ac
Simplify TOML syntax
...
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]`
section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)`
conditions instead of exact target triples:
https://github.com/rust-lang/cargo/pull/2328
2016-04-26 23:51:36 +02:00
bors-servo
ccba2d6841
Auto merge of #10608 - KiChjang:parse-double, r=nox
...
Add parsing of double values in style attributes
<!-- 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/10608 )
<!-- Reviewable:end -->
2016-04-26 11:59:25 -07:00
Per Lundberg
4e8831457a
Moved the rest of the longhand structs to separate files.
...
Sorry for the bulk size of this; I know already it's not going to be a fun thing to review. Nevertheless, it should be done so we finalize the split of this huge file into smaller, more maintable parts.
The content of stuff being moved to separate files is unchanged. Only some minor formatting changes have been made and similar, but nothing of particular interest. IMHO it should be safe to merge if all the tests are fine.
2016-04-25 21:36:58 +03:00
bors-servo
20dd8ba7ec
Auto merge of #10817 - danlrobertson:flex-basis, r=mbrubeck
...
Add style property for flex-basis
Add the style property for flex-basis. The property should allow all
values acceptable for `width` or `height` with the addition of `content`.
I also disabled the tests that I expect to pass. I am confused by [flexbox_computedstyle-flex-basis-0percent:20](https://github.com/servo/servo/blob/master/tests/wpt/css-tests/css-flexbox-1_dev/html/flexbox_computedstyle_flex-basis-0percent.htm#L20 ). Should that be `0%` instead of `0px`?
<!-- 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/10817 )
<!-- Reviewable:end -->
2016-04-24 23:34:37 -07:00
Keith Yeung
48b2e9c055
Add parsing of double values in style attributes
2016-04-25 01:09:30 -04:00
Daniel Robertson
2d9d31ee04
Add style property for flex-basis
...
Add the style property for flex-basis. The property should allow all
values acceptable for `width`|`height` with the addition of `content`.
2016-04-24 14:04:40 -04:00
Simon Sapin
374679852c
Make chrome: URLs have a "host".
2016-04-23 20:28:02 +02:00
Simon Sapin
7932ab6ac2
Upgrade to rust-url 1.0 and hyper 0.9
2016-04-23 20:27:58 +02:00
bors-servo
0a3a50a129
Auto merge of #10706 - zwn:unused-extern-crates, r=nox
...
Turn on unused-extern-crates warning.
As discussed in #9256 . It should solve second half of the issue.
<!-- 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/10706 )
<!-- Reviewable:end -->
2016-04-22 13:40:38 -07:00
Zbynek Winkler
b021874ba0
Silence unused-extern-crates false positives.
...
Added #[allow(unused_extern_crates)] to silence false positives
* bitflags, lazy_static and matches because macro_use
* alloc_jemalloc because builtin crate
See https://github.com/rust-lang/rust/issues/30849
2016-04-22 22:20:05 +02:00
Bobby Holley
1a727225a6
Unstub text-orientation.
...
The spec has changed a bit since the servo implementation. We still need to alias
sideways-right to sideways and add other writing modes, but we can do that later.
2016-04-21 23:57:41 -07:00
Bobby Holley
bba4447637
Support the text-decoration-style property.
2016-04-21 23:57:35 -07:00
Bobby Holley
980c814e2a
Manually implement the display property for now.
2016-04-21 23:57:31 -07:00
Bobby Holley
cc35d4fcce
Get rid of some of our custom additional methods in favor of clonable keywords.
...
Now that I'm pretty convinced we can auto-generate these and make them fast, we can
ditch the additional complexity.
2016-04-21 23:57:29 -07:00
Bobby Holley
456b05e9cf
Make predefined_type use kwargs.
2016-04-21 23:57:28 -07:00
Bobby Holley
a4ee11da0a
Track cloning separately from additional_methods and auto-generate clone methods.
2016-04-21 23:57:27 -07:00
bors-servo
b080da474f
Auto merge of #10791 - servo:explicit-python-path, r=KiChjang
...
Blind attempt at fixing a Python import error on Windows.
See #10789 .
<!-- 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/10791 )
<!-- Reviewable:end -->
2016-04-21 17:26:11 -07:00
Per Lundberg
4643737a1b
Applied a bunch of suggestions from Simon.
2016-04-21 22:42:35 +03:00
Per Lundberg
d0489f1160
Improve properties.mako.rs file structure, take 2
...
This is a new attempt of #10586 , after Simon Sapin's great cleanups in #10749 has landed. I have adjusted the changes to the new structure that was introduced, and also only done a few of the longhand ones. Will certainly continue on this as soon as we have a basic agreement that this style is reasonable.
2016-04-21 22:42:35 +03:00
Simon Sapin
ad95a1dd23
Blind attempt at fixing a Python import error on Windows.
...
See #10789 .
2016-04-21 19:46:23 +02:00
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