Commit graph

2528 commits

Author SHA1 Message Date
Manish Goregaokar
f2f832d1d9 stylo: Support all non-ts pseudos with an argument 2017-03-21 12:33:57 -07:00
bors-servo
d790973fb4 Auto merge of #16062 - BorisChiou:stylo/animation/parse_number, r=emilio
stylo: Make specified::parse_number() return finite f32.

We need to clamp the float numbers to avoid positive/negative infinity in timing functions, transform functions, and other possible css values to avoid undefined behaviors and assertions.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1343153](https://bugzilla.mozilla.org/show_bug.cgi?id=1343153) and [Bug 1336769](https://bugzilla.mozilla.org/show_bug.cgi?id=1336769)
- [X] These changes do not require tests because gecko has related 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/16062)
<!-- Reviewable:end -->
2017-03-21 09:22:37 -07:00
Boris Chiou
f3a99baeac Make specified::parse_number() return finite f32. 2017-03-22 00:20:55 +08:00
Emilio Cobos Álvarez
6c1153ab28
Revendor rust nsstring bindings. 2017-03-21 10:26:45 +01:00
Boris Chiou
30f44da11c Bug 1343153 - Replace pointer to const with immutable reference for nsTimingFunction. 2017-03-21 16:35:07 +08:00
Boris Chiou
708f446364 Bug 1343153 - Support Servo_ParseEasing. 2017-03-21 16:34:58 +08:00
bors-servo
32ca5f3540 Auto merge of #16053 - bholley:shared_lock_atomic_refcell, r=bholley
Use AtomicRefCell instead of RwLock inside SharedRwLock for stylo

@SimonSapin wrote the original patch in [1], and I tweaked it to conditionally compile. Just waiting for the try run to come back green before landing.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1348587

<!-- 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/16053)
<!-- Reviewable:end -->
2017-03-20 17:00:31 -07:00
Simon Sapin
7850d3f331 Use AtomicRefCell instead of RwLock inside SharedRwLock for stylo.
MozReview-Commit-ID: 8M6BUqe4pil
2017-03-20 16:36:03 -07:00
Nazım Can Altınova
260e919f7b
Stylo: Update bindings for ServoType 2017-03-20 21:18:59 +03:00
bors-servo
17098ddc8f Auto merge of #16045 - mbrubeck:any, r=emilio
Bug 1348487 - stylo: Don't allow combinators in :-moz-any.

https://bugzilla.mozilla.org/show_bug.cgi?id=1348487
2017-03-20 08:31:25 -07:00
Matt Brubeck
b8dead37f6 Bug 1348487 - stylo: Don't allow combinators in :-moz-any. 2017-03-20 08:28:56 -07:00
bors-servo
4a63581fad Auto merge of #15918 - munyari:whitespace, r=emilio
PropertyDeclaration with CSSWideKeyword is parsed

Addresses #15401

<!-- 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/15918)
<!-- Reviewable:end -->
2017-03-20 04:23:28 -07:00
bors-servo
9fdebf0934 Auto merge of #16035 - emilio:parallel-log-no-fun, r=upsuper
stylo: Sequentialize binding generation if logging is enabled.

Otherwise the log is useless, and it's even slower than in parallel mode due to
the high lock contention.

<!-- 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/16035)
<!-- Reviewable:end -->
2017-03-20 03:43:26 -07:00
Emilio Cobos Álvarez
e348940296
stylo: Sequentialize binding generation if logging is enabled.
Otherwise the log is useless, and it's even slower than in parallel mode due to
the high lock contention.
2017-03-20 11:42:41 +01:00
bors-servo
50fd39f068 Auto merge of #16016 - Manishearth:graft-font-size, r=upsuper
Add separate specified value for keyword font sizes

In Gecko, these keywords compute to different values depending on the
font.

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

<!-- 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/16016)
<!-- Reviewable:end -->
2017-03-20 00:28:46 -07:00
Manish Goregaokar
c9198d92d5 Add separate specified value for keyword font sizes
In Gecko, these keywords compute to different values depending on the
font.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1341775
2017-03-20 00:06:04 -07:00
Jeremy Chen
615c8cb5e6 stylo: Add support for text-size-adjust property 2017-03-20 11:34:48 +08:00
Panashe M. Fundira
ec87545774
PropertyDeclaration with CSSWideKeyword is parsed
Addresses #15401

The desired result is for `CSSWideKeyword`s to return false (they are
parsed) and other Custom declaration values to return true (they are unparsed).
2017-03-19 18:37:40 -04:00
Simon Sapin
643545b87f Per-document shared lock for author-origin stylesheets.
Fix #16027
2017-03-19 23:12:15 +01:00
Simon Sapin
d5074136e3 Rename ReadGuards to StylesheetGuards 2017-03-19 22:30:42 +01:00
Simon Sapin
d9491187dc Parse stylesheets without acquiring a shared lock. 2017-03-19 22:30:40 +01:00
Simon Sapin
1e38013783 Refactor StylesheetLoader so impls do not need to acquire a shared lock.
This fixes a deadlock:
https://github.com/servo/servo/pull/16014#issuecomment-287527067
2017-03-19 22:30:39 +01:00
Simon Sapin
1bacd0eb15 Move all PropertyDeclarationBlock from RwLock<_> to Locked<_> 2017-03-19 22:30:38 +01:00
Simon Sapin
aeffca2a59 Replace RwLock<StyleRule> with Locked<StyleRule> 2017-03-19 22:30:37 +01:00
Simon Sapin
57724e5a37 Replace RwLock<Keyframe> with Locked<Keyframe> 2017-03-19 22:30:37 +01:00
Simon Sapin
adb97d4cbe Wrap most CSS rules in Locked<_> instead of RwLock<_> 2017-03-19 22:30:36 +01:00
Simon Sapin
f35b4e27b3 Replace RwLock<CssRules> with Locked<CssRules> 2017-03-19 22:30:35 +01:00
Simon Sapin
600152bd00 Replace more RwLock<MediaList> with shared_lock::Locked<MediaList> 2017-03-19 22:30:34 +01:00
Simon Sapin
fe4e70c5f8 Introduce a ToCssWithGuard trait 2017-03-19 22:30:33 +01:00
Simon Sapin
3ae2ecbec2 More lock acquire in callers 2017-03-19 22:30:32 +01:00
Simon Sapin
d18b1280f2 Move shared lock acquires up the call stack. (Or is it down?) 2017-03-19 22:30:32 +01:00
Simon Sapin
c5a7294e05 Replace RwLock<MediaList> with shared_lock::Locked<MediaList> 2017-03-19 22:30:31 +01:00
Simon Sapin
8feb9e8047 Add SharedRwLock<T> and Locked<T> 2017-03-19 22:30:24 +01:00
Zach Ploskey
cbaa6e262c Serialize font to "" on some nondefault properties
Fixes font shorthand serialization so that it serializes to "" when
certain subproperties of the font shorthand are set to non-default
values. These subproperties are:
- font-size-adjust
- font-kerning
- font-variant-caps
- font-variant-position
- font-language-override

Additionally, enable the above subproperties in the tests.
2017-03-19 00:16:19 -07:00
bors-servo
a2c33ac6e6 Auto merge of #16028 - canaltinova:pseudos-for-alt, r=Manishearth
Stylo: Add support for -moz-*  pseudo-classes for alt text

<!-- 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 [Bug 1341642](https://bugzilla.mozilla.org/show_bug.cgi?id=1341642)

<!-- Either: -->
- [X] These changes do not require tests because they are stylo 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/16028)
<!-- Reviewable:end -->
2017-03-18 13:45:01 -07:00
George White
00da1eb810 Add parsing/serialisation for 'grid-auto-flow' 2017-03-18 23:38:31 +05:30
Nazım Can Altınova
d23cbd37b8
Stylo: Add support for -moz-* pseudo-classes for alt text 2017-03-18 19:46:53 +03:00
bors-servo
7fcba10614 Auto merge of #16023 - emilio:nits, r=emilio
style: Fix some nits

I was looking at the code that used Length for #16015, and found these two.

<!-- 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/16023)
<!-- Reviewable:end -->
2017-03-18 07:24:52 -07:00
Emilio Cobos Álvarez
60d340d76f
style: Remove outdated comment. 2017-03-18 15:05:26 +01:00
Emilio Cobos Álvarez
fe9d88326e
style: Fix alignment of the padding properties. 2017-03-18 15:05:25 +01:00
Emilio Cobos Álvarez
a1930fc554
stylo: Add a build log mechanism.
MozReview-Commit-ID: 4Zo1EveUYkK
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-18 13:21:10 +01:00
Bobby Holley
97dd3a1b08 Box more specified values to bring SpecifiedValue/PropertyDeclaration sizes down to 24/32 bytes.
MozReview-Commit-ID: xstAfjVQqi
2017-03-17 22:18:19 -07:00
bors-servo
8f3f8098c3 Auto merge of #16006 - upsuper:box-ordinal-group, r=Manishearth
Implement -moz-box-ordinal-group property

This PR fixes #16000.

<!-- 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/16006)
<!-- Reviewable:end -->
2017-03-17 15:15:01 -07:00
Xidorn Quan
a1acb29aed Add support for -moz-box-ordinal-group 2017-03-17 23:08:07 +11:00
Xidorn Quan
ab0e5c9d99 Switch column-count to use predefined integer type 2017-03-17 23:08:05 +11:00
Xidorn Quan
9233882d49 Switch z-index to use predefined integer type 2017-03-17 23:08:03 +11:00
Xidorn Quan
b489c4ed90 Make Interpolate impl generic for Either 2017-03-17 23:08:00 +11:00
Xidorn Quan
0d556ddbf0 Add a predefined integer type 2017-03-17 23:07:57 +11:00
cku
6ccbf499b8 stylo: Update transform-box glue. 2017-03-17 20:00:28 +08:00
cku
e8d8b9984f stylo: Update clip-path glue. 2017-03-17 19:55:31 +08:00