Commit graph

5389 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
0714652d35
style: Remove another cfg'd import.
And a redundant assertion while at it.
2017-10-01 22:56:00 +02:00
Emilio Cobos Álvarez
5954e0a4ba
style: Remove conditional imports in traversal.rs 2017-10-01 22:55:50 +02:00
Martin Robinson
0380431157 Combine ReflowGoal and ReflowQueryType
This simplifies the logic in the layout_thread and makes it clearer
which types of reflows generate display lists and cause display updates.
2017-09-30 16:06:48 +02:00
Emilio Cobos Álvarez
b7b22b76a8
style: Use PrecomputedHasher for custom properties. 2017-09-30 14:35:38 +02:00
Emilio Cobos Álvarez
497897ffc9
style: Update precomputed-hash. 2017-09-30 14:28:35 +02:00
Emilio Cobos Álvarez
3215e36b5b
style: Cleanup the animated value setup.
We have three different enums to represent slightly different things. Reuse them
properly, and kill some code in the animated_properties module while at it.

MozReview-Commit-ID: 5ZAly8f4lWy
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-29 13:20:50 +02:00
bors-servo
c6f4ced45c Auto merge of #18667 - Manishearth:bindingsup, r=emilio
Update debug bindings for removal of mFrameRefCnt

r=emilio from https://bugzilla.mozilla.org/show_bug.cgi?id=1403808

<!-- 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/18667)
<!-- Reviewable:end -->
2017-09-28 20:15:51 -05:00
bors-servo
5d2ac4aa2e Auto merge of #18668 - bholley:mprotect_diagnostics, r=Manishearth
Add mprotect diagnostics for HashMap crash

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

<!-- 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/18668)
<!-- Reviewable:end -->
2017-09-28 19:10:46 -05:00
Bobby Holley
abd408433f Add a testing API.
This will allow us to verify the entire detection pipeline in real nightly
builds, which will give us confidence that real heap corruption will be
detected and reported properly.

MozReview-Commit-ID: 43Fp2HT8RYy
2017-09-28 15:06:50 -07:00
Bobby Holley
98f370130d Semantics for ProtectedHashMap.
MozReview-Commit-ID: K0m65uZi7iw
2017-09-28 14:13:01 -07:00
Bobby Holley
e2c0ca5110 Update bindings.
MozReview-Commit-ID: 8hyaJxfSi9L
2017-09-28 14:12:56 -07:00
Nazım Can Altınova
dfd12d78c6 stylo: Don't serialize default position on -moz- prefixed linear gradient
Normally, we should not serialize if the line direction points downwards. Unprefixed and
-webkit- prefixed syntaxes use only Keyword enum for line direction and we check them already.
But -moz- prefixed linear gradients can store position too. Therefore it's stored inside
`LineDirection::MozPosition` and we should check that for consistency between other gradients.
2017-09-29 00:06:18 +03:00
Manish Goregaokar
b19b9b78db Update debug bindings for removal of mFrameRefCnt 2017-09-28 13:19:51 -07:00
bors-servo
2c73736f7d Auto merge of #18660 - upsuper:var-sub-inherit, r=emilio
Don't use inherited custom properties for substitution

<!-- Please describe your changes on the following line: -->
Custom properties from parent node has been considered in early stage of cascading them (in [`custom_properties::cascade`](01adcf69d7/components/style/custom_properties.rs (L461-L469))), and there is nothing in the spec stating that substitution should take inherited values into consideration when the value is invalid in the current node. Actually, there is a web-platform test explicitly checks that inherited value is not taken when the value is computed to invalid.

This would fix [bug 1402217](https://bugzilla.mozilla.org/show_bug.cgi?id=1402217).

---
<!-- 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 _____

<!-- 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/18660)
<!-- Reviewable:end -->
2017-09-28 09:06:48 -05:00
Xidorn Quan
dba19f53f5 Don't use inherited custom properties for substitution 2017-09-28 19:46:53 +10:00
Emilio Cobos Álvarez
f6a350b725
style: update bindings. 2017-09-28 10:03:58 +02:00
Emilio Cobos Álvarez
0ead078aa0
style: Simplify and remove some more code.
Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: Ec9pfQw7U6W
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:58:45 +02:00
Emilio Cobos Álvarez
87dc00d54f
style: Remove :-moz-empty-except-children-with-local-name.
<applet> is not a thing anymore, and that selector in our UA sheet will never
match anyway, since an <applet> element will never have the BROKEN state.

Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: 7UOMKOv55uJ
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:58:19 +02:00
Emilio Cobos Álvarez
abcd92ba9e
style: Hide :-moz-devtools-highlighted from anywhere but UA sheets.
It's always used from a UA sheet already.

Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: J3poQuTD1C7
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:57:55 +02:00
Nazım Can Altınova
6ac5e9c3fa stylo: Handle quirks mode on font base sizes 2017-09-28 00:54:30 +03:00
Michael Layzell
47df1375c5 Stop allocating in fmt::Write for nsA[C]String 2017-09-27 13:51:02 -04:00
bors-servo
bad77b6a20 Auto merge of #18652 - emilio:xbl-stuff, r=TYLin
style: Fix various issues with XBL rule matching

See the commit details.

<!-- 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/18652)
<!-- Reviewable:end -->
2017-09-27 09:15:16 -05:00
Emilio Cobos Álvarez
19d34b96e5
style: Fix various issues with XBL rule matching.
We were using the wrong MatchingMode and flags setter just because we didn't
bother threading them down.

This patch fixes the issue seen with the video controls.

MozReview-Commit-ID: Il1WOzRDxI1
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-27 15:29:04 +02:00
Emilio Cobos Álvarez
d82e6926fc
style: Do not optimize out lazy pseudo rules if the main stylist doesn't have rules for it.
This could prevent an XBL binding to use some pseudo-elements fairly randomly.

MozReview-Commit-ID: b44DO8qcfD
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-27 13:29:36 +02:00
Hiroyuki Ikezoe
08574b8c4d Update bindings. 2017-09-27 18:27:58 +09:00
Hiroyuki Ikezoe
5481d8ed6f Compute css variables with custom properties in keyframes for getKeyframes() 2017-09-27 18:27:57 +09:00
Hiroyuki Ikezoe
1b39041a8c Factor custom properties in keyframes into compute values in each keyframe 2017-09-27 18:27:55 +09:00
Hiroyuki Ikezoe
ded0c713db Store custom properties in keyframes into servo's PropertyDeclarationBlock 2017-09-27 18:27:48 +09:00
bors-servo
54f8a131ea Auto merge of #18649 - nnethercote:bug-1400459, r=froydnj
Devirtualize nsIAtom.

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

https://bugzilla.mozilla.org/show_bug.cgi?id=1400459
---
<!-- 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1400459

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because 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/18649)
<!-- Reviewable:end -->
2017-09-27 00:52:31 -05:00
Nicholas Nethercote
67e62f49fd Update Gecko bindings. 2017-09-27 13:48:12 +10:00
Nicholas Nethercote
7019d42523 Devirtualize nsIAtom. 2017-09-27 12:40:31 +10:00
Manish Goregaokar
2e1359b164 stylo: Don't error out on trailing whitespace in attr() 2017-09-26 14:00:11 -07:00
Michael Layzell
98dbf149ad Remove unlanded TakeFrom methods from nsstring_vendor 2017-09-26 14:14:22 -04:00
Michael Layzell
c1c98659b9 Update ns[C]String::from -> ns[C]Str::from where possible 2017-09-26 11:03:35 -04:00
Michael Layzell
cc8b69bae1 Update version of nsstring bindings used by stylo 2017-09-26 10:45:35 -04:00
bors-servo
4450bbdb0c Auto merge of #18640 - emilio:cleanup-as-you-go, r=nox
style: Really minor cleanups.

See commits for details.
2017-09-26 07:53:43 -05:00
Emilio Cobos Álvarez
2bf84ba468
style: There are no more ua_sheets. 2017-09-26 14:52:00 +02:00
Emilio Cobos Álvarez
8a51a4eb01
style: Reformat a bunch of signatures in wrapper.rs 2017-09-26 14:49:27 +02:00
Emilio Cobos Álvarez
4e6fd5693a
style: Cleanup some media-query-related code. 2017-09-26 14:49:25 +02:00
bors-servo
3dbb97922d Auto merge of #18638 - emilio:invalidation-lazy, r=heycam
style: Lazily tweak the traversal root to account for sibling invalidations.

Bug: 1403078
Reviewed-by: heycam
MozReview-Commit-ID: Ij3nMOKu5FO
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

<!-- 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/18638)
<!-- Reviewable:end -->
2017-09-26 06:58:04 -05:00
Emilio Cobos Álvarez
07d55a4bf8
style: Lazily tweak the traversal root to account for sibling invalidations.
Bug: 1403078
Reviewed-by: heycam
MozReview-Commit-ID: Ij3nMOKu5FO
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-26 13:09:03 +02:00
Nicholas Nethercote
e030c0d96a Rename add_size_of_children() methods as add_size_of().
This makes them match `size_of` from `MallocSizeOf`.
2017-09-26 18:54:36 +10:00
Cameron McCormack
b1671f1282 style: Regenerate Gecko bindings. 2017-09-26 15:08:13 +08:00
Cameron McCormack
23d710bc36 style: Add support for -moz-font-smoothing-background-color. 2017-09-26 09:17:08 +08:00
Emilio Cobos Álvarez
638ba2ce6d
style: Simplify paint-order serialization when possible.
This matches Gecko, and fixes the last reported case in bug 1397619.

MozReview-Commit-ID: 4Z7GeaokKE1
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-25 16:07:33 +02:00
Emilio Cobos Álvarez
614da6b4a1
style: Simplify paint-order gecko-related code.
We share value representation, so there's no reason to do this in a more complex
way.

MozReview-Commit-ID: BITfCPqTkal
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-25 16:07:33 +02:00
Emilio Cobos Álvarez
3067d2e320
style: Early return in a couple of places to deindent some code.
MozReview-Commit-ID: 8hDAKZANOro
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-25 16:07:32 +02:00
Emilio Cobos Álvarez
0b930255f4
style: Early return and skip duplicate assertion in matching.rs 2017-09-25 10:59:34 +02:00
Hiroyuki Ikezoe
aefea7230f Handle display property change from 'none' only if there is restyle hint for SMIL
We only need to handle changes when the display property is changed from 'none'
when we have a restyle hint for SMIL.  The only other case where we expect to
see changes to display property during an animation are from using the CSSOM.
However, when the display property is changed from 'none' by the CSSOM, during
the animation-only restyle we can skip all descendants since they will be
traversed in the subsequent normal traversal because at that time we flush
style sheets and traverse all elements in the document. So we don't need to
care about the descendants during animation-only restyle.
2017-09-25 13:53:30 +09:00
Hiroyuki Ikezoe
fd0295ead2 Use 4-spaces instead of 2-spaced 2017-09-25 13:49:17 +09:00