Commit graph

17658 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
d570fc8164
style: Remove pretty useless layer of abstraction. 2017-12-02 03:23:22 +01:00
bors-servo
49e6594bc9 Auto merge of #19455 - emilio:color-does-stupid-things-too, r=upsuper
style: Don't waste an allocation when failing to parse a CSSParserColor.

I see that allocation show up in the profiles, and it makes sense, because
system colors and such are common in Firefox, and they're just wasting it.

Note that the clone() added is refcounted.

<!-- 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/19455)
<!-- Reviewable:end -->
2017-12-01 18:03:11 -06:00
bors-servo
f7aa22a87e Auto merge of #19451 - emilio:inlining-is-fun, r=upsuper
style: Inline some things that should never ever appear in a profile.

<!-- 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/19451)
<!-- Reviewable:end -->
2017-12-01 16:52:34 -06:00
bors-servo
bca8951182 Auto merge of #19453 - emilio:is-root-is-slow, r=upsuper
style: Add a fast-path for GeckoElement::is_root.

<!-- 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/19453)
<!-- Reviewable:end -->
2017-12-01 15:14:13 -06:00
Emilio Cobos Álvarez
848a8581ac
style: Don't waste an allocation when failing to parse a color.
I see that allocation show up in the profiles, and it makes sense, because
system colors and such are common in Firefox, and they're just wasting it.

Note that the clone() added is refcounted.
2017-12-01 20:55:24 +01:00
Emilio Cobos Álvarez
382a89511a
style: Add a fast-path for GeckoElement::is_root. 2017-12-01 20:17:53 +01:00
Emilio Cobos Álvarez
2bbeda97d3
style: Inline some things that should never ever appear in a profile. 2017-12-01 20:04:33 +01:00
bors-servo
210d0ab30a Auto merge of #19447 - emilio:arc-soundness, r=jdm
servo_arc: Add some #[inline] and repr(C) annotations.

inline is probably unnecessary, but anyway... We rely on those being repr(C), so
they rather have some.

<!-- 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/19447)
<!-- Reviewable:end -->
2017-12-01 12:58:11 -06:00
bors-servo
712d75af01 Auto merge of #19307 - avadacatavra:domrefcellpanic, r=jdm
change parse_own_css to queue event not fire synchronously

<!-- Please describe your changes on the following line: -->
fixes a panic and aligns with spec

I've also added checks around each mutable borrow of the tokenizer to see if we can catch any other panics

---
<!-- 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 #18930 (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/19307)
<!-- Reviewable:end -->
2017-12-01 11:41:47 -06:00
Emilio Cobos Álvarez
0f12380db3
style: Make -moz-border-colors chrome only.
This also makes the `border` shorthand not reset them.

Bug: 1417200
Reviewed-by: xidorn
MozReview-Commit-ID: KNais1e5FnE
2017-12-01 16:49:55 +01:00
Emilio Cobos Álvarez
a1521d9d4d
servo_arc: Add some #[inline] and repr(C) annotations.
inline is probably unnecessary, but anyway... We rely on those being repr(C), so
they rather have some.
2017-12-01 14:34:38 +01:00
Emilio Cobos Álvarez
0bcd36838d
style: Remove redundant style sharing check.
We check that a few lines before calling test_candidate.
2017-11-30 17:26:45 +01:00
ddh
79d896d474 queue event instead of immediately fire
created checks to see if parser is in use before event dispatch

changed tests to expect crash and added async style test
2017-11-30 16:18:57 +00:00
bors-servo
fce44a2e13 Auto merge of #19429 - upsuper:sharing-quirks-id, r=emilio
Don't try to share style on quirks mode whenever two elements have different id

This fixes [bug 1420946](https://bugzilla.mozilla.org/show_bug.cgi?id=1420946).

<!-- 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/19429)
<!-- Reviewable:end -->
2017-11-30 08:23:07 -06:00
Emilio Cobos Álvarez
1168305e93
style: Update bindings. 2017-11-30 14:23:49 +01:00
Emilio Cobos Álvarez
b45686f243
style: Disable @-moz-document on author sheets on nightly and early beta.
Bug: 1035091
Reviewed-by: xidorn
MozReview-Commit-ID: AAUs1jJifjS
2017-11-30 14:08:55 +01:00
Emilio Cobos Álvarez
2beb441d04
style: Bail out from invalidation if we're the root and got tons of descendant invalidations.
Bug: 1420741
Reviewed-by: heycam
MozReview-Commit-ID: 4Kja20Ep9qD
2017-11-30 12:28:59 +01:00
Xidorn Quan
af8026a98c Don't try to share style on quirks mode whenever two elements have different id 2017-11-29 19:37:03 -06:00
bors-servo
cc8f9305e4 Auto merge of #19406 - ghoo1125:add_inner_spin, r=heycam
Add a new value inner-spin-button to -moz-appearance in stylo.

<!-- Please describe your changes on the following line: -->
Add a new value inner-spin-button to -moz-appearance. See bug 1417751.
https://reviewboard.mozilla.org/r/200244/diff/6#index_header

---
<!-- 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/19406)
<!-- Reviewable:end -->
2017-11-29 19:14:41 -06:00
bors-servo
95aac490a5 Auto merge of #19426 - emilio:cache-invalidation, r=xidorn
style: Require an nth-index cache for invalidation.

<!-- 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/19426)
<!-- Reviewable:end -->
2017-11-29 16:36:48 -06:00
bors-servo
fa3f3896d3 Auto merge of #19412 - CYBAI:grid-template-areas-out-of-mako, r=emilio
style: Move grid-template-areas 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 #19409
- [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/19412)
<!-- Reviewable:end -->
2017-11-29 15:24:33 -06:00
Emilio Cobos Álvarez
02ad6d3d90
style: Require an nth-index cache for invalidation. 2017-11-29 21:22:29 +01:00
bors-servo
05b57e67b6 Auto merge of #19425 - emilio:log-invalidation, r=xidorn
style: Log a bit more information about invalidation collection.

<!-- 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/19425)
<!-- Reviewable:end -->
2017-11-29 14:14:58 -06:00
Emilio Cobos Álvarez
dceda4465c
style: Log a bit more information about invalidation collection. 2017-11-29 19:23:53 +01:00
bors-servo
dbe3136a05 Auto merge of #19424 - mbrubeck:veclike, r=emilio
Remove unused generic from push_applicable_declarations

This function is only ever used with one type.

This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35).  If we do need to make this function generic in the future, we can do it using standard traits instead.

---
- [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 they are removing unused code

<!-- 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/19424)
<!-- Reviewable:end -->
2017-11-29 11:47:33 -06:00
Matt Brubeck
0009ccd330 Remove unused generic from push_applicable_declarations
This function is only ever used with one type.  This gets rid of the
only use of the `smallvec::VecLike` trait, which we may want to
deprecate.  (If we do need to make this function generic in the future,
we can do it using standard traits instead.)
2017-11-29 09:20:13 -08:00
CYBAI
003ddfc945 style: Move grid-template-areas outside of mako 2017-11-29 22:36:55 +08:00
Ting-Yu Lin
f8648ff602 style: Update Gecko bindings
MozReview-Commit-ID: J7VPWvOtP88
2017-11-29 18:01:49 +08:00
Louis Chang
47d4d16539 Add a new value inner-spin-button to -moz-appearance in stylo. 2017-11-29 18:01:36 +08:00
Ting-Yu Lin
14ec5a662f style: Update Gecko bindings
MozReview-Commit-ID: FUsLXeucoz2
2017-11-29 11:27:42 +08:00
Ting-Yu Lin
923ffcf2cc style: Support shape-image: <image>
MozReview-Commit-ID: GSCZIMEpCS2
2017-11-29 11:27:31 +08:00
Simon Sapin
eb3652b3c6 Replace parse-hosts crate with 10 lines of code.
This removes 3927 lines of Rust code in 6 crates from the dependency graph:
parse-hosts, multistr, bow, extra-default, len-trait, and push-trait.

One of these crates doesn’t build in today’s Nightly:
https://github.com/rust-lang/rust/issues/46328
2017-11-28 16:19:29 +01:00
bors-servo
66d0a41127 Auto merge of #19378 - CYBAI:grid-auto-flow-out-of-mako, r=emilio
style: Move grid-auto-flow 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 #19375
- [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/19378)
<!-- Reviewable:end -->
2017-11-28 05:16:49 -06:00
bors-servo
5568c4e3d3 Auto merge of #19384 - CYBAI:fix-19177, r=emilio
Call children_changed on the parent node consistently

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19177
- [x] There are tests for these changes

<!-- 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/19384)
<!-- Reviewable:end -->
2017-11-28 04:08:51 -06:00
bors-servo
823da9e34a Auto merge of #19388 - BorisChiou:stylo/dommatrix/parser, r=emilio,heycam
stylo: Implement Servo_ParseTransformIntoMatrix

This is an inter-dependent patch of Bug 1408310.

DOMMatrix needs to convert a specified transform list into a matrix, so we rewrite
to_transform_3d_matrix by generics for both specified and computed transform lists.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1408310](https://bugzilla.mozilla.org/show_bug.cgi?id=1408310).
- [X] These changes do not require tests because we can count on the wpt tests for DOMMatrix on Gecko side.

<!-- 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/19388)
<!-- Reviewable:end -->
2017-11-27 20:13:34 -06:00
Boris Chiou
3a38e815ec Implement Servo_ParseTransformIntoMatrix.
DOMMatrix needs to convert a specified transform list into a matrix, so
we could rewrite to_transform_3d_matrix by generics for both specified
and computed transform lists.

Besides, we have to update the test case because we use Transform3D<f64> to
compute the matrix, instead of Transform3D<f32>, so the result will be
the same as that in Gecko. Using 0.3 may cause floating point issue
because (0.3f32 as f64) is not equal to 0.3 (i.e. floating point precision
issue), so using 0.25 instead.
2017-11-28 10:08:12 +08:00
bors-servo
df50a9a81c Auto merge of #19391 - emilio:early-props-docs, r=upsuper
style: Add a comment about why early properties are early.

<!-- 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/19391)
<!-- Reviewable:end -->
2017-11-27 17:42:50 -06:00
bors-servo
7c99ae3bb8 Auto merge of #19398 - emilio:visited-as-an-image, r=dholbert
style: Disable :visited if the document is being used as an image.

Bug: 1420001
Reviewed-by: dholbert
MozReview-Commit-ID: F9MeT1kXZER
2017-11-27 14:57:57 -06:00
Emilio Cobos Álvarez
f94601d0a7
style: Disable :visited if the document is being used as an image.
Bug: 1420001
Reviewed-by: dholbert
MozReview-Commit-ID: F9MeT1kXZER
2017-11-27 21:20:14 +01:00
Emilio Cobos Álvarez
5887e1e55c
style: Move get_writing_mode outside of mako, and add a pointer to it. 2017-11-27 21:14:53 +01:00
bors-servo
769b643c0f Auto merge of #19380 - emilio:my-existence-seems-a-continuous-fight-with-xbl, r=heycam
style: Bring back the optimization to avoid traversing XBL subtrees that will likely change.

Bug: 1420496
Reviewed-by: heycam
MozReview-Commit-ID: 3sIGtcVOt0r

<!-- 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/19380)
<!-- Reviewable:end -->
2017-11-27 13:35:28 -06:00
Emilio Cobos Álvarez
cf45a45e18
style: Add a comment about why early properties are early. 2017-11-27 20:12:59 +01:00
Emilio Cobos Álvarez
7a5a35f5e0
style: Fix indentation of multiple CssParserContext construction. 2017-11-27 15:35:16 +01:00
Emilio Cobos Álvarez
92e9f12bd0
style: Remove quite useless StyleChange constructor. 2017-11-27 15:17:44 +01:00
Emilio Cobos Álvarez
3bfe529728
style: Deindent some code in matching.rs 2017-11-27 15:13:38 +01:00
Emilio Cobos Álvarez
3e1ae65e43
style: Remove redundant deny(). 2017-11-27 15:10:50 +01:00
Emilio Cobos Álvarez
c786fd2e55
style: Prefer doc comments to #[doc] annotations. 2017-11-27 15:10:28 +01:00
CYBAI
3a740142d9 Call children_changed on the parent node consistently 2017-11-27 20:19:08 +08:00
Emilio Cobos Álvarez
47e9c88742
style: Deindent some property declaration code. 2017-11-26 17:16:22 +01:00
CYBAI
09321bfb68 style: Move grid-auto-flow outside of mako 2017-11-26 23:51:02 +08:00