Commit graph

26088 commits

Author SHA1 Message Date
bors-servo
a5ff57b20f Auto merge of #16891 - kvark:preserve3d, r=glennw,emilio
Using TransformStyle::Preserve3D

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

The changes were reviewed previously as a part of WR update PRs, but then we decided to move them out.
r? @emilio

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] 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/16891)
<!-- Reviewable:end -->
2017-05-17 20:38:14 -05:00
bors-servo
10cc59dd2e Auto merge of #16881 - mbrubeck:absolute_root, r=stshine
Fix containing block size for absolute root element

The root element doesn't have a containing block, so use the viewport size instead of `self.base.absolute_cb`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #16248 (github issue number if applicable).
- [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/16881)
<!-- Reviewable:end -->
2017-05-17 19:13:51 -05:00
bors-servo
ac99a48aea Auto merge of #16814 - asajeffrey:script-worklets, r=jdm
Implement Houdini worklets

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

This PR implements the current draft Houdini Worklets specification (https://drafts.css-houdini.org/worklets/).

The implementation is intended to provide a responsive environment for worklet execution, and in particular to ensure that the primary worklet executor does not garbage collect, and does not block loading module code. The implementation does this by providing a thread pool, and performing GC and module loading in a backup thread, not in the primary thread.

---
<!-- 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 #16206
- [x] There are tests for these changes

<!-- 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/16814)
<!-- Reviewable:end -->
2017-05-17 16:20:42 -05:00
bors-servo
bafaae75f4 Auto merge of #16911 - emilio:bits, r=bzbarsky
Bug 1365471: Check bool flags before going through FFI in a variety of situations. r=bz

<!-- 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/16911)
<!-- Reviewable:end -->
2017-05-17 14:45:55 -05:00
Paolo Amadini
51b09f9b54 Merge branch 'master' of https://github.com/pamadini/servo 2017-05-17 20:13:35 +01:00
Paolo Amadini
693ec08387 Allow -moz-stack-sizing to work in a single direction only. 2017-05-17 19:46:04 +01:00
bors-servo
a7fecc4127 Auto merge of #16910 - froydnj:bindgen-cross-compilation-take-2, r=emilio
Bindgen cross compilation take 2

Fix all the cross-compilation issues in build_gecko.rs.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16879

<!-- 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/16910)
<!-- Reviewable:end -->
2017-05-17 12:48:47 -05:00
bors-servo
c6c960a661 Auto merge of #16909 - emilio:simplify-cascade, r=bholley
style: Refactor the cascade function.

The `cascade_primary_or_pseudo` function was nice when we shared more code, but
right now I think it just makes it harder to understand what's going on.

<!-- 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/16909)
<!-- Reviewable:end -->
2017-05-17 11:19:56 -05:00
Emilio Cobos Álvarez
b420b80073
Bug 1365471: Check bool flags before going through FFI in a variety of situations. r=bz
MozReview-Commit-ID: E6mitc11tYa
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-17 18:06:30 +02:00
Nathan Froyd
0371a62172 fix general cross compilation
Use the CARGO_CFG_* environment variables for everything instead of
`cfg!`.

Fixes #16879.
2017-05-17 11:13:10 -04:00
Emilio Cobos Álvarez
e8d1c5316d
style: Refactor the cascade function.
The `cascade_primary_or_pseudo` function was nice when we shared more code, but
right now I think it just makes it harder to understand what's going on.
2017-05-17 16:32:30 +02:00
bors-servo
c2d5b0006c Auto merge of #16907 - emilio:postrebuild, r=heycam
Bug 1364862: Make PostRebuildAllStyleData async. r=heycam

<!-- 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/16907)
<!-- Reviewable:end -->
2017-05-17 09:21:53 -05:00
Nathan Froyd
96a03d93b6 fix windows cross-compilation
Similar to the Linux case, we were checking the host's pointer width,
rather than the target's pointer width.
2017-05-17 10:17:40 -04:00
Nathan Froyd
536154475c fix linux cross-compilation, take 2
We were using `cfg!(target_arch)` checks, which are not correct, as
those check the architecture of the compiled build script, not the clang
target.
2017-05-17 10:17:40 -04:00
Alan Jeffrey
af8436c9be Implemented Houdini worklets. 2017-05-17 09:01:05 -05:00
bors-servo
5622c2af81 Auto merge of #16858 - nox:quirks, r=SimonSapin
Implement the hashless color quirk (fixes #15341)

<!-- 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/16858)
<!-- Reviewable:end -->
2017-05-17 08:08:00 -05:00
Anthony Ramine
9964b328b1 Implement the hashless color quirk (fixes #15341) 2017-05-17 14:12:58 +02:00
bors-servo
abb2985ffe Auto merge of #16882 - canaltinova:more-quirk, r=bholley
stylo: Continue to propagate quirks mode information to Servo

r=bholley in bugzilla

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

<!-- 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/16882)
<!-- Reviewable:end -->
2017-05-17 06:53:57 -05:00
bors-servo
d8b7013fcd Auto merge of #16900 - emilio:pseudos, r=bholley
Bug 1364850: Move PseudoElement to be just another combinator in selectors. r=bholley

On top of https://github.com/servo/servo/pull/16890.

<!-- 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/16900)
<!-- Reviewable:end -->
2017-05-17 05:40:14 -05:00
Emilio Cobos Álvarez
b6ba711af2
Bug 1364862: Make PostRebuildAllStyleData async. r=heycam
MozReview-Commit-ID: EM3eUP1dWwA
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-17 11:02:40 +02:00
Emilio Cobos Álvarez
522f8489d6
Bug 1364850: Move PseudoElement to be just another combinator in selectors. r=bholley
MozReview-Commit-ID: 8OoOIodkKJ5
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-17 10:58:24 +02:00
bors-servo
a7b77306f9 Auto merge of #16884 - jdm:structuredclone, r=jdm
Create higher-level APIs for manipulating custom structured clones.

Rebase of #16321.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16031
- [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/16884)
<!-- Reviewable:end -->
2017-05-17 03:53:10 -05:00
Paul Rouget
0483fc61ef Not headless by default 2017-05-17 09:52:40 +02:00
Paul Rouget
56d645281f make gl context current on browser initialization 2017-05-17 09:25:51 +02:00
bors-servo
5da0aa9f11 Auto merge of #16883 - jdm:mutationobserver, r=jdm
Mutation Observer API

Rebased from #16668.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix (partially) #6633
- [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/16883)
<!-- Reviewable:end -->
2017-05-17 01:21:40 -05:00
bors-servo
8375319928 Auto merge of #16876 - asajeffrey:constellation-rename-frames, r=cbrewster
Renamed constellation::Frame to constellation::BrowsingContext

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

Now that script has `WindowProxy` rather than `BrowsingContext` objects, we can rename `Frame` in the constellation to `BrowsingContext`. In particular, this means that `FrameId`s are now `BrowsingContextid`s, which better captures their purpose (and they are used in a lot of places, not just the constellation).

---
<!-- 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 do not require tests because renaming

<!-- 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/16876)
<!-- Reviewable:end -->
2017-05-16 23:10:45 -05:00
bors-servo
fada0eb660 Auto merge of #16795 - mrobinson:out-of-viewport-transform, r=glennw
Don't optimize display list for projective transforms

There are situations where elements are transformed from outside the
display list. With projective transforms it's currently difficult to
detect these. In those cases we just don't optimize the display list,
so that they will always be shown.

Fixes #13822.

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

<!-- Either: -->
- [x] 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/16795)
<!-- Reviewable:end -->
2017-05-16 21:27:47 -05:00
bors-servo
c962458984 Auto merge of #16890 - servo:qname, r=emilio
Fix serialization of namespace and universal selectors

Fix #16017
Fix #16020

<!-- 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/16890)
<!-- Reviewable:end -->
2017-05-16 20:03:53 -05:00
bors-servo
1312ab2b28 Auto merge of #16899 - jdm:revertabort, r=emilio
Revert "Replace intrinsics::abort with process::abort"

This reverts #16680. Calling `process::abort` from the crash handler causes the crash handler to be invoked again recursively.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16898

<!-- 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/16899)
<!-- Reviewable:end -->
2017-05-16 18:46:17 -05:00
Josh Matthews
3fef2535fc Informative text about process::abort. 2017-05-16 18:33:47 -04:00
Josh Matthews
5a82e8ffdd Revert "Replace intrinsics::abort with process::abort"
This reverts commit a239419cc0.
2017-05-16 17:37:22 -04:00
bors-servo
15271f5961 Auto merge of #16896 - mbrubeck:image-inherit, r=Manishearth
Bug 1365100 - stylo: Fix inheritance of multiple background images. r=Manishearth

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

<!-- 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/16896)
<!-- Reviewable:end -->
2017-05-16 16:13:43 -05:00
Matt Brubeck
e34cf4fba0 Fix containing block size for absolute root element
Fixes #16248.
2017-05-16 12:55:14 -07:00
Matt Brubeck
c8262ba99f Bug 1365100 - stylo: Fix inheritance of multiple background images. 2017-05-16 12:53:36 -07:00
bors-servo
7b9e9caa1d Auto merge of #16895 - bzbarsky:moz-is-html, r=emilio
Add :-moz-is-html support for stylo.

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

<!-- 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/16895)
<!-- Reviewable:end -->
2017-05-16 14:36:13 -05:00
Boris Zbarsky
e03e9de6d0 Add :-moz-is-html support for stylo. 2017-05-16 14:33:44 -04:00
bors-servo
f87e362059 Auto merge of #16894 - bzbarsky:two-value-text-overflow, r=manishearth
Fix the two-value form of text-overflow to work in stylo

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

<!-- 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/16894)
<!-- Reviewable:end -->
2017-05-16 13:31:50 -05:00
Boris Zbarsky
a03c0233c6 Fix the two-value form of text-overflow to work in stylo 2017-05-16 13:04:52 -04:00
bors-servo
a42df6dd30 Auto merge of #16875 - bzbarsky:dir-no-revalidation, r=emilio
Don't require style sharing cache invalidation for :dir

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because we have no way to test performance optimizations, sadly.

<!-- 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/16875)
<!-- Reviewable:end -->
2017-05-16 12:01:50 -05:00
Simon Sapin
685b9efed6 Move "is universal" logic from stylist.rs to selectors/parser.rs 2017-05-16 18:41:27 +02:00
Paolo Amadini
2e686b323c Allow -moz-stack-sizing to work in a single direction only. 2017-05-16 16:25:23 +01:00
Dzmitry Malyshau
d04a64394e Using TransformStyle::Preserve3D 2017-05-16 11:08:32 -04:00
bors-servo
7f6b28e241 Auto merge of #16872 - jryans:matching-context, r=emilio
Create a MatchingContext to group related matching args

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

Upcoming changes for visited support and others as well need to pass more args through matching, so this creates a MatchingContext to group them together.

<!-- 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/16872)
<!-- Reviewable:end -->
2017-05-16 09:45:36 -05:00
Simon Sapin
390e688058 Fix serialization of namespace and universal selectors
Fix #16017
Fix #16020
2017-05-16 16:44:28 +02:00
J. Ryan Stinnett
e385b81fc3 Create a MatchingContext to group related matching args
MozReview-Commit-ID: 7XZTn7HDXrm
2017-05-16 09:19:28 -05:00
Boris Zbarsky
993cb6eb41 Don't require style sharing cache invalidation for :dir 2017-05-16 09:55:37 -04:00
bors-servo
d855c929ef Auto merge of #16865 - mrobinson:scroll-offsets-fix, r=emilio
Properly handle scroll offsets in hit testing

Scroll roots are no longer nested containers holding items, so instead
we need to track the offsets of each, carefully handling fixed position
items and stacking contexts that create new reference frames.
Additionally, we remove the complexity of the pre-computed page scroll
offset, instead opting to send script scrolls to the layout task in
order to more quickly have a ScrollState there that matches the
script's idea of the scroll world.

Fixes #16405.

<!-- 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 #16405.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it is currently impossible to test interactive scrolling with Servo's test infrastructure. Existing tests verify the script part though.

<!-- 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/16865)
<!-- Reviewable:end -->
2017-05-16 08:33:22 -05:00
Martin Robinson
9fd2df5c09 Properly handle scroll offsets in hit testing
Scroll roots are no longer nested containers holding items, so instead
we need to track the offsets of each, carefully handling fixed position
items and stacking contexts that create new reference frames.
Additionally, we remove the complexity of the pre-computed page scroll
offset, instead opting to send script scrolls to the layout task in
order to more quickly have a ScrollState there that matches the
script's idea of the scroll world.

Fixes #16405.
2017-05-16 15:27:09 +02:00
bors-servo
0388e11db2 Auto merge of #16880 - froydnj:bindgen-informative-failure, r=emilio
provide more information when bindgen fails

Providing the flags we passed into clang can be informative for double-checking that we set everything up correctly.

- [X] `./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).

<!-- 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/16880)
<!-- Reviewable:end -->
2017-05-16 07:19:53 -05:00
bors-servo
ababebcced Auto merge of #16870 - servo:size_of, r=emilio
Add size_of tests for geckolib selectors

First step of https://bugzilla.mozilla.org/show_bug.cgi?id=1364148

<!-- 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/16870)
<!-- Reviewable:end -->
2017-05-16 04:00:30 -05:00