Commit Graph

775 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
950451a844 servo: Merge #14622 - stylo: Track the last restyle generation properly (from emilio:last-restyle); r=bholley
I couldn't reproduce locally, but I believe this fixes:

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

r? @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: f6163c77b9ac979f8406ef6ffe90e8c8e4a054cc
2016-12-17 14:40:33 -08:00
Julien Wajsberg
7b2299345c servo: Merge #14430 - Expose Quirks Mode information in the layout data and code (from julienw:access-quirks-mode-from-layout); r=emilio
<!-- Please describe your changes on the following line: -->
This patch exposes the Quirks (NoQuirks/LimitedQuirks/Quirks) state to the layout subsystem.

---
<!-- 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).
Prelimary work for issue #11704.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
(Waiting for guidance of where/which tests I could do here)

<!-- 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: 164426a7f90c90652d2d52c5a54be91154d26af7
2016-12-17 13:25:06 -08:00
Nick Price
5962202a57 servo: Merge #14598 - Fix linear gradient's specified form #13892 (from DominoTree:master); r=canaltinova
<!-- Please describe your changes on the following line: -->
WIP for #13892

---
<!-- 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 #13892  (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: 9d2b98e6f82fe601672dbf435a920ccceffe78dc
2016-12-16 15:11:29 -08:00
Ravi Shankar
af902543bc servo: Merge #14000 - Stylo: Basic support for grid-{row,column}-{start,end} (from Wafflespeanut:grid); 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-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [ ] 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: 71b68ea0dec10a8e71a9f080d7d7ff382d8f0127
2016-12-16 14:23:40 -08:00
Bobby Holley
b0588eeb56 servo: Merge #14610 - Simplify style context architecture and make it safer (from bholley:style_context_refactor); r=emilio
See the discussion at https://bugzilla.mozilla.org/show_bug.cgi?id=1323372

Not done here, but want to get a try run in on the first patch.

Source-Repo: https://github.com/servo/servo
Source-Revision: a4ecdf2d5fda281f25e2689852bc2134429e07c6
2016-12-16 11:38:27 -08:00
Emilio Cobos Álvarez
6609a2b21d servo: Merge #14540 - style: Basic @import support (from servo:at-import); r=SimonSapin,Ms2ger
r? @SimonSapin or @mbrubeck

cc @heycam and @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: 38f136175e15acb6472466d141dedb6a253b0330
2016-12-16 09:43:19 -08:00
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