Commit graph

5981 commits

Author SHA1 Message Date
Jon Leighton
53e868e203 Refactor ListStyleType 2017-12-23 21:24:46 +01:00
Jon Leighton
214b423bbd Move list-style-type outside of mako
Closes issue #19629
2017-12-23 13:01:30 +01:00
Emilio Cobos Álvarez
cdb604ae69
style: Make sure to honor parse_method in transition and animation shorthands.
Reviewed-by: birtles
Bug: 1426312
MozReview-Commit-ID: HY3jtdSdaga
2017-12-21 13:56:57 +01:00
bors-servo
df0f9ad7ae Auto merge of #19618 - upsuper:border-image-repeat, r=emilio
Convert NS_STYLE_BORDER_IMAGE_REPEAT_* to an enum class

This is the Servo side change of [bug 1325940](https://bugzilla.mozilla.org/show_bug.cgi?id=1325940).

<!-- 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/19618)
<!-- Reviewable:end -->
2017-12-21 01:34:04 -06:00
Xidorn Quan
11bd1bc38c Convert NS_STYLE_BORDER_IMAGE_REPEAT_* to an enum class. 2017-12-21 18:27:40 +11:00
Emilio Cobos Álvarez
974458cafc
style: Fix inheritance of animation and transition properties of mismatched length.
At least when the animation-name length is bigger than the animation properties,
we mess up inheritance and only set properly the specified counts, then don't
cycle it.

The nicer fix for this is making these vectors properly, and move the cycling
logic at used-value time (bug 1420928). Same for transitions.

Bug: 1426246
Reviewed-by: hiro
MozReview-Commit-ID: 3cguzIvfMFU
2017-12-21 06:14:17 +01:00
Emilio Cobos Álvarez
40b9d78a34
style: Remove needless and bogus bounds-check.
The check should read index >= self.len(). But it doesn't matter anyway since
we're covered by Rust's bound checks by default anyway.
2017-12-21 04:08:44 +01:00
Emilio Cobos Álvarez
79e0f19221
style: Workaround a likely valgrind false-positive. 2017-12-20 23:03:07 +01:00
Emilio Cobos Álvarez
b556ddbf55
style: Don't support a list of selectors in ::slotted yet.
Bug: 1425757
Reviewed-by: xidorn
MozReview-Commit-ID: G0I0gM2sWTh
2017-12-20 15:55:09 +01:00
Emilio Cobos Álvarez
a931789f37
style: Update bindings. 2017-12-19 20:47:16 +01:00
neerpancholi
9bea4baf6f
Bug 1417725 - (Servo) Add -moz-column-span alias for column-span property. 2017-12-19 10:33:46 +01:00
Manish Goregaokar
82e024913b stylo: Correctly handle interpolation where optional second argument for translate(), skew(), scale() exists in one but not the other
MozReview-Commit-ID: 59rNRAXBEN9
2017-12-18 18:45:25 -08:00
Emilio Cobos Álvarez
f6d0a14246
style: Don't adjust :visited styles.
As the comment says those are not interesting, and it matches what we do for
text and placeholders in Servo_ComputedValues_Inherit.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1425893
2017-12-18 22:48:02 +01:00
bors-servo
a9c17970c1 Auto merge of #19576 - canaltinova:text-align, r=Manishearth,emilio
style: Move text-align outside of the mako file.

I will need this refactoring before my next job. I didn't actually fix the FIXME's along the way. My other PR probably will cover these.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/19576)
<!-- Reviewable:end -->
2017-12-18 12:12:52 -06:00
Nazım Can Altınova
9882d0bae5 style: Move text-align outside of the mako file. 2017-12-18 11:58:06 -06:00
Emilio Cobos Álvarez
0e781384cd
style: Add a FIXME comment that I need to write a test-case for. 2017-12-18 14:19:17 +01:00
bors-servo
8aba41d951 Auto merge of #19583 - CYBAI:move-will-change-out-of-mako, r=emilio
style: Move will-change outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19582
- [x] These changes do not require tests

<!-- 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/19583)
<!-- Reviewable:end -->
2017-12-16 16:39:37 -06:00
Emilio Cobos Álvarez
af3a50a9d9
style: Remove the grid pref.
Bug: 1398492
Reviewed-by: mats
MozReview-Commit-ID: 6Qez8NE8oze
2017-12-16 22:10:22 +01:00
CYBAI
2eb396613b
style: Move will-change outside of mako 2017-12-16 21:47:59 +01:00
bors-servo
a31fd24ce9 Auto merge of #19581 - emilio:grid-line-serialize, r=canaltinova
style: Fix grid line serialization to avoid redundant spacing.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1425227.

<!-- 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/19581)
<!-- Reviewable:end -->
2017-12-16 09:13:48 -06:00
Emilio Cobos Álvarez
de4dd638eb
style: Fix grid line serialization to avoid redundant spacing.
This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1425227.
2017-12-16 01:26:18 +01:00
Brian Birtles
150db42ef6 Update references to Web Animations spec 2017-12-15 16:21:26 -06:00
bors-servo
e631d167bf Auto merge of #19578 - emilio:parse-keyword, r=Manishearth,canaltinova
Allow deriving Parse on keywords.

This makes patches like #19576 much easier.

<!-- 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/19578)
<!-- Reviewable:end -->
2017-12-15 14:55:49 -06:00
Emilio Cobos Álvarez
8fbdbc8f95
style: Use derive(Parse) for X and Y. 2017-12-15 20:15:32 +01:00
Emilio Cobos Álvarez
4abd1dc819
style: Use derive(Parse) for RepeatKeyword. 2017-12-15 20:15:31 +01:00
Emilio Cobos Álvarez
7036cb0077
Allow deriving Parse for keywords. 2017-12-15 20:01:31 +01:00
bors-servo
90290cfafe Auto merge of #19564 - emilio:push-applicable-simple, r=mbrubeck
style: Slightly simplify push_applicable_declarations.

<!-- 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/19564)
<!-- Reviewable:end -->
2017-12-15 11:28:16 -06:00
Felipe Nakandakari
eb88a298f6 style: move list-style-image out of mako
cleaner way to set boxed param

redefine get_initial_value to none

make parse method clearer

remove some extra lines
2017-12-15 16:23:53 +11:00
Emilio Cobos Álvarez
94e895c61e
style: Slightly simplify push_applicable_declarations. 2017-12-14 18:04:02 +01:00
bors-servo
26feea3be5 Auto merge of #19556 - emilio:quotes-mako, r=emilio
Move list quotes out of mako.

Rebase of https://github.com/servo/servo/pull/19154.

<!-- 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/19556)
<!-- Reviewable:end -->
2017-12-14 01:39:38 -06:00
bors-servo
c258bfb430 Auto merge of #19551 - emilio:anon-box-visited, r=heycam
style: Make anon boxes account for :visited.

This should fix one of the test failures of:

  https://bugzilla.mozilla.org/show_bug.cgi?id=616436

<!-- 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/19551)
<!-- Reviewable:end -->
2017-12-13 22:47:38 -06:00
Emilio Cobos Álvarez
604c520343
style: Make anon boxes account for :visited.
This should fix one of the test failures of:

  https://bugzilla.mozilla.org/show_bug.cgi?id=616436
2017-12-14 05:02:54 +01:00
Emilio Cobos Álvarez
03f3521216
style: Use more Box<[]> and Box<str> for quotes. 2017-12-14 04:05:25 +01:00
Connor Brewster
16f627a18a
style: Move list quotes out of mako 2017-12-14 03:43:10 +01:00
bors-servo
714c1b2455 Auto merge of #19548 - CYBAI:move-outline-style-out-of-mako, r=emilio
style: Move outline-style outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19546
- [x] These changes do not require tests

<!-- 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/19548)
<!-- Reviewable:end -->
2017-12-13 19:30:26 -06:00
CYBAI
b9b91b33be style: Move outline-style outside of mako 2017-12-13 11:41:59 +08:00
Manish Goregaokar
337e5288c2 Add weighted telemetry probes for parallel restyles 2017-12-12 10:13:23 -06:00
Manish Goregaokar
d573081fe5 Add telemetry probe for fraction of restyles that are parallel 2017-12-12 10:08:11 -06:00
Simon Sapin
890257ebc3 Check that 'style' is compiled in a supported configuration.
Provide an explanatory error message when the compilation would fail because of missing or duplicate items.
2017-12-10 02:58:31 +01:00
bors-servo
c6bf85eca9 Auto merge of #19536 - emilio:compound-selector-list, r=mbrubeck
style: Move the code to parse a list of compound selectors.

I'll need this for ::slotted().

<!-- 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/19536)
<!-- Reviewable:end -->
2017-12-09 17:15:14 -06:00
bors-servo
95520ca39c Auto merge of #19533 - emilio:unused-code-should-die, r=emilio
style: Remove unused SelectorImpl::pseudo_element_cascade_type.

<!-- 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/19533)
<!-- Reviewable:end -->
2017-12-09 15:27:49 -06:00
Emilio Cobos Álvarez
dbf0183b0f
style: Use ? in Option more often. 2017-12-09 20:26:09 +01:00
bors-servo
5f4f355cea Auto merge of #19537 - mbrubeck:try, r=nox
style: Use the ? operator for Option

This is stable in Rust 1.22 (#19532).

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it is refactoring only

<!-- 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/19537)
<!-- Reviewable:end -->
2017-12-09 10:50:55 -06:00
Matt Brubeck
3005a26daf style: Use the ? operator for Option 2017-12-09 08:29:53 -08:00
Emilio Cobos Álvarez
b1f25a2b1f
style: Move the code to parse a list of compound selectors.
I'll need this for ::slotted().
2017-12-09 16:47:37 +01:00
Emilio Cobos Álvarez
bf564e0238
style: Simplify naming and signatures of single-colon pseudo stuff.
Also drop a few FIXMEs while at it, since they look bogus.
2017-12-09 16:12:22 +01:00
Emilio Cobos Álvarez
c93b844125
style: Remove unused SelectorImpl::pseudo_element_cascade_type. 2017-12-09 16:03:09 +01:00
bors-servo
f8a87a76b2 Auto merge of #19530 - emilio:extend-not-much, r=jdm
style: Don't unconditionally extend() the declaration block vector.

Since it appears in profiles when used from CSSOM, like the one in the bug
mentioned in the comment.

<!-- 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/19530)
<!-- Reviewable:end -->
2017-12-08 19:59:38 -06:00
bors-servo
42a3c1631c Auto merge of #19526 - upsuper:moz-bool-pref, r=emilio
Add @supports -moz-bool-pref() support for stylo

This is the Servo side change for [bug 1267890](https://bugzilla.mozilla.org/show_bug.cgi?id=1267890).

<!-- 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/19526)
<!-- Reviewable:end -->
2017-12-08 18:49:39 -06:00
bors-servo
7a87337235 Auto merge of #19520 - emilio:simplify-visited, r=jryans
selectors: Simplify :visited by only using the "is inside link" information.

Right now we go through a lot of hoops to see if we ever see a relevant link.

However, that information is not needed: if the element is a link, we'll always
need to compute its visited style because its its own relevant link.

If the element inherits from a link, we need to also compute the visited style
anyway.

So the "has a relevant link been found" is pretty useless when we know what are
we inheriting from.

The branches at the beginning of matches_complex_selector_internal were
affecting performance, and there are no good reasons to keep them.

I've verified that this passes all the visited tests in mozilla central, and
that the test-cases too-flaky to be landed still pass.

<!-- 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/19520)
<!-- Reviewable:end -->
2017-12-08 17:37:32 -06:00