Commit graph

6718 commits

Author SHA1 Message Date
Xidorn Quan
b0f5f20290 Serialize text-decoration-line to none if nothing specified 2017-01-25 17:51:04 +11:00
bors-servo
742ed2e03c Auto merge of #15173 - upsuper:border-image-repeat, r=emilio
Fix serialization of border-image-repeat

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15173)
<!-- Reviewable:end -->
2017-01-24 21:56:42 -08:00
bors-servo
6fc0d2f927 Auto merge of #15167 - heycam:cssparser-up-2, r=bholley
Update cssparser to 0.7.3 to get perf improvements.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15167)
<!-- Reviewable:end -->
2017-01-24 21:00:56 -08:00
bors-servo
1934a33875 Auto merge of #15160 - emilio:expose-traversal-kind, r=bholley
style: Expose the traversal kind to the style system.

This way we'll be able to take different paths for the sequential and parallel
traversals in some concrete cases.

This is a preliminar patch to fix bug 1332525.

r? @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15160)
<!-- Reviewable:end -->
2017-01-24 17:02:41 -08:00
bors-servo
dc8fc44238 Auto merge of #15153 - upsuper:pseudo-class-list, r=emilio
Put stylo's pseudo-class into a list file

r? @emilio

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15153)
<!-- Reviewable:end -->
2017-01-24 16:06:31 -08:00
Simon Sapin
8b0d8cbbf0 When a css-wide keyword is followed by more stuff, try parsing as "normal" value. 2017-01-24 20:04:28 +01:00
Simon Sapin
d0ea53ade9 Reject CSS-wide keywords in font-family 2017-01-24 20:04:28 +01:00
Simon Sapin
5c8c38be5d Mako: configure included templates like the main one. 2017-01-24 20:04:27 +01:00
Simon Sapin
bf16836598 Properly escape font-family names in CSS serialization.
Fix #15059.
2017-01-24 20:04:26 +01:00
Boris Chiou
19aea7ea78 Bug 1317209 - Part 5: Support transition cascade level. r=emilio
Support a new enum, EffectCompositor_CascadeLevel, which is an equivalent of
EffectCompositor::CascadeLevel in Gecko.
2017-01-24 18:44:07 +08:00
Ms2ger
14fe337866 Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23). 2017-01-24 11:02:51 +01:00
Boris Chiou
3a89e89952 Bug 1317209 - Part 4: Put animation rule to cascade. r=emilio
We try to get the servo animation rule and declarations during elements
matching, and put the rule to the right priority.
Note: According to CSS Cascade Level spec, Animations is between
      Important author declarations and Normal override declarations.
2017-01-24 16:32:20 +08:00
Dexter Haslem
f3bcb0a496 make -webkit-text-stroke color and width shorthand no longer sensitive to order of values 2017-01-24 01:24:12 -07:00
Boris Chiou
c09b204d5d Bug 1317209 - Part 3: Add TElement::get_animation_rule. r=heycam
We use TElement::get_animation_rule to get the animation rules from
Gecko side, which contain the interpolated values of the specific
element and the pseudo type.
2017-01-24 16:11:01 +08:00
Boris Chiou
1f1c67f485 Bug 1317209 - Part 2: Implement interpolate FFI. r=manishearth 2017-01-24 16:10:52 +08:00
Boris Chiou
4f0791a94b Bug 1317209 - Part 1: Implement uncompute FFI. r=manishearth 2017-01-24 15:47:35 +08:00
Xidorn Quan
d814c5b659 Fix serialization of border-image-repeat 2017-01-24 18:44:23 +11:00
Emilio Cobos Álvarez
f00b628c3a
style: Expose the traversal kind to the style system.
This way we'll be able to take different paths for the sequential and parallel
traversals in some concrete cases.

This is a preliminar patch to fix bug 1332525.
2017-01-24 08:41:29 +01:00
Xidorn Quan
3c412383fb Add space before keyword for border-image-slice 2017-01-24 16:53:34 +11:00
Xidorn Quan
a994e4e96b Correct serialization of column-rule shorthand 2017-01-24 16:00:55 +11:00
Cameron McCormack
87c57489d7 Update cssparser to 0.7.3 to get perf improvements. 2017-01-24 11:20:17 +08:00
Xidorn Quan
4bb982131b Put stylo's pseudo-class into a list file 2017-01-24 10:17:57 +11:00
Emilio Cobos Álvarez
d29fade4c2
Bug 1332969: stylo: Synchronously do a style update when the device changes.
Ideally this would be lazy, but eventually we're going to need to restyle in
RebuildAllStyleData anyway, which would require us to have the style up to date,
so no need to complicate our lives.

MozReview-Commit-ID: AlmUGRCNm2z
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-23 18:55:45 +01:00
Boris Chiou
9360beb03c Update selectors to 0.15.1
selectors 0.15.1 supports AFFECTED_BY_ANIMATIONS and
AFFECTED_BY_TRANSITIONS, which are used by stylo animations.
2017-01-23 14:51:10 +08:00
bors-servo
c75946c3ed Auto merge of #14978 - shinglyu:inline-flex, r=notriddle
Implemented display: inline-flex

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14685 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14978)
<!-- Reviewable:end -->
2017-01-22 19:57:49 -08:00
Shing Lyu
e31ee04dad Implemented display: inline-flex 2017-01-23 10:30:55 +08:00
Manish Goregaokar
9c69b3d0a5 Regen bindings 2017-01-21 16:54:17 -08:00
kkkkkkkk
7c654048d2 add font-stretch to font shorthand sub-property
modify to_css_declared function

update comment and Err condition
use statement split to two lines
2017-01-21 22:24:12 +08:00
Bobby Holley
5370224877 Bug 1331856 - Add style performance statistics to Servo. r=emilio
MozReview-Commit-ID: ECHZgYNA8nb
2017-01-19 15:05:19 -08:00
bors-servo
5e888b5504 Auto merge of #15089 - Manishearth:less-vec, r=SimonSapin
Reduce allocator churn when parsing property declaration blocks

fixes #15060

cc @emilio

r? @SimonSapin

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15089)
<!-- Reviewable:end -->
2017-01-18 17:41:05 -08:00
Manish Goregaokar
b5cb401aef Reduce allocator churn when parsing property declaration blocks (fixes #15060) 2017-01-18 16:31:46 -08:00
bors-servo
1755ad7b75 Auto merge of #15077 - emilio:stylo-medialist, r=heycam,Manishearth,upsuper
Media query parsing and evaluation in stylo using nsMediaFeatures

<!-- Please describe your changes on the following line: -->

Reviewed in the bug.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15077)
<!-- Reviewable:end -->
2017-01-18 05:39:57 -08:00
Emilio Cobos Álvarez
182e0758f7
Regenerate bindings.
MozReview-Commit-ID: 4XEaLnhGSqT
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-18 14:39:26 +01:00
Xidorn Quan
0a3866cfa8 Fix initial value of -moz-user-{input,focus} 2017-01-18 13:59:50 +11:00
bors-servo
f010fb58fd Auto merge of #15065 - Manishearth:box-calclop, r=heycam
Use Box<CalcLengthOrPercentage> in specified values to avoid bloating inline sizes

For #15061

CalcLOP is a large struct, and gets used quite often. While #15063 reduces its size a bit,
it will still be much larger than any of the other variants in the `specified::Length*` types,
so it will still bloat sizes, especially for specified values that contain many lengths.

This change boxes it in the length types, so that it just takes one word.

r? @heycam

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15065)
<!-- Reviewable:end -->
2017-01-17 11:49:52 -08:00
bors-servo
4b3fbc0059 Auto merge of #15071 - upsuper:page-break-after, r=emilio
Fix typo in glue code for page-break-after

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15071)
<!-- Reviewable:end -->
2017-01-17 09:05:33 -08:00
bors-servo
b4980f9037 Auto merge of #15069 - heycam:bindgen-regex-update, r=emilio
Update geckolib build-time bindgen build script for recent regex changes.

`./mach build-geckolib --with-gecko ...` is broken due to regex's API changing a bit.

r? @Manishearth

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15069)
<!-- Reviewable:end -->
2017-01-17 08:13:47 -08:00
Manish Goregaokar
f59557d2f2 Box CalcLengthOrPercentage to reduce inline size of PropertyDeclaration(s) 2017-01-17 08:09:54 -08:00
Emilio Cobos Álvarez
3b36f4c58e
Bug 1331213: Implement the resolution override. r=heycam
MozReview-Commit-ID: LFGam2hDoh7
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:18:56 +01:00
Emilio Cobos Álvarez
13878d674c
Bug 1331213: Implement Device::media_type, without supporting overrides for now. r=heycam
MozReview-Commit-ID: 9AeHViwoX1t
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:18:53 +01:00
Emilio Cobos Álvarez
646258e5a0
Bug 1331213: Don't make the pres context pointers opaque. r=heycam
I don't know why they were that way, but it makes no sense and tests still pass.

MozReview-Commit-ID: HAIuQhqlTtF
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:18:51 +01:00
Emilio Cobos Álvarez
10a1b887d6
Bug 1331213: Implement the bulk of media query evaluation. r=heycam
Two main notes:

 * The nsStringBuffer bit goes untested, since it's only used on windows and
   there's no way I can test it, please review with care.

 * I haven't implemented yet the "enumerated" media queries. I'd want to do it
   as a follow-up, because I'm running out of time, and it requires some
   investigation.

MozReview-Commit-ID: 1pBbzyIViPk
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:18:49 +01:00
Emilio Cobos Álvarez
197f21f3a7
Bug 1331213: Allow parsing media query expressions without colons. r=heycam
This is used for stuff like @media (monochrome), etc.

MozReview-Commit-ID: ANhZLXDURDj
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:37 +01:00
Emilio Cobos Álvarez
2dceb4502f
Bug 1331213: Add sugar for nsCSSValue and nsCSSValue::Array. r=heycam r=Manishearth
I will use this soon to implement the media query evaluation code.

Please review carefully.

MozReview-Commit-ID: HXelawXBfH8
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:34 +01:00
Emilio Cobos Álvarez
ad32f40e13
Bug 1331213: Add an API to drop a nsCSSValue in the stack. r=heycam
The getter function may create an nsCSSValue with allocated stuff, and we don't
want to leak it.

MozReview-Commit-ID: DYkUD8CW88E
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:32 +01:00
Emilio Cobos Álvarez
5b5243b8af
Bug 1331213: Bootstrap a Gecko-side Device, and track it's dirtiness manually in the per-doc data. r=heycam
The setup is quite different to Servo-land, so add a comment about the different
setup.

Also, check viewport rules when flushing stylesheets. I believe that the
previous behavior is plain wrong, though I haven't taken the time to come up
with a test case.

In any case, it doesn't hurt any of both back-ends.

MozReview-Commit-ID: 46gtTkesOsr
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:23 +01:00
Emilio Cobos Álvarez
5d6ac65e04
Bug 1331213: Add an API to get nsMediaFeatures::features. r=heycam
We can't use the generated ones if we want a windows build.

MozReview-Commit-ID: 200LNgWl5Lm
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 13:59:00 +01:00
Emilio Cobos Álvarez
7d2f43df58
Bug 1331213: Generate nsMediaFeatures and nsMediaList, along with a bunch of other stuff in nsCSSProps. r=xidorn
MozReview-Commit-ID: 8ANuHlp886J
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 13:58:44 +01:00
Emilio Cobos Álvarez
4843fcad80
Bug 1331213: Add a descriptive error message when an include isn't found. r=xidorn
Kind of drive-by.

MozReview-Commit-ID: CHLYcrLhyRq
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 13:58:34 +01:00
bors-servo
a70af60eec Auto merge of #15063 - Wafflespeanut:calc, r=heycam
Cleaning up CalcLengthOrPercentage

<!-- Please describe your changes on the following line: -->

We don't really need enum variants in `CalcLengthOrPercentage`. Given that we already have the information (whether it's `vw`, `ch`, etc.) in the struct fields, we could just store `Option<CSSFloat>` there, and modify our `ToCss` implementation a bit.

cc #15061

r? @Manishearth or anyone interested

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15063)
<!-- Reviewable:end -->
2017-01-17 02:18:15 -08:00