Commit graph

15543 commits

Author SHA1 Message Date
bors-servo
ed75bcae75 Auto merge of #17912 - bzbarsky:stylo-first-line, r=emilio
Implement ::first-line support in stylo

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

Fixes Gecko bug 1324619.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there are Gecko tests

<!-- 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/17912)
<!-- Reviewable:end -->
2017-07-28 22:51:20 -05:00
Boris Zbarsky
c531af96ae Make sure we don't recreate boxes just because we have a ::first-line.
Servo part of part 5 of the fix for Gecko bug 1324619.  r=emilio
2017-07-28 22:54:06 -04:00
Boris Zbarsky
7161fff1b8 Add a Stylo API for reparenting a given style.
Servo side of part 4 of the fix for Gecko bug 1324619.  r=emilio
2017-07-28 22:54:06 -04:00
bors-servo
b47e1876bd Auto merge of #17913 - upsuper:prop-enabled, r=Manishearth
Have check_allowed_in read gPropertyEabled table directly

This is the Servo side change of [bug 1381690](https://bugzilla.mozilla.org/show_bug.cgi?id=1381690).

<!-- 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/17913)
<!-- Reviewable:end -->
2017-07-28 21:49:38 -05:00
Xidorn Quan
5be5d493df Have check_allowed_in read gPropertyEabled table directly. 2017-07-29 12:08:46 +10:00
bors-servo
8db39f8fde Auto merge of #17909 - bzbarsky:dont-reframe-before-after, r=emilio
Don't reconstruct the layout object when going from no pseudo to pseudo with no content for ::before and ::after.

Fixes Gecko bug 1376073.  r=emilio

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there are Gecko tests.

<!-- 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/17909)
<!-- Reviewable:end -->
2017-07-28 20:12:37 -05:00
Gecko Backout
3f1af3e62f Backed out changeset c424ad1c5f94 for build failures a=backout CLOSED TREE
Backs out https://github.com/servo/servo/pull/17892
2017-07-28 23:21:03 +00:00
Gecko Backout
f022936ebb Backed out changeset a417b9d7712d for vendoring bustage. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/17565
2017-07-28 22:06:00 +00:00
Boris Zbarsky
91d4956da5 Don't reconstruct the layout object when going from no pseudo to pseudo with no content for ::before and ::after.
Fixes Gecko bug 1376073.  r=emilio
2017-07-28 17:45:29 -04:00
bors-servo
12a49dc0be Auto merge of #17892 - kvark:wr, r=glennw
WR multi-document update

<!-- Please describe your changes on the following line: -->
The PR updates WR version to support multiple documents (https://github.com/servo/webrender/pull/1509) but doesn't take advantage of this new feature yet.
It also makes Servo to use `DevicePixel` from WR instead of rolling out another one.

---
<!-- 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
- [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
- [x] These changes do not require tests because _____ no extra logic

<!-- 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/17892)
<!-- Reviewable:end -->
2017-07-28 13:26:52 -05:00
Dzmitry Malyshau
8c588e8c36 WR multi-document update 2017-07-28 14:22:36 -04:00
bors-servo
e8272dcf1a Auto merge of #17565 - cynicaldevil:new-parser-thread, r=nox,jdm
Servo's async Tokenizer: New! Improved! Now with multithreading!

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

The Tokenizer, defined in the file `async_html.rs` will run on the main thread, while h5e's `Tokenizer`(along with its Sink) lives on the parser thread. Both h5e's `Tokenizer` and `Sink` communicate with the main thread Tokenizer via their own mpsc channels. The Sink keeps sending parser operations to the main thread, to be executed. For some operations, it waits for a message from the main thread before returning.

---
<!-- 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
- [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/17565)
<!-- Reviewable:end -->
2017-07-28 12:23:29 -05:00
bors-servo
e95da98f5f Auto merge of #17901 - heycam:rm-empty-variables, r=emilio
style: Remove now-unused empty Variables struct.

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

The `Servo_GetEmptyVariables` FFI function no longer has any callers from Gecko, so we can remove it and the code that creates/frees that struct.

---
<!-- 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
- [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/17901)
<!-- Reviewable:end -->
2017-07-28 09:08:24 -05:00
bors-servo
3ab6b1cf8f Auto merge of #17898 - BorisChiou:stylo/animation/filter_distance, r=birtles
stylo: Fix compute_squared_distance for AnimatedFilterList

We implement compute_distance for Angle to avoid returning Err(()) from it, and then rewrite compute_squared_distance of AnimatedFilterLIst to avoid using unwrap() and make it simpler.

---
<!-- 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 [Bug 1384014](https://bugzilla.mozilla.org/show_bug.cgi?id=1384014).
- [X] These changes do not require tests because there is a DevTools test for this already.

<!-- 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/17898)
<!-- Reviewable:end -->
2017-07-28 02:08:31 -05:00
Xidorn Quan
193be649d6 Upgrade to bindgen 0.29. 2017-07-28 14:16:50 +10:00
Cameron McCormack
45df66f9ff style: Remove now-unused empty Variables struct. 2017-07-28 11:57:45 +08:00
Boris Chiou
902819590f Rewrite compute_squared_distance for AnimatedFilterList. 2017-07-28 11:27:46 +08:00
bors-servo
b1d9746041 Auto merge of #17897 - Manishearth:bump-au, r=emilio
Bump app units version (take 2)

<!-- 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/17897)
<!-- Reviewable:end -->
2017-07-27 19:32:30 -05:00
Manish Goregaokar
1c77535b3f stylo: Bump app units version 2017-07-27 16:49:17 -07:00
bors-servo
255c9d00da Auto merge of #17895 - bholley:clean_up_traversal, r=emilio
Clean up traversal modes

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

<!-- 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/17895)
<!-- Reviewable:end -->
2017-07-27 18:29:29 -05:00
Bobby Holley
5a1550401a Update checked-in bindings.
MozReview-Commit-ID: 34zO9Jp9VEr
2017-07-27 14:26:27 -07:00
Bobby Holley
6148db670b Break TraversalFlags::ForReconstruct down into several independent pieces.
These will be useful in followup work.

MozReview-Commit-ID: Dyp9R0PG36v
2017-07-27 14:26:21 -07:00
Bobby Holley
5c6d3b820e Stop unconditionally traversing every element in the subtree on reconstruct traversals.
We already have a more-specific check further down in the file, which was added in the same revision.
I think this one was erroneous.

MozReview-Commit-ID: CnP0zCpBtnp
2017-07-27 14:26:15 -07:00
Bobby Holley
68c8808711 Get rid of the ForNewlyBoundElement mode.
MozReview-Commit-ID: 1IRn2iaPnVc
2017-07-27 14:26:10 -07:00
Bobby Holley
543bbb7b9c Clean up ForThrottledAnimationFlush stuff.
MozReview-Commit-ID: I6xeHv65nH2
2017-07-27 14:26:04 -07:00
Bobby Holley
ce295f6daf Pass TraversalFlags from C++ into Rust.
MozReview-Commit-ID: EVUzgnL5coN
2017-07-27 14:25:58 -07:00
Nazım Can Altınova
25896c384f stylo: Create ServoFontFeatureValuesRule and bind servo data
Add ServoFontFeatureValuesRule for CSSOM representation of
@font-feature-values rule and wire up with bindings.
2017-07-27 13:38:00 -07:00
Nazım Can Altınova
43cf493832 style: Implement parsing/serialization for @font-feature-values rule 2017-07-27 13:37:57 -07:00
Nathan Froyd
2a689d66e9 remove workspace key for components/atoms
Cargo will already traverse up the directory hierarchy to find an
appropriate workspace, so we don't need to specify anything here.  This
change brings components/atoms/Cargo.toml in line with other Cargo.toml
files in the tree.
2017-07-27 11:49:26 -04:00
bors-servo
d429561aa2 Auto merge of #17889 - chenpighead:fix-transition-visited, r=hiro
stylo: remove bogus optimization check in replace_rules() for visited styles.

We skipped updating the rule nodes for visited rules during animation-only restyle.
However, this causes isseus that visited style overrides animation styles on visited element.
So, it turns out that we should update the visited rules even during animation-only restyle.

Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1381235

<!-- 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/17889)
<!-- Reviewable:end -->
2017-07-27 08:25:20 -05:00
Jeremy Chen
000547b999 stylo: remove bogus optimization check in replace_rules() for visited styles.
We skipped updating the rule nodes for visited rules during animation-only restyle.
However, this causes isseus that visited style overrides animation styles on visited element.
So, it turns out that we should update the visited rules even during animation-only restyle.

Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1381235
2017-07-27 19:10:38 +08:00
Emilio Cobos Álvarez
4c391ca6ba
style: Avoid exponential blowup when processing invalidations of the same kind.
Bug: 1383981
Reviewed-by: heycam
MozReview-Commit-ID: HZ97UwvblkQ
2017-07-27 13:03:22 +02:00
bors-servo
9370a0c4b5 Auto merge of #17884 - servo:rustup, r=Manishearth
Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)

<!-- 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/17884)
<!-- Reviewable:end -->
2017-07-27 03:13:34 -05:00
Boris Chiou
20e3508ca3 Implement compute_distance for Angle.
When computing the distance between two filter functions, e.g.
HueRotate(0deg) and HueRotate(-360deg), we got an Err(()) and unwrap it
immediately in compute_filter_square_distance(), which causes a crash.
The root-cause is that we don't implement computed_distance of Angle, and we
assume we always get a valid result from compute_squared_distance() for
each filter function.
2017-07-27 15:23:44 +08:00
bors-servo
9645ecef3e Auto merge of #17881 - emilio:fncall, r=canaltinova
style: fix alignment in call to get_all_matching_rules.

<!-- 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/17881)
<!-- Reviewable:end -->
2017-07-27 02:10:46 -05:00
bors-servo
33c9504690 Auto merge of #17880 - Manishearth:stylo-update-border, r=emilio
stylo: call update_border_foo when inheriting borders too

this fixes the reftest failure in layout/reftests/bugs/731521-1.html

<!-- 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/17880)
<!-- Reviewable:end -->
2017-07-27 01:09:24 -05:00
Simon Sapin
a205c82264 Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26) 2017-07-27 02:21:01 +02:00
Emilio Cobos Álvarez
b15fa2cd79
style: fix alignment in call to get_all_matching_rules. 2017-07-27 01:35:57 +02:00
Manish Goregaokar
68d67ef3f5 stylo: call update_border_foo when inheriting borders too 2017-07-26 15:48:51 -07:00
bors-servo
27031b996b Auto merge of #17878 - Manishearth:bump-au, r=emilio
stylo: Bump app units version

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

<!-- 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/17878)
<!-- Reviewable:end -->
2017-07-26 16:53:58 -05:00
Hiroyuki Ikezoe
123e5d33c2 MatrixDecomposed3D.add_weighted() is called with zero value for other_portion in case of iteration composite.
In the case where we accumulate transform:none onto decomposed matrix for
iteration composite whose iteration count is over 2, we pass zero
other_portion and self_portion which is over 1.0.  We should care about the
case.
2017-07-27 06:20:35 +09:00
Manish Goregaokar
f61eb07a10 stylo: Bump app units version 2017-07-26 13:55:30 -07:00
bors-servo
020188fdd7 Auto merge of #17875 - bzbarsky:first-line-dual-inheritance, r=emilio
Add support for having two separate parent styles.  Fixes gecko bug 1382806.

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

This is needed for ::first-line support.  See https://drafts.csswg.org/css-pseudo-4/#first-line-inheritance

This PR doesn't quite implement what the CSS spec draft says right now.  It implements what Gecko does, which is what an earlier draft said.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because servo doesn't support ::first-line yet

<!-- 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/17875)
<!-- Reviewable:end -->
2017-07-26 15:21:37 -05:00
Boris Zbarsky
048044f98b Make it possible to construct StyleBuilder with two different inherited styles.
Part 3 of Gecko bug 1382806.  r=emilio
2017-07-26 15:25:34 -04:00
bors-servo
a15d13a6ec Auto merge of #17877 - canaltinova:font-face-refactoring, r=jdm
Cleanup @font-face rule constructor

Passing SourceLocation into constructor instead of assigning
immediately after construction cleans up the code and helps to
prevent leaving an invalid SourceLocation in the future.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] These changes do not require tests because it's just a 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/17877)
<!-- Reviewable:end -->
2017-07-26 14:13:02 -05:00
Nazım Can Altınova
c9e5cf0a28 Cleanup @font-face rule constructor
Passing SourceLocation into constructor instead of assigning
immediately after construction cleans up the code and helps to
prevent leaving an invalid SourceLocation in the future.
2017-07-26 11:55:22 -07:00
Boris Zbarsky
f991b76535 Give StyleBuilder separate inherited styles for inherited and non-inherited structs.
This is needed for ::first-line, which causes its kids to inherit different properties from different places.

Part 2 of Gecko bug 1382806.  r=emilio
2017-07-26 13:41:11 -04:00
Boris Zbarsky
648c0a3d0b Remove the inherited_style getter from StyleBuilder.
The concept of inherited style is about to get a bit more complicated, and this
will prevent consumers from doing it wrong.

Part 1 of Gecko bug1382806.  r=emilio
2017-07-26 13:40:02 -04:00
bors-servo
799988578e Auto merge of #17871 - emilio:revert-gradient-stuff, r=emilio
Revert "Auto merge of #17868 - ferjm:bug1380259.radial.gradients, r=xidorn"

This reverts commit ef233381cc, reversing
changes made to f61528d297.

This broke a bunch of tests in m-c, like:

  https://treeherder.mozilla.org/logviewer.html#?job_id=118007409&repo=autoland

<!-- 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/17871)
<!-- Reviewable:end -->
2017-07-26 07:51:21 -05:00
Emilio Cobos Álvarez
75a844cd32
Revert "Auto merge of #17868 - ferjm:bug1380259.radial.gradients, r=xidorn"
This reverts commit ef233381cc, reversing
changes made to f61528d297.

This broke a bunch of tests in m-c, like:

  https://treeherder.mozilla.org/logviewer.html#?job_id=118007409&repo=autoland
2017-07-26 14:25:22 +02:00