Commit graph

25860 commits

Author SHA1 Message Date
J. Ryan Stinnett
981571f4f8 Ignore non-margin properties in @page rule
Extend Servo's @page parsing to match Gecko's CSS 2.2 behavior, where only
margin properties are allowed in an @page rule.  Other properties are ignored.

MozReview-Commit-ID: IPYUlnkLYSb
2017-04-09 17:49:41 +08:00
J. Ryan Stinnett
f0e849cbd8 Servo parsing / serialization for @page
Adds basic parsing and serialization for @page rules in Servo.  It is handled
in the same manner as a regular style rule.

MozReview-Commit-ID: JRr3DDGcUIl
2017-04-09 17:49:14 +08:00
Manish Goregaokar
2ea8d61fbf stylo: Bypass cache when fetching font size prefs from Stylo 2017-04-09 17:44:00 +08:00
bors-servo
6020c2feeb Auto merge of #16314 - Wafflespeanut:bind, r=heycam
Include bindings for StyleGridTemplate

Servo-side changes for [Bug 1354775](https://bugzilla.mozilla.org/show_bug.cgi?id=1354775)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16314)
<!-- Reviewable:end -->
2017-04-09 02:29:32 -05:00
Ravi Shankar
00bb0d6a12 Include bindings for StyleGridTemplate 2017-04-09 12:38:44 +05:30
bors-servo
fd2b092839 Auto merge of #16312 - bholley:breadth_first_sequential, r=emilio
Make the sequential traversal breadth-first

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1354806

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16312)
<!-- Reviewable:end -->
2017-04-09 01:55:09 -05:00
Bobby Holley
3f52052cf9 Do the sequential traversal breadth-first.
While we're at it, we also eliminate the 'unknown' dom depth for the
bloom filter. Computing depth has negligible cost relative to the
amount of work we do setting up the bloom filter at a given depth.
Doing it once per traversal should be totally fine.

I originally separated the elimination of unknown dom depth from the
traversal changes, but I got bloom filter crashes on the intermediate
patch, presumably because I didn't properly fix the sequential traversal
for this case. Given that the final state is green, I just decided to
squash and move on.
2017-04-09 14:52:49 +08:00
bors-servo
2f67f69e89 Auto merge of #16309 - heycam:restyle-reconstruct, r=bholley
style: add a "for frame reconstruction" mode for restyle traversal

This is the Servo part of https://bugzilla.mozilla.org/show_bug.cgi?id=1351535.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16309)
<!-- Reviewable:end -->
2017-04-09 01:04:57 -05:00
Bobby Holley
1b363ac909 Factor out the bottom-up postorder traversal logic. 2017-04-09 12:35:58 +08:00
bors-servo
3a5ed1797f Auto merge of #16311 - nox:data-method, r=KiChjang
Do not return an error for non-GET data: requests (fixes #13293)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16311)
<!-- Reviewable:end -->
2017-04-08 23:17:26 -05:00
Emilio Cobos Álvarez
1748150497
selectors: Remove custom attribute-affecting logic and sibling-affecting logic from rust-selectors.
MozReview-Commit-ID: BjZY6TjJbcb
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-09 05:49:47 +02:00
Anthony Ramine
c0f9fb8f55 Do not return an error for non-GET data: requests (fixes #13293) 2017-04-08 21:47:55 +02:00
Cameron McCormack
5c974c21d9 geckolib: Regenerate bindings. 2017-04-08 23:18:12 +08:00
Cameron McCormack
3f71c80e2f style: Handle TraversalRestyleBehavior::ForReconstruct in the Servo restyle. 2017-04-08 23:09:00 +08:00
Cameron McCormack
2bbeb21551 style: Move TraversalFlags into SharedStyleContext. 2017-04-08 23:07:35 +08:00
Cameron McCormack
5fa9a56247 style: Don't traverse children if the root of the restyle is display:none.
If we append a child to a display:none element, and we use StyleNewChildren on
that parent, we should skip restyling the children.
2017-04-08 23:07:30 +08:00
bors-servo
63988b9103 Auto merge of #16306 - ahmedcharles:msvc, r=Wafflespeanut
Update Cargo.lock to include fix for MSVC 2017 in mozjs-sys.

<!-- 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 it just updates to a new version of spidermonkey.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16306)
<!-- Reviewable:end -->
2017-04-08 05:11:01 -05:00
Ahmed Charles
b2bbc35781 Update Cargo.lock to include fix for MSVC 2017 in mozjs-sys. 2017-04-08 02:31:41 -07:00
bors-servo
a811776df4 Auto merge of #16070 - emilio:selectors-bloom-hash-less, r=bholley
selectors: Get rid of hashing overhead using the precomputed hash atoms have.

I realized of this when @bzbarsky  mentioned the bloom filter in https://bugzilla.mozilla.org/show_bug.cgi?id=1348935#c7.

Right now we hash (the hash) all the time, when we can do better.

This requires a change in string-cache, which is at https://github.com/servo/string-cache/pull/183.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16070)
<!-- Reviewable:end -->
2017-04-07 19:03:12 -05:00
Emilio Cobos Álvarez
e29b84de18
style: Hash less stuff in the bloom filter, using the precomputed hashes we have. 2017-04-08 02:02:11 +02:00
Emilio Cobos Álvarez
65ebbb7c56
selectors: Unbust tests, and add a way to override the hash for the bloom filter. 2017-04-08 02:00:31 +02:00
bors-servo
e0731215c0 Auto merge of #16301 - emilio:atoms-up, r=Wafflespeanut
Update string-cache.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16301)
<!-- Reviewable:end -->
2017-04-07 06:40:45 -05:00
Emilio Cobos Álvarez
1b51324b66
Update string-cache. 2017-04-07 13:38:40 +02:00
bors-servo
8f2ceb41dd Auto merge of #16288 - nox:net, r=jdm
Kill ResourceGroup

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16288)
<!-- Reviewable:end -->
2017-04-07 05:53:31 -05:00
Anthony Ramine
9394469ede Kill Request::omit_origin_header 2017-04-07 12:52:50 +02:00
bors-servo
e97b186f34 Auto merge of #16300 - pyfisch:transform-perspective, r=emilio
Make transform perspective reject negative lengths.

<!-- Please describe your changes on the following line: -->
`transform: perspective(-10px)` is invalid per spec. This patch prevents negative values from being parsed. There is an issue if zero should be allowed: https://github.com/w3c/fxtf-drafts/issues/126
---
<!-- 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/pull/16242#issuecomment-291639340

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16300)
<!-- Reviewable:end -->
2017-04-07 05:13:47 -05:00
Pyfisch
b62cdb92ec Make transform perspective reject negative lengths.
Contains one test.
Fixes:
https://github.com/servo/servo/pull/16242#issuecomment-291639340
2017-04-07 12:10:50 +02:00
bors-servo
12a4cc875d Auto merge of #16297 - upsuper:stylo-servo-url, r=SimonSapin
Remove servo_url dependency for geckolib

It seems mod attr is not used for geckolib at all, and that is the only place where servo_url is still referenced for geckolib, so we can just remove it.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16297)
<!-- Reviewable:end -->
2017-04-07 04:34:47 -05:00
Clement Miao
ea3c840983 new keyboard shortcuts inside text input 2017-04-07 01:05:13 -07:00
Xidorn Quan
817172ebc4 Remove servo feature from servo_url 2017-04-07 17:51:49 +10:00
Xidorn Quan
e07cf0a8da Remove servo feature from servo_config 2017-04-07 17:44:22 +10:00
Xidorn Quan
c857878ce9 Remove servo_config dependency for geckolib 2017-04-07 17:20:42 +10:00
Xidorn Quan
3150a92651 Remove servo_url dependency for geckolib
It seems mod attr is not used for geckolib at all, and that is the
only place where servo_url is still referenced for geckolib, so we
can just remove it.
2017-04-07 16:44:38 +10:00
bors-servo
535d0e421a Auto merge of #16296 - upsuper:cssparser, r=heycam
Update cssparser in Cargo.toml

This helps Stylo builds to actually use the new cssparser.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16296)
<!-- Reviewable:end -->
2017-04-07 01:10:25 -05:00
Xidorn Quan
da901bd2dc Update cssparser in Cargo.toml. 2017-04-07 16:07:37 +10:00
bors-servo
1b6c3e06bb Auto merge of #16294 - hiikezoe:make-word-spacing-animatable, r=emilio
Make word spacing animatable

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1354053

---
<!-- 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, a test case will be landed in web-platform-tests in https://bugzilla.mozilla.org/show_bug.cgi?id=1354053

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16294)
<!-- Reviewable:end -->
2017-04-06 22:11:18 -05:00
bors-servo
c87d0c671c Auto merge of #16037 - cbrewster:reduce_framestate_clones, r=asajeffrey
Reduce cloning of FrameState

<!-- Please describe your changes on the following line: -->
This uses `kmerge` from itertools to construct the jsh future and past iterators without having to do a collect/sort. This allows us to reduce cloning of `FrameState`.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16037)
<!-- Reviewable:end -->
2017-04-06 21:22:14 -05:00
Hiroyuki Ikezoe
933a5d2f9c Use from_gecko_style_coord() to convert CoordDataValue to Option<T> for letter-spacing. 2017-04-07 11:21:07 +09:00
Hiroyuki Ikezoe
f1642eb7a6 Make word-spacing animatable. 2017-04-07 11:21:07 +09:00
Hiroyuki Ikezoe
c120b0b701 Introduce a macro to define Interpolate trait for tuple struct which has Option<T>.
The computed value of word-spacing is T(pub Option<LengthOrPercentage>),
the computed value of letter-spacing is similar to this, T(pub Option<Au>).
It would be nice to have re-usable macro for these kind of struct.
2017-04-07 11:21:07 +09:00
bors-servo
8c2548a0c4 Auto merge of #16292 - hiikezoe:discrete-type-animations, r=emilio,birtles
Discrete type animations

<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1336668

---
<!-- 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 there is a test case in web-platform-tests.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16292)
<!-- Reviewable:end -->
2017-04-06 20:44:23 -05:00
Hiroyuki Ikezoe
53b4cc3593 Make align-items animatable as discrete type. 2017-04-07 10:38:34 +09:00
Hiroyuki Ikezoe
4ff5a1ef70 Add a tweak to avoid calling interpolate() if animation_type is discrete.
For discrete type of animations, we just need to return 'from' value if
progress is less than 0.5 and otherwise return 'to' value.

https://w3c.github.io/web-animations/#discrete-animation-type
2017-04-07 10:38:33 +09:00
Hiroyuki Ikezoe
03d354afba Rename animatable to animation_type.
animation_type takes following values:

animation_type="none" for non-animatable properties
animation_type="normal" for animatable properties
animation_type="discrete" for animatable but discrete type of animations

We use string value to distinguish the case where no animation_type is
specified.
animation_type="discrete" will be used in a subsequent patch to make a property
animatable as discrete type.
2017-04-07 10:38:28 +09:00
bors-servo
48a412abc7 Auto merge of #16291 - bholley:possibly_expired, r=emilio
Hoist possibly_expired_animations into CurrentElementInfo

The current mechanism requires threading a lot of this state through a bunch of
callsites that are several layers of abstraction above the code that actually
uses this vector (which is only compiled for servo). Putting it in
CurrentElementInfo gets it nicely out of the way.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16291)
<!-- Reviewable:end -->
2017-04-06 20:07:48 -05:00
Bobby Holley
788d9ad0aa Hoist possibly_expired_animations into CurrentElementInfo.
The current mechanism requires threading a lot of this state through a bunch of
callsites that are several layers of abstraction above the code that actually
uses this vector (which is only compiled for servo). Putting it in
CurrentElementInfo gets it nicely out of the way.

MozReview-Commit-ID: 9PLBKcJreN0
2017-04-06 17:51:59 -07:00
bors-servo
9ad95a5dc7 Auto merge of #16282 - upsuper:bug1343964, r=heycam
Move dummy url data to be a static member of URLExtraData

This is the Servo side change of [bug 1343964](https://bugzilla.mozilla.org/show_bug.cgi?id=1343964) which has been reviewed on Bugzilla.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16282)
<!-- Reviewable:end -->
2017-04-06 19:33:35 -05:00
Xidorn Quan
2471c4d794 Update binding files. 2017-04-07 10:33:12 +10:00
Xidorn Quan
2820b7ac53 Move dummy url data to be a static member of URLExtraData. 2017-04-07 10:33:09 +10:00
bors-servo
3beaa8d2e9 Auto merge of #16289 - bholley:primary_before_pseudos, r=emilio
Cascade the primary style before matching pseudos

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16289)
<!-- Reviewable:end -->
2017-04-06 16:32:14 -05:00