Commit Graph

819 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
8dd3b1c5c8 servo: Merge #14615 - Prepare for @import support (from servo:import); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: e5d783c4542135e75cd86e1beedf42bf0ee35e5f
2016-12-16 06:41:45 -08:00
Ms2ger
8337fc7843 servo: Merge #14613 - Remove unused style::refcell module (from servo:refcell-style); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: c284bf2f6032fb79913ee24d940332eb59e33040
2016-12-16 05:40:33 -08:00
Xidorn Quan
143392b8b4 servo: Merge #14609 - Update atoms when build geckolib with gecko (from upsuper:auto-regen-atoms); r=Wafflespeanut
<!-- Please describe your changes on the following line: -->
This would automatically update the generated atom-related files in-tree before calling cargo to build geckolib. With this change, `./mach build-gecko --with-gecko` should be now the easiest way to update all in-tree bindings.

This isn't really a build-time generating, because it isn't invoked from the build script, but from mach. It isn't done the other way because
1. it doesn't seem to be a common practice for build script to write anything to the src directory
2. real build-time generated atom data wouldn't need to include atoms for multiple platforms, but we still want it so that we can build geckolib independently

cc @heycam

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 0bc84154858d76f57831affee348d0f1c573f9f1
2016-12-15 22:05:15 -08:00
Emilio Cobos Álvarez
906042a85b servo: Merge #14605 - style: Avoid ending up with an invalid keyframe when inf or NaN are a… (from emilio:crashtest-bug-1323717); r=SimonSapin
<!-- Please describe your changes on the following line: -->

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

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: da42fea6b2c1c0bda14c021d65c16b1326b536d8
2016-12-15 17:45:12 -08:00
Nazım Can Altınova
291006f0e0 servo: Merge #14509 - Implement background-position-x/y (from canaltinova:position); r=Manishearth
<!-- Please describe your changes on the following line: -->
This is a WIP PR. Just HorizontalPosition / VerticalPosition implementations are complete. I would like to get early feedbacks about this architecture. Here's some architectural topics to consider:

- I created `HorizontalPosition` and `VerticalPosition` structs for this and used them in `Position` as well. We have decided to split `Keyword` enum, but we need them as unified for `PositionComponent` enum. So I didn't split but I can split it if we prefer to change PositionComponent as well.
- If we prefer Keyword enum like this, we can create a SubPosition(or something like this) instead of HorizontalPosition/VerticalPosition enums since only difference is 2 lines in `parse` functions. We can create a `parse_horizontal` and `parse_vertical` instead and a lot of code duplication can be cleared.
- I couldn't find a good way to use HorizontalPosition/VerticalPosition's parse functions in `Position`'s parse function. It is a bit more complicated. I'm open to suggestions :)
- I don't know much about logical keywords so do I need to do something different? I placed some comments where logical keywords are processing.

Any advice about these?

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 5357f05ff785ee160d6b07de5d0e10aba199e578
2016-12-15 12:15:06 -08:00
Xidorn Quan
23cffc7f4e servo: Merge #14600 - Parallelize build-time bindgen (from upsuper:parallel-bindgen); r=bholley
When there is nothing else is being compiled, this cuts the time consumption of running the bindgen part by more than half.

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 04d9ab50eb2408ceaaa692ee5660fdd871cd7620
2016-12-15 01:51:00 -08:00
Bobby Holley
8f8a339677 servo: Merge #14581 - stylo: Avoid traversing children of XBL-bound elements during initial styling (from bholley:dont_traverse_xbl); r=heycam
Corresponding Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1294572

CC @heycam @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 535563be313d2766267872a822642e68b686a4a9
2016-12-14 19:41:12 -08:00
Cameron McCormack
e265b2b1f4 servo: Merge #14580 - stylo: regenerate bindings (from heycam:bindings-update-11); r=emilio
<!-- Please describe your changes on the following line: -->

This corresponds to https://treeherder.mozilla.org/#/jobs?repo=stylo&revision=10ac81fb6185037648c6694889aa030d28a5e8a5.

There's probably no meaningful change here, but there's a lot of churn since I just changed locally to using clang-3.9.  r? @Manishearth

---
<!-- 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
- [ ] `./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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 49133d1f49008f3efd0bcd93c764b9ff7772512b
2016-12-14 17:40:55 -08:00
Alan Jeffrey
07258edab3 servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck
<!-- Please describe your changes on the following line: -->

This PR removes the `util` crate.

* Replaced the `spawn_named` and `clamp` functions by appropriate uses of `std:🧵:Builder::spawn`, `std::cmp::min` and `std::cmp::max`.
* Moved `opts`, `prefs` and `resource_files` into a new `config` crate.
* Moved `remutex` and `geometry` into their own crates.

---
<!-- 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 they are refactorings

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 4eb653817f87e5fb47de34356f558eb76ecbca9f

--HG--
rename : servo/components/util/Cargo.toml => servo/components/config/Cargo.toml
rename : servo/components/util/basedir.rs => servo/components/config/basedir.rs
rename : servo/components/util/lib.rs => servo/components/config/lib.rs
rename : servo/components/util/opts.rs => servo/components/config/opts.rs
rename : servo/components/util/prefs.rs => servo/components/config/prefs.rs
rename : servo/components/util/resource_files.rs => servo/components/config/resource_files.rs
rename : servo/components/util/geometry.rs => servo/components/geometry/lib.rs
rename : servo/components/util/remutex.rs => servo/components/remutex/lib.rs
rename : servo/tests/unit/util/lib.rs => servo/tests/unit/servo_config/lib.rs
rename : servo/tests/unit/util/opts.rs => servo/tests/unit/servo_config/opts.rs
rename : servo/tests/unit/util/prefs.rs => servo/tests/unit/servo_config/prefs.rs
rename : servo/tests/unit/util/remutex.rs => servo/tests/unit/servo_remutex/lib.rs
2016-12-14 16:48:42 -08:00
Suh Dude
834dc8b2b3 servo: Merge #14561 - font-variant-caps implemented in font.mako.rs (from Impally:master); r=Manishearth
<!-- Please describe your changes on the following line: -->
Implemented font-variant-caps for gecko library

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
Not sure.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Before Change:

<img width="261" alt="beforechange" src="https://cloud.githubusercontent.com/assets/9249887/21127332/03487fbc-c0c0-11e6-8667-bb1e60d5c754.PNG">

After Change:

<img width="174" alt="afterchange" src="https://cloud.githubusercontent.com/assets/9249887/21127345/0cc8860e-c0c0-11e6-96cf-16b77c14c5a7.png">

Pictures are rendering of example from [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps)

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b84acc618c2ebee1b0b863dba92b92946446413
2016-12-14 09:55:57 -08:00
Cameron McCormack
358938fd29 servo: Merge #14582 - fix feature check for Gecko-specific assertions (from heycam:cfg); r=emilio
r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 65b891c23fbb85c32ae07e2c5495b82b29b3331a
2016-12-14 05:13:17 -08:00
Shing Lyu
e0ddee40ec servo: Merge #14359 - Reuse box-shadow code for drop-shadow filter (from shinglyu:dropshadow-refactor); r=Manishearth
<!-- Please describe your changes on the following line: -->

Followup for #14218. Extracted the `Shadow` struct and methods into `values::*`, and make `box-shadow` and `drop-shadow` share the new `Shadow` type. The `ToCss` trait is not reused because they behave different in the two properties.

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: cd1d5f1cf359051eb76aa81ec3de48b84b0dab81
2016-12-13 18:50:30 -08:00
Xidorn Quan
a63319387c servo: Merge #14563 - Add asserts to make failure clearer (from upsuper:buildtime-bindgen); r=emilio
Gecko currently doesn't pass absolute path for `MOZ_DIST`, which leads to obscure panic when running the build script. This patch adds some assertions so that failures around this would be clearer.

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: a6cfec972f033df77276d74f7bc455f6717ea50f
2016-12-13 01:40:23 -08:00
Emilio Cobos Álvarez
666e6e311a servo: Merge #14565 - style: Make some removed assertions Servo-only instead (from emilio:assert); r=heycam
These were removed in #14560.

r? @heycam or @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: fb6f88624af8795a417ccb8abe7abf9e9aa8ec9e
2016-12-13 00:32:28 -08:00
Cameron McCormack
738cd2957b servo: Merge #14564 - stylo: regenerate bindings (from heycam:bindings-update-10); r=emilio
<!-- Please describe your changes on the following line: -->

This corresponds to https://treeherder.mozilla.org/#/jobs?repo=stylo&revision=6c5de1f0640254429c826c38622e5b1fd78693f5.

r? @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: debf5e0e7872347d67d9046b72979bcf7d08f9ca
2016-12-12 22:10:39 -08:00
Bobby Holley
0124e8b7ab servo: Merge #14560 - stylo: Fix some crashes on incubator (from bholley:fix_crashes); r=heycam
Corresponding gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1322945

Source-Repo: https://github.com/servo/servo
Source-Revision: 855358866640605fe055d792832db2f5e74fe197
2016-12-12 19:13:03 -08:00
Nick Price
40866dde40 servo: Merge #14538 - Use LengthOrNormal for column-gap #14297 (from DominoTree:master); r=Manishearth,Wafflespeanut
<!-- 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 #14297 (github issue number if applicable).

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 0530e648af9ff01ada4b7a5fa4a43d608b8602db
2016-12-11 08:03:16 -08:00
Sumant Manne
be4b6521fe servo: Merge #14498 - Added image-orientation property (from dpyro:image-orientation); r=canaltinova
<!-- Please describe your changes on the following line: -->

Implemented as per the MDN documentation—I could not find a current CSS draft. I am not sure if this is the complete correct metadata for the longhand helper:
```
<%helpers:longhand name="image-orientation”
                   experimental=“True”
                   animatable=“False”>
```
Also I am not sure how to test this and would appreciate help in creating a testing strategy.

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 37c4051d21f5baacdf843510c8b111202ac2e876
2016-12-10 13:57:14 -08:00
Xidorn Quan
a685fc7563 servo: Merge #14244 - Use build script to generate binding files (from upsuper:buildtime-bindgen); r=emilio
<!-- Please describe your changes on the following line: -->
This is a WIP patch to make rust-bindgen a build time dependency of style component for stylo. This should make things more automatic. I convert majority of `regen.py` to `build_gecko.rs`.

It currently doesn't work on Windows, because of servo/rust-bindgen#271 (it works when I fix the generated file manually, though). I haven't tested other platforms.

It would break servo's CI for geckolib, because:
1. it needs libclang (which is probably easy to solve)
2. it needs `MOZ_OBJDIR` to be passed in so that it can generate bindings

@Manishearth @emilio Do you agree with this change? Do you have suggestion for the issues above?

---
<!-- 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
- [ ] `./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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 872ec89a9c546eb05246b5047aabfc032d140eff
2016-12-10 03:21:42 -08:00
Simon Sapin
b176e4d08e servo: Merge #14535 - Introduce a PropertyId enum and use it instead of strings of property names (from servo:property-id); r=mbrubeck
<!-- Please describe your changes on the following line: -->

* `LonghandId` and `ShorthandId` are C-like enums
* `Atom` is used for the name of custom properties.
* `PropertyDeclarationId` is the identifier for `PropertyDeclaration`,
  after parsing and shorthand expansion. (Longhand or custom property.)
* `PropertyId` represents any CSS property, e.g. in CSSOM.
  (Longhand, shorthand, or custom.)

CC @upsuper

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 6dd4b4822fa788694153ee61a04dd9a5dfb748ec
2016-12-10 01:16:26 -08:00
Bobby Holley
637f6af4d6 servo: Merge #14436 - Make restyle tracking more granular (from bholley:granular_restyle); r=emilio
The primary idea of this patch is to ditch the rigid enum of Previous/Current
styles, and replace it with a series of indicators for the various types of
work that needs to be performed (expanding snapshots, rematching, recascading,
and damage processing). This loses us a little bit of sanity checking (since
the up-to-date-ness of our style is no longer baked into the type system), but
gives us a lot more flexibility that we'll need going forward (especially when
we separate matching from cascading). We also eliminate get_styling_mode in
favor of a method on the traversal.

This patch does a few other things as ridealongs:
* Temporarily eliminates the handling for transfering ownership of styles to the
  frame. We'll need this again at some point, but for now it's causing too much
  complexity for a half-implemented feature.
* Ditches TRestyleDamage, which is no longer necessary post-crate-merge, and is
  a constant source of compilation failures from either needing to be imported
  or being unnecessarily imported (which varies between gecko and servo).
* Expands Snapshots for the traversal root, which was missing before.
* Fixes up the skip_root stuff to avoid visiting the skipped root.
* Unifies parallel traversal and avoids spawning for a single work item.
* Adds an explicit pre_traverse step do any pre-processing and determine whether
      we need to traverse at all.

Source-Repo: https://github.com/servo/servo
Source-Revision: b9a8ccd775c3192e3810a1730b1d0bc2b5c9dfb6
2016-12-09 17:01:05 -08:00
Jansen Jan
23b92da701 servo: Merge #13489 - Add support for fullscreen #10102 (from farodin91:fullscreen); r=jdm
<!-- Please describe your changes on the following line: -->

I'm start working on fullscreen support.
@jdm Should be the entry_point in ScriptReflow a Option if fullscreen is enabled or point on the entry_node? For example the RootNode.

---

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 8b69e73594647319e95bd0fd36c2addabcee1e5d
2016-12-09 09:52:34 -08:00
Cameron McCormack
986c6f4640 servo: Merge #14492 - stylo bindings update (from heycam:bindings-update-9); r=emilio
<!-- Please describe your changes on the following line: -->

For the latest m-c stylo sync, on top of #14472.

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: c9370e04a5c09b706927068b1d514367116563a9
2016-12-08 10:55:42 -08:00
Nazım Can Altınova
a7808a60f8 servo: Merge #14464 - Write tests for CSSOM Interfaces (from canaltinova:cssom-test); r=Manishearth
<!-- Please describe your changes on the following line: -->
ToCss implementation was wrong about Keyframe percentage values, it was writing values between 0-1. I had to fix it. Wrote some tests about CSSKeyframesRule, CSSNamespaceRule, CSSRuleList, CSSStyleSheet, StyleSheetList interfaces.
CSSFontFaceRule and CSSViewportRule looks like not implemented yet. I didn't write one for them.
Also name attribute in CSSKeyframesRule isn't implemented yet. Is there any complication about it? If not, I can implement it.

r? @Manishearth

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 8dfaed218377dbac6935b54f1599d7a9245d6122
2016-12-07 13:38:50 -08:00
Cameron McCormack
e1622060bc servo: Merge #14471 - adjust display style fixup to handle more Gecko cases (from heycam:blockification); r=emilio
<!-- Please describe your changes on the following line: -->

This tweaks the display property fixup we do when restyling to:

* handle the display values that Gecko supports that Servo doesn't
* blockify grid items (like we do flex items)
* skip the fixup for NAC

And while I'm in the area, this sets `nsStyleDisplay::mOriginalDisplay` too.

r? @bholley cc @SimonSapin

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: b5a96e6054e0669d8891847fa5f806078ffb2aa6
2016-12-06 20:19:21 -08:00
Cameron McCormack
8c24dd36ff servo: Merge #14467 - stylo: Support remaining display property values (from heycam:gecko-display); r=Manishearth
<!-- Please describe your changes on the following line: -->

This has already been reviewed by Manish in https://bugzilla.mozilla.org/show_bug.cgi?id=1322185.

Source-Repo: https://github.com/servo/servo
Source-Revision: e11441bdbce9c5bf2a1ba45faf938bab994f387c
2016-12-05 23:53:17 -08:00
Emilio Cobos Álvarez
89cb8d3586 servo: Merge #14460 - stylo: Use master bindgen again (from emilio:stylo-bindgenup); r=heycam
<!-- Please describe your changes on the following line: -->

To be fair, this is master bindgen with https://github.com/servo/rust-bindgen/pull/318.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6c3e94805f74e78b091b37fe374af12ad2249528
2016-12-05 03:52:16 -08:00
Cameron McCormack
d63ff4d088 servo: Merge #14461 - allow the style bloom filter to recover from switch to a node with no common ancestor with the old node (from heycam:bloom-no-common-ancestor); r=emilio
<!-- Please describe your changes on the following line: -->

Since https://bugzilla.mozilla.org/show_bug.cgi?id=1321284, we can have multiple disjoint subtrees of elements to style in a document, due to document level native anonymous content not inheriting from the document's element.  This patch tweaks the style Bloom filter to allow switching to a new node that has no common ancestor with the old node.

r? @emilio

---
<!-- 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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

… common ancestor with the old node.

Source-Repo: https://github.com/servo/servo
Source-Revision: 16c2960c3a8ec1893a1667bb6c414998dab681b5
2016-12-05 03:01:12 -08:00
Cameron McCormack
df85033fbf servo: Merge #14459 - Fix current_dom_depth in sequential traversal. (fixes #14414) (from heycam:seq-dom-depth); r=emilio
<!-- Please describe your changes on the following line: -->

Since we pass around a reference to the one `PerLevelTraversalData` object in sequential traversal, we must update it after we process children.  Alternatively, we could switch to what the parallel traversal is doing and clone the object when passing it down.

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: c2515f9c9822b6011fc6f8ad7127bccc3a1e6122
2016-12-05 01:19:23 -08:00
Cameron McCormack
bbdda783c7 servo: Merge #14457 - update stylo bindings (from heycam:bindings-update-8); r=Manishearth
<!-- Please describe your changes on the following line: -->

Update stylo bindings for the latest mozilla-central sync.

r? @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 85f569bd67b5bb62f4d9eea7c328dfa7e89e87ea
2016-12-04 01:52:59 -08:00
Xidorn Quan
770198de7f servo: Merge #14421 - Treat top-level number in calc() invalid (from upsuper:patch-2); r=emilio
<!-- Please describe your changes on the following line: -->
This should probably considered as a temporary fix (for [bug 1321206](https://bugzilla.mozilla.org/show_bug.cgi?id=1321206)), to avoid assertion when trying to serialize calc value with only numbers. Certain properties (e.g. `line-height`) would eventually need to keep numbers inside calc.

---
<!-- 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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Currently, CalcLengthOrPercentage doesn't actually keep the number value. If we don't treat it invalid, we can end up generating empty `calc()` value when one contains numbers (e.g. `calc(1)`), which would violate assertion elsewhere that `calc` must not be empty.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c346e0d943fd518031437bcc7d10fee16213ff3
2016-12-02 20:18:05 -08:00
Nazım Can Altınova
5ae9a60994 servo: Merge #14433 - Implement MediaList interface (from canaltinova:medialist); r=Manishearth
<!-- Please describe your changes on the following line: -->
Added MediaList interface and implemented `mediaText`, `length` and `index` attributes.
r? @Manishearth

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 106a538e7e2898902093a77307f004ab79a270d8
2016-12-02 12:53:57 -08:00
Emilio Cobos Álvarez
497de97944 servo: Merge #14439 - style: Don't pop too much in the bloom filter (from emilio:fix-bloom); r=bholley
<!-- Please describe your changes on the following line: -->

This is not a problem for Servo, because we recovered it without much problem a
few lines below, and we never reached the pathological case where the filter has
one element (the root), and we restyled another element with depth 1.

Fixes [bug 1321725](https://bugzil.la/1321725).

Source-Repo: https://github.com/servo/servo
Source-Revision: 3376922f2d0275ba9d39748f1b2283062a687f41
2016-12-02 09:59:00 -08:00
J. Cliff Dyer
94712f0390 servo: Merge #14394 - Convert column-width to use Either (from jcdyer:jcdyer/either-column-width); r=Wafflespeanut
<!-- Please describe your changes on the following line: -->

* Converted column-width to use `Either<Length, Auto>`
* Added gecko glue code
* Cleaned up old column-width glue code

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because tests already surround the refactored code.
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a913815a4de0f1b66a5fd6dfe1c41105cf38e63e
2016-12-01 23:03:37 -08:00
Thiago Pontes
4990faa77a servo: Merge #14370 - use Either type for UrlOrNone (from thiagopnts:master); r=Wafflespeanut
Use the Either type for UrlOrNone

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 290ff5c80138c77d65eaada3183dec35c059e38e
2016-12-01 22:03:31 -08:00
Patrick Walton
79cb861735 servo: Merge #14418 - layout: Fix some particularly bad cases of spurious reflows leading to script thread unresponsiveness (from pcwalton:infinite-reflows); r=notriddle
See commits for details. This improves nytimes.com quite a bit.

r? @notriddle

Source-Repo: https://github.com/servo/servo
Source-Revision: d2d62267a14891ecc37092a1a931862b9f784019
2016-12-01 10:16:38 -08:00
Xidorn Quan
351b329516 servo: Merge #14406 - Add insertRule/deleteRule support for stylo (from upsuper:bug1313293); r=heycam
<!-- Please describe your changes on the following line: -->
This is the servo part of [bug 1313293](https://bugzilla.mozilla.org/show_bug.cgi?id=1313293), reviewed by @heycam.

r? @heycam

---
<!-- 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
- [ ] `./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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 87f5b877d8c1d670e55516c6e6ec2cf303b9692e
2016-11-30 21:54:46 -08:00
Boris Chiou
5877be3c21 servo: Merge #14404 - Use XPCOM string bindings instead of Gecko_Utf8SliceToString (from BorisChiou:Bug1317179); r=Manishearth
These are the servo-side changes for [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179). @Manishearth has already reviewed them there. I'd like to merge these patches until the gecko-side changes for [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179) is landed.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

Source-Repo: https://github.com/servo/servo
Source-Revision: 22c8df150af341064abac25a26768c8c1517df1f
2016-11-30 20:12:28 -08:00
Nazım Can Altınova
4d826a96b8 servo: Merge #14410 - Implement 3 more properties for stylo (from canaltinova:stylo-things); r=Manishearth
<!-- Please describe your changes on the following line: -->
Implemented these new properties:

1. Implemented parsing/serialization and stylo glue for `background-blend-mode`.
2. Made `align-items` work for stylo.
3. Implemented parsing/serialization for `-moz-column-rule`.

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

<!-- Either: -->
- [X] These changes do not require tests because it's stylo changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: b3cdcfaa39a7933a9f87a6881f5d58e5afe94086
2016-11-30 04:15:19 -08:00
Manish Goregaokar
45f6902cc6 servo: Merge #14399 - Support offset- logical properties (from Manishearth:feat-offset-logical); r=SimonSapin
I didn't realize that these map to the top/left/bottom/right physical properties. We can just implement them.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: a88487f96a5e17dfbaf02acd3a2af49456013b6e
2016-11-29 09:27:42 -08:00
Xidorn Quan
fca01e20b5 servo: Merge #14384 - Move Arc<RwLock<_>> out from CssRules tuple (from upsuper:cssrules-struct); r=Manishearth
<!-- Please describe your changes on the following line: -->
Otherwise it would be hard for Gecko to hold `CssRules`.

r? @manishearth

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 39845faf261672b795af59602b45e7ce096b9f33
2016-11-29 03:26:46 -08:00
Simon Sapin
4d50e21cf3 servo: Merge #14395 - Use stylesheet’s base URL and ns prefixes in CSSOM insert/appendRule (from servo:stylesheet-metadata); r=Manishearth
<!-- 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
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 40917e7991ddd0f1fdcf83f0bf637a721f37256a
2016-11-29 01:28:06 -08:00
Emilio Cobos Álvarez
cca73fbfd1 servo: Merge #14353 - Fix the bloom filter stuff (from emilio:fix-bloom); r=SimonSapin
<!-- Please describe your changes on the following line: -->

I think I got the numbers right, want to do a try run before just in case.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 2289ad53dd9a2666645b1f7eef07636e21c1607e
2016-11-28 10:30:19 -08:00
Razican
07f3886ed0 servo: Merge #14383 - Stylo: implement column-rule-style (from Razican:column-rule-style); r=Wafflespeanut
Implemented `column-rule-style` in stylo.

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

- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a style addition and I added the screenshot.

Screenshot:
![screenshot from 2016-11-27 21-59-38](https://cloud.githubusercontent.com/assets/597469/20652731/0a7ccbfc-b4ff-11e6-8e4c-1547897bcf25.png)

Source-Repo: https://github.com/servo/servo
Source-Revision: 4dbca055c6d225e5fe5030bf2d402b73d2ea94da
2016-11-28 04:57:28 -08:00
Xidorn Quan
41402ea069 servo: Merge #14355 - Move algorithm for insertRule and deleteRule to style component (from upsuper:rulelist-mutate); r=Manishearth
<!-- Please describe your changes on the following line: -->

r? @Manishearth

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: b18ec28fa7dab1728bb9e01d675534a28c43bb6a
2016-11-27 15:40:19 -08:00
Ravi Shankar
f0120bad7b servo: Merge #14373 - Use the ParserContext along with the Parser (from Wafflespeanut:parse); r=emilio
<!-- Please describe your changes on the following line: -->

This changes the `parse` function's signature to include `ParserContext`, so that we don't introduce another trait just for the sake of the context. Instead, we can safely ignore the context whenever we don't need it.

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

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @SimonSapin or @emilio or @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 4755cb7586ab4a89f35bbccf8b57c85ed2f428e7
2016-11-26 19:20:10 -08:00
Jeremy Chen
ab2cea122f servo: Merge #14358 - stylo - implement -webkit-text-fill-color and -webkit-text-stroke (from chenpighead:webkit-text-stroke); r=canaltinova
<!-- Please describe your changes on the following line: -->

Implement -webkit-text-fill-color property.
Implement -webkit-text-stroke property, along with -webkit-text-stroke-width and -webkit-text-stroke-color longhand properties.

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: c4f87f451faf8eeac3e046c38ebf8b9b3dd0051e
2016-11-26 07:17:34 -08:00
Nazım Can Altınova
5eae07c4ed servo: Merge #14365 - Property declaration block serialization should check for importance (from canaltinova:block-important); r=emilio
<!-- Please describe your changes on the following line: -->
r? @emilio , @Manishearth

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: a0269027db848354fe779ce73d03d60a2b26a87f
2016-11-26 05:09:55 -08:00
Gregory
dd3f6b0834 servo: Merge #14192 - implement support for the width query (from gterzian:support_equality_constraints); r=emilio
<!-- Please describe your changes on the following line: -->
implement support for the `width` media query

---
<!-- 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://github.com/servo/servo/issues/13670 (github issue number if applicable).

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bcc76f8a58f2ebe3886d16ff3eebbe68e3debf6c
2016-11-26 04:09:24 -08:00
Bobby Holley
62e95664e4 servo: Merge #14300 - stylo: Basic infrastructure for RestyleHint-driven traversal (from bholley:restyle_driven_traversal); r=emilio
Gecko Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=131701

(Don't review yet, will flag on the gecko bug when the time comes)

Source-Repo: https://github.com/servo/servo
Source-Revision: d98abaec20e624aa89a3abddf4cf2a6399951ef1
2016-11-25 09:00:44 -08:00
Boris Chiou
4f250b729e servo: Merge #14357 - Use single_value_to_css in Servo_DeclarationBlock_SerializeOneValue (from BorisChiou:Bug1317178); r=emilio
These are the servo-side changes for [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178). @Manishearth has already reviewed them there. Please merge these patches until the gecko-side changes for [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178) is landed.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

Source-Repo: https://github.com/servo/servo
Source-Revision: 67a4ecd68ec782fd661c0095df1e7f75e79a5d84
2016-11-25 02:39:52 -08:00
Cameron McCormack
7b5d5ddcea servo: Merge #14340 - implement StyleSheet.disabled (from heycam:sheet-disabled); r=Manishearth
<!-- Please describe your changes on the following line: -->

This implements the [CSSOM StyleSheet.disabled](https://drafts.csswg.org/cssom/#dom-stylesheet-disabled) IDL attribute.

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: c1c3974fb2d8ca60f2837ccd7d2d3b345e440af8
2016-11-24 20:40:24 -08:00
Cameron McCormack
43830e4013 servo: Merge #14366 - move Servo_GetStyleVariables definition from the Gecko side (from heycam:variables); r=Manishearth
<!-- Please describe your changes on the following line: -->

This is the Servo-side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1319982 which has already been reviewed by @Manishearth there.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4529435f96cadf0a7b32f7417bef885833a7cabc
2016-11-24 16:38:40 -08:00
Cameron McCormack
7d301ac03e servo: Merge #14356 - stylo: don't match native anonymous content to user/author rules (from heycam:nac-no-doc); r=emilio
<!-- Please describe your changes on the following line: -->

This makes us skip user and document style sheets when performing the cascade for Gecko native anonymous content.  It was reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1293809 by @emilio.

Source-Repo: https://github.com/servo/servo
Source-Revision: a9b0eb101f452278fa805dd04a5b4ab9d036be70
2016-11-23 23:32:32 -08:00
Xidorn Quan
b6124e6d1e servo: Merge #14330 - Implement access to CSSStyleRule for stylo (from upsuper:bug1307357); r=heycam
<!-- Please describe your changes on the following line: -->
This is the servo part of [bug 1307357](https://bugzilla.mozilla.org/show_bug.cgi?id=1307357) which has been reviewed by @heycam, @Manishearth and @SimonSapin.

r? @heycam

(`./mach test-tidy` reports several issues on bindings.rs... which I don't think is introduced by my patch... so I have no idea what to do here...)

---
<!-- 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
- [ ] `./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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: c8e39dcdf6fbdc36bed42d3f0d46ad78133d83cf
2016-11-23 15:47:18 -08:00
J. Cliff Dyer
33f07b3fd9 servo: Merge #14347 - Only allow border-image-outset to use non-negative numbers (from jcdyer:cdyer/len-parsing); r=Wafflespeanut
Restricts border-image-outline to only allow positive values.

Fixes #14295

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 210b1be1d093adf3a4fb4d4360c6e016676f34be
2016-11-23 12:30:41 -08:00
Manish Goregaokar
ad91ed0527 servo: Merge #14241 - CSSOM: Whole ton of things (from Manishearth:mut-cssom); r=SimonSapin
CSSOM is now starting to be useful!

Based on #14190. Only the <s>last commit</s> last two commits need review.

cc @xidorn . This doesn't change the style API, but adds useful methods.

part of #11420

This adds:
 - `insertRule()` and `deleteRule()` on `CSSStyleSheet`, `CSSGroupingRule`
 - `.style` getters on link and style elements
 - Keyframes-backed `CSSRules` and `CSSKeyframesRule.cssRules`
 - `CSSGroupingRule.cssRules`
 - `prefix` and `namespaceURI` attributes of `CSSNamespaceRule`
 - Fixups regarding parent stylesheets

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 996756687cd741ad0d30029022638bdcceecb563
2016-11-23 10:27:49 -08:00
Nazım Can Altınova
f13da5d1ad servo: Merge #14316 - Implement parsing/serialization and/or gecko glue for some properties (from canaltinova:stylo-properties); r=emilio
<!-- Please describe your changes on the following line: -->
The PR covers implementation and/or gecko glue for these properties:

1. Implemented parsing/serialization and gecko glue for column-rule-width, column-rule-color and column-span longhand properties (column-span is not implemented in gecko yet but I wanted to complete column properties :) )
2.  Implemented parsing/serialization and gecko glue for text-emphasis-color longhand and text-emphasis shorthand properties.
3. Implemented gecko glue for column-gap and order properties

I implemented column-rule-width and column-rule-color properties with `-moz-` prefixes, but I can remove them if it's not right.
I coudn't test them in full stylo build yet (LLVM messed up my current clang). But I'll test them soon.

r? @Manishearth or @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

<!-- Either: -->
- [X] These changes do not require tests

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a2babd6db8bd8fdfa30f5fbb66b734e679960285
2016-11-22 23:51:21 -08:00
Xidorn Quan
8dbd2d5c92 servo: Merge #14334 - Remove unused check_bindings (from upsuper:remove-check-bindings); r=Manishearth
<!-- Please describe your changes on the following line: -->
It seems the two files are no longer used. `check_bindings` has been moved to stylo unit test in `tests/unit/stylo`. Keeping these files in the component directory could confuse people.

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 9790ab0a0de37a3d968619cb3fea0ed41b9210a4
2016-11-22 20:39:23 -08:00
Ravi Shankar
781c9f8423 servo: Merge #14296 - Some generic impls for Either<Length, T> (from Wafflespeanut:either); r=emilio
<!-- Please describe your changes on the following line: -->

We seem to be using `parse_non_negative` a lot for `LengthOrFoo` types, so it's better to have generic impls (now, and in the future) for such things (assuming that `Length` will always be in the first variant of `Either`).

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

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bcf41844833e1818768f9d8ca73a931996617868
2016-11-22 14:59:11 -06:00
Simon Sapin
ce87984b66 servo: Merge #14320 - Update to selectors 0.15 (from servo:selectorsup); r=nox
<!-- 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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: f37fc5ea5ef3335ebc0a754dce93872dd5fd85a1
2016-11-22 10:44:03 -06:00
Shing Lyu
f4739afdf9 servo: Merge #14218 - Implement drop-shadow filter for Stylo (from shinglyu:dropshadow-review); r=Manishearth
<!-- Please describe your changes on the following line: -->

This patch got an r+ on [MozReview](https://reviewboard.mozilla.org/r/90560/#issue-summary)

---
<!-- 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 Bugzilla [#1315157](https://bugzilla.mozilla.org/show_bug.cgi?id=1315157)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because unit test not land-able if not enabled for servo. I'll land the test later when we enable it in Servo

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: f747ff95cdb03cdf66735d3975de4793147ba07f
2016-11-22 03:25:43 -06:00
Simon Sapin
174dbcace7 servo: Merge #14232 - CSSOM: Make Stylesheet fields have their own synchronization (from servo:moar-locks); r=upsuper
<!-- Please describe your changes on the following line: -->

r? @upsuper

---
<!-- 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 1314208.

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 30867001d17222cc5d0b18086dca9f5d9bcb3934
2016-11-21 19:33:57 -06:00
Manish Goregaokar
4ac112d1e4 servo: Merge #14268 - Regenerate bindings (from Manishearth:regen); r=bholley
Don't merge yet

Source-Repo: https://github.com/servo/servo
Source-Revision: 95bc7ece477d201605c77a5e73c211bdd7723ee9
2016-11-21 12:19:39 -06:00
Cameron McCormack
2b1a7dd8de servo: Merge #14273 - ensure RuleNodes are dropped when Gecko drops the Stylist (from heycam:rule-tree-stylo); r=bholley,emilio
<!-- Please describe your changes on the following line: -->

These are the Servo-side patches from https://bugzilla.mozilla.org/show_bug.cgi?id=1318238, which already have been reviewed by @bholley and @emilio there.

Source-Repo: https://github.com/servo/servo
Source-Revision: 385e59e0f124d02b36a66e4d4a4a073a6612a20b
2016-11-21 08:16:36 -06:00
Cameron McCormack
ed81f90b37 servo: Merge #14055 - support cursor property url() values in stylo (from heycam:cursor); r=Manishearth
<!-- Please describe your changes on the following line: -->

This is the Servo-side change for [bug 1310560](https://bugzilla.mozilla.org/show_bug.cgi?id=1310560), which @Manishearth has already r+ed.

---
<!-- 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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: eb531c15d990391f73f3a1030b103dfc3e023427
2016-11-21 05:49:05 -06:00
Emilio Cobos Álvarez
ba5988535f servo: Merge #14278 - style: Don't assert when the final rule tree GC happens in script (from emilio:layout-data-in-script); r=Ms2ger
This should silence the assertions in https://github.com/servo/servo/issues/14213.

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 976989fc8d6a61391b35639943c63e6aaa27068b
2016-11-20 14:23:39 -06:00
Simon Sapin
c839f3f401 servo: Merge #14294 - Rename a few source files (from servo:renames); r=Wafflespeanut
<!-- 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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 68b1d1d2860ac6c6e8c1c0dfe46af6790ca01dc8

--HG--
rename : servo/components/style/gecko/selector_impl.rs => servo/components/style/gecko/selector_parser.rs
rename : servo/components/style/selector_impl.rs => servo/components/style/selector_parser.rs
rename : servo/components/style/servo/selector_impl.rs => servo/components/style/servo/selector_parser.rs
rename : servo/components/style/selector_matching.rs => servo/components/style/stylist.rs
rename : servo/tests/unit/style/selector_matching.rs => servo/tests/unit/style/stylist.rs
2016-11-20 09:21:52 -06:00
Pu Xingyu
8f506067e0 servo: Merge #13418 - Make document url mutable and implement location.replace() (from stshine:location-replace); r=KiChjang
<!-- 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 #13413 (github issue number if applicable).

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 72e4c6dc21c132d49cf0a5f68a3ba45d16cc8322
2016-11-20 02:27:54 -06:00
Cameron McCormack
f241c1d75a servo: Merge #14256 - GC the rule tree only when the free list gets to a certain size (from heycam:rn-gc-heuristic); r=emilio
<!-- Please describe your changes on the following line: -->

Use a heuristic similar to Gecko's to decide when to GC the rule tree.

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: b78622bd53b0b605c777b4af2319e032eb3fe190
2016-11-19 22:01:12 -06:00
Jeremy Chen
e902ebee42 servo: Merge #14227 - Stylo - gecko glue code for font-size-adjust (from chenpighead:font-size-adjust-gecko); r=Manishearth
<!-- Please describe your changes on the following line: -->

Implement the gecko-side glue code for font-size-adjust.
This is a followup for #14125, which is originally filed in #13875.

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a4e26d503af5589262e0ad2a73b40325fc7ef8a0
2016-11-19 05:07:46 -06:00
Ravi Shankar
0587931765 servo: Merge #14261 - Prefer Either type for LengthOrNumber (from Wafflespeanut:lon); r=SimonSapin
<!-- Please describe your changes on the following line: -->

This adds `impl GeckoStyleCoordConvertible for Either<A, B>` and makes `LengthOrNumber` prefer `Either<A, B>`.

---
<!-- 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 build-geckolib` 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 a refactor

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c55d461f1d6ab29f8309c81ccb8e4fca3461929
2016-11-18 22:20:04 -06:00
Nazım Can Altınova
3bd7c5ba21 servo: Merge #14238 - Implement ToCss serialization for CSSRules (from canaltinova:cssom-tocss); r=Manishearth
<!-- Please describe your changes on the following line: -->
Implementation of ToCss serialization for CSSRules. It requires #14190 to merge first to uncomment `CssRule::Style` branch in CssRule's ToCss implementation.

r? @Manishearth

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

- [X] These changes do not require tests because it's serialization changes and I'm not sure there is a test for that.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 731264f20e1f19687bf0d77fb364568bd1ac034e
2016-11-18 10:15:52 -06:00
Emilio Cobos Álvarez
9747761479 servo: Merge #14246 - Urlmageddon (from emilio:servo-url); r=SimonSapin
<!-- Please describe your changes on the following line: -->

Still needs a bunch of code in net to be converted in order to get more
advantage of this for images and stuff, but meanwhile this should help quite a
bit with #13778.

Still wanted to get this in.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 22aebdf5d41a3509cd6515ccf5edcdf33715a76d
2016-11-17 15:34:47 -06:00
Ravi Shankar
ec6d8e4f51 servo: Merge #13917 - Remove usage of 'keyword_list' (from Wafflespeanut:keywords); r=Manishearth
<!-- Please describe your changes on the following line: -->

We're using `keyword_list` to generate code for some of the animation properties. This could be achieved with `single_keyword` (passing `vector=True`).

---

<!-- 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 build-geckolib` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because it's a cleanup

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: b3ad71353bf264770bf0b3a87b32d86928eb09d4
2016-11-17 14:34:33 -06:00
Bobby Holley
484461d581 servo: Merge #14214 - Overhaul dirtiness handling in Servo to prepare for the new incremental restyle architecture (from bholley:dirtiness_overhaul); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: e4a27c4d16ee0e80ccd4ffd97a93c2b2a4f05391
2016-11-17 12:25:52 -06:00
Manish Goregaokar
9ef4011197 servo: Merge #14223 - Delegate logical bitfield setters to physical to fix cascade (from Manishearth:fix-logical-cascade); r=emilio
(fixes #14222)

Five minutes early for "tomorrow", _shrug_.

I'm not entirely sure of this fix. It depends on properties going through the cascade in source order all else being the same. I think that's the case.

Fixes wikipedia though.

r? @emilio or @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 8c6703637ff82e3a6063cfb032e6179e3dc4d18a
2016-11-16 19:10:25 -06:00
Manish Goregaokar
d8a79aa1af servo: Merge #14190 - Immutable CSSOM (from Manishearth:cssom); r=SimonSapin
This PR is intended to add basic support for all CSSOM interfaces, with the ability to index `document.styleSheets` and css rule lists, and serializing individual css rules. Handling individual interface methods for CSSRule subclasses can probably be done with easy/medium bugs.

Mutation safety isn't dealt with here; if the css rule list is mutated the CSSOM will be in an inconsistent state. I intend to deal with this via zero sized tokens, see https://groups.google.com/forum/#!topic/mozilla.dev.servo/AnxJoVmtMXQ .  I'll handle that when I start making the CSSOM mutable. (Getting the immutable bit landed first opens this up for easy bugs)

This doesn't really change style aside from adding an extra arc in the CSS rule list as discussed in the linked thread. So far this same design can be used by stylo as well when the time comes.

f? @SimonSapin @emilio

cc @upsuper

part of #11420
Todo:

 - [x] Stubs for rest of the CSSRule subclasses
 - [x] <s>ToCSS impls for CSSRules.</s> May make into easy bugs and stub out in this PR https://github.com/servo/servo/issues/14195
 - [x] Cache CSSStyleSheet on the relevant node

Source-Repo: https://github.com/servo/servo
Source-Revision: afc60bee2809059b8b754a1c6d6d10c1d36326fb
2016-11-16 15:05:59 -06:00
Agoston Szepessy
1c702e923b servo: Merge #14188 - Added parsing/serialization for text-emphasis-position (from AgostonSzepessy:text-emphasis-position); r=SimonSapin
Implemented parsing/serialization for text-emphasis-position

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13850
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 00f229d615980dbd23612f64b7a60a70b76d3f97
2016-11-16 07:59:55 -06:00
Cameron McCormack
5139892d26 servo: Merge #14224 - Regenerate bindings (from heycam:bindings-update-6); r=shinglyu
<!-- Please describe your changes on the following line: -->

r? @shinglyu

The oldest commit is from #14220 which hasn't merged yet.  The second commit is the update for the sync: https://treeherder.mozilla.org/#/jobs?repo=stylo&revision=88d68e17f03c1f8b9f688081902a3369ea83e627

The newest commit is just regenerating bindings again with an updated rust-bindgen (since the previous few bindings updates were done with an old rust-bindgen).

I ran `./mach test-stylo` and all the tests pass.

---
<!-- 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
- [ ] `./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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 969c7ec06fa51226ae97a9b1f066e3d0da48e536
2016-11-15 04:41:44 -06:00
Cameron McCormack
77e9737522 servo: Merge #14220 - Regenerate bindings (from heycam:bindings-update-5); r=Manishearth
<!-- Please describe your changes on the following line: -->

r? @Manishearth

---
<!-- 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
- [ ] `./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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Bindings update for
00ef34eaec

Source-Repo: https://github.com/servo/servo
Source-Revision: 544f2385726fade765e2d1b58d2c8b9b18d1c755
2016-11-15 02:28:25 -06:00
Emilio Cobos Álvarez
fbd6dc3fd6 servo: Merge #13641 - Use rayon to drive parallel layout and styling (from emilio:rayon-style); r=pcwalton
<!-- Please describe your changes on the following line: -->

The current work queue had a really annoying constraint: The size of the node had to be the size of the work unit data.

This makes it impractical for the new restyling model where we plan to pass down a bunch of data.

Rayon by default makes you wait for the result of the work unit, which makes it impractical for the current model (it's mostly sequential).

I added an API to rayon that allows us to push work to the queue without waiting (https://github.com/nikomatsakis/rayon/pull/103).

This still needs some work (for example, we're loosing the memory reporting functionality), but I wanted feedback on this.

---

<!-- 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
- [ ] `./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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 9467fbe26d25dfc633d5ab8973fe459d14eff9dc
2016-11-14 14:47:21 -06:00
Nazım Can Altınova
b3a69ffa24 servo: Merge #14189 - Implement border-image shorthand (from canaltinova:border-image-shorthand); r=Manishearth
<!-- Please describe your changes on the following line: -->
Implementation of border-image shorthand.
r? Manishearth

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: e9fa69bb2d2210563f774393b40913154ad43d22
2016-11-14 11:17:54 -06:00
Takanori Ishibashi
a69e0fd09a servo: Merge #14199 - Update CSSRule naming from 'CSSRule' to 'CssRule' (from 11Takanori:CSSRule_to_CssRule); r=nox
<!-- Please describe your changes on the following line: -->
Update CSSRule naming from 'CSSRule' to 'CssRule'

---
<!-- 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://github.com/servo/servo/issues/14196 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I just rename CSSRule to CssRule.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: b63c85c31b10e449b7334890becacb08def81f96
2016-11-14 03:36:37 -06:00
Manish Goregaokar
f1021c2d77 servo: Merge #14104 - Adds scroll-snap-type shorthand property (from iamrohit7:scroll-snap-type); r=Manishearth,waffles
<!-- Please describe your changes on the following line: -->
Follow up to #14017

---
r=Manishearth
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes `scroll_snap_type::should_serialize_to_single_value_if_sub_types_are_equal`, `scroll_snap_type::should_serialize_to_empty_string_if_sub_types_not_equal`

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 395981742475612eac7ef0bd484b4ae1bc1dd4a8
2016-11-14 01:51:07 -06:00
Emilio Cobos Álvarez
8f22036232 servo: Merge #14187 - Add a few minimal debugging docs (from emilio:rr-docs); r=jdm
r? @jdm (or anyone else)

Source-Repo: https://github.com/servo/servo
Source-Revision: bfd4a0e5ffce6ceed6c4426279a8f3dcb3766fd1
2016-11-13 14:16:15 -06:00
Emilio Cobos Álvarez
f6b347dc05 servo: Merge #14174 - style: Refactor and add infrastructure for font metrics in style (from emilio:font-provider); r=Manishearth
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because moves stuff around without adding functionality.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 57c4db7c670f34fffbee0c179077e8afdadf09f8
2016-11-13 04:55:02 -06:00
Artem Biryukov
8e1d17f6f3 servo: Merge #14178 - Parse trait functions (from impowski:parse_trait_functions); r=Wafflespeanut
<!-- Please describe your changes on the following line: -->
Moved parse functions to a Parse trait in style. r? @Manishearth

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

<!-- Either: -->
- [x] There are tests for these changes OR
- [X] These changes do not require tests because new functionalities weren't added

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 6adae66f9c7ff58e0e31f3913471e575910a5861
2016-11-11 21:35:48 -06:00
Bobby Holley
7fa6f2be7f servo: Merge #14175 - Separate selector matching from property cascading (from bholley:separate_cascade); r=emilio
This builds on @emilio's rule tree work. The goal is to raise the boundary between rule node computation and property cascading higher up the callstack, so that the new traversal architecture can decide to do one but not the other.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3b2e3dcfb98464d24ad721a03009a1d31f54b31d
2016-11-11 16:35:34 -06:00
Manish Goregaokar
2bfe265228 servo: Merge #14120 - Support logical properties in style (from Manishearth:logical); r=emilio
Adds support for the logical block-end/inline-start/etc properties. These properties (like `border-block-end-color`) map to "physical" properties (e.g. `border-top-color`) depending on the writing mode.

Todo:

 - [x] Handle shorthands
 - [x] Make geckolib setters work
 - [x] Handle padding/offset logical properties
 - [x] Perhaps handle `-block-size`, `-inline-size` type logical properties?
 - [x] Tests?

This will overall add 16 new longhands and 4 new shorthands, taking a big bite out of the [remaining properties work](https://manishearth.github.io/css-properties-list/?stylo=hide&servo=hide&firefox=only&chrome=show&mdn=false&alexa=false)

f? @emilio @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 4b9693cf81c5953a062e138e37fed0e00f2c1cc1
2016-11-11 15:41:08 -06:00
Emilio Cobos Álvarez
a04521065b servo: Merge #14167 - style: Don't assume siblings are alive in the rule tree when removing ourselves from the child list (from emilio:rule-tree-list); r=Manishearth
<!-- 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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

We can't assume all our siblings are alive because they may very well be in the
free list too.

This tempts to happen when the rule nodes are destroyed as part of the last GC,
the one that runs in the root destructor.

Also, properly put the next sibling back into the list when the rules are GCd.

Source-Repo: https://github.com/servo/servo
Source-Revision: d49840eeec30967cc6f482bc2db9055ab6404ea4
2016-11-11 13:33:06 -06:00
Manish Goregaokar
052337a4f7 servo: Merge #14168 - stylo: support transform (from Manishearth:tmp-transform); r=heycam
r=heycam from https://bugzilla.mozilla.org/show_bug.cgi?id=1314200

Source-Repo: https://github.com/servo/servo
Source-Revision: 75d35241db63894db31b6385143ffea0db5cac70
2016-11-10 18:38:48 -06:00
Pu Xingyu
96276fe1da servo: Merge #14136 - style: Add a "start_end()" method to LogicalMargin (from stshine:orthogonal-symmetry); r=SimonSapin
<!-- Please describe your changes on the following line: -->

Add a `LogicalMargin::start_end()` method that receives a `Direction' parameter. This is useful for some layout that is symmetric in inline and block directions, like flexbox.

Part of #14123.

---
<!-- 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 refactoring

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: d16f3124640be647b4ed67cc4a68cebd55cdb7cc
2016-11-10 11:53:05 -06:00
Emilio Cobos Álvarez
9a550ec1c4 servo: Merge #13791 - Centralize construction of specified url() values in style (from emilio:lazy-url); r=SimonSapin
This reduces a decent amount of overhead in #13778.

r? @SimonSapin

---

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

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 164e956944db0d1d873d2f6eeb9eb59e3f46dc5f
2016-11-10 08:28:39 -06:00
Xidorn Quan
306c3d3de4 servo: Merge #14159 - Allow empty media query list (from upsuper:media-query); r=Wafflespeanut
<!-- 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: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: c3dc50b7ac553acc7116a2fca4c4498e8b3a8a72
2016-11-10 01:37:57 -06:00
Cameron McCormack
eda4eab5e7 servo: Merge #14158 - Regenerate bindings (from heycam:bindings-update-4); r=Manishearth
<!-- Please describe your changes on the following line: -->

Bindings update from [the latest incubator/stylo push](https://treeherder.mozilla.org/#/jobs?repo=stylo&revision=c5170a72424e7175020506586fa775077f5307a9).

r? @Manishearth

---
<!-- 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
- [ ] `./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 _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 29a55e5cbd36e57cd1fad20898200fe2470d7db1
2016-11-09 22:59:04 -06:00
Nikhil Shagrithaya
cea225d1f4 servo: Merge #13924 - implemented string-valued text-overflow (from cynicaldevil:text-overflow); 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 #13709

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

cc @Manishearth
The lorem-ipsum example from MDN works as expected.

Source-Repo: https://github.com/servo/servo
Source-Revision: a91f48ee05933784630fdf918fc4b66037dba9f1
2016-11-09 16:36:45 -06:00
Ravi Shankar
6b633a5593 servo: Merge #14049 - Add a generic type for sharing some CSS types (from Wafflespeanut:lon); r=SimonSapin
<!-- Please describe your changes on the following line: -->

This would be useful for types such as `T(pub Option<U>)` or any type that's a mixture of two types (like `LengthOrFoo` for example). Well, it's a bit ugly, especially because we have to address the types as `Either::First` and `Either::Second` everywhere, but I don't have a brighter idea 😄

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

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor

r? @SimonSapin (cc @Manishearth @emilio)

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 35f328d7174c93bb6ef5913a206496779fb8d3bf
2016-11-09 08:15:16 -06:00
Jeremy Chen
e2377967c1 servo: Merge #14125 - #13875 - Implement parsing/serialization for font-size-adjust (from chenpighead:font-size-adjust#13875); r=Manishearth
<!-- Please describe your changes on the following line: -->
 Implement parsing/serialization for font-size-adjust.
---
<!-- 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 #13875 (github issue number if applicable).

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 2e2eab069a366be658b759fcd2ed1006a4c60407
2016-11-08 10:39:32 -06:00
Patrick Walton
1878ef834a servo: Merge #14111 - style: Turn the CSS flexible box model on by default (from servo:pcwalton-turn-flexbox-on); r=emilio,jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c4bd2027b723df9a999b25917ebb293acf9f722c
2016-11-08 03:31:16 -06:00