Commit graph

4994 commits

Author SHA1 Message Date
bors-servo
9fcbeb3ca2 Auto merge of #17499 - asajeffrey:script-paint-worklets-zoom, r=glennw
Fixed scaling artefacts in paint worklets caused by zoom and hidpi

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

This PR renders paint worklet canvases at the device pixel resolution, rather than the CSS pixel resolution.

It's a dependent PR, building on #17239, #17326 and #17364.

---
<!-- 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 #17454
- [X] These changes do not require tests because we don't run reftests with zoom enabled

<!-- 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/17499)
<!-- Reviewable:end -->
2017-07-20 17:09:06 -07:00
bors-servo
4616f4ae77 Auto merge of #17809 - Manishearth:stylo-system-anim, r=hiikezoe
Stop asserting when cached system font changes

It may change during animation

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

<!-- 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/17809)
<!-- Reviewable:end -->
2017-07-20 16:07:51 -07:00
Xidorn Quan
7f3fa3edeb Don't panic when body element don't have style data. 2017-07-21 09:07:15 +10:00
Alan Jeffrey
caa3585219 Fixed scaling artefacts in paint worklets caused by zoom and hidpi. 2017-07-20 17:25:50 -05:00
Manish Goregaokar
5f7d0436ab Stop asserting when cached system font changes
It may change during animation
2017-07-20 15:07:55 -07:00
bors-servo
a303696ae3 Auto merge of #17793 - hiikezoe:may-have-animations-check, r=birtles
Call may_have_animations() for parent element in the case where the t…

…arget 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.

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1367278
---
- [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/17793)
<!-- Reviewable:end -->
2017-07-20 14:21:34 -07:00
Emilio Cobos Álvarez
f879ebcc99
selectors: Don't track class and id ancestor hashes in quirks mode.
It's incorrect to track classes and id selectors in a quirks-mode document,
since they should match case-insensitively.

Bug: 1382812
Reviewed-by: bholley
MozReview-Commit-ID: 4uvrfYsWb1v
2017-07-20 22:42:35 +02:00
bors-servo
e19fefcb47 Auto merge of #17792 - upsuper:supports-any-value, r=SimonSapin
Fix supports rule parsing issues with <any-value>

This eventually fixes #15482, as well as several reftests in mozilla-central which were added for [bug 883987](https://bugzilla.mozilla.org/show_bug.cgi?id=883987).

The new function should probably be moved into cssparser crate at some point.

<!-- 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/17792)
<!-- Reviewable:end -->
2017-07-20 13:08:58 -07:00
bors-servo
a64f085ee0 Auto merge of #17803 - Manishearth:servo-fontcomputation, r=emilio
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.

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

<!-- 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/17803)
<!-- Reviewable:end -->
2017-07-20 10:33:43 -07:00
Emilio Cobos Álvarez
2006994ae6
Add a comment about visited style inheritance. 2017-07-20 19:05:16 +02:00
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
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
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
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
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
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
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
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
Emilio Cobos Álvarez
cb4feee34d
style: Unify needs_traversal logic. 2017-07-19 12:58:41 +02:00