Commit Graph

252 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Ravi Shankar
fec4250721 servo: Merge #14089 - Make use of Servo-specific ToCss everywhere! (from Wafflespeanut:tocss); r=SimonSapin
<!-- Please describe your changes on the following line: -->

This will allow types to be generic over our local `ToCss`

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

<!-- 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: f48b3fe2197a59b29bc711fb1b5496cbb97bd330
2016-11-06 23:26:08 -06:00
Nazım Can Altınova
8ab3d2b642 servo: Merge #13989 - Implement border-image-* longhands in stylo (from canaltinova:border-image); r=Manishearth
Implementation of border-image-\* longhands in stylo. PR covers just parsing/serialization part for now. I'll write gecko glue next.
I wanted to open a WIP pr to get early feedback about these parts. I made a `SingleSpecifiedValue` enums to handle {1, 4} values. I'm not sure about naming. I did like this because `keyword_list` helper is doing similar.

r? @emilio or @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: -->
- [ ] 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: 60e09add4d51e12efbf513fbf694f4ac2e21d2cb
2016-11-06 11:36:25 -06:00
Simon Sapin
9c206a6cf3 servo: Merge #13202 - Rule tree, v1 (from emilio:rule-tree); r=SimonSapin,Manishearth,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

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

This patch introduces infrastructure for the rule tree, and constructs it.

We don't use it yet, nor have good heuristics for GC'ing it, but this should not
happen anymore once we store the rule node reference in the node.

I haven't messed up with memory orders because I want to do a try run with it,
then mess with them.

Source-Repo: https://github.com/servo/servo
Source-Revision: ac0475971bb24a63ca5d36d1d17e3036ddb99049
2016-11-05 17:11:24 -05:00
Simon Sapin
7cb2f9a2dc servo: Merge #14043 - Update to string-cache 0.3 (from servo:string-cache-up); r=nox
Previously, `string-cache` defined:
*  An string-like `Atom` type,
* An `atom!("foo")` macro that expands to a value of that type, for a set of strings known at compile-time,
* A `struct Namespace(Atom);` type
* A `ns!(html)` macro that maps known prefixed to `Namespace` values with the corresponding namespace URL.

Adding a string to the static set required making a change to the `string-cache` crate.

With 0.3, the `Atom` type is now generic, with a type parameter that provides a set of static strings. We can have multiple such sets, defined in different crates. The `string_cache_codegen` crate, to be used in build scripts, generates code that defines such a set, a new atom type (a type alias for `Atom<_>` with the type parameter set), and an `atom!`-like macro.

The html5ever repository has a new `html5ever_atoms` crate that defines three such types: `Prefix`, `Namespace`, and `LocalName` (with respective `namespace_prefix!`, `namespace_url!`, and `local_name!` macros). It also defines the `ns!` macro like before.

This repository has a new `servo_atoms` crate in `components/atoms` that, for now, defines a single `Atom` type (and `atom!`) macro. (`servo_atoms::Atom` is defined as something like `type Atom = string_cache::Atom<ServoStaticStringSet>;`, so overall there’s now two types named `Atom`.)

In this PR, `servo_atoms::Atom` is used for everything else that was `string_cache::Atom` before. But more atom types can be defined as needed. Two reasons to do this are to auto-generate the set of static strings (I’m planning to do this for CSS property names, which is the motivation for this change), or to have the type system help us avoid mix up unrelated things (this is why we had a `Namespace` type ever before this change).

Introducing new types helped me find a bug: when creating a new attribute `dom::Element::set_style_attr`, would pass `Some(atom!("style"))` instead of `None` (now `Option<html5ever_atoms::Prefix>` instead of `Option<string_cache::Atom>`) to the `prefix` argument of `Attr::new`. I suppose the author of that code confused it with the `local_name` argument.

---

Note that Stylo is not affected by any of this. The `gecko_string_cache` module is unchanged, with a single `Atom` type. The `style` crate conditionally compiles `Prefix` and `LocalName` re-exports for that are both `gecko_string_cache::Atom` on stylo.

---
<!-- 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: 5b4cc9568dbd5c15e5d2fbc62719172f11566ffa
2016-11-03 11:19:44 -05:00
Rohit Burra
cd4e1e00b1 servo: Merge #14017 - Parsing/Serialization for scroll-snap-points-* (from iamrohit7:scroll-snap-points); r=Manishearth
<!-- Please describe your changes on the following line: -->
Implements Parsing/Serialization for scroll-snap-points-x and scroll-snap-points-y
---
<!-- 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 #13871

<!-- 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: 193a4d88ed6497ebefcf776607a7647dd88628c1
2016-11-02 12:00:11 -05:00
Bobby Holley
44768ccc0c servo: Merge #13991 - Regenerate bindings for mozilla-central rev e3279760cd977aac30bd9e8032d3ee71f55d2a67 (from bholley:regen_bindings); r=emilio
Just pushed an update to incubator, here are the regenerated bindings.

r? @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: 46791b81580558fde815db2adbae715bdeee8906
2016-10-30 17:57:42 -05:00
Ting-Yu Lin
87ba6fe09f servo: Merge #13908 - Use enum BorderWidth as SpecifiedValue (from aethanyc:add-border-width-keyword); r=emilio
Use enum BorderWidth instead of a tuple-like struct to store the specified
value. BorderWidth is needed to be used in both longhand and shorthand
border width properties, so I put it in `specified` module.

Fixed #13869.

---
<!-- 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 #13869 (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: 357e746a9a37a68604fe5ae1c3fb30334f75b4ac
2016-10-29 19:48:27 -05:00
Mateusz 'Haggus' Mrowiec
0575b06d07 servo: Merge #13978 - Implement column-fill (from Haggus:master); r=emilio
Implemented column-fill from #13764

---
<!-- 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: 47d29fd056d1ee5dffdf04c8daf1e097bdd3f38f
2016-10-29 14:16:13 -05:00
Will Tange
7771e6fcb5 servo: Merge #13950 - Implement parsing for font-language-override property (from bheart:parse-font-language-override-property); r=emilio
Implement and test parsing of the `font-language-override` style property.

---
<!-- 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 #13874
- [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: c6ef48ccc1ee55b0c3d2f6a02423ce1f05c06531
2016-10-28 11:23:39 -05:00
Cameron McCormack
69d52c3aa6 servo: Merge #13786 - support url() values in background-image, mask-image and list-style-image in stylo (from heycam:background-image); r=Manishearth
<!-- Please describe your changes on the following line: -->
Corresponding Gecko bugs, where @Manishearth has given r+s:

* https://bugzilla.mozilla.org/show_bug.cgi?id=1288302
* https://bugzilla.mozilla.org/show_bug.cgi?id=1310463

(Sorry for the large structs_{debug,release}.rs changes; I thought it was too much trouble to disentangle the useless changes from the legitimate ones.)

Holding off on landing this until the Gecko patches are reviewed and landed.

---
<!-- 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 I've tested the stylo functionality manually and we can rely on Gecko's existing tests going forward

<!-- 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: a27d54e07fc7b91193d2595c10b7fd702cbafcbc
2016-10-28 07:16:30 -05:00
Rohit Burra
ae75313198 servo: Merge #13937 - Implements parser/serialization for font-synthesis (from iamrohit7:font-synthesis); 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 #13876 (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: 0193f987f6b8cdce02c297529f823e403da49b20
2016-10-28 06:09:27 -05:00
Jesse Kipp
c0dec3c05f servo: Merge #13914 - 13894 Use graphenes in text-emphasis-style (from TooManyBees:13894-use-graphemes); r=emilio
<!-- Please describe your changes on the following line: -->
Use `unicode_segmentation` crate to truncate strings on grapheme boundaries.

---
<!-- 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 #13894 (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: b4a882f81ab9d8128166a49f0514a398ad7a3b7d
2016-10-27 15:58:17 -05:00
Bobby Holley
75f32bc234 servo: Merge #13934 - Only traverse elements from style (from bholley:skip_text_nodes); r=emilio
This is part of the new incremental restyle architecture work. I have patches to element-ify things more, but want to get this in the tree first.

Source-Repo: https://github.com/servo/servo
Source-Revision: 87ef5487179a5b4c556361ad0c77c798b1edd4e1
2016-10-27 12:32:45 -05:00
rwakulszowa
a00b44e235 servo: Merge #13910 - Font feature settings (from rwakulszowa:font-feature-settings); r=emilio
<!-- Please describe your changes on the following line: -->
Implement parsing/serialization for font-feature-settings

---
<!-- 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 #13852 (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: a1dfa0fd85fa3071c90b868f4594b9ee59d08744
2016-10-27 10:48:41 -05:00
Patrick Walton
dff6bf022d servo: Merge #13870 - layout: Rewrite anonymous table code, simplify and fix table intrinsic width calculation, and improve safety of flexbox code (from pcwalton:anonymous-table-rewrite); r=mbrubeck
Closes #13782.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6b40f97289c4c5a20b539992c3d511b3bf470f28
2016-10-26 20:14:04 -05:00
Ravi Shankar
ef541c8a2c servo: Merge #13902 - Prefer auto-generation for some keyword props (from Wafflespeanut:keyword); 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-geckolib` 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? @Manishearth or @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 3c16dde1f268ffab3e2b220fda7e5be299d005b4
2016-10-26 02:27:13 -05:00