Commit graph

12229 commits

Author SHA1 Message Date
bors-servo
89dcbec0ba Auto merge of #15515 - nox:rustc-serialize, r=jdm
Remove rustc-serialize from range

<!-- 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/15515)
<!-- Reviewable:end -->
2017-02-12 04:55:40 -08:00
Anthony Ramine
58046cc83c Remove rustc-serialize from range 2017-02-12 09:44:11 +01:00
Anthony Ramine
5aba878227 Kill dead code 2017-02-12 09:44:10 +01:00
Alon Levy
48bb508f66 fix #15492 2017-02-12 07:22:28 +02:00
deror1869107
2d99f7f995 Remove slice_to_array_buffer_view and update_array_buffer_view 2017-02-11 23:25:14 +08:00
Josh Matthews
baf8c5462a Make typed_array_or_sequence_to_vec support typed arrays. 2017-02-10 16:34:11 -05:00
deror1869107
6c4ce7247f Use TypedArray 2017-02-10 16:33:57 -05:00
bors-servo
aea6797a94 Auto merge of #15466 - hiei23:master, r=Wafflespeanut
-added parsing and serialization for grid-{row,column}-gap

<!-- Please describe your changes on the following line: -->
I have added an implementation for grid-{row,column}-gap based on the predefined type property suggestion in the description

---
<!-- 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 #15310 (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. -->

<!-- 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/15466)
<!-- Reviewable:end -->
2017-02-10 11:28:28 -08:00
Bobby Holley
1f4f099efe Clean up and simplify the accumulation of restyle damage. 2017-02-10 10:34:28 -08:00
Bobby Holley
0e3aeac922 Stop returning rule nodes from match_element and overhaul style calculation logic. 2017-02-10 10:34:28 -08:00
Bobby Holley
5873de3fb6 Allow the ComputedValues in ComputedStyle to be null.
This is necessary to start synthesizing the styles in match_element and avoid
round-tripping them through the caller.
2017-02-10 10:34:27 -08:00
Bobby Holley
1c530f9279 Hoist style sharing cache handling to the top of compute_style. 2017-02-10 10:34:27 -08:00
Bobby Holley
095265affe Hoist some work out of the tail of compute_style into the caller.
This is really part of the "recalc" rather than the "compute" work. But more to
the point, it lets us early-return on the style-sharing stuff (see the next patch).
2017-02-10 10:34:27 -08:00
hiei23
0701227906 -added parsing and serialization for grid-{row,column}-gap
updated missing products='gecko' in grid-row-gap and grip-column-gap
2017-02-10 13:10:16 -05:00
bors-servo
401a55e172 Auto merge of #15493 - BorisChiou:animation/get_property, r=Manishearth
stylo: Add Servo_AnimationValue_Serialize

This is the servo-side change for [bug 1337313](https://bugzilla.mozilla.org/show_bug.cgi?id=1337313). @Manishearth had already reviewed it there. Please merge this patch until the gecko-side changes for [bug 1337313](https://bugzilla.mozilla.org/show_bug.cgi?id=1337313) 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 1337313](https://bugzilla.mozilla.org/show_bug.cgi?id=1337313).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

<!-- 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/15493)
<!-- Reviewable:end -->
2017-02-10 01:34:07 -08:00
Boris Chiou
fe1c2af406 Bug 1337313 - Add Servo_AnimationValue_Serialize. r=manishearth 2017-02-10 14:01:44 +08:00
Cameron McCormack
2dc9166256 stylo: Remove Servo_Element_ShouldTraverse. 2017-02-10 10:24:04 +08:00
Cameron McCormack
57e1b25cbd stylo: Make Servo_TraverseSubtree return whether a post-traversal is required.
MozReview-Commit-ID: 8EWxdt0pZ6W
2017-02-10 10:24:01 +08:00
Cameron McCormack
10994ea758 stylo: Call Gecko_SetOwnerDocumentNeedsStyleFlush after setting has_dirty_descendants on a style root. 2017-02-10 10:23:55 +08:00
bors-servo
e985ad5422 Auto merge of #15463 - Manishearth:buncha-props, r=mbrubeck
stylo: Implement a bunch of properties

r? @mbrubeck or @heycam

<!-- 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/15463)
<!-- Reviewable:end -->
2017-02-09 15:51:29 -08:00
Manish Goregaokar
779d936698 fixup! stylo: Implement scroll-snap-destination 2017-02-09 15:09:39 -08:00
Manish Goregaokar
78dc5f6aa9 stylo: Implement -moz-image-region
MozReview-Commit-ID: E6Iir2hWlbG
2017-02-09 15:09:37 -08:00
Manish Goregaokar
6b0d3902de Factor out ClipRect type into values; use Either for clip
MozReview-Commit-ID: C3R1erJdiID
2017-02-09 15:09:35 -08:00
Manish Goregaokar
8b7bb97aa9 stylo: Implement object-position
MozReview-Commit-ID: 6mr4ktfeEGT
2017-02-09 15:09:32 -08:00
Manish Goregaokar
3266b5b31f stylo: Implement outline-offset
MozReview-Commit-ID: 6mr4ktfeEGT
2017-02-09 15:09:30 -08:00
Manish Goregaokar
20796ee94e stylo: Implement scroll-snap-coordinate
MozReview-Commit-ID: 6mr4ktfeEGT
2017-02-09 15:09:27 -08:00
bors-servo
ce7827eadf Auto merge of #15454 - jlevesy:bg-size-reject-negative-values, r=SimonSapin
use `::parse_non_negative instead` of `::parse` for background_size property parsing

Use  `::parse_non_negative` instead of `::parse` for background_size property parsing

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

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

<!-- 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/15454)
<!-- Reviewable:end -->
2017-02-09 14:55:14 -08:00
Julien Levesy
3da559488d use ::parse_non_negative instead of ::parse for background_size parsing 2017-02-09 23:47:29 +01:00
Manish Goregaokar
a095565a8c stylo: Implement scroll-snap-destination
MozReview-Commit-ID: 6mr4ktfeEGT
2017-02-09 10:54:19 -08:00
Manish Goregaokar
3b59dbadee stylo: Implement -moz-stack-sizing
MozReview-Commit-ID: 6mr4ktfeEGT
2017-02-09 10:16:36 -08:00
Manish Goregaokar
7e4f788172 stylo: Implement tab-size
MozReview-Commit-ID: DNmtu1hm8u1
2017-02-09 10:16:33 -08:00
Manish Goregaokar
30deaab48a stylo: Implement text-emphasis-position
MozReview-Commit-ID: Lg9kDrZJpXl
2017-02-09 10:16:31 -08:00
Manish Goregaokar
2410591119 Implement -moz-window-dragging
MozReview-Commit-ID: Ed6qYsOi5Ix
2017-02-09 10:16:29 -08:00
bors-servo
3d0fe9a0dd Auto merge of #15475 - kekkyojin:bb15436, r=jdm
Only expose Storage/StorageEvent in Window

<!-- Please describe your changes on the following line: -->
This patch removes Worker scope from Storage and StorageEvent WebIDL definition. This way it is possible to construct the objects passing Window instead of GlobalScope. It also removes some tests as they would run out of the scope.

It removes Worker from the WebIDL files defining the Storage and StorageEvent interfaces, as they should not be exposed in that scope.

In Rust source code, this patch replaces "GlobalScope" with "Window" on the contructors. It also modifies constructor calling code in order to pass Window instead of the previously used GlobalScope.

There has been removed these interfaces from the Worker tests.

(This time I did a real build and real tests. Sorry about previous pull requests, I am used to the Mozilla flow, which doesn't uses GitHub)

---
<!-- 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 #15436 (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. -->

<!-- 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/15475)
<!-- Reviewable:end -->
2017-02-09 08:17:53 -08:00
Javier Rueda
1aeca9c255 Only expose Storage/StorageEvent in Window 2017-02-09 15:34:24 +01:00
bors-servo
384391da68 Auto merge of #15469 - stshine:no-integer-overflow, r=emilio
layout: Fix integer overflow when computing size of replace elements

<!-- Please describe your changes on the following line: -->

When calculating size of replaced element that has intrinsic aspect ratio, we need to multiply the ratio if one of the dimensions has definite size. And we can not precompute the ratio and store it as a float, because doing so may result one pixel difference in calculation for certain images, thus make some tests fail. So it may overflow when the dimension lengths are large, and this pull request convert them to `i64` before multiplication.

---
<!-- 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 #15249 (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. -->

<!-- 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/15469)
<!-- Reviewable:end -->
2017-02-09 06:21:29 -08:00
bors-servo
6d1836e32b Auto merge of #15459 - emilio:ua-rules, r=SimonSapin
style: Ensure that precomputed pseudo-element declarations are correctly sorted.

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

r? @SimonSapin

<!-- 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/15459)
<!-- Reviewable:end -->
2017-02-09 04:20:34 -08:00
Emilio Cobos Álvarez
db26ef9acb
style: Ensure that precomputed pseudo-element declarations are correctly sorted. 2017-02-09 13:20:09 +01:00
Nazım Can Altınova
adb6d20293 Box DeclaredValue::WithVariables 2017-02-09 11:10:10 +01:00
Nazım Can Altınova
43731c5757 Box custom property 2017-02-09 11:10:09 +01:00
Nazım Can Altınova
78afe2b8d1 Box larger specified values to avoid memmove impact 2017-02-09 11:10:08 +01:00
Nazım Can Altınova
abc40f61c0 Replace NoViewportPercentage with a macro 2017-02-09 10:41:16 +01:00
Pu Xingyu
31ad3b2949 layout: Fix integer overflow when computing size of replace elements 2017-02-09 17:08:13 +08:00
bors-servo
368af6f861 Auto merge of #15357 - dashed:gh-15207, r=Wafflespeanut,emilio
Refactor outline-style to accept "auto" value in addition to border-style values.

Fixes https://github.com/servo/servo/issues/15207

Refactored as per https://github.com/servo/servo/issues/15207#issuecomment-275171590 .

<!-- Please describe your changes on the following line: -->

- [x] Correct refactor? I'd appreciate any feedback on this.
- [x] ~~~proper borderstyle value for `outline-style: auto;`?~~~ ~~~(EDIT: deferred to a `FIXME`)~~~ (EDIT2: it is now solid for behaviour parity with firefox)
- [x] squash pending PR review
- [x] mako code review

---
<!-- 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 #15207 (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. -->

<!-- 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/15357)
<!-- Reviewable:end -->
2017-02-08 21:10:57 -08:00
Alberto Leal
09d4751054 Refactor outline-style to accept "auto" value in addition to border-style values.
Fixes https://github.com/servo/servo/issues/15207
2017-02-08 23:13:20 -05:00
bors-servo
cbfd446427 Auto merge of #15462 - bholley:accumulate_selector_flags, r=emilio
Accumulate parent elements that need selector bits set on the ThreadLocalStyleContext

Discussion and review in https://bugzilla.mozilla.org/show_bug.cgi?id=1336646

<!-- 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/15462)
<!-- Reviewable:end -->
2017-02-08 19:33:27 -08:00
Bobby Holley
9e860df9df Bug 1336646 - Apply selector flags during traversal. r=emilio 2017-02-08 19:21:05 -08:00
bors-servo
11c86b82f6 Auto merge of #15442 - BorisChiou:animation/opacity_transform, r=Manishearth
Retrieve the opacity and the transform list from RawServoAnimationValue

These are the servo-side changes for [bug 1335942](https://bugzilla.mozilla.org/show_bug.cgi?id=1335942). @Manishearth had already reviewed them there. Please merge these patches until the gecko-side changes for [bug 1335942](https://bugzilla.mozilla.org/show_bug.cgi?id=1335942) 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 1335942](https://bugzilla.mozilla.org/show_bug.cgi?id=1335942).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

<!-- 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/15442)
<!-- Reviewable:end -->
2017-02-08 18:39:45 -08:00
Bobby Holley
37b8d5231d Bug 1336646 - Move opts check for statistics into should_dump. r=emilio
This makes things more consistent between the parallel and sequential traversal drivers.
2017-02-08 17:09:41 -08:00
Bobby Holley
e7a8f5ec30 Bug 1336646 - Use the bloom filter for manual style resolves and pass a mutable StyleContext into match_element. r=emilio
We need to do something here to avoid a double-borrow when passing a mutable
StyleContext to match_element. After some discussion on IRC, we decided that
building the bloom filter for this case is probably worthwhile.
2017-02-08 17:09:35 -08:00