Commit graph

16155 commits

Author SHA1 Message Date
Manish Goregaokar
ac1bae4f7a servo: Move FontComputationData to the end of ServoComputedValues to make size check easier, make it NonZero
We fail bindgen layout tests on 32 bit because FontComputationData does not accurately reflect the size/alignment of the rust-side replacement.

We move it to the end so that alignment is more straightforward, and
use a NonZero enum so that the representation can be more accurately
handled on the C++ side.

MozReview-Commit-ID: 8GlSma3Wl9W
2017-07-20 09:39:30 -07:00
Emilio Cobos Álvarez
ef4fbfaa6b
Revert "Backed out changeset b10e6ba9cbdb because gecko part had to be backed out."
This reverts commit b96d96d448.

The fix on the Gecko side is trivial, and I can land it after this lands.
2017-07-20 17:26:53 +02:00
bors-servo
3d66cdeed4 Auto merge of #17801 - emilio:visited-inherited, r=jryans
style: Don't inherit from the parent visited style if we're a link.

Bug: 1377469
Reviewed-by: jryans
MozReview-Commit-ID: CoMj9KSb5w9
2017-07-20 08:25:09 -07:00
Emilio Cobos Álvarez
6f0c912b95
style: Don't inherit from the parent visited style if we're a link.
Bug: 1377469
Reviewed-by: jryans
MozReview-Commit-ID: CoMj9KSb5w9
2017-07-20 17:22:55 +02:00
Xidorn Quan
5eb0613947 Fix supports rule parsing issues with <any-value> 2017-07-21 00:41:02 +10:00
Gecko Backout
b96d96d448 Backed out changeset b10e6ba9cbdb because gecko part had to be backed out. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/17796
2017-07-20 13:42:53 +00:00
Fernando Jiménez Moreno
892b30edca Implement basic Time To First Paint and First Contentful Paint PWMs 2017-07-20 15:41:21 +02:00
bors-servo
fa34af609f Auto merge of #17798 - servo:derive-all-the-things, r=emilio
Derive some SVGPaint impls

<!-- 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/17798)
<!-- Reviewable:end -->
2017-07-20 04:46:23 -07:00
bors-servo
7b71070c04 Auto merge of #17796 - heycam:calc-difference, r=emilio
style: pass old ComputedValues from Element data into Gecko_CalcStyleDifference

This is the Servo-side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1380133.

<!-- 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/17796)
<!-- Reviewable:end -->
2017-07-20 03:39:15 -07:00
bors-servo
f594ae58a6 Auto merge of #17788 - emilio:clean-cascade, r=heycam
style: Cleanup the cascade a good bit.

Was about the time.

<!-- 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/17788)
<!-- Reviewable:end -->
2017-07-20 02:36:15 -07:00
Emilio Cobos Álvarez
e374a54050
style: Cleanup the cascade a good bit. 2017-07-20 11:20:37 +02:00
Anthony Ramine
dc1e5372da Derive ToCss for SVGPaint
I wonder if there wasn't a bug in the former implementation, given there is no
space written before the fallback value.
2017-07-20 10:30:44 +02:00
Anthony Ramine
1eb51daba6 Derive ToComputedValue for SVGPaint 2017-07-20 10:30:25 +02:00
bors-servo
069243a474 Auto merge of #17790 - glennw:update-wr-shadows-agan, r=KiChjang
Update WR (text-shadow optimizations).

<!-- 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/17790)
<!-- Reviewable:end -->
2017-07-20 00:55:45 -07:00
bors-servo
20a3b0236d Auto merge of #17776 - canaltinova:disabled-mochitests, r=emilio
More grid serialization and parsing fixes

These are the bugs I discovered while I was re-enabling the disabled grid mochitests. Now all grid mochitests are passing! Additionally I converted `Vec<CustomIdent>`'s into `Box<[CustomIdent]>`. We are storing so many line names in vectors. These should help a bit.

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

<!-- 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/17776)
<!-- Reviewable:end -->
2017-07-19 23:54:33 -07:00
bors-servo
513e6b2979 Auto merge of #17794 - birtles:assign-properties-safely, r=hiro
Assign properties safely

These are the Servo-side changes for [Bugzilla bug 1381389](https://bugzilla.mozilla.org/show_bug.cgi?id=1381389).

<!-- 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/17794)
<!-- Reviewable:end -->
2017-07-19 22:48:47 -07:00
Cameron McCormack
e12294b00a style: Update Gecko bindings. 2017-07-20 13:10:11 +08:00
Cameron McCormack
914ba609c0 style: Pass old ComputedValues and old cached struct bits to Gecko_CalcStyleDifference. 2017-07-20 13:10:11 +08:00
Cameron McCormack
25dc352d7c style: Pass a &ComputedValues (aka ServoStyleContext*) to Gecko_CalcStyleDifference. 2017-07-20 13:10:11 +08:00
Nazım Can Altınova
ac1d15f726 Add a bug link as comment for repeat function 2017-07-19 22:09:15 -07:00
Brian Birtles
ea2da6b07b Update bindings 2017-07-20 13:23:10 +09:00
bors-servo
37d96f5ca9 Auto merge of #17791 - bholley:less_verbose_cv, r=heycam
Bring back concise logging for ElementData

This was removed recently in the ComputedValues patch, and makes traversal
logging rather unusable.

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1382357

<!-- 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/17791)
<!-- Reviewable:end -->
2017-07-19 21:02:28 -07:00
Hiroyuki Ikezoe
48851135e8 Call may_have_animations() for parent element in the case where the target is pseudo element.
In case of pseudo elements ElementHasAnimations is set on the parent element.

updating-animation-on-pseudo-element.html fails without this patch, succeeds
with this patch.
2017-07-20 12:52:12 +09:00
Bobby Holley
cd31ae82b2 Bring back concise logging for ElementData.
This was removed recently in the ComputedValues patch, and makes traversal
logging rather unusable.

MozReview-Commit-ID: 5Jisfj9QxBM
2017-07-19 20:43:23 -07:00
Daisuke Akatsuka
4486758fae make -moz-user-select property animatable 2017-07-20 12:26:21 +09:00
Daisuke Akatsuka
f01ad20f74 make cursor animatable 2017-07-20 12:25:57 +09:00
Glenn Watson
8e979e301a Update WR (text-shadow optimizations). 2017-07-20 13:23:38 +10:00
Daisuke Akatsuka
e8b11d26b5 make border-XX-style animatable 2017-07-20 12:23:06 +09:00
Jeremy Chen
22a16ccee7 stylo: Fix Y scale computation while decomposing a 3D matrix.
While decomposing a 3D matrix, we should normalize the 2nd row right after the
Y scale computation. However, we accidentally use the length of the 1st row to
do the normalization. This causes the wrong Scale3D function while decomposing,
and then leads to the wrong decomposed 3D matrix.

Here, we correct it by using the right value (the length of the 2nd row).

r=hiro https://bugzilla.mozilla.org/show_bug.cgi?id=1381196
2017-07-20 10:58:01 +08:00
bors-servo
7d95fb8e49 Auto merge of #17749 - SergeevPavel:extra-space-check, r=jdm
Extra space check

<!-- Please describe your changes on the following line: -->
Add tidy check for keywords with more than one space afterwards.

---
<!-- 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 #17700 (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/17749)
<!-- Reviewable:end -->
2017-07-19 16:03:51 -07:00
bors-servo
e7b195b060 Auto merge of #17754 - SergeevPavel:system-colors-refactor, r=SimonSapin
replace vector iteration by ascii_case_insensitive_phf_map

<!-- 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 #15994 (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/17754)
<!-- Reviewable:end -->
2017-07-19 14:56:24 -07:00
Pavel Sergeev
677a24a8d6 remove extra spaces after keywords 2017-07-20 00:45:02 +03:00
Nazım Can Altınova
3f10488da1 Clamp the repeat numbers greater than 10000
This was causing a crash in gecko mochitest because of OOM.
2017-07-19 14:26:29 -07:00
Nazım Can Altınova
1ab86a46b6 Convert Vec values into boxed slices 2017-07-19 14:26:28 -07:00
Nazım Can Altınova
744cf0ee44 Add more checks to properly fail at invalid grid and grid-template serialization
We have checks for these in the shorthand parsing side actually.
But if we need to serialize a group of longhand sub-properties for the shorthand,
we should be able to fail for invalid grammar gracefully. This patch adds these checks.
2017-07-19 11:57:01 -07:00
Nazım Can Altınova
fd184f6b4a Serialize 'minmax(auto, <flex>)' as '<flex>' 2017-07-19 10:36:59 -07:00
Nazım Can Altınova
638a306168 Fix the integer setting of the GridLine struct
GridLine line_num shouldn't be set if it's not parsed. So we can determine if it's set or not for serialization.
2017-07-19 10:36:58 -07:00
Nazım Can Altınova
46780ceb0d Prevent panic during grid-template serialization 2017-07-19 10:36:47 -07:00
bors-servo
b70cbeb84c Auto merge of #17787 - jdm:invalidvalue, r=SimonSapin
Store COW strings in CSS parser errors when possible.

This should be a straightforward performance improvement in pages with lots of CSS property values that the parser does not understand.

---
- [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 there's no functional difference.

<!-- 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/17787)
<!-- Reviewable:end -->
2017-07-19 10:08:14 -07:00
Josh Matthews
bbf3280fef Store COW strings in CSS parser errors when possible. 2017-07-19 12:57:07 -04:00
bors-servo
4b69665beb Auto merge of #17784 - omakk:master, r=jdm
constellation: Remove unused title attribute from Pipeline struct

<!-- Please describe your changes on the following line: -->
Removes title attribute from constellation::Pipeline since it is never used

---
<!-- 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 #15714

- [X] These changes do not require tests because it's a very simple cleanup

<!-- 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/17784)
<!-- Reviewable:end -->
2017-07-19 08:20:35 -07:00
bors-servo
9597fec9fa Auto merge of #17785 - servo:future-break, r=nox
Remove explicit lifetime arguments on a method call.

This causes a warning it today’s Nightly: https://github.com/rust-lang/rust/issues/42868

… which makes the build fail because we use `#![deny(warnings)]`. This warning is planned to become a hard error in a future Rust version.

<!-- 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/17785)
<!-- Reviewable:end -->
2017-07-19 07:12:36 -07:00
bors-servo
31228c1849 Auto merge of #17775 - michael-p:rename-stylearc-to-servo-arc, r=emilio
Replace all uses of the style::stylearc alias with servo_arc.

The `stylearc` alias is left there temporarilly and will be removed completely in a later commit/PR where also `components/style/gecko/generated/structs_{debug|release}.rs` are re-generated (they still use the old alias).

---
<!-- 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 #17768  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because no new features / only refactoring

<!-- 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/17775)
<!-- Reviewable:end -->
2017-07-19 06:03:17 -07:00
Simon Sapin
2f46a0d65e Remove explicit lifetime arguments on a method call.
This causes a warning it today’s Nightly:
https://github.com/rust-lang/rust/issues/42868

… which makes the build fail because we use `#![deny(warnings)]`.
This warning is planned to become a hard error in a future Rust version.
2017-07-19 14:34:33 +02:00
Omar Akkila
31aabeaf47 constellation: Remove unused title attribute from Pipeline struct (#15714) 2017-07-19 16:13:33 +04:00
bors-servo
9b060cf4bf Auto merge of #17782 - emilio:needs-traversal, r=heycam
style: Unify needs_traversal logic.

<!-- 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/17782)
<!-- Reviewable:end -->
2017-07-19 04:57:23 -07:00
bors-servo
81f6b9a1c7 Auto merge of #17539 - jyc:simplify-an-b, r=emilio
Simplify <an+b> in selector args when serializing.

<!-- 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 is part of a series to fix #17182

<!-- Either: -->
I am running this to identify what tests will fail; as the other PRs in the series are merged, I believe the tests that pass will change as well.

- [ ] 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/17539)
<!-- Reviewable:end -->
2017-07-19 03:59:50 -07:00
Emilio Cobos Álvarez
cb4feee34d
style: Unify needs_traversal logic. 2017-07-19 12:58:41 +02:00
bors-servo
d76d097891 Auto merge of #17774 - servo:derive-all-the-things, r=emilio
Prepare some code for future derivation 🌊

<!-- 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/17774)
<!-- Reviewable:end -->
2017-07-19 01:56:05 -07:00
Emilio Cobos Álvarez
f8575d97de
style: Remove useless traversal checks.
The callee checks this.
2017-07-19 10:29:11 +02:00