Emilio Cobos Álvarez
dd3bf6f952
Ensure the default computed values are up-to-date before evaluating media queries.
...
Zoom changes can change the meaning of ems, so we can't re-evaluate media
queries with the old values, because otherwise we may miss a restyle.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: HQInvR7RPqR
2017-06-03 14:44:12 +02:00
Emilio Cobos Álvarez
5c66d3c77a
Cache effective media query results.
...
This patch also makes RulesIterator not iterate over rules for which we don't
process nested rules.
There's nothing depending on this behavior right now afaik, and this will make
us duplicate less code in following patches.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: CaMFQtAVnJF
2017-06-03 14:43:44 +02:00
Emilio Cobos Álvarez
b5232c940d
style: Move the stylesheet invalidation code to another submodule.
...
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: DIzZXoHycZs
2017-06-03 14:18:56 +02:00
Manish Goregaokar
41f1c3463e
Bump cssparser to 0.13.7
2017-06-02 17:43:56 -07:00
J. Ryan Stinnett
b03867da5d
Update bindings
2017-06-02 14:39:13 -05:00
J. Ryan Stinnett
56b44d2709
Pull decls from Gecko for link preshints
...
Based on a link's active state and the visited handling mode, pull in link,
vlink, and alink preshint declaration blocks from Gecko as needed.
MozReview-Commit-ID: A6udMYbzQnK
2017-06-02 14:34:39 -05:00
bors-servo
fa158a78b6
Auto merge of #17139 - emilio:parsing-simplify, r=nox
...
style: Simplify a bit the parsing code.
I plan to simplify it further, but this is worth landing on its own.
<!-- 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/17139 )
<!-- Reviewable:end -->
2017-06-02 05:38:48 -07:00
Emilio Cobos Álvarez
bbd85ccbda
style: Simplify the namespace setup for stylesheet parsing.
2017-06-02 14:38:05 +02:00
Emilio Cobos Álvarez
26ef0f6178
style: Simplify some attr() parsing code.
2017-06-02 12:51:33 +02:00
Emilio Cobos Álvarez
d6e703a9e9
style: return early when appropriate to deindent some dense code.
2017-06-02 12:43:53 +02:00
Emilio Cobos Álvarez
9a8c5fa7b5
style: Don't unnecessarily use a Cell in the parser.
2017-06-02 12:43:52 +02:00
bors-servo
fab1a6354f
Auto merge of #17138 - emilio:parsing-decl-block, r=heycam
...
Bug 1369198: Ensure pushing a declaration to a declaration block for parsing always inserts it at the last position.
<!-- 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/17138 )
<!-- Reviewable:end -->
2017-06-02 03:04:26 -07:00
Emilio Cobos Álvarez
acdd8aa99a
style: Insert declarations last while parsing.
...
The CSSOM spec forces us to reuse the slot, so we need to conditionally keep the
previous behavior.
This fixes bug 1369198.
MozReview-Commit-ID: LM9mK6ngZ4e
2017-06-02 11:21:02 +02:00
Anthony Ramine
e58f541951
Rename BorderImageWidthSide to BorderImageSideWidth
2017-06-02 10:53:28 +02:00
Anthony Ramine
7da94d0880
Use BorderSideWidth for outline-width
2017-06-02 10:53:27 +02:00
Anthony Ramine
2c7fbb4b4c
Use generics for text spacing properties
2017-06-02 10:21:22 +02:00
Anthony Ramine
5c6987a50d
Use generics for the line-height property
2017-06-02 10:21:21 +02:00
Hiroyuki Ikezoe
ac86d2d648
Update bindings.
2017-06-02 12:18:08 +09:00
bors-servo
373d3b91dd
Auto merge of #17130 - Manishearth:stylo-attr, r=heycam,emilio
...
stylo: Handle attr() in `content`
r=heycam https://bugzilla.mozilla.org/show_bug.cgi?id=1346693
<!-- 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/17130 )
<!-- Reviewable:end -->
2017-06-01 15:34:55 -07:00
Manish Goregaokar
5de2f29080
stylo: Create separate Attr type
2017-06-01 14:20:56 -07:00
Manish Goregaokar
25d193ba34
stylo: Use namespace ids for content: attr(..)
...
MozReview-Commit-ID: FZ9YEpHQCBh
2017-06-01 14:11:31 -07:00
Manish Goregaokar
7deeccf4cb
stylo: Move reference of namespace map to parser context
...
MozReview-Commit-ID: 74Kaj2Rqkdb
2017-06-01 14:10:40 -07:00
bors-servo
cfdb6af53b
Auto merge of #17121 - Manishearth:stylo-system-font-ser, r=upsuper
...
stylo: Fix serialization of system fonts
<!-- 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/17121 )
<!-- Reviewable:end -->
2017-06-01 14:04:41 -07:00
Jeff Hajewski
878b9a4db3
Use enum class for white-space
2017-06-01 13:55:54 -07:00
Manish Goregaokar
7123e5333f
stylo: Fix serialization of system fonts
2017-06-01 13:55:52 -07:00
Emilio Cobos Álvarez
93c39b0730
Bug 1369187: style: Assert that if we find an eager, element-backed pseudo, it's ::before or ::after. r=bholley
...
This holds because ::first-line and ::first-letter are not element-backed.
MozReview-Commit-ID: 67FU15pCLqW
2017-06-01 21:10:45 +02:00
Emilio Cobos Álvarez
a529c13904
Bug 1369187: style: Use ArrayVec for the pseudo-elements we need to restyle. r=bholley
...
Just a drive-by, easy optimization.
MozReview-Commit-ID: AVaeWvBHLzc
2017-06-01 21:10:37 +02:00
Emilio Cobos Álvarez
509a450cff
Bug 1369187: style: Add first-line and first-letter to the set of eager pseudo styles. r=bholley
...
MozReview-Commit-ID: DmpX0nA2DOw
2017-06-01 21:09:34 +02:00
Emilio Cobos Álvarez
fe74e70a2d
Bug 1369187: style: Add an API to fast-reject eager pseudos. r=bholley
...
Also, do nothing for now (we'll hook the Gecko pieces here when the time comes).
Let me know if you want to hold-off landing this.
MozReview-Commit-ID: 6PIhfp6sxk4
2017-06-01 21:09:26 +02:00
Xidorn Quan
764ed57c33
Remove unicode-bidi/with_serde feature from style deps
2017-06-01 10:53:35 +10:00
bors-servo
3337fccd99
Auto merge of #17105 - heycam:rayonup, r=nox
...
Update rayon to 0.7.1.
To take advantage of nikomatsakis/rayon#348 .
<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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 _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- 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/17105 )
<!-- Reviewable:end -->
2017-05-31 15:20:22 -05:00
bors-servo
71eb672923
Auto merge of #17093 - ferjm:bug1365674.simulate.compute.value.failure, r=hiikezoe
...
Stylo - Bug 1365674: Simulate compute value failure for tests
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
https://bugzilla.mozilla.org/show_bug.cgi?id=1365674
<!-- 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/17093 )
<!-- Reviewable:end -->
2017-05-31 12:03:50 -05:00
bors-servo
cd22fc6b90
Auto merge of #17095 - servo:derive-all-the-things, r=emilio
...
Refactor a few CSS properties
<!-- 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/17095 )
<!-- Reviewable:end -->
2017-05-31 11:08:56 -05:00
Bobby Holley
47404cfc4e
Compare style attributes rather than rejecting them from the cache.
...
MozReview-Commit-ID: Jmu7Pie2mBP
2017-05-31 06:48:40 -07:00
Bobby Holley
f40c45fe1a
Reduce the number of places where we need to enumerate ValidationData members.
...
MozReview-Commit-ID: 9m2ebknBFSE
2017-05-31 06:48:33 -07:00
Bobby Holley
6d8455a916
Sort the cached class list in ValidationInfo.
...
MozReview-Commit-ID: 3vsfP5ECzds
2017-05-31 06:48:27 -07:00
Fernando Jiménez Moreno
ebfb18c1b5
Update gecko bindings
2017-05-31 11:07:06 +02:00
Anthony Ramine
5d70580813
Make use of generics for transform-origin
...
This allows us to preserve keywords during serialisation.
2017-05-31 09:58:07 +02:00
Cameron McCormack
f62a236d8c
Update rayon to 0.7.1.
...
To take advantage of nikomatsakis/rayon#348 .
2017-05-31 17:55:26 +10:00
Hiroyuki Ikezoe
c058eb5512
Update bindings.
2017-05-31 06:16:31 +09:00
Hiroyuki Ikezoe
47124e1787
Don't process visited rules during animation-only restyle.
2017-05-31 05:48:57 +09:00
Hiroyuki Ikezoe
636c47da29
Set the dirty flag of DeclarationBlock when the DeclarationBlock is modified and clear the flag when it's resyled.
2017-05-31 05:48:27 +09:00
bors-servo
dd0813b3f2
Auto merge of #17090 - upsuper:upgrade-bindgen, r=nox
...
Upgrade bindgen to 0.25.3
This fixes #17070 .
<!-- 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/17090 )
<!-- Reviewable:end -->
2017-05-30 12:32:08 -05:00
Anthony Ramine
b42aaf28df
Clean up some <time> properties
2017-05-30 16:04:24 +02:00
bors-servo
38a6a3bff6
Auto merge of #17063 - emilio:pres-hints-sharing, r=bholley
...
style: Allow sharing styles across elements with presentational hints.
<!-- 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/17063 )
<!-- Reviewable:end -->
2017-05-30 07:28:06 -05:00
bors-servo
43862ba045
Auto merge of #17092 - heycam:document-colors, r=xidorn
...
style: Add support for disabled document colors.
Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1355716 .
<!-- 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/17092 )
<!-- Reviewable:end -->
2017-05-30 06:10:42 -05:00
bors-servo
433d68955b
Auto merge of #17071 - servo:derive-all-the-things, r=emilio
...
Reuse Rect<T> some more
<!-- 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/17071 )
<!-- Reviewable:end -->
2017-05-30 05:11:28 -05:00
Emilio Cobos Álvarez
7db2776348
s/CachedStyleSharingData/ValidationData.
...
I still think CachedStyleSharingData should be the name, but not going to fight
over it.
2017-05-30 11:23:59 +02:00
Cameron McCormack
c768169149
style: Add support for disabled document colors.
2017-05-30 16:25:08 +08:00
Xidorn Quan
4b687b02fe
Upgrade bindgen to 0.25.3
2017-05-30 17:22:00 +10:00