Commit graph

4404 commits

Author SHA1 Message Date
Cameron McCormack
25dc352d7c style: Pass a &ComputedValues (aka ServoStyleContext*) to Gecko_CalcStyleDifference. 2017-07-20 13:10:11 +08: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
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
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
Anthony Ramine
98bf832169 Move Animatable::get_zero_value to ToAnimatedZero::to_animated_zero 2017-07-19 10:19:44 +02:00
Anthony Ramine
99592cc3d1 Put Animatable at the start of animated_properties 2017-07-19 10:19:42 +02:00
Anthony Ramine
5ffa523ccd Don't use Point2D<f32> for cubic curves anymore 2017-07-19 10:19:41 +02:00
Emilio Cobos Álvarez
2d57e001aa
style: Remove bogus assertion.
Bug: 1381682
Reviewed-by: heycam
MozReview-Commit-ID: E6bKyBdMUue
2017-07-19 09:44:00 +02:00
Michael Partheil
b07ebbae6b Replace all uses of the style::stylearc alias with servo_arc.
The alias is left there temporarilly and will be removed completely in a later commit where
also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still
use the old alias).
2017-07-19 09:29:05 +02:00
Manish Goregaokar
8d7a368377 stylo: Don't ignore visited state when deciding to share style contexts 2017-07-18 12:40:01 -07:00
Emilio Cobos Álvarez
c482754658
style: Update bindings. 2017-07-18 17:36:01 +02:00
Emilio Cobos Álvarez
fe8638a618
style: More ComputedValuesInner cleanup.
MozReview-Commit-ID: 8rkAP3pMEpD
2017-07-18 17:35:59 +02:00
Emilio Cobos Álvarez
07e1c6e75a
stylo: Cleanup the Gecko bits.
MozReview-Commit-ID: dbVDy1u4vp
2017-07-18 17:35:44 +02:00
Emilio Cobos Álvarez
655c842d2e
style: Cleanup most of the Inner mess.
MozReview-Commit-ID: Ieg2GJT0yUl
2017-07-18 17:34:57 +02:00
Emilio Cobos Álvarez
b113d54987
stylo: Make ComputedValues::to_outer_helper private.
MozReview-Commit-ID: L4VX11FgZg2
2017-07-18 17:34:55 +02:00
Emilio Cobos Álvarez
6b8649e012
stylo: Fix PseudoElement::pseudo_type.
MozReview-Commit-ID: DH2Pv52ankl
2017-07-18 17:34:42 +02:00
Hiroyuki Ikezoe
18cd7391fb Update bindings. 2017-07-18 20:44:31 +09:00
Hiroyuki Ikezoe
9c05481923 Skip snapshot handling during animation-only restyle. 2017-07-18 19:14:25 +09:00
Hiroyuki Ikezoe
f91126ba86 Add has_current_styles_for_traversal().
In animation-only restyle, we just need to check the element
has animation restyle hints or has recascade self which is a result
of animation-only restyle for ancestors.
has_current_styles() in Servo_ResolveStyle() is intentionally left there,
it will be changed in a subsequent patch.
2017-07-18 19:13:50 +09:00
Hiroyuki Ikezoe
ae55e51aaf Factor out restyle_kind_for_animation. 2017-07-18 19:13:24 +09:00
Xidorn Quan
bae59d4520 Adjust display value for ::-moz-fieldset-content when parent is flex/grid. 2017-07-18 14:13:12 +10:00
Manish Goregaokar
8eafe6a3b7 Fix tidy 2017-07-17 19:43:57 -07:00
Manish Goregaokar
c33fa3effa Update bindings 2017-07-17 18:41:47 -07:00
Manish Goregaokar
b280585cbb stylo: Clean up GetContext, call it UpdateWithElementState 2017-07-17 18:05:08 -07:00
Manish Goregaokar
2a49a73f91 stylo: Stop using mStyleIfVisited in Servo 2017-07-17 18:04:46 -07:00
Manish Goregaokar
e78947f8b5 stylo: Remove FFI calls for fetching style structs from ServoComputedValues 2017-07-17 18:04:24 -07:00
Manish Goregaokar
ff4bc5a2c6 stylo: Flatten ServoComputedValues into ServoStyleContext
This patch also removes the duplication of style contexts during the
restyle, because otherwise pointer equality of ServoComputedValues stops
holding (and we assert on that in a few places)
2017-07-17 18:04:01 -07:00
Manish Goregaokar
cfad95bff0 stylo: Use ServoStyleContext in ServoStyleSet/ServoRestyleManager 2017-07-17 18:03:41 -07:00
Manish Goregaokar
89930e7565 stylo: Switch Gecko over to ServoStyleContext 2017-07-17 18:03:23 -07:00
Manish Goregaokar
74519cc1a7 stylo: Make Servo Arc types use ptr to T instead of ptr to ArcInner<T> 2017-07-17 18:03:09 -07:00
Manish Goregaokar
808b1f509b stylo: Use ComputedValuesInner instead of ComputedValues when we don't need it 2017-07-17 18:02:25 -07:00
Manish Goregaokar
04b0ae64f2 stylo: Introduce ComputedValuesInner 2017-07-17 18:01:36 -07:00
Manish Goregaokar
5d78743037 stylo: Replace real ComputedValues with bindgenned ComputedValues2 2017-07-17 18:01:20 -07:00
Manish Goregaokar
d52f04d105 stylo: Use RawOffsetArc in ComputedValues 2017-07-17 18:01:01 -07:00
Manish Goregaokar
4c5cc89f39 stylo: Create C++-side ServoComputedValues 2017-07-17 18:00:31 -07:00
Manish Goregaokar
3343c829ca Update bindings 2017-07-17 18:00:16 -07:00
bors-servo
e122ea65fd Auto merge of #17762 - emilio:visited-nested, r=jryans
style: Cascade the visited style with the normal rules if we didn't find a relevant link.

<!-- 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/17762)
<!-- Reviewable:end -->
2017-07-17 15:21:22 -07:00
Emilio Cobos Álvarez
1d8e069389
style: Cascade the visited style with the normal rules if we didn't find a relevant link.
MozReview-Commit-ID: HbfZs0jnusn
2017-07-17 23:30:37 +02:00
Emilio Cobos Álvarez
f5bddd1465
style: Update bindings. 2017-07-17 22:51:18 +02:00
Emilio Cobos Álvarez
c606ec13e2
Bug 1377993: Make node slots less memory hungry in common cases. 2017-07-17 22:48:11 +02:00
Pavel Sergeev
6a2f84eca4 replace vector iteration by ascii_case_insensitive_phf_map 2017-07-17 19:30:55 +03:00
bors-servo
38f4ae80c4 Auto merge of #17739 - jdm:no-vendor-prefixed-errors, r=emilio
Suppress CSS parser errors for vendor-prefixed properties.

This matches the behaviour of Gecko's CSS parser.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #17736
- [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/17739)
<!-- Reviewable:end -->
2017-07-17 07:10:11 -07:00