Emilio Cobos Álvarez
d1a3cb6d94
style: Get rid of ComputedValueAsSpecified in inherited_text.rs
2017-09-11 11:29:31 +02:00
Emilio Cobos Álvarez
a3bfa5db3e
style: Get rid of a few ComputedValueAsSpecified in grid.
...
Need Box to remove the macro invocation.
2017-09-11 11:29:30 +02:00
Emilio Cobos Álvarez
4c283fbed6
style: Get rid of ComputedValueAsSpecified for alignment props.
2017-09-11 11:29:29 +02:00
Emilio Cobos Álvarez
64ab73eabd
style: Properly use integers on grid properties, and derive ToComputedValue.
2017-09-11 11:29:27 +02:00
Emilio Cobos Álvarez
02d24061e7
style: Avoid ComputedValueAsSpecified for TrackKeyword.
2017-09-11 11:22:25 +02:00
Emilio Cobos Álvarez
5e136a7a05
style: Get rid of ComputedValueAsSpecified in box.mako.rs.
2017-09-11 11:22:24 +02:00
Emilio Cobos Álvarez
a4da2220c1
style: Unify the trivial ToComputedValue implementations, and add impls for i32.
2017-09-11 11:22:23 +02:00
Emilio Cobos Álvarez
b94dd4885d
style: Derive ToComputedValue for TransitionProperty.
2017-09-11 11:22:22 +02:00
Emilio Cobos Álvarez
84f3073402
style: Avoid ComputedValueAsSpecified in template-areas.
...
Would need to impl ToComputedValue for Range and Box, which is undoable right
now.
2017-09-11 11:22:21 +02:00
Emilio Cobos Álvarez
5b05aa7c52
style: Derive ToComputedValue in grid properties.
2017-09-11 11:22:20 +02:00
Emilio Cobos Álvarez
b9f5388635
style: Use derive for -x-span.
2017-09-11 11:22:20 +02:00
Emilio Cobos Álvarez
156b371376
style: Use derive(TCV) in GeometryBox.
2017-09-11 11:22:19 +02:00
Emilio Cobos Álvarez
900eaec3cc
style: Remove the special-case in single_keyword_computed.
...
The other case is pretty much the same.
2017-09-11 11:22:18 +02:00
Emilio Cobos Álvarez
9788ffe3e4
style: Derive ToComputedValue for font-variant-caps.
2017-09-11 11:22:17 +02:00
Emilio Cobos Álvarez
c87b485fa6
style: Derive ToComputedValue for keyword types.
2017-09-11 11:22:17 +02:00
Emilio Cobos Álvarez
06c8e0163e
style: Manually expand ComputedValueAsSpecified in the keyword macros.
2017-09-11 11:22:16 +02:00
Emilio Cobos Álvarez
95712d5edf
style: Minor reformatting in macros.rs
2017-09-11 11:22:15 +02:00
bors-servo
8129cf5563
Auto merge of #18206 - ferjm:bug1382369.grid.repeat.function, r=wafflespeanut
...
stylo: store specified value of grid layout repeat() function
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1382369](https://bugzilla.mozilla.org/show_bug.cgi?id=1382369 )
<!-- 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/18206 )
<!-- Reviewable:end -->
2017-09-11 02:32:38 -05:00
Emilio Cobos Álvarez
6661bfa838
fallible: Avoid using system malloc in servo.
2017-09-10 16:53:42 +02:00
Julian Seward
c85633f48e
stylo: Add uses of fallible Vec, SmallVec and HashMap facilities.
...
Bug: 1395064
Reviewed-by: emilio
2017-09-10 16:42:06 +02:00
Boris Zbarsky
385e34acee
Avoid array overallocation when parsing background shorthand. r=xidorn
...
This is part 2 of the fix for Gecko bug 1397614
<https://bugzilla.mozilla.org/show_bug.cgi?id=1397614 >
2017-09-09 10:55:59 -04:00
Boris Zbarsky
26b39241f9
Box gradients and rects in Image. r=xidorn
...
Gradients and rects are rare, and large. Image is much smaller with them boxed.
This is part of of the fix for Gecko bug 1397614
<https://bugzilla.mozilla.org/show_bug.cgi?id=1397614 >
2017-09-09 10:55:58 -04:00
Emilio Cobos Álvarez
0a1a134050
style: remove selector_map::find_push.
...
It has a single caller and is overly generic, which is going to make harder to
add fallible allocations to it.
2017-09-09 09:56:09 +02:00
bors-servo
c0c43da1f9
Auto merge of #18426 - hiikezoe:transition-shorthand, r=xidorn,boris
...
Transition shorthand fix
<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1397122
---
- [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/18426 )
<!-- Reviewable:end -->
2017-09-08 22:11:50 -05:00
bors-servo
8065eac0eb
Auto merge of #18423 - emilio:more-stale-todos, r=nox
...
More stale todos
Just removing or rewording stale stuff.
<!-- 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/18423 )
<!-- Reviewable:end -->
2017-09-08 21:09:58 -05:00
Hiroyuki Ikezoe
aad63f241c
Handle values as valid in single transition shorthand even if the transition-property is 'none'.
...
A single transition value that includes 'none' for transition-property is
valid, so we should store whole specified values (if it's valid). Whereas,
the spec [1] clearly says for the case where there are multiple entries;
If there is more than one <single-transition> in the shorthand, and any of
the transitions has none as the <single-transition-property>, then the
declaration is invalid.
'none 2s linear 2s' is a test case for the former, '1s width, 2s none' is a
test case for the latter.
Note that with this patch, 'transition: none' is serialized as 'none 0s ease 0s'
instead of 'none' but it matches Gecko.
[1] https://drafts.csswg.org/css-transitions/#single-transition
MozReview-Commit-ID: 3o3z5GFyMqh
2017-09-09 09:00:55 +09:00
Hiroyuki Ikezoe
42873abe84
Simplify transition-property parser.
2017-09-09 09:00:22 +09:00
Emilio Cobos Álvarez
56282f4fab
style: Reword a TODO in the stylesheet invalidation code.
...
We already run that for removals.
2017-09-09 00:10:00 +02:00
Emilio Cobos Álvarez
d5a24b79d9
style: Remove another stale todo in animation.rs
...
There's no mutex anymore.
2017-09-09 00:09:59 +02:00
Emilio Cobos Álvarez
7f2a9478f0
style: Minimal cleanup in bloom.rs
2017-09-09 00:09:58 +02:00
Emilio Cobos Álvarez
caa83fc421
style: Remove another stale todo.
...
This was fixed by me in 1e6999b02b
.
2017-09-09 00:09:56 +02:00
bors-servo
9c0abfea23
Auto merge of #18422 - emilio:stale-todo, r=bholley
...
style: Remove stale todo about handling scrollbars in viewport units.
This is effectively not going to happen, per
https://github.com/w3c/csswg-drafts/issues/1766
<!-- 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/18422 )
<!-- Reviewable:end -->
2017-09-08 16:30:26 -05:00
Emilio Cobos Álvarez
9a55b1e469
style: Remove stale todo about handling scrollbars in viewport units.
...
This is effectively not going to happen, per
https://github.com/w3c/csswg-drafts/issues/1766
2017-09-08 23:24:12 +02:00
bors-servo
2b73735539
Auto merge of #18413 - Manishearth:bump-au, r=jdm
...
Bump app_units; use from_f64_au
<!-- 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/18413 )
<!-- Reviewable:end -->
2017-09-08 14:06:26 -05:00
bors-servo
fef2cfde8c
Auto merge of #18341 - ferjm:bug1384225.media.errors, r=jdm
...
stylo: Error reporting for unknown media features
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1384225](https://bugzilla.mozilla.org/show_bug.cgi?id=1384225 )
<!-- 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/18341 )
<!-- Reviewable:end -->
2017-09-08 11:14:51 -05:00
Fernando Jiménez Moreno
337a90329c
stylo: Error reporting for unknown media features
2017-09-08 12:48:50 +02:00
Manish Goregaokar
489bbb849a
Bump app_units; use from_f64_au
2017-09-08 00:37:25 -07:00
bors-servo
44072163eb
Auto merge of #18417 - emilio:grid-gap-shorthand, r=heycam
...
style: Stop the grid shorthand from resetting grid-gap properties.
Bug: 1387410
Reviewed-by: heycam
MozReview-Commit-ID: GxU9YuAUc00
<!-- 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/18417 )
<!-- Reviewable:end -->
2017-09-08 01:30:07 -05:00
Emilio Cobos Álvarez
7bf6b528b1
style: Stop the grid shorthand from resetting grid-gap properties.
...
Bug: 1387410
Reviewed-by: heycam
MozReview-Commit-ID: GxU9YuAUc00
2017-09-08 08:24:53 +02:00
bors-servo
dfc38fabdc
Auto merge of #18404 - nnethercote:measure-PropertyDeclaration, r=heycam
...
Measure PropertyDeclaration better.
This increases the style-sheets counts for gmail by about 30 MiB.
<!-- Please describe your changes on the following line: -->
r? @heycam
---
<!-- 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
- [X] These changes do not require tests because code is tested on the Gecko side.
<!-- 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/18404 )
<!-- Reviewable:end -->
2017-09-08 00:22:05 -05:00
Nicholas Nethercote
0ee32cc8c5
Measure PropertyDeclaration better.
...
This increases the style-sheets counts for gmail by about 30 MiB.
2017-09-08 13:36:06 +10:00
bors-servo
c8bc6ca420
Auto merge of #18409 - BorisChiou:stylo/calc/unit, r=emilio
...
Keep the unit of the serialization of specified::CalcLengthOrPercentage.
For the serialization of specified values of calc(), we should keep the
units of absolute lengths, so use AbsoluteLength.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1396692](https://bugzilla.mozilla.org/show_bug.cgi?id=1396692 ).
- [X] These changes do not require tests because we have wpt tests for this already.
<!-- 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/18409 )
<!-- Reviewable:end -->
2017-09-07 21:34:28 -05:00
Bobby Holley
f3abbb4ee3
Increase stack safety margin for stylo.
...
MozReview-Commit-ID: Fv9DttU20hM
2017-09-07 11:44:45 -07:00
Boris Chiou
6607103f94
Keep the unit of the serialization of specified::CalcLengthOrPercentage.
...
For the serialization of specified values of calc(), we should keep the
units of absolute lengths, so use AbsoluteLength.
2017-09-07 22:39:18 +08:00
Emilio Cobos Álvarez
86f4e22fc2
stylo: Don't add boundary characters to the fixups specified in ServoBindings.toml
...
This allows adjusting the fixups for the patches in bug 1393230 when using
libclang 3.9.
2017-09-07 15:37:43 +02:00
Julian Seward
155a20ff83
Bug 1389009 - stylo: Add fallible append APIs for Vec and SmallVec. r=manishearth.
2017-09-07 12:04:37 +02:00
Nicholas Nethercote
61877b7316
Measure selectors.
...
This patch adds measurement of Selectors within StyleRule. This requires
exposing the pointer within ThinArc.
The patch also adds measurement of the several CssRule variants, in order to
measure nested CssRules (and PropertyDeclarationBlocks) within them:
DocumentRule, MediaRule, PageRule, SupportsRule.
2017-09-07 15:01:11 +10:00
bors-servo
812cac78f0
Auto merge of #18399 - Manishearth:stylo-fuzzfix, r=emilio
...
stylo: Overflow fixes
r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1397363 , https://bugzilla.mozilla.org/show_bug.cgi?id=1397439
<!-- 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/18399 )
<!-- Reviewable:end -->
2017-09-06 17:47:28 -05:00
Manish Goregaokar
e4de8d10a6
stylo: Use saturating subtraction for script level
2017-09-06 15:42:24 -07:00
Manish Goregaokar
c063ff88de
stylo: Clamp Au on accumulation
2017-09-06 15:42:12 -07:00