Commit graph

6718 commits

Author SHA1 Message Date
Boris Chiou
7ed37d27d8 Bug 1338087 - Drop Servo_RestyleWithAddedDeclaration. r=manishearth
MozReview-Commit-ID: KnhvwYsR7Pf
2017-02-13 12:54:38 +08:00
Alon Levy
48bb508f66 fix #15492 2017-02-12 07:22:28 +02: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
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
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
bors-servo
8aec1ccdd2 Auto merge of #15447 - bholley:in_tree_selectors, r=SimonSapin
Move rust-selectors into servo/servo

See the thread at [1].

[1] https://groups.google.com/d/msg/mozilla.dev.servo/iHykieVC5SM/Z31_n0agBAAJ

<!-- 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/15447)
<!-- Reviewable:end -->
2017-02-08 16:06:06 -08:00
bors-servo
287b02e21f Auto merge of #15360 - atheed:font-weight-keyword, r=emilio
Ensured all font-weight keywords are preserved until computed-value time

Fixed the serialization of `font-weight` keywords (i.e. `bold`, `normal`, etc.) to ensure that Servo preserves the keyword until computed-value time (just as other major browsers do).

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

<!-- 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/15360)
<!-- Reviewable:end -->
2017-02-08 11:04:29 -08:00
Atheed Thameem
17c74cf967 fix to ensure all font-weight keywords are preserved 2017-02-08 13:39:37 -05:00
Bobby Holley
8915e53cee Move rust-selectors in-tree. 2017-02-07 22:53:10 -08:00
bors-servo
8ca1383c41 Auto merge of #15418 - upsuper:blockify-flow-root, r=emilio
Not blockify flow-root

<!-- 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/15418)
<!-- Reviewable:end -->
2017-02-07 22:48:48 -08:00
bors-servo
f7e75fd001 Auto merge of #15440 - KiChjang:selectors, r=KiChjang
Update selectors to 0.17

Closes #15434.
2017-02-07 20:36:59 -08:00
Anthony Ramine
55b2c5c1bd Update selectors to 0.17 2017-02-07 20:33:35 -08:00
Boris Chiou
873cb98302 Bug 1335942 - Part 3: Support GetTransform FFI. r=manishearth 2017-02-08 12:32:25 +08:00
Boris Chiou
22d04e1a16 Bug 1335942 - Part 2: Support GetOpacity FFI. r=manishearth 2017-02-08 12:32:19 +08:00