Commit graph

14061 commits

Author SHA1 Message Date
Mantaroh Yoshinaga
c71abc0c28 Make font-stretch animatable. 2017-05-19 09:06:00 +09:00
bors-servo
0b3fd8de76 Auto merge of #16067 - Wafflespeanut:grid, r=nox,Wafflespeanut
Stylo: Add support for grid-template-{rows,columns}

This has the implementation of grid's `<track-list>` nightmare.

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

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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/16067)
<!-- Reviewable:end -->
2017-05-18 17:09:15 -05:00
bors-servo
b4204b5e2d Auto merge of #16937 - nox:clamp-calc, r=emilio
Fix calc() clamping issues

<!-- 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/16937)
<!-- Reviewable:end -->
2017-05-18 15:15:04 -05:00
Anthony Ramine
307dd74ecf Introduce CalcLengthOrPercentage::unclamped_length
This is necessary for some operations, notably converting this to something
suitable for gecko.
2017-05-18 19:27:31 +02:00
Anthony Ramine
bcf1a6c5e5 Avoid unwrap in LengthOrPercentageOrAuto::compute_squared_distance 2017-05-18 19:10:40 +02:00
bors-servo
2fd7f4f393 Auto merge of #16934 - bzbarsky:check-snapshot-id-class-flags, r=emilio
Check snapshot id/class flags before looking for those attributes.

<!-- Please describe your changes on the following line: -->
Most elements don't have classes or IDs.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are just performance optimization

<!-- 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/16934)
<!-- Reviewable:end -->
2017-05-18 11:40:51 -05:00
Ravi Shankar
825e6db37e Add gecko glue for grid-template-{rows,columns} 2017-05-18 21:59:31 +05:30
Ravi Shankar
3011c7cadc Add bindings for setting grid nsTArrays 2017-05-18 21:59:28 +05:30
Ravi Shankar
4899bb471b Fix old grid code
* Fix <grid-line> parsing/serialization and fit-content parsing
 * Fix <track-size> flex computation
 * Cleanup <grid-line> and <track-size> code
2017-05-18 21:58:13 +05:30
Ravi Shankar
0c68471b5e Auto-generate code for grid-template-{rows,columns} 2017-05-18 21:57:29 +05:30
Ravi Shankar
26540dfbf2 Merge grid <line-names> in <track-list> computed value 2017-05-18 21:57:23 +05:30
Ravi Shankar
0d9bdb9a85 Add parsing/serialization for <track-list> 2017-05-18 21:57:01 +05:30
Ravi Shankar
7d1505a188 Apply track repetitions and merge grid <line-names> in ToComputedValue 2017-05-18 21:56:41 +05:30
Ravi Shankar
81b4e64dfc Add parsing/serialization for repeat() function 2017-05-18 21:56:38 +05:30
Ravi Shankar
d3e394c68a Add RepeatCount enum for handling the first component of repeat() 2017-05-18 21:56:35 +05:30
Ravi Shankar
efe1a5d256 Add functions for checking <fixed-size> and <fixed-breadth> 2017-05-18 21:56:32 +05:30
Ravi Shankar
53c7b0ac15 Add function to parse <line-names> 2017-05-18 21:56:21 +05:30
Boris Zbarsky
b9a0737946 Use snapshot class/id flags to optimize out class/id gets. 2017-05-18 11:32:49 -04:00
Boris Zbarsky
8783254d3d Update bindgen for new Gecko snapshot flags. 2017-05-18 11:31:38 -04:00
Boris Zbarsky
42cb7caa12 Update bindgen for Gecko snapshot member reordering. 2017-05-18 11:30:28 -04:00
bors-servo
9d887a2375 Auto merge of #16930 - bholley:limit_parallelism, r=emilio
Only use the parallel traversal when traversing from the root

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

Let's get this in to see the impact on Talos.

<!-- 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/16930)
<!-- Reviewable:end -->
2017-05-18 09:53:41 -05:00
Bobby Holley
5a28c87b8e Allow forcing a style threadpool of size 1. 2017-05-18 16:18:12 +02:00
Anthony Ramine
d0b9bd9c64 Refactor how calc() clamping is done on computed values (fixes #15296) 2017-05-18 10:14:59 +02:00
Anthony Ramine
3ea0c26e90 Silence a warning in script::dom::mutationobserver 2017-05-18 09:57:22 +02:00
bors-servo
d1eef9d08a Auto merge of #16904 - paulrouget:notHeadLess, r=metajack
Not headless by default

Without this, initializing Servo without using the command line (when embedded) requires to explicitly set `opts.headless = false`, which is weird as it's the only option that needs to be changed.

<!-- 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/16904)
<!-- Reviewable:end -->
2017-05-18 00:56:30 -05:00
bors-servo
5d1e02760b Auto merge of #16903 - paulrouget:makeCurrentOnNew, r=emilio
make gl context current on browser initialization

As explained in servo/webrender#1233, it's necessary to make the current gl context current when the browser is initialized, otherwise the wrong gl context might be used if another window is created before the initialization.

/cc @glennw

<!-- 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/16903)
<!-- Reviewable:end -->
2017-05-17 22:53:46 -05:00
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
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
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
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